mirror of
https://github.com/shlinkio/shlink.git
synced 2024-12-29 16:08:29 +03:00
76 lines
2.3 KiB
JSON
76 lines
2.3 KiB
JSON
{
|
|
"get": {
|
|
"operationId": "shortUrlQrCode",
|
|
"tags": [
|
|
"URL Shortener"
|
|
],
|
|
"summary": "Short URL QR code",
|
|
"description": "Generates a QR code image pointing to a short URL",
|
|
"parameters": [
|
|
{
|
|
"name": "shortCode",
|
|
"in": "path",
|
|
"description": "The short code to resolve.",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"name": "size",
|
|
"in": "query",
|
|
"description": "The size of the image to be returned.",
|
|
"required": false,
|
|
"schema": {
|
|
"type": "integer",
|
|
"minimum": 50,
|
|
"maximum": 1000,
|
|
"default": 300
|
|
}
|
|
},
|
|
{
|
|
"name": "format",
|
|
"in": "query",
|
|
"description": "The format for the QR code image, being valid values png and svg. Not providing the param or providing any other value will fall back to png.",
|
|
"required": false,
|
|
"schema": {
|
|
"type": "string",
|
|
"enum": [
|
|
"png",
|
|
"svg"
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"name": "margin",
|
|
"in": "query",
|
|
"description": "The margin around the QR code image.",
|
|
"required": false,
|
|
"schema": {
|
|
"type": "integer",
|
|
"minimum": 0,
|
|
"default": 0
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "QR code in PNG format",
|
|
"content": {
|
|
"image/png": {
|
|
"schema": {
|
|
"type": "string",
|
|
"format": "binary"
|
|
}
|
|
},
|
|
"image/svg+xml": {
|
|
"schema": {
|
|
"type": "string",
|
|
"format": "binary"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|