feat(cards): Implement endpoint for card generation

This commit is contained in:
2024-12-03 18:44:17 +01:00
parent ed4941b403
commit 7d22a32cb4
7 changed files with 250 additions and 10 deletions

View File

@@ -1,5 +1,28 @@
definitions:
models.Contract:
models.Card:
properties:
code:
type: string
enabled:
type: boolean
id:
type: integer
runner:
$ref: '#/definitions/models.Runner'
type: object
models.CardRequest:
properties:
card:
items:
$ref: '#/definitions/models.Card'
type: array
locale:
enum:
- en
- de
type: string
type: object
models.ContractRequest:
properties:
locale:
enum:
@@ -39,6 +62,24 @@ info:
for pdf generation.
title: LfK Document Server API
paths:
/cards:
post:
consumes:
- application/json
description: Generate cards based on the provided data
parameters:
- description: Card data
in: body
name: data
required: true
schema:
$ref: '#/definitions/models.CardRequest'
produces:
- application/pdf
responses: {}
summary: Generate runner cards
tags:
- cards
/contracts:
post:
consumes:
@@ -50,7 +91,7 @@ paths:
name: data
required: true
schema:
$ref: '#/definitions/models.Contract'
$ref: '#/definitions/models.ContractRequest'
produces:
- application/pdf
responses: {}