feat(docs): New swagger doc
This commit is contained in:
117
docs/docs.go
117
docs/docs.go
@@ -42,6 +42,33 @@ const docTemplate = `{
|
||||
"responses": {}
|
||||
}
|
||||
},
|
||||
"/certificates": {
|
||||
"post": {
|
||||
"description": "Generate certificates based on the provided data",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/pdf"
|
||||
],
|
||||
"tags": [
|
||||
"certificates"
|
||||
],
|
||||
"summary": "Generate runner certificates",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "Certificate data",
|
||||
"name": "data",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/models.CertificateRequest"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {}
|
||||
}
|
||||
},
|
||||
"/contracts": {
|
||||
"post": {
|
||||
"description": "Generate a contract based on the provided data",
|
||||
@@ -106,6 +133,24 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"models.CertificateRequest": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"locale": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"en",
|
||||
"de"
|
||||
]
|
||||
},
|
||||
"runners": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/models.RunnerWithDonations"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"models.ContractRequest": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@@ -124,6 +169,43 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"models.DistanceDonation": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"amount": {
|
||||
"type": "integer"
|
||||
},
|
||||
"amount_per_distance": {
|
||||
"type": "integer"
|
||||
},
|
||||
"donor": {
|
||||
"$ref": "#/definitions/models.Donor"
|
||||
},
|
||||
"id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"paid_amount": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"models.Donor": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"first_name": {
|
||||
"type": "string"
|
||||
},
|
||||
"id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"last_name": {
|
||||
"type": "string"
|
||||
},
|
||||
"middle_name": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"models.Group": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@@ -157,6 +239,41 @@ const docTemplate = `{
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"models.RunnerWithDonations": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"distance": {
|
||||
"type": "integer"
|
||||
},
|
||||
"distance_donations": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/models.DistanceDonation"
|
||||
}
|
||||
},
|
||||
"first_name": {
|
||||
"type": "string"
|
||||
},
|
||||
"group": {
|
||||
"$ref": "#/definitions/models.Group"
|
||||
},
|
||||
"id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"last_name": {
|
||||
"type": "string"
|
||||
},
|
||||
"middle_name": {
|
||||
"type": "string"
|
||||
},
|
||||
"total_donations": {
|
||||
"type": "integer"
|
||||
},
|
||||
"total_per_distance": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}`
|
||||
|
||||
Reference in New Issue
Block a user