Skip to content

Commit

Permalink
swagger.json in api v0
Browse files Browse the repository at this point in the history
  • Loading branch information
sebiboga committed Jul 7, 2024
1 parent fd3ecd6 commit 64276c2
Showing 1 changed file with 164 additions and 0 deletions.
164 changes: 164 additions & 0 deletions v0/swagger.json
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"
}
}
}
}
}
}
}
}
}
}
}

0 comments on commit 64276c2

Please sign in to comment.