{ "swagger": "2.0", "info": { "description": "API for managing job scraping operations", "title": "Jobs Scraper API", "contact": {}, "version": "1.0" }, "basePath": "/", "paths": { "/jobs": { "post": { "description": "Creates a new job with the provided specifications", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "jobs" ], "summary": "Create a new job", "parameters": [ { "description": "Job creation data", "name": "job", "in": "body", "required": true, "schema": { "$ref": "#/definitions/ports.CreateJobCommand" } } ], "responses": { "201": { "description": "Successfully created job", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "400": { "description": "Invalid request data", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "500": { "description": "Internal server error", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } } } }, "/jobs/analysis": { "get": { "description": "Retrieves all job analysis results from the database", "produces": [ "application/json" ], "tags": [ "jobs" ], "summary": "Get all job analysis results", "responses": { "200": { "description": "List of job analysis results", "schema": { "type": "array", "items": { "$ref": "#/definitions/domain.JobAnalysisResult" } } }, "500": { "description": "Internal server error", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } } } }, "/jobs/analysis/top-matches": { "get": { "description": "Retrieves jobs with high analysis match scores", "produces": [ "application/json" ], "tags": [ "jobs" ], "summary": "Get top matching jobs", "parameters": [ { "type": "integer", "description": "Minimum match score (default: 70)", "name": "min_score", "in": "query" } ], "responses": { "200": { "description": "List of top matching job analysis results", "schema": { "type": "array", "items": { "$ref": "#/definitions/domain.JobAnalysisResult" } } }, "400": { "description": "Invalid minimum score", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "500": { "description": "Internal server error", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } } } }, "/jobs/{id}/analysis": { "get": { "description": "Retrieves the analysis result for a specific job", "produces": [ "application/json" ], "tags": [ "jobs" ], "summary": "Get job analysis result by job ID", "parameters": [ { "type": "integer", "description": "Job ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "Job analysis result", "schema": { "$ref": "#/definitions/domain.JobAnalysisResult" } }, "400": { "description": "Invalid job ID", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "404": { "description": "Analysis result not found", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "500": { "description": "Internal server error", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } } } } }, "definitions": { "domain.JobAnalysisResult": { "type": "object", "properties": { "analysisResult": { "type": "string" }, "analyzedAt": { "type": "string" }, "id": { "type": "integer", "format": "int64" }, "jobID": { "type": "integer", "format": "int64" }, "keySkills": { "type": "array", "items": { "type": "string" } }, "matchScore": { "type": "integer" }, "missingSkills": { "type": "array", "items": { "type": "string" } }, "recommendations": { "type": "string" } } }, "domain.JobProvider": { "type": "integer", "enum": [ 0, 1, 2, 3, 4, 5 ], "x-enum-varnames": [ "LinkedIn", "Indeed", "Glassdoor", "Bayt", "TokyoDev", "JapanDev" ] }, "ports.CreateJobCommand": { "type": "object", "properties": { "fwt": { "type": "string" }, "keywords": { "type": "string" }, "location": { "type": "string" }, "numPages": { "type": "integer" }, "provider": { "$ref": "#/definitions/domain.JobProvider" } } } } }