feat: service/controller prototype

This commit is contained in:
2025-06-19 18:37:19 +03:00
parent 912470b6e2
commit 87878f15a3
12 changed files with 258 additions and 12 deletions

View File

@@ -50,7 +50,25 @@ const docTemplate = `{
"Auth"
],
"summary": "Acquire tokens via login credentials (and 2FA code if needed)",
"responses": {}
"parameters": [
{
"description": "desc",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/models.LoginRequest"
}
}
],
"responses": {
"200": {
"description": "desc",
"schema": {
"$ref": "#/definitions/models.LoginResponse"
}
}
}
}
},
"/auth/passwordResetBegin": {
@@ -230,7 +248,7 @@ const docTemplate = `{
"summary": "Get health status",
"responses": {
"200": {
"description": "desc",
"description": "Says whether it's healthy or not",
"schema": {
"$ref": "#/definitions/controllers.HealthStatus"
}
@@ -247,6 +265,31 @@ const docTemplate = `{
"type": "boolean"
}
}
},
"models.LoginRequest": {
"type": "object",
"properties": {
"password": {
"type": "string"
},
"totp": {
"type": "string"
},
"username": {
"type": "string"
}
}
},
"models.LoginResponse": {
"type": "object",
"properties": {
"access_token": {
"type": "string"
},
"refresh_token": {
"type": "string"
}
}
}
},
"securityDefinitions": {