Bug 37018: Add 400 response definition to all routes

This patch adds a test for well defined 400 responses on all verbs and
paths on the API spec.

The tests verify:

* Presence of 400 response definition
* The description must start with 'Bad request' (needs coding guideline)
* If DBIC queries are allowed on the route, then `invalid_query` needs
  to be mentioned in the description.

All routes get fixed to make the tests pass.

To test:
1. Apply this patch
2. Run:
   $ ktd --shell
  k$ yarn api:bundle
  k$ prove xt/api.t
=> SUCCESS: Tests pass!

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
Tomás Cohen Arazi 2024-07-08 17:21:25 -03:00 committed by Katrin Fischer
parent e77db213a5
commit 35e9ac9b0a
Signed by: kfischer
GPG key ID: 0EF6E2C03357A834
77 changed files with 1122 additions and 162 deletions

View file

@ -61,7 +61,7 @@ sub register {
if ( blessed $exception && ref($exception) eq 'Koha::Exceptions::REST::Query::InvalidOperator' ) {
return $c->render(
status => 500,
status => 400,
json => {
error => printf( "Invalid operator in query: %s", $exception->operator ),
error_code => 'invalid_query',

View file

@ -34,6 +34,13 @@
type: array
items:
$ref: "../swagger.yaml#/definitions/patron"
"400":
description: |
Bad request. Possible `error_code` attribute values:
* `invalid_query`
schema:
$ref: "../swagger.yaml#/definitions/error"
"403":
description: Access forbidden
schema:

View file

@ -35,6 +35,13 @@
type: array
items:
$ref: "../swagger.yaml#/definitions/edifact_file"
"400":
description: |
Bad request. Possible `error_code` attribute values:
* `invalid_query`
schema:
$ref: "../swagger.yaml#/definitions/error"
"401":
description: Authentication required
schema:

View file

@ -33,6 +33,13 @@
type: array
items:
$ref: "../swagger.yaml#/definitions/fund"
"400":
description: |
Bad request. Possible `error_code` attribute values:
* `invalid_query`
schema:
$ref: "../swagger.yaml#/definitions/error"
"401":
description: Authentication required
schema:
@ -94,6 +101,13 @@
type: array
items:
$ref: "../swagger.yaml#/definitions/patron"
"400":
description: |
Bad request. Possible `error_code` attribute values:
* `invalid_query`
schema:
$ref: "../swagger.yaml#/definitions/error"
"403":
description: Access forbidden
schema:
@ -147,6 +161,13 @@
type: array
items:
$ref: "../swagger.yaml#/definitions/patron"
"400":
description: |
Bad request. Possible `error_code` attribute values:
* `invalid_query`
schema:
$ref: "../swagger.yaml#/definitions/error"
"403":
description: Access forbidden
schema:

View file

@ -74,6 +74,13 @@
type: array
items:
$ref: "../swagger.yaml#/definitions/order"
"400":
description: |
Bad request. Possible `error_code` attribute values:
* `invalid_query`
schema:
$ref: "../swagger.yaml#/definitions/error"
"401":
description: Authentication required
schema:
@ -191,6 +198,10 @@
description: An order
schema:
$ref: "../swagger.yaml#/definitions/order"
"400":
description: Bad request
schema:
$ref: "../swagger.yaml#/definitions/error"
"401":
description: Authentication required
schema:
@ -238,6 +249,10 @@
description: An order
schema:
$ref: "../swagger.yaml#/definitions/order"
"400":
description: Bad request
schema:
$ref: "../swagger.yaml#/definitions/error"
"401":
description: Authentication required
schema:
@ -277,6 +292,10 @@
responses:
"204":
description: Order deleted
"400":
description: Bad request
schema:
$ref: "../swagger.yaml#/definitions/error"
"401":
description: Authentication required
schema:

View file

@ -64,6 +64,13 @@
type: array
items:
$ref: "../swagger.yaml#/definitions/vendor_issue"
"400":
description: |
Bad request. Possible `error_code` attribute values:
* `invalid_query`
schema:
$ref: "../swagger.yaml#/definitions/error"
"401":
description: Authentication required
schema:

View file

@ -43,6 +43,13 @@
type: array
items:
$ref: "../swagger.yaml#/definitions/vendor"
"400":
description: |
Bad request. Possible `error_code` attribute values:
* `invalid_query`
schema:
$ref: "../swagger.yaml#/definitions/error"
"401":
description: Authentication required
schema:
@ -89,6 +96,10 @@
description: Vendor added
schema:
$ref: "../swagger.yaml#/definitions/vendor"
"400":
description: Bad request
schema:
$ref: "../swagger.yaml#/definitions/error"
"401":
description: Authentication required
schema:
@ -131,6 +142,10 @@
description: A vendor
schema:
$ref: "../swagger.yaml#/definitions/vendor"
"400":
description: Bad request
schema:
$ref: "../swagger.yaml#/definitions/error"
"401":
description: Authentication required
schema:
@ -178,6 +193,10 @@
description: A vendor
schema:
$ref: "../swagger.yaml#/definitions/vendor"
"400":
description: Bad request
schema:
$ref: "../swagger.yaml#/definitions/error"
"401":
description: Authentication required
schema:
@ -217,6 +236,10 @@
responses:
"204":
description: Vendor deleted
"400":
description: Bad request
schema:
$ref: "../swagger.yaml#/definitions/error"
"401":
description: Authentication required
schema:

View file

@ -43,6 +43,13 @@
type: array
items:
$ref: "../swagger.yaml#/definitions/advancededitormacro"
"400":
description: |
Bad request. Possible `error_code` attribute values:
* `invalid_query`
schema:
$ref: "../swagger.yaml#/definitions/error"
"403":
description: Access forbidden
schema:
@ -81,6 +88,10 @@
description: Macro added
schema:
$ref: "../swagger.yaml#/definitions/advancededitormacro"
"400":
description: Bad request
schema:
$ref: "../swagger.yaml#/definitions/error"
"401":
description: Authentication required
schema:
@ -121,6 +132,10 @@
description: Macro added
schema:
$ref: "../swagger.yaml#/definitions/advancededitormacro"
"400":
description: Bad request
schema:
$ref: "../swagger.yaml#/definitions/error"
"401":
description: Authentication required
schema:
@ -158,6 +173,10 @@
description: A macro
schema:
$ref: "../swagger.yaml#/definitions/advancededitormacro"
"400":
description: Bad request
schema:
$ref: "../swagger.yaml#/definitions/error"
"403":
description: Access forbidden
schema:
@ -198,6 +217,10 @@
description: An advanced editor macro
schema:
$ref: "../swagger.yaml#/definitions/advancededitormacro"
"400":
description: Bad request
schema:
$ref: "../swagger.yaml#/definitions/error"
"401":
description: Authentication required
schema:
@ -236,6 +259,10 @@
description: Advanced editor macro deleted
schema:
type: string
"400":
description: Bad request
schema:
$ref: "../swagger.yaml#/definitions/error"
"401":
description: Authentication required
schema:
@ -275,6 +302,10 @@
description: A macro
schema:
$ref: "../swagger.yaml#/definitions/advancededitormacro"
"400":
description: Bad request
schema:
$ref: "../swagger.yaml#/definitions/error"
"403":
description: Access forbidden
schema:
@ -315,6 +346,10 @@
description: An advanced editor macro
schema:
$ref: "../swagger.yaml#/definitions/advancededitormacro"
"400":
description: Bad request
schema:
$ref: "../swagger.yaml#/definitions/error"
"401":
description: Authentication required
schema:
@ -355,6 +390,10 @@
description: Advanced editor macro deleted
schema:
type: string
"400":
description: Bad request
schema:
$ref: "../swagger.yaml#/definitions/error"
"401":
description: Authentication required
schema:

View file

@ -22,7 +22,7 @@
type: integer
additionalProperties: false
"400":
description: Bad Request
description: Bad request
schema:
$ref: "../swagger.yaml#/definitions/error"
"403":
@ -65,7 +65,7 @@
type: string
additionalProperties: false
"400":
description: Bad Request
description: Bad request
schema:
$ref: "../swagger.yaml#/definitions/error"
"403":
@ -111,7 +111,7 @@
schema:
$ref: "../swagger.yaml#/definitions/error"
"400":
description: Bad Request
description: Bad request
schema:
$ref: "../swagger.yaml#/definitions/error"
"403":
@ -163,9 +163,12 @@
items:
$ref: ../swagger.yaml#/definitions/auth_provider
"400":
description: Bad Request
description: |
Bad request. Possible `error_code` attribute values:
* `invalid_query`
schema:
$ref: ../swagger.yaml#/definitions/error
$ref: "../swagger.yaml#/definitions/error"
"403":
description: Access forbidden
schema:
@ -225,7 +228,7 @@
schema:
$ref: ../swagger.yaml#/definitions/auth_provider
"400":
description: Bad Request
description: Bad request
schema:
$ref: ../swagger.yaml#/definitions/error
"403":
@ -272,6 +275,10 @@
description: An identity provider
schema:
$ref: ../swagger.yaml#/definitions/auth_provider
"400":
description: Bad request
schema:
$ref: "../swagger.yaml#/definitions/error"
"404":
description: Object not found
schema:
@ -332,7 +339,7 @@
schema:
$ref: ../swagger.yaml#/definitions/auth_provider
"400":
description: Bad Request
description: Bad request
schema:
$ref: ../swagger.yaml#/definitions/error
"403":
@ -370,6 +377,10 @@
responses:
"204":
description: identity provider deleted
"400":
description: Bad request
schema:
$ref: "../swagger.yaml#/definitions/error"
"401":
description: Authentication required
schema:
@ -428,6 +439,13 @@
schema:
items:
$ref: ../swagger.yaml#/definitions/auth_provider_domain
"400":
description: |
Bad request. Possible `error_code` attribute values:
* `invalid_query`
schema:
$ref: "../swagger.yaml#/definitions/error"
"404":
description: Object not found
schema:
@ -468,7 +486,7 @@
schema:
$ref: ../swagger.yaml#/definitions/auth_provider_domain
"400":
description: Bad Request
description: Bad request
schema:
$ref: ../swagger.yaml#/definitions/error
"403":
@ -510,6 +528,10 @@
description: An identity provider
schema:
$ref: ../swagger.yaml#/definitions/auth_provider_domain
"400":
description: Bad request
schema:
$ref: "../swagger.yaml#/definitions/error"
"404":
description: Object not found
schema:
@ -542,6 +564,10 @@
responses:
"204":
description: identity provider deleted
"400":
description: Bad request
schema:
$ref: "../swagger.yaml#/definitions/error"
"401":
description: Authentication required
schema:
@ -601,9 +627,12 @@
items:
$ref: ../swagger.yaml#/definitions/identity_provider
"400":
description: Bad Request
description: |
Bad request. Possible `error_code` attribute values:
* `invalid_query`
schema:
$ref: ../swagger.yaml#/definitions/error
$ref: "../swagger.yaml#/definitions/error"
"403":
description: Access forbidden
schema:
@ -663,7 +692,7 @@
schema:
$ref: ../swagger.yaml#/definitions/identity_provider
"400":
description: Bad Request
description: Bad request
schema:
$ref: ../swagger.yaml#/definitions/error
"403":
@ -710,6 +739,10 @@
description: An identity provider
schema:
$ref: ../swagger.yaml#/definitions/identity_provider
"400":
description: Bad request
schema:
$ref: "../swagger.yaml#/definitions/error"
"404":
description: Object not found
schema:
@ -770,7 +803,7 @@
schema:
$ref: ../swagger.yaml#/definitions/identity_provider
"400":
description: Bad Request
description: Bad request
schema:
$ref: ../swagger.yaml#/definitions/error
"403":
@ -807,7 +840,11 @@
- application/json
responses:
"204":
description: identity provider deleted
description: Identity provider deleted
"400":
description: Bad request
schema:
$ref: "../swagger.yaml#/definitions/error"
"401":
description: Authentication required
schema:
@ -866,6 +903,13 @@
schema:
items:
$ref: ../swagger.yaml#/definitions/identity_provider_domain
"400":
description: |
Bad request. Possible `error_code` attribute values:
* `invalid_query`
schema:
$ref: "../swagger.yaml#/definitions/error"
"404":
description: Object not found
schema:
@ -906,7 +950,7 @@
schema:
$ref: ../swagger.yaml#/definitions/identity_provider_domain
"400":
description: Bad Request
description: Bad request
schema:
$ref: ../swagger.yaml#/definitions/error
"403":
@ -948,6 +992,10 @@
description: An identity provider
schema:
$ref: ../swagger.yaml#/definitions/identity_provider_domain
"400":
description: Bad request
schema:
$ref: "../swagger.yaml#/definitions/error"
"404":
description: Object not found
schema:
@ -989,7 +1037,7 @@
schema:
$ref: ../swagger.yaml#/definitions/identity_provider_domain
"400":
description: Bad Request
description: Bad request
schema:
$ref: ../swagger.yaml#/definitions/error
"403":
@ -1028,6 +1076,10 @@
responses:
"204":
description: identity provider deleted
"400":
description: Bad request
schema:
$ref: "../swagger.yaml#/definitions/error"
"401":
description: Authentication required
schema:

View file

@ -33,7 +33,10 @@
$ref: "../swagger.yaml#/definitions/authorised_value_category"
type: array
400:
description: Bad request
description: |
Bad request. Possible `error_code` attribute values:
* `invalid_query`
schema:
$ref: "../swagger.yaml#/definitions/error"
403:

View file

@ -58,7 +58,10 @@
$ref: "../swagger.yaml#/definitions/authorised_value"
type: array
400:
description: Bad request
description: |
Bad request. Possible `error_code` attribute values:
* `invalid_query`
schema:
$ref: "../swagger.yaml#/definitions/error"
403:

View file

@ -23,6 +23,13 @@
responses:
"200":
description: A list of authorities
"400":
description: |
Bad request. Possible `error_code` attribute values:
* `invalid_query`
schema:
$ref: "../swagger.yaml#/definitions/error"
"401":
description: Authentication required
schema:
@ -91,7 +98,7 @@
"201":
description: An authority
"400":
description: Bad request.
description: Bad request
schema:
$ref: "../swagger.yaml#/definitions/error"
"401":
@ -148,6 +155,10 @@
responses:
"200":
description: An authority
"400":
description: Bad request
schema:
$ref: "../swagger.yaml#/definitions/error"
"401":
description: Authentication required
schema:
@ -196,6 +207,10 @@
description: Authority deleted
schema:
type: string
"400":
description: Bad request
schema:
$ref: "../swagger.yaml#/definitions/error"
"401":
description: Authentication required
schema:

View file

@ -84,6 +84,13 @@
responses:
"200":
description: A list of biblios
"400":
description: |
Bad request. Possible `error_code` attribute values:
* `invalid_query`
schema:
$ref: "../swagger.yaml#/definitions/error"
"401":
description: Authentication required
schema:
@ -135,6 +142,10 @@
responses:
"200":
description: A biblio
"400":
description: Bad request
schema:
$ref: "../swagger.yaml#/definitions/error"
"401":
description: Authentication required
schema:
@ -183,6 +194,10 @@
description: Biblio deleted
schema:
type: string
"400":
description: Bad request
schema:
$ref: "../swagger.yaml#/definitions/error"
"401":
description: Authentication required
schema:
@ -313,6 +328,13 @@
type: array
items:
$ref: ../swagger.yaml#/definitions/booking
"400":
description: |
Bad request. Possible `error_code` attribute values:
* `invalid_query`
schema:
$ref: "../swagger.yaml#/definitions/error"
"401":
description: Authentication required
schema:
@ -385,6 +407,13 @@
description: A list of checkouts
schema:
$ref: "../swagger.yaml#/definitions/checkouts"
"400":
description: |
Bad request. Possible `error_code` attribute values:
* `invalid_query`
schema:
$ref: "../swagger.yaml#/definitions/error"
"403":
description: Access forbidden
schema:
@ -474,6 +503,13 @@
type: array
items:
$ref: "../swagger.yaml#/definitions/item"
"400":
description: |
Bad request. Possible `error_code` attribute values:
* `invalid_query`
schema:
$ref: "../swagger.yaml#/definitions/error"
"401":
description: Authentication required
schema:
@ -651,7 +687,10 @@
items:
$ref: "../swagger.yaml#/definitions/library"
"400":
description: Missing or wrong parameters
description: |
Bad request. Possible `error_code` attribute values:
* `invalid_query`
schema:
$ref: "../swagger.yaml#/definitions/error"
"401":
@ -697,6 +736,10 @@
responses:
"200":
description: A biblio
"400":
description: Bad request
schema:
$ref: "../swagger.yaml#/definitions/error"
"401":
description: Authentication required
schema:
@ -763,6 +806,13 @@
type: array
items:
$ref: "../swagger.yaml#/definitions/item"
"400":
description: |
Bad request. Possible `error_code` attribute values:
* `invalid_query`
schema:
$ref: "../swagger.yaml#/definitions/error"
"401":
description: Authentication required
schema:
@ -836,6 +886,10 @@
description: number of ratings
type: integer
additionalProperties: false
"400":
description: Bad request
schema:
$ref: "../swagger.yaml#/definitions/error"
"401":
description: Authentication required
schema:

View file

@ -37,6 +37,13 @@
type: array
items:
"$ref": "../swagger.yaml#/definitions/item_group"
'400':
description: |
Bad request. Possible `error_code` attribute values:
* `invalid_query`
schema:
$ref: "../swagger.yaml#/definitions/error"
'401':
description: Authentication required
schema:
@ -90,7 +97,7 @@
schema:
"$ref": "../swagger.yaml#/definitions/item_group"
'400':
description: Bad parameter
description: Bad request
schema:
"$ref": "../swagger.yaml#/definitions/error"
'401':
@ -156,7 +163,7 @@
schema:
"$ref": "../swagger.yaml#/definitions/item_group"
'400':
description: Missing or wrong parameters
description: Bad request
schema:
"$ref": "../swagger.yaml#/definitions/error"
'404':
@ -273,6 +280,10 @@
description: ItemGroup deleted
schema:
type: string
'400':
description: Bad request
schema:
$ref: "../swagger.yaml#/definitions/error"
'401':
description: Authentication required
schema:
@ -397,6 +408,10 @@
description: Item unlinked from item group
schema:
type: string
'400':
description: Bad request
schema:
$ref: "../swagger.yaml#/definitions/error"
'401':
description: Authentication required
schema:

View file

@ -24,6 +24,10 @@
responses:
'200':
description: The merge result as a biblio record
'400':
description: Bad request
schema:
$ref: "../swagger.yaml#/definitions/error"
'404':
description: Biblio not found
schema:

View file

@ -57,6 +57,13 @@
items:
$ref: ../swagger.yaml#/definitions/booking
type: array
400:
description: |
Bad request. Possible `error_code` attribute values:
* `invalid_query`
schema:
$ref: "../swagger.yaml#/definitions/error"
403:
description: Access forbidden
schema:
@ -92,7 +99,7 @@
schema:
$ref: ../swagger.yaml#/definitions/booking
400:
description: Client error
description: Bad request
schema:
$ref: ../swagger.yaml#/definitions/error
401:
@ -132,6 +139,10 @@
responses:
204:
description: Booking deleted
400:
description: Bad request
schema:
$ref: "../swagger.yaml#/definitions/error"
401:
description: Authentication required
schema:
@ -170,6 +181,10 @@
description: A booking
schema:
$ref: ../swagger.yaml#/definitions/booking
400:
description: Bad request
schema:
$ref: "../swagger.yaml#/definitions/error"
404:
description: Booking not found
schema:
@ -207,7 +222,7 @@
schema:
$ref: ../swagger.yaml#/definitions/booking
400:
description: Client error
description: Bad request
schema:
$ref: ../swagger.yaml#/definitions/error
401:

View file

@ -34,6 +34,13 @@
type: array
items:
$ref: "../swagger.yaml#/definitions/cashup"
"400":
description: |
Bad request. Possible `error_code` attribute values:
* `invalid_query`
schema:
$ref: "../swagger.yaml#/definitions/error"
"403":
description: Access forbidden
schema:
@ -82,6 +89,10 @@
description: A cashup
schema:
$ref: "../swagger.yaml#/definitions/cashup"
"400":
description: Bad request
schema:
$ref: "../swagger.yaml#/definitions/error"
"403":
description: Access forbidden
schema:

View file

@ -38,6 +38,13 @@
description: A list of checkouts
schema:
$ref: "../swagger.yaml#/definitions/checkouts"
"400":
description: |
Bad request. Possible `error_code` attribute values:
* `invalid_query`
schema:
$ref: "../swagger.yaml#/definitions/error"
"403":
description: Access forbidden
schema:
@ -90,7 +97,7 @@
schema:
$ref: "../swagger.yaml#/definitions/checkout"
"400":
description: Missing or wrong parameters
description: Bad request
schema:
$ref: "../swagger.yaml#/definitions/error"
"401":
@ -150,6 +157,10 @@
description: Updated borrower's checkout
schema:
$ref: "../swagger.yaml#/definitions/checkout"
"400":
description: Bad request
schema:
$ref: "../swagger.yaml#/definitions/error"
"403":
description: Access forbidden
schema:
@ -189,6 +200,10 @@
description: Updated borrower's checkout
schema:
$ref: "../swagger.yaml#/definitions/checkout"
"400":
description: Bad request
schema:
$ref: "../swagger.yaml#/definitions/error"
"403":
description: Cannot renew checkout
schema:
@ -228,6 +243,10 @@
description: Updated borrower's checkout
schema:
$ref: "../swagger.yaml#/definitions/checkout"
"400":
description: Bad request
schema:
$ref: "../swagger.yaml#/definitions/error"
"403":
description: Cannot renew checkout
schema:
@ -275,6 +294,10 @@
description: List of checkouts renewals
schema:
$ref: "../swagger.yaml#/definitions/renewals"
"400":
description: Bad request
schema:
$ref: "../swagger.yaml#/definitions/error"
"403":
description: Access forbidden
schema:
@ -313,6 +336,10 @@
description: Checkout renewability information
schema:
$ref: "../swagger.yaml#/definitions/allows_renewal"
"400":
description: Bad request
schema:
$ref: "../swagger.yaml#/definitions/error"
"403":
description: Forbidden
schema:
@ -352,6 +379,10 @@
description: Availability
schema:
$ref: "../swagger.yaml#/definitions/checkout_availability"
"400":
description: Bad request
schema:
$ref: "../swagger.yaml#/definitions/error"
"403":
description: Access forbidden
schema:
@ -397,6 +428,10 @@
confirmation_token:
type: string
additionalProperties: false
"400":
description: Bad request
schema:
$ref: "../swagger.yaml#/definitions/error"
"403":
description: Access forbidden
schema:

View file

@ -83,6 +83,10 @@
type: object
additionalProperties:
$ref: "../swagger.yaml#/definitions/circ-rule-kind"
"400":
description: Bad request
schema:
$ref: "../swagger.yaml#/definitions/error"
"403":
description: Access forbidden
schema:

View file

@ -43,6 +43,13 @@
type: array
items:
$ref: "../swagger.yaml#/definitions/city"
"400":
description: |
Bad request. Possible `error_code` attribute values:
* `invalid_query`
schema:
$ref: "../swagger.yaml#/definitions/error"
"403":
description: Access forbidden
schema:
@ -81,6 +88,10 @@
description: City added
schema:
$ref: "../swagger.yaml#/definitions/city"
"400":
description: Bad request
schema:
$ref: "../swagger.yaml#/definitions/error"
"401":
description: Authentication required
schema:
@ -119,6 +130,10 @@
description: A city
schema:
$ref: "../swagger.yaml#/definitions/city"
"400":
description: Bad request
schema:
$ref: "../swagger.yaml#/definitions/error"
"404":
description: City not found
schema:
@ -158,6 +173,10 @@
description: A city
schema:
$ref: "../swagger.yaml#/definitions/city"
"400":
description: Bad request
schema:
$ref: "../swagger.yaml#/definitions/error"
"401":
description: Authentication required
schema:
@ -194,6 +213,10 @@
responses:
"204":
description: City deleted
"400":
description: Bad request
schema:
$ref: "../swagger.yaml#/definitions/error"
"401":
description: Authentication required
schema:

View file

@ -61,7 +61,7 @@
schema:
$ref: "../definitions/club_hold.yaml"
"400":
description: Missing or wrong parameters
description: Bad request
schema:
$ref: "../swagger.yaml#/definitions/error"
"401":

View file

@ -23,6 +23,13 @@
type: array
items:
$ref: "../swagger.yaml#/definitions/smtp_server"
"400":
description: |
Bad request. Possible `error_code` attribute values:
* `invalid_query`
schema:
$ref: "../swagger.yaml#/definitions/error"
"403":
description: Access forbidden
schema:
@ -61,6 +68,10 @@
description: An SMTP server object
schema:
$ref: "../swagger.yaml#/definitions/smtp_server"
"400":
description: Bad request
schema:
$ref: "../swagger.yaml#/definitions/error"
"401":
description: Authentication required
schema:
@ -103,6 +114,10 @@
description: An SMTP server object
schema:
$ref: "../swagger.yaml#/definitions/smtp_server"
"400":
description: Bad request
schema:
$ref: "../swagger.yaml#/definitions/error"
"404":
description: Object not found
schema:
@ -146,6 +161,10 @@
description: An SMTP server object
schema:
$ref: "../swagger.yaml#/definitions/smtp_server"
"400":
description: Bad request
schema:
$ref: "../swagger.yaml#/definitions/error"
"401":
description: Authentication required
schema:
@ -185,6 +204,10 @@
responses:
"204":
description: SMTP server deleted
"400":
description: Bad request
schema:
$ref: "../swagger.yaml#/definitions/error"
"401":
description: Authentication required
schema:

View file

@ -23,6 +23,13 @@
responses:
"200":
description: A list of deleted biblios
"400":
description: |
Bad request. Possible `error_code` attribute values:
* `invalid_query`
schema:
$ref: "../swagger.yaml#/definitions/error"
"401":
description: Authentication required
schema:
@ -74,6 +81,10 @@
responses:
"200":
description: A deleted biblio
"400":
description: Bad request
schema:
$ref: "../swagger.yaml#/definitions/error"
"401":
description: Authentication required
schema:

View file

@ -83,8 +83,11 @@
items:
$ref: "../swagger.yaml#/definitions/erm_agreement"
type: array
400:
description: Bad request
"400":
description: |
Bad request. Possible `error_code` attribute values:
* `invalid_query`
schema:
$ref: "../swagger.yaml#/definitions/error"
403:
@ -128,7 +131,7 @@
items:
$ref: "../swagger.yaml#/definitions/erm_agreement"
400:
description: Bad parameter
description: Bad request
schema:
$ref: "../swagger.yaml#/definitions/error"
401:
@ -202,6 +205,10 @@
schema:
items:
$ref: "../swagger.yaml#/definitions/erm_agreement"
400:
description: Bad request
schema:
$ref: "../swagger.yaml#/definitions/error"
401:
description: Authentication required
schema:
@ -266,7 +273,7 @@
items:
$ref: "../swagger.yaml#/definitions/erm_agreement"
400:
description: Bad parameter
description: Bad request
schema:
$ref: "../swagger.yaml#/definitions/error"
403:
@ -312,7 +319,7 @@
204:
description: Agreement deleted
400:
description: Agreement deletion failed
description: Bad request
schema:
$ref: "../swagger.yaml#/definitions/error"
401:

View file

@ -19,6 +19,10 @@
description: A counter file
schema:
type: file
400:
description: Bad request
schema:
$ref: "../swagger.yaml#/definitions/error"
401:
description: Authentication required
schema:
@ -108,7 +112,10 @@
$ref: "../swagger.yaml#/definitions/erm_counter_file"
type: array
400:
description: Bad request
description: |
Bad request. Possible `error_code` attribute values:
* `invalid_query`
schema:
$ref: "../swagger.yaml#/definitions/error"
403:
@ -143,7 +150,7 @@
204:
description: counter_file deleted
400:
description: counter_file deletion failed
description: Bad request
schema:
$ref: "../swagger.yaml#/definitions/error"
401:
@ -174,4 +181,4 @@
$ref: "../swagger.yaml#/definitions/error"
x-koha-authorization:
permissions:
erm: 1
erm: 1

View file

@ -27,7 +27,10 @@
$ref: "../swagger.yaml#/definitions/erm_counter_log"
type: array
400:
description: Bad request
description: |
Bad request. Possible `error_code` attribute values:
* `invalid_query`
schema:
$ref: "../swagger.yaml#/definitions/error"
403:
@ -46,4 +49,4 @@
$ref: "../swagger.yaml#/definitions/error"
x-koha-authorization:
permissions:
erm: 1
erm: 1

View file

@ -23,7 +23,10 @@
$ref: "../swagger.yaml#/definitions/erm_counter_registry"
type: array
400:
description: Bad request
description: |
Bad request. Possible `error_code` attribute values:
* `invalid_query`
schema:
$ref: "../swagger.yaml#/definitions/error"
403:
@ -42,4 +45,4 @@
$ref: "../swagger.yaml#/definitions/error"
x-koha-authorization:
permissions:
erm: 1
erm: 1

View file

@ -32,6 +32,13 @@
schema:
items:
$ref: "../swagger.yaml#/definitions/erm_custom_report"
"400":
description: |
Bad request. Possible `error_code` attribute values:
* `invalid_query`
schema:
$ref: "../swagger.yaml#/definitions/error"
401:
description: authentication required
schema:
@ -91,6 +98,13 @@
schema:
items:
$ref: "../swagger.yaml#/definitions/erm_custom_report"
"400":
description: |
Bad request. Possible `error_code` attribute values:
* `invalid_query`
schema:
$ref: "../swagger.yaml#/definitions/error"
401:
description: authentication required
schema:
@ -150,6 +164,13 @@
schema:
items:
$ref: "../swagger.yaml#/definitions/erm_custom_report"
"400":
description: |
Bad request. Possible `error_code` attribute values:
* `invalid_query`
schema:
$ref: "../swagger.yaml#/definitions/error"
401:
description: authentication required
schema:
@ -212,6 +233,13 @@
schema:
items:
$ref: "../swagger.yaml#/definitions/erm_custom_report"
"400":
description: |
Bad request. Possible `error_code` attribute values:
* `invalid_query`
schema:
$ref: "../swagger.yaml#/definitions/error"
401:
description: authentication required
schema:
@ -236,4 +264,4 @@
$ref: "../swagger.yaml#/definitions/error"
x-koha-authorization:
permissions:
erm: 1
erm: 1

View file

@ -37,8 +37,11 @@
items:
$ref: "../swagger.yaml#/definitions/erm_default_usage_report"
type: array
400:
description: Bad request
"400":
description: |
Bad request. Possible `error_code` attribute values:
* `invalid_query`
schema:
$ref: "../swagger.yaml#/definitions/error"
403:
@ -82,7 +85,7 @@
items:
$ref: "../swagger.yaml#/definitions/erm_default_usage_report"
400:
description: Bad parameter
description: Bad request
schema:
$ref: "../swagger.yaml#/definitions/error"
401:
@ -132,8 +135,8 @@
responses:
204:
description: default_usage_report deleted
400:
description: default_usage_report deletion failed
"400":
description: Bad request
schema:
$ref: "../swagger.yaml#/definitions/error"
401:
@ -164,4 +167,4 @@
$ref: "../swagger.yaml#/definitions/error"
x-koha-authorization:
permissions:
erm: 1
erm: 1

View file

@ -19,6 +19,10 @@
description: Anagreement
schema:
type: file
"400":
description: Bad request
schema:
$ref: "../swagger.yaml#/definitions/error"
401:
description: Authentication required
schema:

View file

@ -80,8 +80,11 @@
items:
$ref: "../swagger.yaml#/definitions/erm_eholdings_package"
type: array
400:
description: Bad request
"400":
description: |
Bad request. Possible `error_code` attribute values:
* `invalid_query`
schema:
$ref: "../swagger.yaml#/definitions/error"
403:
@ -130,7 +133,7 @@
items:
$ref: "../swagger.yaml#/definitions/erm_eholdings_package"
400:
description: Bad parameter
description: Bad request
schema:
$ref: "../swagger.yaml#/definitions/error"
401:
@ -197,6 +200,10 @@
schema:
items:
$ref: "../swagger.yaml#/definitions/erm_eholdings_package"
"400":
description: Bad request
schema:
$ref: "../swagger.yaml#/definitions/error"
401:
description: Authentication required
schema:
@ -263,7 +270,7 @@
items:
$ref: "../swagger.yaml#/definitions/erm_eholdings_package"
400:
description: Bad parameter
description: Bad request
schema:
$ref: "../swagger.yaml#/definitions/error"
403:
@ -310,7 +317,7 @@
204:
description: package deleted
400:
description: package deletion failed
description: Bad request
schema:
$ref: "../swagger.yaml#/definitions/error"
401:
@ -378,6 +385,10 @@
description: Add or remove this package from remote holdings
type: boolean
additionalProperties: false
400:
description: Bad request
schema:
$ref: "../swagger.yaml#/definitions/error"
401:
description: Authentication required
schema:

View file

@ -58,8 +58,11 @@
items:
$ref: "../swagger.yaml#/definitions/erm_eholdings_resource"
type: array
400:
description: Bad request
"400":
description: |
Bad request. Possible `error_code` attribute values:
* `invalid_query`
schema:
$ref: "../swagger.yaml#/definitions/error"
403:

View file

@ -57,8 +57,11 @@
items:
$ref: "../swagger.yaml#/definitions/erm_eholdings_resource"
type: array
400:
description: Bad request
"400":
description: |
Bad request. Possible `error_code` attribute values:
* `invalid_query`
schema:
$ref: "../swagger.yaml#/definitions/error"
403:
@ -112,6 +115,10 @@
schema:
items:
$ref: "../swagger.yaml#/definitions/erm_eholdings_resource"
"400":
description: Bad request
schema:
$ref: "../swagger.yaml#/definitions/error"
401:
description: Authentication required
schema:
@ -173,6 +180,10 @@
description: Add or remove this resource from remote holdings
type: boolean
additionalProperties: false
"400":
description: Bad request
schema:
$ref: "../swagger.yaml#/definitions/error"
401:
description: Authentication required
schema:

View file

@ -167,8 +167,11 @@
items:
$ref: "../swagger.yaml#/definitions/erm_eholdings_title"
type: array
400:
description: Bad request
"400":
description: |
Bad request. Possible `error_code` attribute values:
* `invalid_query`
schema:
$ref: "../swagger.yaml#/definitions/error"
403:
@ -217,7 +220,7 @@
items:
$ref: "../swagger.yaml#/definitions/erm_eholdings_title"
400:
description: Bad parameter
description: Bad request
schema:
$ref: "../swagger.yaml#/definitions/error"
401:
@ -282,6 +285,10 @@
schema:
items:
$ref: "../swagger.yaml#/definitions/erm_eholdings_title"
"400":
description: Bad request
schema:
$ref: "../swagger.yaml#/definitions/error"
401:
description: Authentication required
schema:
@ -348,7 +355,7 @@
items:
$ref: "../swagger.yaml#/definitions/erm_eholdings_title"
400:
description: Bad parameter
description: Bad request
schema:
$ref: "../swagger.yaml#/definitions/error"
403:
@ -395,7 +402,7 @@
204:
description: title deleted
400:
description: title deletion failed
description: Bad request
schema:
$ref: "../swagger.yaml#/definitions/error"
401:
@ -461,7 +468,7 @@
type: string
additionalProperties: false
400:
description: Bad parameter
description: Bad request
schema:
$ref: "../swagger.yaml#/definitions/error"
401:
@ -537,7 +544,7 @@
type: object
additionalProperties: false
400:
description: Bad parameter
description: Bad request
schema:
$ref: "../swagger.yaml#/definitions/error"
401:

View file

@ -58,8 +58,11 @@
items:
$ref: "../swagger.yaml#/definitions/erm_eholdings_resource"
type: array
400:
description: Bad request
"400":
description: |
Bad request. Possible `error_code` attribute values:
* `invalid_query`
schema:
$ref: "../swagger.yaml#/definitions/error"
403:

View file

@ -66,8 +66,11 @@
items:
$ref: "../swagger.yaml#/definitions/erm_license"
type: array
400:
description: Bad request
"400":
description: |
Bad request. Possible `error_code` attribute values:
* `invalid_query`
schema:
$ref: "../swagger.yaml#/definitions/error"
403:
@ -111,7 +114,7 @@
items:
$ref: "../swagger.yaml#/definitions/erm_license"
400:
description: Bad parameter
description: Bad request
schema:
$ref: "../swagger.yaml#/definitions/error"
401:
@ -177,6 +180,10 @@
schema:
items:
$ref: "../swagger.yaml#/definitions/erm_license"
"400":
description: Bad request
schema:
$ref: "../swagger.yaml#/definitions/error"
401:
description: authentication required
schema:
@ -238,7 +245,7 @@
items:
$ref: "../swagger.yaml#/definitions/erm_license"
400:
description: bad parameter
description: Bad request
schema:
$ref: "../swagger.yaml#/definitions/error"
403:
@ -284,7 +291,7 @@
204:
description: license deleted
400:
description: license deletion failed
description: Bad request
schema:
$ref: "../swagger.yaml#/definitions/error"
401:

View file

@ -21,8 +21,11 @@
schema:
items:
$ref: "../swagger.yaml#/definitions/erm_sushi_service"
400:
description: Bad request
"400":
description: |
Bad request. Possible `error_code` attribute values:
* `invalid_query`
schema:
$ref: "../swagger.yaml#/definitions/error"
403:

View file

@ -107,8 +107,11 @@
items:
$ref: "../swagger.yaml#/definitions/erm_usage_data_provider"
type: array
400:
description: Bad request
"400":
description: |
Bad request. Possible `error_code` attribute values:
* `invalid_query`
schema:
$ref: "../swagger.yaml#/definitions/error"
403:
@ -152,7 +155,7 @@
items:
$ref: "../swagger.yaml#/definitions/erm_usage_data_provider"
400:
description: Bad parameter
description: Bad request
schema:
$ref: "../swagger.yaml#/definitions/error"
401:
@ -216,6 +219,10 @@
schema:
items:
$ref: "../swagger.yaml#/definitions/erm_usage_data_provider"
"400":
description: Bad request
schema:
$ref: "../swagger.yaml#/definitions/error"
401:
description: authentication required
schema:
@ -273,8 +280,8 @@
schema:
items:
$ref: "../swagger.yaml#/definitions/erm_usage_data_provider"
400:
description: bad parameter
"400":
description: Bad request
schema:
$ref: "../swagger.yaml#/definitions/error"
403:
@ -319,8 +326,8 @@
responses:
204:
description: usage_data_provider deleted
400:
description: usage_data_provider deletion failed
"400":
description: Bad request
schema:
$ref: "../swagger.yaml#/definitions/error"
401:
@ -491,4 +498,4 @@
$ref: "../swagger.yaml#/definitions/error"
x-koha-authorization:
permissions:
erm: 1
erm: 1

View file

@ -64,8 +64,11 @@
items:
$ref: "../swagger.yaml#/definitions/erm_usage_database"
type: array
400:
description: Bad request
"400":
description: |
Bad request. Possible `error_code` attribute values:
* `invalid_query`
schema:
$ref: "../swagger.yaml#/definitions/error"
403:
@ -84,4 +87,4 @@
$ref: "../swagger.yaml#/definitions/error"
x-koha-authorization:
permissions:
erm: 1
erm: 1

View file

@ -59,8 +59,11 @@
items:
$ref: "../swagger.yaml#/definitions/erm_usage_item"
type: array
400:
description: Bad request
"400":
description: |
Bad request. Possible `error_code` attribute values:
* `invalid_query`
schema:
$ref: "../swagger.yaml#/definitions/error"
403:
@ -79,4 +82,4 @@
$ref: "../swagger.yaml#/definitions/error"
x-koha-authorization:
permissions:
erm: 1
erm: 1

View file

@ -49,8 +49,11 @@
items:
$ref: "../swagger.yaml#/definitions/erm_usage_platform"
type: array
400:
description: Bad request
"400":
description: |
Bad request. Possible `error_code` attribute values:
* `invalid_query`
schema:
$ref: "../swagger.yaml#/definitions/error"
403:
@ -69,4 +72,4 @@
$ref: "../swagger.yaml#/definitions/error"
x-koha-authorization:
permissions:
erm: 1
erm: 1

View file

@ -89,8 +89,11 @@
items:
$ref: "../swagger.yaml#/definitions/erm_usage_title"
type: array
400:
description: Bad request
"400":
description: |
Bad request. Possible `error_code` attribute values:
* `invalid_query`
schema:
$ref: "../swagger.yaml#/definitions/error"
403:

View file

@ -34,8 +34,11 @@
type: array
items:
$ref: "../swagger.yaml#/definitions/patron"
400:
description: Bad request
"400":
description: |
Bad request. Possible `error_code` attribute values:
* `invalid_query`
schema:
$ref: "../swagger.yaml#/definitions/error"
403:

View file

@ -33,8 +33,11 @@
items:
$ref: "../swagger.yaml#/definitions/extended_attribute_type"
type: array
400:
description: Bad request
"400":
description: |
Bad request. Possible `error_code` attribute values:
* `invalid_query`
schema:
$ref: "../swagger.yaml#/definitions/error"
403:

View file

@ -112,6 +112,13 @@
description: A list of holds
schema:
$ref: "../swagger.yaml#/definitions/holds"
"400":
description: |
Bad request. Possible `error_code` attribute values:
* `invalid_query`
schema:
$ref: "../swagger.yaml#/definitions/error"
"401":
description: Authentication required
schema:
@ -224,7 +231,7 @@
schema:
$ref: "../swagger.yaml#/definitions/hold"
"400":
description: Missing or wrong parameters
description: Bad request
schema:
$ref: "../swagger.yaml#/definitions/error"
"401":
@ -291,7 +298,7 @@
schema:
$ref: "../swagger.yaml#/definitions/hold"
"400":
description: Missing or wrong parameters
description: Bad request
schema:
$ref: "../swagger.yaml#/definitions/error"
"401":
@ -359,7 +366,7 @@
schema:
$ref: "../swagger.yaml#/definitions/hold"
"400":
description: Missing or wrong parameters
description: Bad request
schema:
$ref: "../swagger.yaml#/definitions/error"
"401":
@ -413,6 +420,10 @@
description: Hold request recorded
"204":
description: Hold deleted
"400":
description: Bad request
schema:
$ref: "../swagger.yaml#/definitions/error"
"401":
description: Authentication required
schema:
@ -461,6 +472,10 @@
description: The new priority value for the hold
schema:
type: integer
"400":
description: Bad request
schema:
$ref: "../swagger.yaml#/definitions/error"
"401":
description: Authentication required
schema:
@ -520,7 +535,7 @@
"201":
description: Hold suspended
"400":
description: Missing or wrong parameters
description: Bad request
schema:
$ref: "../swagger.yaml#/definitions/error"
"401":
@ -565,7 +580,7 @@
"204":
description: Hold resumed
"400":
description: Missing or wrong parameters
description: Bad request
schema:
$ref: "../swagger.yaml#/definitions/error"
"401":
@ -630,7 +645,10 @@
items:
$ref: "../swagger.yaml#/definitions/library"
"400":
description: Missing or wrong parameters
description: |
Bad request. Possible `error_code` attribute values:
* `invalid_query`
schema:
$ref: "../swagger.yaml#/definitions/error"
"401":
@ -693,7 +711,7 @@
description: Internal identifier for the pickup library
additionalProperties: false
"400":
description: Missing or wrong parameters
description: Bad request
schema:
$ref: "../swagger.yaml#/definitions/error"
"401":

View file

@ -24,6 +24,10 @@
description: A list of ILL backends
schema:
$ref: "../swagger.yaml#/definitions/ill_backends"
"400":
description: Bad request
schema:
$ref: "../swagger.yaml#/definitions/error"
"401":
description: Authentication required
schema:
@ -80,6 +84,10 @@
description: An ILL backends
schema:
$ref: "../swagger.yaml#/definitions/ill_backend"
"400":
description: Bad request
schema:
$ref: "../swagger.yaml#/definitions/error"
"401":
description: Authentication required
schema:
@ -105,4 +113,4 @@
$ref: "../swagger.yaml#/definitions/error"
x-koha-authorization:
permissions:
ill: "1"
ill: "1"

View file

@ -35,6 +35,13 @@
description: A list of ILL batches
schema:
$ref: "../swagger.yaml#/definitions/ill_batches"
"400":
description: |
Bad request. Possible `error_code` attribute values:
* `invalid_query`
schema:
$ref: "../swagger.yaml#/definitions/error"
"401":
description: Authentication required
schema:
@ -170,6 +177,13 @@
description: An ILL batch
schema:
$ref: "../swagger.yaml#/definitions/ill_batch"
"400":
description: |
Bad request. Possible `error_code` attribute values:
* `invalid_query`
schema:
$ref: "../swagger.yaml#/definitions/error"
"401":
description: Authentication required
schema:
@ -264,6 +278,10 @@
description: ILL batch deleted
schema:
type: string
"400":
description: Bad request
schema:
$ref: "../swagger.yaml#/definitions/error"
"401":
description: Authentication required
schema:

View file

@ -14,6 +14,10 @@
description: A list of ILL batch statuses
schema:
$ref: "../swagger.yaml#/definitions/ill_batchstatuses"
"400":
description: Bad request
schema:
$ref: "../swagger.yaml#/definitions/error"
"401":
description: Authentication required
schema:
@ -110,6 +114,10 @@
description: An ILL batch status
schema:
$ref: "../swagger.yaml#/definitions/ill_batchstatus"
"400":
description: Bad request
schema:
$ref: "../swagger.yaml#/definitions/error"
"401":
description: Authentication required
schema:
@ -204,6 +212,10 @@
description: ILL batch status deleted
schema:
type: string
"400":
description: Bad request
schema:
$ref: "../swagger.yaml#/definitions/error"
"401":
description: Authentication required
schema:

View file

@ -41,6 +41,13 @@
type: array
items:
$ref: "../swagger.yaml#/definitions/ill_request"
"400":
description: |
Bad request. Possible `error_code` attribute values:
* `invalid_query`
schema:
$ref: "../swagger.yaml#/definitions/error"
"403":
description: Access forbidden
schema:

View file

@ -28,6 +28,13 @@
description: A list of import batch profiles
schema:
$ref: "../swagger.yaml#/definitions/import_batch_profiles"
"400":
description: |
Bad request. Possible `error_code` attribute values:
* `invalid_query`
schema:
$ref: "../swagger.yaml#/definitions/error"
"401":
description: Authentication required
schema:
@ -128,7 +135,7 @@
schema:
$ref: "../swagger.yaml#/definitions/import_batch_profile"
"400":
description: Missing or wrong parameters
description: Bad request
schema:
$ref: "../swagger.yaml#/definitions/error"
"401":
@ -237,7 +244,7 @@
schema:
$ref: "../swagger.yaml#/definitions/import_batch_profile"
"400":
description: Missing or wrong parameters
description: Bad request
schema:
$ref: "../swagger.yaml#/definitions/error"
"401":
@ -279,6 +286,10 @@
responses:
"204":
description: Profile deleted
"400":
description: Bad request
schema:
$ref: "../swagger.yaml#/definitions/error"
"401":
description: Authentication required
schema:

View file

@ -36,7 +36,7 @@
"200":
description: Match updated
"400":
description: Missing or wrong parameters
description: Bad request
schema:
$ref: "../swagger.yaml#/definitions/error"
"401":
@ -87,6 +87,10 @@
responses:
"204":
description: Matches unchosen
"400":
description: Bad request
schema:
$ref: "../swagger.yaml#/definitions/error"
"401":
description: Authentication required
schema:

View file

@ -32,8 +32,11 @@
items:
$ref: "../swagger.yaml#/definitions/item_type"
type: array
400:
description: Bad request
"400":
description: |
Bad request. Possible `error_code` attribute values:
* `invalid_query`
schema:
$ref: "../swagger.yaml#/definitions/error"
403:

View file

@ -41,6 +41,13 @@
type: array
items:
$ref: "../swagger.yaml#/definitions/item"
"400":
description: |
Bad request. Possible `error_code` attribute values:
* `invalid_query`
schema:
$ref: "../swagger.yaml#/definitions/error"
"401":
description: Authentication required
schema:
@ -92,7 +99,7 @@
schema:
$ref: "../swagger.yaml#/definitions/item"
"400":
description: Missing or wrong parameters
description: Bad request
schema:
$ref: "../swagger.yaml#/definitions/error"
"404":
@ -129,7 +136,7 @@
"204":
description: Deleted item
"400":
description: Missing or wrong parameters
description: Bad request
schema:
$ref: "../swagger.yaml#/definitions/error"
"403":
@ -191,7 +198,7 @@
items:
$ref: "../swagger.yaml#/definitions/item"
"400":
description: Bad parameter
description: Bad request
schema:
$ref: "../swagger.yaml#/definitions/error"
"401":
@ -265,6 +272,13 @@
type: array
items:
$ref: "../swagger.yaml#/definitions/item"
"400":
description: |
Bad request. Possible `error_code` attribute values:
* `invalid_query`
schema:
$ref: "../swagger.yaml#/definitions/error"
"401":
description: Authentication required
schema:
@ -306,7 +320,7 @@
"204":
description: Bundle link deleted
"400":
description: Bad parameter
description: Bad request
schema:
$ref: "../swagger.yaml#/definitions/error"
"409":
@ -363,9 +377,12 @@
items:
$ref: ../swagger.yaml#/definitions/booking
"400":
description: Missing or wrong parameters
description: |
Bad request. Possible `error_code` attribute values:
* `invalid_query`
schema:
$ref: ../swagger.yaml#/definitions/error
$ref: "../swagger.yaml#/definitions/error"
"401":
description: Authentication required
schema:
@ -422,7 +439,10 @@
items:
$ref: "../swagger.yaml#/definitions/library"
"400":
description: Missing or wrong parameters
description: |
Bad request. Possible `error_code` attribute values:
* `invalid_query`
schema:
$ref: "../swagger.yaml#/definitions/error"
"401":
@ -493,6 +513,13 @@
type: array
items:
$ref: "../swagger.yaml#/definitions/item"
"400":
description: |
Bad request. Possible `error_code` attribute values:
* `invalid_query`
schema:
$ref: "../swagger.yaml#/definitions/error"
"401":
description: Authentication required
schema:

View file

@ -28,6 +28,13 @@
type: array
items:
$ref: "../swagger.yaml#/definitions/job"
"400":
description: |
Bad request. Possible `error_code` attribute values:
* `invalid_query`
schema:
$ref: "../swagger.yaml#/definitions/error"
"403":
description: Access forbidden
schema:
@ -62,6 +69,10 @@
description: A job
schema:
$ref: "../swagger.yaml#/definitions/job"
"400":
description: Bad request
schema:
$ref: "../swagger.yaml#/definitions/error"
"403":
description: Access forbidden
schema:

View file

@ -116,6 +116,13 @@
type: array
items:
$ref: "../swagger.yaml#/definitions/library"
"400":
description: |
Bad request. Possible `error_code` attribute values:
* `invalid_query`
schema:
$ref: "../swagger.yaml#/definitions/error"
"500":
description: |
Internal server error. Possible `error_code` attribute values:
@ -209,6 +216,10 @@
description: A library
schema:
$ref: "../swagger.yaml#/definitions/library"
"400":
description: Bad request
schema:
$ref: "../swagger.yaml#/definitions/error"
"404":
description: Library not found
schema:
@ -284,6 +295,10 @@
description: Library deleted
schema:
type: string
"400":
description: Bad request
schema:
$ref: "../swagger.yaml#/definitions/error"
"401":
description: Authentication required
schema:
@ -335,6 +350,13 @@
type: array
items:
$ref: "../swagger.yaml#/definitions/desk"
"400":
description: |
Bad request. Possible `error_code` attribute values:
* `invalid_query`
schema:
$ref: "../swagger.yaml#/definitions/error"
404:
description: Resource not found
schema:
@ -378,6 +400,13 @@
type: array
items:
$ref: "../swagger.yaml#/definitions/cash_register"
"400":
description: |
Bad request. Possible `error_code` attribute values:
* `invalid_query`
schema:
$ref: "../swagger.yaml#/definitions/error"
404:
description: Resource not found
schema:
@ -420,6 +449,13 @@
type: array
items:
$ref: "../swagger.yaml#/definitions/library"
"400":
description: |
Bad request. Possible `error_code` attribute values:
* `invalid_query`
schema:
$ref: "../swagger.yaml#/definitions/error"
"500":
description: |
Internal server error. Possible `error_code` attribute values:
@ -445,6 +481,10 @@
responses:
"200":
description: A library
"400":
description: Bad request
schema:
$ref: "../swagger.yaml#/definitions/error"
"401":
description: Authentication required
schema:

View file

@ -36,7 +36,7 @@
type: integer
additionalProperties: false
"400":
description: Bad Request
description: Bad request
schema:
$ref: "../swagger.yaml#/definitions/error"
"403":
@ -108,7 +108,7 @@
schema:
type: string
"400":
description: Bad Request
description: Bad request
schema:
$ref: ../swagger.yaml#/definitions/error
"403":

View file

@ -23,6 +23,13 @@
type: array
items:
$ref: "../swagger.yaml#/definitions/patron_category"
"400":
description: |
Bad request. Possible `error_code` attribute values:
* `invalid_query`
schema:
$ref: "../swagger.yaml#/definitions/error"
"401":
description: Authentication required
schema:

View file

@ -372,6 +372,13 @@
type: array
items:
$ref: "../swagger.yaml#/definitions/patron"
"400":
description: |
Bad request. Possible `error_code` attribute values:
* `invalid_query`
schema:
$ref: "../swagger.yaml#/definitions/error"
"401":
description: Authentication required
schema:
@ -430,7 +437,7 @@
$ref: "../swagger.yaml#/definitions/patron"
"400":
description: |
Bad parameter. Possible `error_code` attribute values:
Bad request. Possible `error_code` attribute values:
* `invalid_attribute_type`
* `attribute_not_unique`
@ -495,6 +502,10 @@
description: A patron
schema:
$ref: "../swagger.yaml#/definitions/patron"
"400":
description: Bad request
schema:
$ref: "../swagger.yaml#/definitions/error"
"401":
description: Authentication required
schema:
@ -558,7 +569,7 @@
$ref: "../swagger.yaml#/definitions/patron"
"400":
description: |
Bad parameter. Possible `error_code` attribute values:
Bad request. Possible `error_code` attribute values:
* `invalid_attribute_type`
* `attribute_not_unique`
@ -606,7 +617,7 @@
"204":
description: Patron deleted
"400":
description: Patron deletion failed
description: Bad request
schema:
$ref: "../swagger.yaml#/definitions/error"
"401":

View file

@ -15,6 +15,10 @@
description: Patron's account balance
schema:
$ref: "../swagger.yaml#/definitions/patron_balance"
"400":
description: Bad request
schema:
$ref: "../swagger.yaml#/definitions/error"
"401":
description: Authentication required
schema:
@ -66,6 +70,13 @@
type: array
items:
$ref: "../swagger.yaml#/definitions/credit"
"400":
description: |
Bad request. Possible `error_code` attribute values:
* `invalid_query`
schema:
$ref: "../swagger.yaml#/definitions/error"
"403":
description: Access forbidden
schema:
@ -103,6 +114,10 @@
description: Credit added
schema:
$ref: "../swagger.yaml#/definitions/account_line"
"400":
description: Bad request
schema:
$ref: "../swagger.yaml#/definitions/error"
"401":
description: Authentication required
schema:
@ -153,6 +168,13 @@
type: array
items:
$ref: "../swagger.yaml#/definitions/debit"
"400":
description: |
Bad request. Possible `error_code` attribute values:
* `invalid_query`
schema:
$ref: "../swagger.yaml#/definitions/error"
"403":
description: Access forbidden
schema:
@ -195,7 +217,7 @@
schema:
$ref: "../swagger.yaml#/definitions/debit"
"400":
description: Bad parameter
description: Bad request
schema:
$ref: "../swagger.yaml#/definitions/error"
"401":

View file

@ -34,6 +34,13 @@
type: array
items:
$ref: "../swagger.yaml#/definitions/checkout"
"400":
description: |
Bad request. Possible `error_code` attribute values:
* `invalid_query`
schema:
$ref: "../swagger.yaml#/definitions/error"
"401":
description: Authentication required
schema:

View file

@ -24,6 +24,13 @@
type: array
items:
$ref: "../swagger.yaml#/definitions/patron_extended_attribute"
"400":
description: |
Bad request. Possible `error_code` attribute values:
* `invalid_query`
schema:
$ref: "../swagger.yaml#/definitions/error"
"401":
description: Authentication required
schema:
@ -72,7 +79,7 @@
schema:
$ref: "../swagger.yaml#/definitions/patron_extended_attribute"
"400":
description: Bad parameter
description: Bad request
schema:
$ref: "../swagger.yaml#/definitions/error"
"401":
@ -131,7 +138,7 @@
items:
$ref: "../swagger.yaml#/definitions/patron_extended_attribute"
"400":
description: Bad parameters
description: Bad request
schema:
$ref: "../swagger.yaml#/definitions/error"
"401":
@ -198,7 +205,7 @@
schema:
$ref: "../swagger.yaml#/definitions/patron_extended_attribute"
"400":
description: Bad parameter
description: Bad request
schema:
$ref: "../swagger.yaml#/definitions/error"
"401":
@ -249,6 +256,10 @@
responses:
"204":
description: Extended patron attribute deleted
"400":
description: Bad request
schema:
$ref: "../swagger.yaml#/definitions/error"
"401":
description: Authentication required
schema:

View file

@ -43,6 +43,13 @@
type: array
items:
$ref: "../swagger.yaml#/definitions/hold"
"400":
description: |
Bad request. Possible `error_code` attribute values:
* `invalid_query`
schema:
$ref: "../swagger.yaml#/definitions/error"
"401":
description: Authentication required
schema:

View file

@ -24,6 +24,13 @@
type: array
items:
$ref: "../swagger.yaml#/definitions/recall"
"400":
description: |
Bad request. Possible `error_code` attribute values:
* `invalid_query`
schema:
$ref: "../swagger.yaml#/definitions/error"
"401":
description: Authentication required
schema:

View file

@ -32,8 +32,11 @@
items:
$ref: "../swagger.yaml#/definitions/preservation_processing"
type: array
400:
description: Bad request
"400":
description: |
Bad request. Possible `error_code` attribute values:
* `invalid_query`
schema:
$ref: "../swagger.yaml#/definitions/error"
403:
@ -76,8 +79,8 @@
schema:
items:
$ref: "../swagger.yaml#/definitions/preservation_processing"
400:
description: Bad parameter
"400":
description: Bad request
schema:
$ref: "../swagger.yaml#/definitions/error"
401:
@ -140,6 +143,10 @@
schema:
items:
$ref: "../swagger.yaml#/definitions/preservation_processing"
"400":
description: Bad request
schema:
$ref: "../swagger.yaml#/definitions/error"
401:
description: Authentication required
schema:
@ -190,8 +197,8 @@
schema:
items:
$ref: "../swagger.yaml#/definitions/preservation_processing"
400:
description: Bad parameter
"400":
description: Bad request
schema:
$ref: "../swagger.yaml#/definitions/error"
403:
@ -236,8 +243,8 @@
responses:
204:
description: processing deleted
400:
description: processing deletion failed
"400":
description: Bad request
schema:
$ref: "../swagger.yaml#/definitions/error"
401:

View file

@ -62,8 +62,11 @@
items:
$ref: "../swagger.yaml#/definitions/preservation_train"
type: array
400:
description: Bad request
"400":
description: |
Bad request. Possible `error_code` attribute values:
* `invalid_query`
schema:
$ref: "../swagger.yaml#/definitions/error"
403:
@ -107,8 +110,8 @@
schema:
items:
$ref: "../swagger.yaml#/definitions/preservation_train"
400:
description: Bad parameter
"400":
description: Bad request
schema:
$ref: "../swagger.yaml#/definitions/error"
401:
@ -178,6 +181,10 @@
schema:
items:
$ref: "../swagger.yaml#/definitions/preservation_train"
"400":
description: Bad request
schema:
$ref: "../swagger.yaml#/definitions/error"
401:
description: Authentication required
schema:
@ -228,8 +235,8 @@
schema:
items:
$ref: "../swagger.yaml#/definitions/preservation_train"
400:
description: Bad parameter
"400":
description: Bad request
schema:
$ref: "../swagger.yaml#/definitions/error"
403:
@ -275,8 +282,8 @@
responses:
204:
description: Train deleted
400:
description: Train deletion failed
"400":
description: Bad request
schema:
$ref: "../swagger.yaml#/definitions/error"
401:
@ -333,8 +340,8 @@
description: A successfully added item
schema:
$ref: "../swagger.yaml#/definitions/preservation_train_item"
400:
description: Bad parameter
"400":
description: Bad request
schema:
$ref: "../swagger.yaml#/definitions/error"
401:
@ -399,8 +406,8 @@
type: array
items:
type: object
400:
description: Bad parameter
"400":
description: Bad request
schema:
$ref: "../swagger.yaml#/definitions/error"
401:
@ -472,8 +479,8 @@
description: A successfully updated item
schema:
$ref: "../swagger.yaml#/definitions/preservation_train_item"
400:
description: Bad parameter
"400":
description: Bad request
schema:
$ref: "../swagger.yaml#/definitions/error"
403:
@ -521,7 +528,7 @@
"204":
description: Item removed
"400":
description: Item removal failed
description: Bad request
schema:
$ref: "../swagger.yaml#/definitions/error"
"401":
@ -578,6 +585,10 @@
description: An item in train
schema:
$ref: "../swagger.yaml#/definitions/preservation_train_item"
"400":
description: Bad request
schema:
$ref: "../swagger.yaml#/definitions/error"
401:
description: Authentication required
schema:
@ -635,8 +646,8 @@
description: A successfully copied item
schema:
$ref: "../swagger.yaml#/definitions/preservation_train_item"
400:
description: Bad parameter
"400":
description: Bad request
schema:
$ref: "../swagger.yaml#/definitions/error"
401:

View file

@ -41,7 +41,10 @@
items:
$ref: "../swagger.yaml#/definitions/item"
"400":
description: Bad parameter
description: |
Bad request. Possible `error_code` attribute values:
* `invalid_query`
schema:
$ref: "../swagger.yaml#/definitions/error"
"401":
@ -92,8 +95,8 @@
type: array
items:
type: object
400:
description: Bad parameter
"400":
description: Bad request
schema:
$ref: "../swagger.yaml#/definitions/error"
401:
@ -145,7 +148,7 @@
"204":
description: Item removed
"400":
description: Item removal failed
description: Bad request
schema:
$ref: "../swagger.yaml#/definitions/error"
"401":

View file

@ -63,9 +63,12 @@
schema:
type: string
"400":
description: Bad Request
description: |
Bad request. Possible `error_code` attribute values:
* `invalid_query`
schema:
$ref: ../swagger.yaml#/definitions/error
$ref: "../swagger.yaml#/definitions/error"
"403":
description: Access forbidden
schema:

View file

@ -91,7 +91,7 @@
schema:
$ref: "../swagger.yaml#/definitions/checkout"
"400":
description: Missing or wrong parameters
description: Bad request
schema:
$ref: "../swagger.yaml#/definitions/error"
"401":

View file

@ -43,6 +43,13 @@
type: array
items:
$ref: "../swagger.yaml#/definitions/quote"
"400":
description: |
Bad request. Possible `error_code` attribute values:
* `invalid_query`
schema:
$ref: "../swagger.yaml#/definitions/error"
"403":
description: Access forbidden
schema:
@ -81,6 +88,10 @@
description: Quote added
schema:
$ref: "../swagger.yaml#/definitions/quote"
"400":
description: Bad request
schema:
$ref: "../swagger.yaml#/definitions/error"
"401":
description: Authentication required
schema:
@ -119,6 +130,10 @@
description: A Quote
schema:
$ref: "../swagger.yaml#/definitions/quote"
"400":
description: Bad request
schema:
$ref: "../swagger.yaml#/definitions/error"
"404":
description: Quote not found
schema:
@ -158,6 +173,10 @@
description: A quote
schema:
$ref: "../swagger.yaml#/definitions/quote"
"400":
description: Bad request
schema:
$ref: "../swagger.yaml#/definitions/error"
"401":
description: Authentication required
schema:
@ -197,6 +216,10 @@
responses:
"204":
description: Quote deleted
"400":
description: Bad request
schema:
$ref: "../swagger.yaml#/definitions/error"
"401":
description: Authentication required
schema:

View file

@ -25,7 +25,10 @@
items:
$ref: "../swagger.yaml#/definitions/record_source"
"400":
description: Missing or wrong parameters
description: |
Bad request. Possible `error_code` attribute values:
* `invalid_query`
schema:
$ref: "../swagger.yaml#/definitions/error"
"401":
@ -73,7 +76,7 @@
schema:
$ref: "../swagger.yaml#/definitions/record_source"
"400":
description: Missing or wrong parameters
description: Bad request
schema:
$ref: "../swagger.yaml#/definitions/error"
"401":
@ -117,7 +120,7 @@
schema:
$ref: "../swagger.yaml#/definitions/record_source"
"400":
description: Missing or wrong parameters
description: Bad request
schema:
$ref: "../swagger.yaml#/definitions/error"
"401":
@ -170,7 +173,7 @@
schema:
$ref: "../swagger.yaml#/definitions/record_source"
"400":
description: Missing or wrong parameters
description: Bad request
schema:
$ref: "../swagger.yaml#/definitions/error"
"401":
@ -215,7 +218,7 @@
"204":
description: Deleted
"400":
description: Missing or wrong parameters
description: Bad request
schema:
$ref: "../swagger.yaml#/definitions/error"
"401":

View file

@ -23,6 +23,13 @@
type: array
items:
$ref: "../swagger.yaml#/definitions/rota"
"400":
description: |
Bad request. Possible `error_code` attribute values:
* `invalid_query`
schema:
$ref: "../swagger.yaml#/definitions/error"
"403":
description: Access forbidden
schema:
@ -61,6 +68,10 @@
description: Rota added
schema:
$ref: "../swagger.yaml#/definitions/rota"
"400":
description: Bad request
schema:
$ref: "../swagger.yaml#/definitions/error"
"401":
description: Authentication required
schema:
@ -99,6 +110,10 @@
description: A rota
schema:
$ref: "../swagger.yaml#/definitions/rota"
"400":
description: Bad request
schema:
$ref: "../swagger.yaml#/definitions/error"
"404":
description: Rota not found
schema:
@ -138,6 +153,10 @@
description: A rota
schema:
$ref: "../swagger.yaml#/definitions/rota"
"400":
description: Bad request
schema:
$ref: "../swagger.yaml#/definitions/error"
"401":
description: Authentication required
schema:
@ -174,6 +193,10 @@
responses:
"204":
description: Rota deleted
"400":
description: Bad request
schema:
$ref: "../swagger.yaml#/definitions/error"
"401":
description: Authentication required
schema:

View file

@ -23,6 +23,13 @@
type: array
items:
$ref: "../swagger.yaml#/definitions/search_filter"
"400":
description: |
Bad request. Possible `error_code` attribute values:
* `invalid_query`
schema:
$ref: "../swagger.yaml#/definitions/error"
'403':
description: Access forbidden
schema:
@ -58,6 +65,10 @@
description: Search filter added
schema:
$ref: "../swagger.yaml#/definitions/search_filter"
"400":
description: Bad request
schema:
$ref: "../swagger.yaml#/definitions/error"
'401':
description: Authentication required
schema:
@ -97,6 +108,10 @@
description: A search filter
schema:
$ref: "../swagger.yaml#/definitions/search_filter"
"400":
description: Bad request
schema:
$ref: "../swagger.yaml#/definitions/error"
'403':
description: Access forbidden
schema:
@ -137,6 +152,10 @@
description: An search_filter
schema:
$ref: "../swagger.yaml#/definitions/search_filter"
"400":
description: Bad request
schema:
$ref: "../swagger.yaml#/definitions/error"
'401':
description: Authentication required
schema:
@ -175,6 +194,10 @@
description: Searc filter deleted
schema:
type: string
"400":
description: Bad request
schema:
$ref: "../swagger.yaml#/definitions/error"
'401':
description: Authentication required
schema:

View file

@ -24,6 +24,13 @@
type: array
items:
$ref: "../swagger.yaml#/definitions/suggestion"
"400":
description: |
Bad request. Possible `error_code` attribute values:
* `invalid_query`
schema:
$ref: "../swagger.yaml#/definitions/error"
"403":
description: Access forbidden
schema:
@ -121,6 +128,10 @@
description: A suggestion
schema:
$ref: "../swagger.yaml#/definitions/suggestion"
"400":
description: Bad request
schema:
$ref: "../swagger.yaml#/definitions/error"
"403":
description: Access forbidden
schema:
@ -210,6 +221,10 @@
description: Suggestion deleted
schema:
type: string
"400":
description: Bad request
schema:
$ref: "../swagger.yaml#/definitions/error"
"401":
description: Authentication required
schema:
@ -271,6 +286,13 @@
type: array
items:
$ref: "../swagger.yaml#/definitions/patron"
"400":
description: |
Bad request. Possible `error_code` attribute values:
* `invalid_query`
schema:
$ref: "../swagger.yaml#/definitions/error"
"403":
description: Access forbidden
schema:

View file

@ -38,6 +38,13 @@
type: array
items:
$ref: "../swagger.yaml#/definitions/ticket"
"400":
description: |
Bad request. Possible `error_code` attribute values:
* `invalid_query`
schema:
$ref: "../swagger.yaml#/definitions/error"
"403":
description: Access forbidden
schema:
@ -76,6 +83,10 @@
description: Ticket added
schema:
$ref: "../swagger.yaml#/definitions/ticket"
"400":
description: Bad request
schema:
$ref: "../swagger.yaml#/definitions/error"
"401":
description: Authentication required
schema:
@ -114,6 +125,13 @@
description: A ticket
schema:
$ref: "../swagger.yaml#/definitions/ticket"
"400":
description: |
Bad request. Possible `error_code` attribute values:
* `invalid_query`
schema:
$ref: "../swagger.yaml#/definitions/error"
"404":
description: Ticket not found
schema:
@ -153,6 +171,10 @@
description: A ticket
schema:
$ref: "../swagger.yaml#/definitions/ticket"
"400":
description: Bad request
schema:
$ref: "../swagger.yaml#/definitions/error"
"401":
description: Authentication required
schema:
@ -189,6 +211,10 @@
responses:
"204":
description: Ticket deleted
"400":
description: Bad request
schema:
$ref: "../swagger.yaml#/definitions/error"
"401":
description: Authentication required
schema:
@ -249,6 +275,13 @@
type: array
items:
$ref: "../swagger.yaml#/definitions/ticket_update"
"400":
description: |
Bad request. Possible `error_code` attribute values:
* `invalid_query`
schema:
$ref: "../swagger.yaml#/definitions/error"
"403":
description: Access forbidden
schema:
@ -292,6 +325,10 @@
description: Ticket added
schema:
$ref: "../swagger.yaml#/definitions/ticket_update"
"400":
description: Bad request
schema:
$ref: "../swagger.yaml#/definitions/error"
"401":
description: Authentication required
schema:
@ -336,6 +373,10 @@
description: Ticket added
schema:
$ref: "../swagger.yaml#/definitions/ticket"
"400":
description: Bad request
schema:
$ref: "../swagger.yaml#/definitions/error"
"401":
description: Authentication required
schema:

View file

@ -44,7 +44,10 @@
items:
$ref: "../swagger.yaml#/definitions/transfer_limit"
"400":
description: Bad request
description: |
Bad request. Possible `error_code` attribute values:
* `invalid_query`
schema:
$ref: "../swagger.yaml#/definitions/error"
"401":
@ -138,6 +141,10 @@
description: Transfer limit deleted
schema:
type: string
"400":
description: Bad request
schema:
$ref: "../swagger.yaml#/definitions/error"
"401":
description: Authentication required
schema:
@ -313,6 +320,10 @@
responses:
"204":
description: Transfer limits deleted
"400":
description: Bad request
schema:
$ref: "../swagger.yaml#/definitions/error"
"401":
description: Authentication required
schema:

View file

@ -171,7 +171,7 @@ subtest 'SQL injection in "query" handling' => sub {
"[{\"-and\":[[{\"me.patron_id\":{\"like(IF(ASCII(SUBSTRING((SELECT version()),1,1))=ASCII('1'),SLEEP(1/100000),0))or\":\"\%a\%\"}}]]}]";
$t->get_ok("//$userid:$password@/api/v1/patrons?q=$q")
->status_is( 500, 'Attempt to inject SQL through operators is rejected' );
->status_is( 400, 'Attempt to inject SQL through operators is rejected' );
$schema->storage->txn_rollback;
};

View file

@ -14,7 +14,7 @@
use Modern::Perl;
use Test::More tests => 4;
use Test::More tests => 5;
use Test::Mojo;
use Data::Dumper;
@ -127,3 +127,46 @@ subtest 'tags tests' => sub {
print STDERR "$error\n";
}
};
subtest '400 response tests' => sub {
plan tests => 1;
my @errors;
foreach my $route ( sort keys %{$paths} ) {
foreach my $verb ( keys %{ $paths->{$route} } ) {
my $response_400 = $paths->{$route}->{$verb}->{responses}->{400};
if ( !$response_400 ) {
push @errors, "$verb $route -> response 400 absent";
next;
}
push @errors,
"$verb $route -> 'description' does not start with 'Bad request': ($response_400->{description})"
unless $response_400->{description} =~ /^Bad request/;
my $ref = $response_400->{schema}->{'$ref'};
push @errors, "$verb $route -> '\$ref' is not '#/definitions/error': ($ref)"
unless $ref eq '#/definitions/error';
# GET routes with q parameter must mention the `invalid_query` error code
if ( ( any { $_->{in} eq 'body' && $_->{name} eq 'query' } @{ $paths->{$route}->{$verb}->{parameters} } )
|| ( any { $_->{in} eq 'query' && $_->{name} eq 'q' } @{ $paths->{$route}->{$verb}->{parameters} } ) )
{
push @errors,
"$verb $route -> 'description' does not include '* \`invalid_query\`': ($response_400->{description})"
unless $response_400->{description} =~ /\* \`invalid_query\`/;
}
}
}
is( scalar @errors, 0, 'No errors in 400 definitions in the spec' );
foreach my $error (@errors) {
print STDERR "$error\n";
}
};