When you look at https://api.koha-community.org you will notice some categories on the left-side column are not tidy (lower case, similar to other entries but slightly different, etc). I open this bug to address it.
Created attachment 164612 [details] [review] Bug 36565: Unit tests This patch introduces tests on the OpenAPI spec so that all tags used in path definitions have their corresponding entry at the top level 'tags' section. This it important for correctly rendering the API documentation. Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Created attachment 164613 [details] [review] Bug 36565: Bookings API docs fixes (bug 29002 follow-up) Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Created attachment 164614 [details] [review] Bug 36565: ILL requests API docs fixes (bug 22440 follow-up) Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Created attachment 164615 [details] [review] Bug 36565: Biblio merge API docs fixes (bug 33036 follow-up) Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Created attachment 164616 [details] [review] Bug 36565: Preservation module API docs fixes (bug 30708 follow-up) Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Created attachment 164617 [details] [review] Bug 36565: EDI files API docs fixes (bug 30070 follow-up) Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
To test: 1. Apply the tests patch 2. Run: $ ktd --shell k$ prove xt/api.t => FAIL: Tests fail! We have spec issues! 3. Apply the rest of the patches 4. Repeat 2 => SUCCESS: Tests pass! 5. Sign off :-D
I submitted a patch for each dependency bug, because I don't want to track where each was released, and this way it can be backported where appropriate.
Created attachment 164642 [details] [review] Bug 36565: Unit tests This patch introduces tests on the OpenAPI spec so that all tags used in path definitions have their corresponding entry at the top level 'tags' section. This it important for correctly rendering the API documentation. Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: David Nind <david@davidnind.com>
Created attachment 164643 [details] [review] Bug 36565: Bookings API docs fixes (bug 29002 follow-up) Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: David Nind <david@davidnind.com>
Created attachment 164644 [details] [review] Bug 36565: ILL requests API docs fixes (bug 22440 follow-up) Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: David Nind <david@davidnind.com>
Created attachment 164645 [details] [review] Bug 36565: Biblio merge API docs fixes (bug 33036 follow-up) Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: David Nind <david@davidnind.com>
Created attachment 164646 [details] [review] Bug 36565: Preservation module API docs fixes (bug 30708 follow-up) Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: David Nind <david@davidnind.com>
Created attachment 164647 [details] [review] Bug 36565: EDI files API docs fixes (bug 30070 follow-up) Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: David Nind <david@davidnind.com>
Created attachment 164648 [details] [review] Bug 36565: Unit tests This patch introduces tests on the OpenAPI spec so that all tags used in path definitions have their corresponding entry at the top level 'tags' section. This it important for correctly rendering the API documentation. 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>
Created attachment 164649 [details] [review] Bug 36565: Bookings API docs fixes (bug 29002 follow-up) 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>
Created attachment 164650 [details] [review] Bug 36565: ILL requests API docs fixes (bug 22440 follow-up) 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>
Created attachment 164651 [details] [review] Bug 36565: Biblio merge API docs fixes (bug 33036 follow-up) 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>
Created attachment 164652 [details] [review] Bug 36565: Preservation module API docs fixes (bug 30708 follow-up) 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>
Created attachment 164653 [details] [review] Bug 36565: EDI files API docs fixes (bug 30070 follow-up) 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>
Thanks for the cleanup work here Tomas, and apologies it seems I was guilty of introducing a few of the issues. Great to see a unit test to help prevent these in the future. Passing QA
I fixed the first conflict, but got stuck on the second - can you please rebase? Applying: Bug 36565: Bookings API docs fixes (bug 29002 follow-up) Applying: Bug 36565: ILL requests API docs fixes (bug 22440 follow-up) Using index info to reconstruct a base tree... M api/v1/swagger/paths/ill_requests.yaml Falling back to patching base and 3-way merge... Auto-merging api/v1/swagger/paths/ill_requests.yaml Applying: Bug 36565: Biblio merge API docs fixes (bug 33036 follow-up) Applying: Bug 36565: Preservation module API docs fixes (bug 30708 follow-up) Applying: Bug 36565: EDI files API docs fixes (bug 30070 follow-up) error: sha1 information is lacking or useless (api/v1/swagger/swagger.yaml). error: could not build fake ancestor Patch failed at 0001 Bug 36565: EDI files API docs fixes (bug 30070 follow-up) hint: Use 'git am --show-current-patch=diff' to see the failed patch When you have resolved this problem run "git bz apply --continue". If you would prefer to skip this patch, instead run "git bz apply --skip". To restore the original branch and stop patching run "git bz apply --abort". Patch left in /tmp/Bug-36565-EDI-files-API-docs-fixes-bug-30070-follo-dncuei9u.patch
Created attachment 165698 [details] [review] Bug 36565: Unit tests This patch introduces tests on the OpenAPI spec so that all tags used in path definitions have their corresponding entry at the top level 'tags' section. This it important for correctly rendering the API documentation. 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>
Created attachment 165699 [details] [review] Bug 36565: Bookings API docs fixes (bug 29002 follow-up) 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>
Created attachment 165700 [details] [review] Bug 36565: ILL requests API docs fixes (bug 22440 follow-up) 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>
Created attachment 165701 [details] [review] Bug 36565: Biblio merge API docs fixes (bug 33036 follow-up) 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>
Created attachment 165702 [details] [review] Bug 36565: Preservation module API docs fixes (bug 30708 follow-up) 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>
Created attachment 165703 [details] [review] Bug 36565: EDI files API docs fixes (bug 30070 follow-up) 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>
Thanks for the quick rebase :) Could we have a test plan to see the changes in action? (not blocker) I managed in the past, but it might be good to have it available somewhere.
Pushed for 24.05! Well done everyone, thank you!
Does not apply easy on 23.11.x. Please provide patches if possible.
Ah with more backports it applies if I skip "bug 30070 follow-up" patch (since not in 23.11.x). But I get error in unit test : kohadev-koha@kohadevbox:koha(23.11.x)$ prove xt/api.t xt/api.t .. 1/4 # Failed test 'Validation exit code is 0' # at xt/api.t line 100. # got: '256' # expected: '0' # Validation failed. /paths/libraries/{library_id}/cash_registers/get is missing path parameter(s) for {library_id}
(In reply to Fridolin Somers from comment #31) > Does not apply easy on 23.11.x. > Please provide patches if possible. I'll submit a 23.11 version.
Created attachment 167604 [details] [review] [23.11.x] Bug 36565: Unit tests This patch introduces tests on the OpenAPI spec so that all tags used in path definitions have their corresponding entry at the top level 'tags' section. This it important for correctly rendering the API documentation. 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>
Created attachment 167605 [details] [review] [23.11.x] Bug 36565: Bookings API docs fixes (bug 29002 follow-up) 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>
Created attachment 167606 [details] [review] [23.11.x] Bug 36565: ILL requests API docs fixes (bug 22440 follow-up) 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>
Created attachment 167607 [details] [review] [23.11.x] Bug 36565: Biblio merge API docs fixes (bug 33036 follow-up) 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>
Created attachment 167608 [details] [review] [23.11.x] Bug 36565: Preservation module API docs fixes (bug 30708 follow-up) 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>
(In reply to Fridolin Somers from comment #32) > Ah with more backports it applies if I skip "bug 30070 follow-up" patch > (since not in 23.11.x). > > But I get error in unit test : I submitted patches that apply on 23.11.x. They are just the original patches, rebased. Probably something moved forward in 23.11 as I cannot reproduce the failure: kohadev-koha@kohadevbox:koha(bug_36565_2311)$ prove xt/api.t xt/api.t .. ok All tests successful. Files=1, Tests=4, 4 wallclock secs ( 0.01 usr 0.01 sys + 3.44 cusr 0.23 csys = 3.69 CPU) Result: PASS This should be pushed to 23.11 to fix the API docs view.
Thanks a lot. Pushed to 23.11.x for 23.11.07
Not backporting to 23.05.x unless requested