feat(docs): New swagger doc

This commit is contained in:
2024-12-09 17:29:31 +01:00
parent 11a9b51197
commit f5debf58fc
3 changed files with 311 additions and 0 deletions

View File

@@ -22,6 +22,18 @@ definitions:
- de
type: string
type: object
models.CertificateRequest:
properties:
locale:
enum:
- en
- de
type: string
runners:
items:
$ref: '#/definitions/models.RunnerWithDonations'
type: array
type: object
models.ContractRequest:
properties:
locale:
@@ -34,6 +46,30 @@ definitions:
$ref: '#/definitions/models.Runner'
type: array
type: object
models.DistanceDonation:
properties:
amount:
type: integer
amount_per_distance:
type: integer
donor:
$ref: '#/definitions/models.Donor'
id:
type: integer
paid_amount:
type: integer
type: object
models.Donor:
properties:
first_name:
type: string
id:
type: integer
last_name:
type: string
middle_name:
type: string
type: object
models.Group:
properties:
id:
@@ -56,6 +92,29 @@ definitions:
middle_name:
type: string
type: object
models.RunnerWithDonations:
properties:
distance:
type: integer
distance_donations:
items:
$ref: '#/definitions/models.DistanceDonation'
type: array
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
type: object
info:
contact: {}
description: This is the API documentation for the LfK Document Server - a tool
@@ -80,6 +139,24 @@ paths:
summary: Generate runner cards
tags:
- cards
/certificates:
post:
consumes:
- application/json
description: Generate certificates based on the provided data
parameters:
- description: Certificate data
in: body
name: data
required: true
schema:
$ref: '#/definitions/models.CertificateRequest'
produces:
- application/pdf
responses: {}
summary: Generate runner certificates
tags:
- certificates
/contracts:
post:
consumes: