Improved swagger docs for QR code endpoint

This commit is contained in:
Alejandro Celaya 2021-07-13 13:53:10 +02:00
parent d6e155d874
commit 01e06f0503

View file

@ -5,7 +5,7 @@
"URL Shortener" "URL Shortener"
], ],
"summary": "Short URL QR code", "summary": "Short URL QR code",
"description": "Generates a QR code image pointing to a short URL", "description": "Generates a QR code image pointing to a short URL.<br />Since this is not an API endpoint but an image one, when an invalid value is provided for any of the query params, they will fall to their default values instead of throwing an error.",
"parameters": [ "parameters": [
{ {
"name": "shortCode", "name": "shortCode",
@ -35,7 +35,8 @@
"required": false, "required": false,
"schema": { "schema": {
"type": "string", "type": "string",
"enum": ["png", "svg"] "enum": ["png", "svg"],
"default": "png"
} }
}, },
{ {
@ -56,7 +57,8 @@
"required": false, "required": false,
"schema": { "schema": {
"type": "string", "type": "string",
"enum": ["L", "M", "Q", "H"] "enum": ["L", "M", "Q", "H"],
"default": "L"
} }
} }
], ],