You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/main/kotlin/ch/pontius/swissqr/api/handlers/qr/Generate.kt
+8-8Lines changed: 8 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -23,7 +23,7 @@ import java.math.BigDecimal
23
23
path ="/api/qr/simple/{type}",
24
24
methods = [HttpMethod.GET],
25
25
pathParams = [
26
-
OpenApiParam("type", OutputSize::class, "Type of generated invoice. Can either be A4_PORTRAIT_SHEET, QR_BILL_ONLY, QR_BILL_WITH_HORIZONTAL_LINE or QR_CODE_ONLY."),
26
+
OpenApiParam("type", OutputSize::class, "Type of generated invoice. Can either be A4_PORTRAIT_SHEET, QR_BILL_ONLY, QR_CODE_ONLY, QR_BILL_EXTRA_SPACE, QR_BILL_WITH_HORIZONTAL_LINE or PAYMENT_PART_ONLY."),
27
27
],
28
28
queryParams = [
29
29
OpenApiParam("amount", Double::class, "Amount to be printed on the invoice.", required =true),
@@ -91,7 +91,7 @@ fun getGenerateUnstructuredQRCode(ctx: Context) {
91
91
path ="/api/qr/structured/{type}",
92
92
methods = [HttpMethod.GET],
93
93
pathParams = [
94
-
OpenApiParam("type", OutputSize::class, "Type of generated invoice. Can either be A4_PORTRAIT_SHEET, QR_BILL_ONLY, QR_BILL_WITH_HORIZONTAL_LINE or QR_CODE_ONLY."),
94
+
OpenApiParam("type", OutputSize::class, "Type of generated invoice. Can either be A4_PORTRAIT_SHEET, QR_BILL_ONLY, QR_CODE_ONLY, QR_BILL_EXTRA_SPACE, QR_BILL_WITH_HORIZONTAL_LINE or PAYMENT_PART_ONLY."),
95
95
],
96
96
queryParams = [
97
97
OpenApiParam("amount", Double::class, "Amount to be printed on the invoice.", required =true),
@@ -169,7 +169,7 @@ fun getGenerateStructuredQRCode(ctx: Context) {
169
169
OpenApiParam(API_KEY_HEADER, String::class, description ="API Token used for authentication. Syntax: Bearer <Token>", required =true)
170
170
],
171
171
pathParams = [
172
-
OpenApiParam("type", OutputSize::class, "Type of generated invoice. Can either be A4_PORTRAIT_SHEET, QR_BILL_ONLY, QR_BILL_WITH_HORIZONTAL_LINE or QR_CODE_ONLY."),
172
+
OpenApiParam("type", OutputSize::class, "Type of generated invoice. Can either be A4_PORTRAIT_SHEET, QR_BILL_ONLY, QR_CODE_ONLY, QR_BILL_EXTRA_SPACE, QR_BILL_WITH_HORIZONTAL_LINE or PAYMENT_PART_ONLY."),
173
173
],
174
174
queryParams = [
175
175
OpenApiParam("format", GraphicsFormat::class, "File format of the resulting QR code (PNG, PDF or SVG). Defaults to PNG."),
@@ -190,7 +190,7 @@ fun postGenerateStructuredQRCode(ctx: Context) {
throwErrorStatusException(400, "Illegal value for parameter 'type'. Possible values are A4_PORTRAIT_SHEET, QR_BILL_ONLY, QR_BILL_WITH_HORIZONTAL_LINE or QR_CODE_ONLY!")
215
+
} catch (_:IllegalArgumentException) {
216
+
throwErrorStatusException(400, "Illegal value for parameter 'type'. Possible values are A4_PORTRAIT_SHEET, QR_BILL_ONLY, QR_CODE_ONLY, QR_BILL_EXTRA_SPACE, QR_BILL_WITH_HORIZONTAL_LINE or PAYMENT_PART_ONLY!")
0 commit comments