docs: update swagger

This commit is contained in:
2025-11-23 13:47:38 +01:00
parent 9c67cd2a47
commit 964785e494
3 changed files with 46 additions and 44 deletions

View File

@@ -1370,7 +1370,7 @@ const docTemplate = `{
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/handlers.VoteRequest"
"$ref": "#/definitions/dto.VoteRequest"
}
}
],
@@ -2018,6 +2018,22 @@ const docTemplate = `{
}
}
},
"dto.VoteRequest": {
"type": "object",
"required": [
"type"
],
"properties": {
"type": {
"type": "string",
"enum": [
"up",
"down",
"none"
]
}
}
},
"handlers.APIInfo": {
"type": "object",
"properties": {
@@ -2150,21 +2166,6 @@ const docTemplate = `{
}
}
},
"handlers.VoteRequest": {
"description": "Vote request with type field. All votes are handled the same way.",
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"up",
"down",
"none"
],
"example": "up"
}
}
},
"handlers.VoteResponse": {
"type": "object",
"properties": {

View File

@@ -1367,7 +1367,7 @@
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/handlers.VoteRequest"
"$ref": "#/definitions/dto.VoteRequest"
}
}
],
@@ -2015,6 +2015,22 @@
}
}
},
"dto.VoteRequest": {
"type": "object",
"required": [
"type"
],
"properties": {
"type": {
"type": "string",
"enum": [
"up",
"down",
"none"
]
}
}
},
"handlers.APIInfo": {
"type": "object",
"properties": {
@@ -2147,21 +2163,6 @@
}
}
},
"handlers.VoteRequest": {
"description": "Vote request with type field. All votes are handled the same way.",
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"up",
"down",
"none"
],
"example": "up"
}
}
},
"handlers.VoteResponse": {
"type": "object",
"properties": {

View File

@@ -140,6 +140,17 @@ definitions:
required:
- username
type: object
dto.VoteRequest:
properties:
type:
enum:
- up
- down
- none
type: string
required:
- type
type: object
handlers.APIInfo:
properties:
data: {}
@@ -230,17 +241,6 @@ definitions:
success:
type: boolean
type: object
handlers.VoteRequest:
description: Vote request with type field. All votes are handled the same way.
properties:
type:
enum:
- up
- down
- none
example: up
type: string
type: object
handlers.VoteResponse:
properties:
data: {}
@@ -1121,7 +1121,7 @@ paths:
name: request
required: true
schema:
$ref: '#/definitions/handlers.VoteRequest'
$ref: '#/definitions/dto.VoteRequest'
produces:
- application/json
responses: