{ "swagger": "2.0", "info": { "description": "API para gerenciamento de vagas de emprego.", "title": "API Jobs", "termsOfService": "https://api-jobs.com/terms", "contact": { "name": "Gabriel Oliveira", "url": "https://github.com/gaboliveiradev", "email": "gabriel@email.com" }, "license": { "name": "MIT", "url": "https://opensource.org/licenses/MIT" }, "version": "1.0" }, "host": "localhost:8080", "basePath": "/api/v1", "paths": { "/opening": { "post": { "description": "Create a new job opening", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Openings" ], "summary": "Create opening", "parameters": [ { "description": "Request body", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/handler.CreateOpeningRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/handler.CreateOpeningResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handler.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handler.ErrorResponse" } } } } } }, "definitions": { "handler.CreateOpeningRequest": { "type": "object", "properties": { "company": { "type": "string", "example": "Google" }, "link": { "type": "string", "example": "https://company.com/jobs/123" }, "location": { "type": "string", "example": "São Paulo - SP" }, "remote": { "type": "boolean", "example": true }, "role": { "type": "string", "example": "Senior Go Developer" }, "salary": { "type": "integer", "example": 12000 } } }, "handler.CreateOpeningResponse": { "type": "object", "properties": { "data": { "$ref": "#/definitions/schemas.OpeningResponse" }, "message": { "type": "string" } } }, "handler.ErrorResponse": { "type": "object", "properties": { "errorCode": { "type": "integer" }, "message": { "type": "string" } } }, "schemas.OpeningResponse": { "type": "object", "properties": { "company": { "type": "string" }, "createdAt": { "type": "string" }, "deletedAt": { "type": "string" }, "id": { "type": "integer" }, "link": { "type": "string" }, "location": { "type": "string" }, "remote": { "type": "boolean" }, "role": { "type": "string" }, "salary": { "type": "integer" }, "updatedAt": { "type": "string" } } } } }