Bug 20004

Summary: Adapt /v1/cities to new naming guidelines
Product: Koha Reporter: Tomás Cohen Arazi (tcohen) <tomascohen>
Component: REST APIAssignee: Tomás Cohen Arazi (tcohen) <tomascohen>
Status: CLOSED FIXED QA Contact:
Severity: enhancement    
Priority: P5 - low CC: claire_gravely, jonathan.druart
Version: Main   
Hardware: All   
OS: All   
URL: https://wiki.koha-community.org/wiki/Cities_endpoint_RFC
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:
Bug Depends on: 19686    
Bug Blocks: 19774    
Attachments: Bug 20004: Unit tests
Bug 20004: Adapt /v1/cities to new naming guidelines
Bug 20004: Unit tests
Bug 20004: Adapt /v1/cities to new naming guidelines
Bug 20004: Adapt /v1/cities to new naming guidelines
Bug 20004: Unit tests
Bug 20004: Adapt /v1/cities to new naming guidelines
Bug 20004: Unit tests
Bug 20004: Unit tests
Bug 20004: Adapt /v1/cities to new naming guidelines
Bug 20004: Fix POD

Description Tomás Cohen Arazi (tcohen) 2018-01-17 13:31:20 UTC

    
Comment 1 Tomás Cohen Arazi (tcohen) 2018-01-17 17:46:37 UTC Comment hidden (obsolete)
Comment 2 Tomás Cohen Arazi (tcohen) 2018-01-17 17:46:43 UTC Comment hidden (obsolete)
Comment 3 Claire Gravely 2018-02-15 08:18:46 UTC
Patch does not apply 

Applying: Bug 20004: Adapt /v1/cities to new naming guidelines
fatal: sha1 information is lacking or useless (api/v1/swagger/parameters.json).
Comment 4 Tomás Cohen Arazi (tcohen) 2018-02-15 12:11:15 UTC Comment hidden (obsolete)
Comment 5 Tomás Cohen Arazi (tcohen) 2018-02-15 12:11:21 UTC Comment hidden (obsolete)
Comment 6 Claire Gravely 2018-02-15 13:22:13 UTC Comment hidden (obsolete)
Comment 7 Claire Gravely 2018-02-15 15:35:37 UTC
Created attachment 71665 [details] [review]
Bug 20004: Unit tests

This patch adapts the unit tests for the cities endpoint to the
requirements from the RFC. This tests are expected to just fail
without the needed followup.

To test:
- Run:
  $ kshell
 k$ prove t/db_dependent/api/v1/cities.t
=> FAIL: Tests obviously don't pass without the followup patch.

Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>
Comment 8 Claire Gravely 2018-02-15 15:35:40 UTC
Created attachment 71666 [details] [review]
Bug 20004: Adapt /v1/cities to new naming guidelines

This patch implements the changes required by the cities endpoint RFC
[1].

It uses the objects.search helper, and relies on bug 19686.

To test:
- Apply the patches
- Compare the spec with the RFC (api/v1/swagger/definitions/city.json)
=> SUCCESS: It makes sense
- Run:
  $ kshell
 k$ prove t/db_dependent/api/v1/cities.t
=> Tests pass!
- Sign off :-D

Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>
Comment 9 Kyle M Hall (khall) 2018-02-16 16:28:57 UTC
Created attachment 71823 [details] [review]
Bug 20004: Unit tests

This patch adapts the unit tests for the cities endpoint to the
requirements from the RFC. This tests are expected to just fail
without the needed followup.

To test:
- Run:
  $ kshell
 k$ prove t/db_dependent/api/v1/cities.t
=> FAIL: Tests obviously don't pass without the followup patch.

Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 10 Kyle M Hall (khall) 2018-02-16 16:29:28 UTC
Created attachment 71824 [details] [review]
Bug 20004: Unit tests

This patch adapts the unit tests for the cities endpoint to the
requirements from the RFC. This tests are expected to just fail
without the needed followup.

To test:
- Run:
  $ kshell
 k$ prove t/db_dependent/api/v1/cities.t
=> FAIL: Tests obviously don't pass without the followup patch.

Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 11 Kyle M Hall (khall) 2018-02-16 16:29:35 UTC
Created attachment 71825 [details] [review]
Bug 20004: Adapt /v1/cities to new naming guidelines

This patch implements the changes required by the cities endpoint RFC
[1].

It uses the objects.search helper, and relies on bug 19686.

To test:
- Apply the patches
- Compare the spec with the RFC (api/v1/swagger/definitions/city.json)
=> SUCCESS: It makes sense
- Run:
  $ kshell
 k$ prove t/db_dependent/api/v1/cities.t
=> Tests pass!
- Sign off :-D

Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 12 Kyle M Hall (khall) 2018-02-16 16:29:38 UTC
Created attachment 71826 [details] [review]
Bug 20004: Fix POD

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 13 Jonathan Druart 2018-02-16 21:12:25 UTC
(In reply to Kyle M Hall from comment #12)
> Created attachment 71826 [details] [review] [review]
> Bug 20004: Fix POD

Well, you are cheating QA tests here :)
Comment 14 Jonathan Druart 2018-02-16 21:18:06 UTC
Pushed to master for 18.05, thanks to everybody involved!