feat(cards): Implement endpoint for card generation
This commit is contained in:
66
docs/docs.go
66
docs/docs.go
@@ -15,6 +15,33 @@ const docTemplate = `{
|
||||
"host": "{{.Host}}",
|
||||
"basePath": "{{.BasePath}}",
|
||||
"paths": {
|
||||
"/cards": {
|
||||
"post": {
|
||||
"description": "Generate cards based on the provided data",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/pdf"
|
||||
],
|
||||
"tags": [
|
||||
"cards"
|
||||
],
|
||||
"summary": "Generate runner cards",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "Card data",
|
||||
"name": "data",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/models.CardRequest"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {}
|
||||
}
|
||||
},
|
||||
"/contracts": {
|
||||
"post": {
|
||||
"description": "Generate a contract based on the provided data",
|
||||
@@ -35,7 +62,7 @@ const docTemplate = `{
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/models.Contract"
|
||||
"$ref": "#/definitions/models.ContractRequest"
|
||||
}
|
||||
}
|
||||
],
|
||||
@@ -44,7 +71,42 @@ const docTemplate = `{
|
||||
}
|
||||
},
|
||||
"definitions": {
|
||||
"models.Contract": {
|
||||
"models.Card": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"code": {
|
||||
"type": "string"
|
||||
},
|
||||
"enabled": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"runner": {
|
||||
"$ref": "#/definitions/models.Runner"
|
||||
}
|
||||
}
|
||||
},
|
||||
"models.CardRequest": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"card": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/models.Card"
|
||||
}
|
||||
},
|
||||
"locale": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"en",
|
||||
"de"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"models.ContractRequest": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"locale": {
|
||||
|
||||
Reference in New Issue
Block a user