added basic swagger spec

part of #2605
This commit is contained in:
Miodec 2022-02-28 19:53:07 +01:00
parent af94af3667
commit 2c05a1ccc1

50
backend/swagger.json Normal file
View file

@ -0,0 +1,50 @@
{
"swagger": "2.0",
"info": {
"version": "1.0.0",
"title": "Monkeytype",
"termsOfService": "http://monkeytype.com/terms-of-service",
"contact": {
"name": "Developer",
"email": "jack@monkeytype.com"
}
},
"host": "api.monkeytype.com",
"basePath": "/",
"schemes": ["https"],
"consumes": ["application/json"],
"produces": ["application/json"],
"paths": {
"/users": {
"get": {
"description": "Returns user data",
"produces": ["application/json"],
"responses": {
"200": {
"description": "User data.",
"schema": {
"$ref": "#/definitions/Response"
}
}
}
}
}
},
"definitions": {
"Response": {
"type": "object",
"required": ["error", "message", "data"],
"properties": {
"error": {
"type": "string"
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}