feat: service/controller prototype
This commit is contained in:
@@ -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": {
|
||||
|
||||
@@ -46,7 +46,25 @@
|
||||
"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": {
|
||||
@@ -226,7 +244,7 @@
|
||||
"summary": "Get health status",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "desc",
|
||||
"description": "Says whether it's healthy or not",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/controllers.HealthStatus"
|
||||
}
|
||||
@@ -243,6 +261,31 @@
|
||||
"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": {
|
||||
|
||||
@@ -5,6 +5,22 @@ definitions:
|
||||
healthy:
|
||||
type: boolean
|
||||
type: object
|
||||
models.LoginRequest:
|
||||
properties:
|
||||
password:
|
||||
type: string
|
||||
totp:
|
||||
type: string
|
||||
username:
|
||||
type: string
|
||||
type: object
|
||||
models.LoginResponse:
|
||||
properties:
|
||||
access_token:
|
||||
type: string
|
||||
refresh_token:
|
||||
type: string
|
||||
type: object
|
||||
info:
|
||||
contact: {}
|
||||
description: Easy and feature-rich wishlist.
|
||||
@@ -29,9 +45,20 @@ paths:
|
||||
post:
|
||||
consumes:
|
||||
- application/json
|
||||
parameters:
|
||||
- description: desc
|
||||
in: body
|
||||
name: request
|
||||
required: true
|
||||
schema:
|
||||
$ref: '#/definitions/models.LoginRequest'
|
||||
produces:
|
||||
- application/json
|
||||
responses: {}
|
||||
responses:
|
||||
"200":
|
||||
description: desc
|
||||
schema:
|
||||
$ref: '#/definitions/models.LoginResponse'
|
||||
summary: Acquire tokens via login credentials (and 2FA code if needed)
|
||||
tags:
|
||||
- Auth
|
||||
@@ -148,7 +175,7 @@ paths:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: desc
|
||||
description: Says whether it's healthy or not
|
||||
schema:
|
||||
$ref: '#/definitions/controllers.HealthStatus'
|
||||
summary: Get health status
|
||||
|
||||
Reference in New Issue
Block a user