Bug 29593

Summary: Wrong tag in GET /public/libraries spec
Product: Koha Reporter: Tomás Cohen Arazi <tomascohen>
Component: REST APIAssignee: Tomás Cohen Arazi <tomascohen>
Status: CLOSED FIXED QA Contact: Martin Renvoize <martin.renvoize>
Severity: minor    
Priority: P5 - low CC: andrewfh, fridolin.somers, jonathan.druart, kyle, martin.renvoize
Version: unspecified   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: String patch
Documentation contact: Documentation submission:
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
Bug Depends on: 28948    
Bug Blocks: 29620    
Attachments: Bug 29593: Fix wrong tag in GET /public/libraries spec
Bug 29593: Fix wrong tag in GET /public/libraries spec
Bug 29593: Fix wrong tag in GET /public/libraries spec
Bug 29593: Fix wrong tag in GET /public/libraries spec

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