gohorsejobs/backend/docs/docs.go
2025-12-14 16:40:29 -03:00

532 lines
16 KiB
Go

// Package docs Code generated by swaggo/swag. DO NOT EDIT
package docs
import "github.com/swaggo/swag"
const docTemplate = `{
"schemes": {{ marshal .Schemes }},
"swagger": "2.0",
"info": {
"description": "{{escape .Description}}",
"title": "{{.Title}}",
"contact": {},
"version": "{{.Version}}"
},
"host": "{{.Host}}",
"basePath": "{{.BasePath}}",
"paths": {
"/jobs": {
"get": {
"description": "Get a paginated list of job postings with optional filters",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Jobs"
],
"summary": "List all jobs",
"parameters": [
{
"type": "integer",
"description": "Page number (default: 1)",
"name": "page",
"in": "query"
},
{
"type": "integer",
"description": "Items per page (default: 10, max: 100)",
"name": "limit",
"in": "query"
},
{
"type": "integer",
"description": "Filter by company ID",
"name": "companyId",
"in": "query"
},
{
"type": "boolean",
"description": "Filter by featured status",
"name": "featured",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/dto.PaginatedResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"type": "string"
}
}
}
},
"post": {
"description": "Create a new job posting",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Jobs"
],
"summary": "Create a new job",
"parameters": [
{
"description": "Job data",
"name": "job",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/dto.CreateJobRequest"
}
}
],
"responses": {
"201": {
"description": "Created",
"schema": {
"$ref": "#/definitions/models.Job"
}
},
"400": {
"description": "Bad Request",
"schema": {
"type": "string"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"type": "string"
}
}
}
}
},
"/jobs/{id}": {
"get": {
"description": "Get a single job posting by its ID",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Jobs"
],
"summary": "Get job by ID",
"parameters": [
{
"type": "integer",
"description": "Job ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/models.Job"
}
},
"400": {
"description": "Bad Request",
"schema": {
"type": "string"
}
},
"404": {
"description": "Not Found",
"schema": {
"type": "string"
}
}
}
},
"put": {
"description": "Update an existing job posting",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Jobs"
],
"summary": "Update a job",
"parameters": [
{
"type": "integer",
"description": "Job ID",
"name": "id",
"in": "path",
"required": true
},
{
"description": "Updated job data",
"name": "job",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/dto.UpdateJobRequest"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/models.Job"
}
},
"400": {
"description": "Bad Request",
"schema": {
"type": "string"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"type": "string"
}
}
}
},
"delete": {
"description": "Delete a job posting",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Jobs"
],
"summary": "Delete a job",
"parameters": [
{
"type": "integer",
"description": "Job ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"204": {
"description": "No Content"
},
"400": {
"description": "Bad Request",
"schema": {
"type": "string"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"type": "string"
}
}
}
}
}
},
"definitions": {
"dto.CreateJobRequest": {
"type": "object",
"required": [
"companyId",
"description",
"title"
],
"properties": {
"benefits": {
"type": "object",
"additionalProperties": true
},
"cityId": {
"type": "integer"
},
"companyId": {
"type": "integer"
},
"description": {
"type": "string",
"minLength": 20
},
"employmentType": {
"type": "string",
"enum": [
"full-time",
"part-time",
"dispatch",
"contract"
]
},
"languageLevel": {
"type": "string"
},
"location": {
"type": "string"
},
"regionId": {
"type": "integer"
},
"requirements": {
"type": "object",
"additionalProperties": true
},
"salaryMax": {
"type": "number"
},
"salaryMin": {
"type": "number"
},
"salaryType": {
"type": "string",
"enum": [
"hourly",
"monthly",
"yearly"
]
},
"status": {
"type": "string",
"enum": [
"draft",
"open",
"closed"
]
},
"title": {
"type": "string",
"maxLength": 255,
"minLength": 5
},
"visaSupport": {
"type": "boolean"
},
"workingHours": {
"type": "string"
}
}
},
"dto.PaginatedResponse": {
"type": "object",
"properties": {
"data": {},
"pagination": {
"$ref": "#/definitions/dto.Pagination"
}
}
},
"dto.Pagination": {
"type": "object",
"properties": {
"limit": {
"type": "integer"
},
"page": {
"type": "integer"
},
"total": {
"type": "integer"
}
}
},
"dto.UpdateJobRequest": {
"type": "object",
"properties": {
"benefits": {
"type": "object",
"additionalProperties": true
},
"cityId": {
"type": "integer"
},
"description": {
"type": "string",
"minLength": 20
},
"employmentType": {
"type": "string",
"enum": [
"full-time",
"part-time",
"dispatch",
"contract"
]
},
"languageLevel": {
"type": "string"
},
"location": {
"type": "string"
},
"regionId": {
"type": "integer"
},
"requirements": {
"type": "object",
"additionalProperties": true
},
"salaryMax": {
"type": "number"
},
"salaryMin": {
"type": "number"
},
"salaryType": {
"type": "string",
"enum": [
"hourly",
"monthly",
"yearly"
]
},
"status": {
"type": "string",
"enum": [
"draft",
"open",
"closed"
]
},
"title": {
"type": "string",
"maxLength": 255,
"minLength": 5
},
"visaSupport": {
"type": "boolean"
},
"workingHours": {
"type": "string"
}
}
},
"models.JSONMap": {
"type": "object",
"additionalProperties": true
},
"models.Job": {
"type": "object",
"properties": {
"benefits": {
"$ref": "#/definitions/models.JSONMap"
},
"cityId": {
"type": "integer"
},
"companyId": {
"type": "integer"
},
"createdAt": {
"description": "Metadata",
"type": "string"
},
"createdBy": {
"type": "integer"
},
"description": {
"type": "string"
},
"employmentType": {
"description": "Employment",
"type": "string"
},
"id": {
"type": "integer"
},
"isFeatured": {
"description": "Featured job flag",
"type": "boolean"
},
"languageLevel": {
"description": "N5-N1, beginner, none",
"type": "string"
},
"location": {
"description": "Location",
"type": "string"
},
"regionId": {
"type": "integer"
},
"requirements": {
"description": "Requirements \u0026 Benefits (JSONB arrays)",
"allOf": [
{
"$ref": "#/definitions/models.JSONMap"
}
]
},
"salaryMax": {
"type": "number"
},
"salaryMin": {
"description": "Salary",
"type": "number"
},
"salaryType": {
"description": "hourly, monthly, yearly",
"type": "string"
},
"status": {
"description": "Status",
"type": "string"
},
"title": {
"description": "Job Details",
"type": "string"
},
"updatedAt": {
"type": "string"
},
"visaSupport": {
"description": "Visa \u0026 Language",
"type": "boolean"
},
"workingHours": {
"type": "string"
}
}
}
}
}`
// SwaggerInfo holds exported Swagger Info so clients can modify it
var SwaggerInfo = &swag.Spec{
Version: "1.0",
Host: "localhost:8080",
BasePath: "/",
Schemes: []string{},
Title: "GoHorseJobs API",
Description: "API for GoHorseJobs recruitment platform.",
InfoInstanceName: "swagger",
SwaggerTemplate: docTemplate,
LeftDelim: "{{",
RightDelim: "}}",
}
func init() {
swag.Register(SwaggerInfo.InstanceName(), SwaggerInfo)
}