153 lines
4.4 KiB
JSON
153 lines
4.4 KiB
JSON
{
|
|
"swagger": "2.0",
|
|
"info": {
|
|
"description": "This is the API documentation for the LfK Document Server - a tool for pdf generation.",
|
|
"title": "LfK Document Server API",
|
|
"contact": {}
|
|
},
|
|
"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",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/pdf"
|
|
],
|
|
"tags": [
|
|
"contracts"
|
|
],
|
|
"summary": "Generate a contract",
|
|
"parameters": [
|
|
{
|
|
"description": "Contract data",
|
|
"name": "data",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/models.ContractRequest"
|
|
}
|
|
}
|
|
],
|
|
"responses": {}
|
|
}
|
|
}
|
|
},
|
|
"definitions": {
|
|
"models.Card": {
|
|
"type": "object",
|
|
"properties": {
|
|
"code": {
|
|
"type": "string"
|
|
},
|
|
"enabled": {
|
|
"type": "boolean"
|
|
},
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"runner": {
|
|
"$ref": "#/definitions/models.Runner"
|
|
}
|
|
}
|
|
},
|
|
"models.CardRequest": {
|
|
"type": "object",
|
|
"properties": {
|
|
"cards": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/models.Card"
|
|
}
|
|
},
|
|
"locale": {
|
|
"type": "string",
|
|
"enum": [
|
|
"en",
|
|
"de"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"models.ContractRequest": {
|
|
"type": "object",
|
|
"properties": {
|
|
"locale": {
|
|
"type": "string",
|
|
"enum": [
|
|
"en",
|
|
"de"
|
|
]
|
|
},
|
|
"runners": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/models.Runner"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"models.Group": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"parent_group": {
|
|
"$ref": "#/definitions/models.Group"
|
|
}
|
|
}
|
|
},
|
|
"models.Runner": {
|
|
"type": "object",
|
|
"properties": {
|
|
"first_name": {
|
|
"type": "string"
|
|
},
|
|
"group": {
|
|
"$ref": "#/definitions/models.Group"
|
|
},
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"last_name": {
|
|
"type": "string"
|
|
},
|
|
"middle_name": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
} |