Summary: | Invalid specification for ERM routes | ||
---|---|---|---|
Product: | Koha | Reporter: | Martin Renvoize (ashimema) <martin.renvoize> |
Component: | REST API | Assignee: | Martin Renvoize (ashimema) <martin.renvoize> |
Status: | CLOSED FIXED | QA Contact: | Tomás Cohen Arazi (tcohen) <tomascohen> |
Severity: | major | ||
Priority: | P5 - low | CC: | jonathan.druart, lucas, m.de.rooy, pedro.amorim, tomascohen |
Version: | unspecified | ||
Hardware: | All | ||
OS: | All | ||
See Also: |
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32981 https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32983 |
||
Change sponsored?: | --- | Patch complexity: | Small patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: |
23.05.00,22.11.04
|
|
Circulation function: | |||
Attachments: |
Bug 33145: Fix ERM swagger specs
Bug 33145: Fix ERM swagger specs Bug 33145: Fix ERM swagger specs |
Description
Martin Renvoize (ashimema)
2023-03-06 10:01:03 UTC
Created attachment 147777 [details] [review] Bug 33145: Fix ERM swagger specs This patch adds the missing 'Provider name' parameter definition to the various ERM paths that were missing it. Test plan 1) Install swagger-cli using npm 2) cd api/v1/swagger 3) Run `swagger-cli validate swagger.yaml` 4) Confirm validation fails 5) Apply the patch here 6) Re-run the swagger-cli test above and confirm it now passes. I must admit.. I thought we had a unit test to catch invalid specs generally.. so surprised this crept in. Created attachment 147780 [details] [review] Bug 33145: Fix ERM swagger specs This patch adds the missing 'Provider name' parameter definition to the various ERM paths that were missing it. Test plan 1) Install swagger-cli using npm 2) cd api/v1/swagger 3) Run `swagger-cli validate swagger.yaml` 4) Confirm validation fails 5) Apply the patch here 6) Re-run the swagger-cli test above and confirm it now passes. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Tomas: Please have a look here I run this for validating, installing swagger-cli is failing for me in ktd: docker run --rm -v $PWD/api/v1/swagger:/swagger jeanberu/swagger-cli swagger-cli validate swagger/swagger.yaml Created attachment 147782 [details] [review] Bug 33145: Fix ERM swagger specs This patch adds the missing 'Provider name' parameter definition to the various ERM paths that were missing it. Test plan 1) Run: docker run --rm -v $PWD/api/v1/swagger:/swagger \ jeanberu/swagger-cli \ swagger-cli validate swagger/swagger.yaml => FAIL: The spec is not valid! 2) Apply this patch 3) Repeat 1 => SUCCESS: Tests pass! Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Edit: tcohen edited the test plan because of the failure to install swagger-cli cleanly Pushed to master for 23.05. Nice work everyone, thanks! Don't we need a regression test? Nice work, thanks everyone! Pushed to 22.11.x for the next release. Not needed in 22.05.x |