Bug 29593 - Wrong tag in GET /public/libraries spec
Summary: Wrong tag in GET /public/libraries spec
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: REST API (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low minor (vote)
Assignee: Tomás Cohen Arazi
QA Contact: Martin Renvoize
URL:
Keywords:
Depends on: 28948
Blocks: 29620
  Show dependency treegraph
 
Reported: 2021-11-29 18:28 UTC by Tomás Cohen Arazi
Modified: 2021-12-17 19:41 UTC (History)
5 users (show)

See Also:
Change sponsored?: ---
Patch complexity: String patch
Text to go in the release notes:
This updates the tag in GET /public/libraries (api/v1/swagger/paths/libraries.json file) from library to libraries.
Version(s) released in:
22.05.00,21.11.01


Attachments
Bug 29593: Fix wrong tag in GET /public/libraries spec (1.08 KB, patch)
2021-11-29 18:44 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 29593: Fix wrong tag in GET /public/libraries spec (1.13 KB, patch)
2021-11-29 20:39 UTC, David Nind
Details | Diff | Splinter Review
Bug 29593: Fix wrong tag in GET /public/libraries spec (2.66 KB, patch)
2021-12-02 11:10 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 29593: Fix wrong tag in GET /public/libraries spec (2.72 KB, patch)
2021-12-03 12:15 UTC, Martin Renvoize
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Tomás Cohen Arazi 2021-11-29 18:28:15 UTC
There's a 'libraries' tag when it should be 'library'. This leads to wrong display in the API documentation site [1].

[1] https://api.koha-community.org/#tag/library
Comment 1 Tomás Cohen Arazi 2021-11-29 18:44:09 UTC
Created attachment 128088 [details] [review]
Bug 29593: Fix wrong tag in GET /public/libraries spec

This makes the documentation look untidy.

To test:
1. Open the api/v1/swagger/paths/libraries.json file with your favourite
   editor.
=> FAIL: All routes, but this one, have tags: ['library']
2. Apply this patch
=> SUCCESS: All routes have tags: ['library']
3. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 2 David Nind 2021-11-29 20:39:08 UTC
Created attachment 128089 [details] [review]
Bug 29593: Fix wrong tag in GET /public/libraries spec

This makes the documentation look untidy.

To test:
1. Open the api/v1/swagger/paths/libraries.json file with your favourite
   editor.
=> FAIL: All routes, but this one, have tags: ['library']
2. Apply this patch
=> SUCCESS: All routes have tags: ['library']
3. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: David Nind <david@davidnind.com>
Comment 3 Jonathan Druart 2021-12-02 10:10:15 UTC
Looking at api/v1/swagger/swagger.yaml it seems that we use the plural form for all other tags.

Shouldn't we do the reverse and use "libraries" everywhere else instead?
Comment 4 Tomás Cohen Arazi 2021-12-02 10:57:19 UTC
(In reply to Jonathan Druart from comment #3)
> Looking at api/v1/swagger/swagger.yaml it seems that we use the plural form
> for all other tags.
> 
> Shouldn't we do the reverse and use "libraries" everywhere else instead?

Good point, updating the patch.
Comment 5 Tomás Cohen Arazi 2021-12-02 11:10:13 UTC
Created attachment 128151 [details] [review]
Bug 29593: Fix wrong tag in GET /public/libraries spec

This makes the documentation look untidy.

To test:
1. Open the api/v1/swagger/paths/libraries.json file with your favourite
   editor.
=> FAIL: All routes, but this one, have tags: ['library']
2. Apply this patch
=> SUCCESS: All routes have tags: ['libraries']
3. swagger.yaml too!
4. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: David Nind <david@davidnind.com>
Comment 6 Martin Renvoize 2021-12-03 12:15:24 UTC
Created attachment 128210 [details] [review]
Bug 29593: Fix wrong tag in GET /public/libraries spec

This makes the documentation look untidy.

To test:
1. Open the api/v1/swagger/paths/libraries.json file with your favourite
   editor.
=> FAIL: All routes, but this one, have tags: ['library']
2. Apply this patch
=> SUCCESS: All routes have tags: ['libraries']
3. swagger.yaml too!
4. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 7 Martin Renvoize 2021-12-03 12:16:32 UTC
Solid improvement, Passing QA
Comment 8 Fridolin Somers 2021-12-07 22:19:11 UTC
Pushed to master for 22.05, thanks to everybody involved 🦄
Comment 9 Kyle M Hall 2021-12-10 12:27:34 UTC
Pushed to 21.11.x for 21.11.01
Comment 10 Andrew Fuerste-Henry 2021-12-17 19:41:06 UTC
Missing dependencies, not backported to 21.05.x