lab-development-imb/web/09/labor/workshop-api.json

119 lines
2.1 KiB
JSON

{
"openapi": "3.0.0",
"info": {
"title": "Workshop API",
"version": "1.0.0"
},
"servers": [
{
"url": "http://localhost:8080"
}
],
"paths": {
"/registrierung": {
"post": {
"summary": "Sends all information needed for registering at a workshop",
"requestBody": {
"required": false,
"content": {
"application/x-www-form-urlencoded": {
"schema": {
"$ref": "#/components/schemas/RegistrierungForm"
}
},
"application/json": {
"schema": {
"$ref": "#/components/schemas/RegistrierungForm"
}
}
}
},
"responses": {
"200": {
"description": "Success",
"content": {
"text/html": {
"schema": {
"type": "string"
}
}
}
},
"400": {
"description": "Bad Request",
"content": {
"text/plain": {
"schema": {
"type": "string",
"example": "Kein Formular gesendet"
}
}
}
}
}
}
}
},
"components": {
"schemas": {
"RegistrierungForm": {
"type": "object",
"required": [
"vorname",
"nachname",
"agb",
"format"
],
"properties": {
"vorname": {
"type": "string",
"example": "Zoya"
},
"nachname": {
"type": "string",
"example": "Akhtar"
},
"email": {
"type": "string",
"example": "z.akhtar@test.de"
},
"telefon": {
"type": "string",
"example": "Zoya"
},
"sessions": {
"type": "array",
"items": {
"type": "string",
"example": "vormittag"
},
"example": [
"vormittag",
"nachmittag"
]
},
"agb": {
"type": "string",
"enum": ["on","ja"],
"example": "on"
},
"newsletter": {
"type": "string",
"enum": ["on","ja"],
"example": "ja"
},
"equipment": {
"type": "string",
"enum": ["on","ja"],
"example": "ja"
},
"format": {
"type": "string",
"enum": ["online","praesenz"],
"example": "online"
}
}
}
}
}
}