2018-12-09 08:43:56 -06:00
{
"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" ,
2020-11-27 10:47:52 -06:00
"in" : "query" ,
2018-12-09 08:43:56 -06:00
"description" : "The size of the image to be returned." ,
"required" : false ,
"schema" : {
"type" : "integer" ,
"minimum" : 50 ,
"maximum" : 1000 ,
"default" : 300
}
2020-09-21 15:48:52 -05:00
} ,
{
"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" ,
2021-07-13 06:22:50 -05:00
"enum" : [ "png" , "svg" ]
2020-09-21 15:48:52 -05:00
}
2021-02-07 01:35:52 -06:00
} ,
{
"name" : "margin" ,
"in" : "query" ,
"description" : "The margin around the QR code image." ,
"required" : false ,
"schema" : {
"type" : "integer" ,
"minimum" : 0 ,
"default" : 0
}
2021-07-13 06:22:50 -05:00
} ,
{
"name" : "errorCorrection" ,
"in" : "query" ,
"description" : "The error correction level to apply to the the QR code: **[L]**ow, **[M]**edium, **[Q]**uartile or **[H]**igh. See [docs](https://www.qrcode.com/en/about/error_correction.html)." ,
"required" : false ,
"schema" : {
"type" : "string" ,
"enum" : [ "L" , "M" , "Q" , "H" ]
}
2018-12-09 08:43:56 -06:00
}
] ,
"responses" : {
"200" : {
"description" : "QR code in PNG format" ,
"content" : {
"image/png" : {
"schema" : {
"type" : "string" ,
"format" : "binary"
}
2020-09-21 15:48:52 -05:00
} ,
"image/svg+xml" : {
"schema" : {
"type" : "string" ,
"format" : "binary"
}
2018-12-09 08:43:56 -06:00
}
}
}
}
}
}