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: Frédéric Demians <f.demians@tamil.fr> |
||
|---|---|---|
| .. | ||
| acquisitions_baskets.t | ||
| acquisitions_funds.t | ||
| acquisitions_orders.t | ||
| acquisitions_vendors.t | ||
| advanced_editor_macros.t | ||
| article_requests.t | ||
| auth.t | ||
| auth_authenticate_api_request.t | ||
| auth_basic.t | ||
| authorised_values.t | ||
| biblios.t | ||
| cashups.t | ||
| checkouts.t | ||
| cities.t | ||
| clubs_holds.t | ||
| erm_agreements.t | ||
| erm_documents.t | ||
| erm_eholdings_packages.t | ||
| erm_eholdings_resources.t | ||
| erm_eholdings_titles.t | ||
| erm_licenses.t | ||
| erm_users.t | ||
| holds.t | ||
| idp.t | ||
| ill_backends.t | ||
| ill_requests.t | ||
| import_batch_profiles.t | ||
| import_record_matches.t | ||
| item_groups.t | ||
| items.t | ||
| jobs.t | ||
| libraries.t | ||
| oauth.t | ||
| pagination.t | ||
| password_validation.t | ||
| patrons.t | ||
| patrons_accounts.t | ||
| patrons_extended_attributes.t | ||
| patrons_holds.t | ||
| patrons_password.t | ||
| patrons_password_expiration.t | ||
| query.t | ||
| return_claims.t | ||
| search_filters.t | ||
| smtp_servers.t | ||
| stockrotationstage.t | ||
| suggestions.t | ||
| transfer_limits.t | ||
| two_factor_auth.t | ||
| unhandled_exceptions.t | ||