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", "in": "body",
"required": true, "required": true,
"schema": { "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": { "handlers.APIInfo": {
"type": "object", "type": "object",
"properties": { "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": { "handlers.VoteResponse": {
"type": "object", "type": "object",
"properties": { "properties": {

View File

@@ -1367,7 +1367,7 @@
"in": "body", "in": "body",
"required": true, "required": true,
"schema": { "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": { "handlers.APIInfo": {
"type": "object", "type": "object",
"properties": { "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": { "handlers.VoteResponse": {
"type": "object", "type": "object",
"properties": { "properties": {

View File

@@ -140,6 +140,17 @@ definitions:
required: required:
- username - username
type: object type: object
dto.VoteRequest:
properties:
type:
enum:
- up
- down
- none
type: string
required:
- type
type: object
handlers.APIInfo: handlers.APIInfo:
properties: properties:
data: {} data: {}
@@ -230,17 +241,6 @@ definitions:
success: success:
type: boolean type: boolean
type: object 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: handlers.VoteResponse:
properties: properties:
data: {} data: {}
@@ -1121,7 +1121,7 @@ paths:
name: request name: request
required: true required: true
schema: schema:
$ref: '#/definitions/handlers.VoteRequest' $ref: '#/definitions/dto.VoteRequest'
produces: produces:
- application/json - application/json
responses: responses: