-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
164 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,164 @@ | ||
{ | ||
"openapi": "3.0.3", | ||
"info": { | ||
"title": "API for LOCAL ENV of peviitor.ro", | ||
"description": "API documentation", | ||
"version": "1.0" | ||
}, | ||
"servers": [ | ||
{ | ||
"url": "http://localhost:8080/api/v0" | ||
} | ||
], | ||
"paths": { | ||
"/random/": { | ||
"get": { | ||
"tags": ["General"], | ||
"summary": "Get random data", | ||
"responses": { | ||
"200": { | ||
"description": "A random job", | ||
"content": { | ||
"application/json": { | ||
"schema": { | ||
"type": "object", | ||
"properties": { | ||
"job": { | ||
"type": "integer" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"/clean/": { | ||
"post": { | ||
"tags": ["General"], | ||
"summary": "Delete jobs for a company", | ||
"requestBody": { | ||
"description": "Company name", | ||
"required": true, | ||
"content": { | ||
"application/x-www-form-urlencoded": { | ||
"schema": { | ||
"type": "object", | ||
"properties": { | ||
"company": { | ||
"type": "string" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"responses": { | ||
"200": { | ||
"description": "Deleted jobs successfully", | ||
"content": { | ||
"application/json": { | ||
"schema": { | ||
"type": "object", | ||
"properties": { | ||
"message": { | ||
"type": "string" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"/companies/": { | ||
"get": { | ||
"tags": ["General"], | ||
"summary": "Get list of companies", | ||
"parameters": [ | ||
{ | ||
"in": "query", | ||
"name": "count", | ||
"schema": { | ||
"type": "boolean" | ||
}, | ||
"description": "Whether to count the number of jobs for each company" | ||
} | ||
], | ||
"responses": { | ||
"200": { | ||
"description": "Successfully received the list of companies", | ||
"content": { | ||
"application/json": { | ||
"schema": { | ||
"type": "object", | ||
"properties": { | ||
"companies": { | ||
"type": "array" | ||
}, | ||
"total": { | ||
"type": "integer" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"/getuser/": { | ||
"get": { | ||
"tags": ["User"], | ||
"summary": "Get a user by ID", | ||
"parameters": [ | ||
{ | ||
"name": "user", | ||
"in": "query", | ||
"required": true, | ||
"description": "The ID of the user", | ||
"schema": { | ||
"type": "string" | ||
} | ||
} | ||
], | ||
"responses": { | ||
"200": { | ||
"description": "Successfully retrieved the user", | ||
"content": { | ||
"application/json": { | ||
"schema": { | ||
"type": "object" | ||
} | ||
} | ||
} | ||
}, | ||
"404": { | ||
"description": "No user found", | ||
"content": {} | ||
}, | ||
"503": { | ||
"description": "Service Unavailable. SOLR server is down or your call to Solr failed", | ||
"content": { | ||
"application/json": { | ||
"schema": { | ||
"type": "object", | ||
"properties": { | ||
"error": { | ||
"type": "string" | ||
}, | ||
"code": { | ||
"type": "integer" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |