diane-fileserver/src/api/v1/swagger/swagger.json

137 lines
3.2 KiB
JSON

{
"openapi": "3.0.0",
"info": {
"title": "Express Typescript Rest Api",
"description": "Express Typescript Rest Api",
"termsOfService": "https://github.com/giuseppealbrizio/express-typescript-rest-api",
"contact": {
"email": "g.albrizio@gmail.com"
},
"license": {
"name": "MIT",
"url": "https://opensource.org/licenses/MIT"
},
"version": "1.0.0"
},
"externalDocs": {
"description": "Find out more about this template",
"url": "https://github.com/giuseppealbrizio"
},
"servers": [
{
"url": "http://localhost:3000/api/v1"
},
{
"url": "http://localhost:3000/api/v1"
}
],
"tags": [
{
"name": "App",
"description": "App routes"
}
],
"paths": {
"/app": {
"get": {
"tags": ["App"],
"summary": "App router",
"operationId": "appTest",
"responses": {
"200": {
"description": "successful operation",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"status": {
"type": "string"
},
"message": {
"type": "string"
}
}
}
}
}
},
"400": {
"description": "Missing credentials",
"content": {}
},
"401": {
"description": "Invalid token, please log in or sign up",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"status": {
"type": "string"
},
"error": {
"type": "object",
"properties": {
"message": {
"type": "string"
},
"trace": {
"type": "object",
"properties": {
"statusCode": {
"type": "number"
}
}
}
}
}
}
}
}
}
}
},
"security": [
{
"bearerAuth": []
}
],
"x-codegen-request-body-name": "body"
}
}
},
"components": {
"schemas": {
"App": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"format": "int64"
},
"username": {
"type": "string"
},
"email": {
"type": "string"
},
"password": {
"type": "string"
}
},
"xml": {
"name": "User"
}
}
},
"securitySchemes": {
"bearerAuth": {
"type": "http",
"scheme": "bearer",
"bearerFormat": "JWT"
}
}
}
}