Now that we have specs thanks to bug 36480 and bug 36481, we should add the option.
Created attachment 164229 [details] [review] Bug 36482: Allow embedding desks and cash_registers on libraries endpoints Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Created attachment 164230 [details] [review] Bug 36482: Make embedding work for GET /libraries/:library_id Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Not sure how to test this one.
(In reply to David Nind from comment #4) > Not sure how to test this one. Sorry for that!
To test: 1. Have UseCirculationDesks and UseCashRegisters enabled 2. Add some cash registers and desks to a known KTD library. For example 'MPL'. 3. Use Postman to make: * GET /libraries * GET /libraries/MPL in both cases add the request header 'x-koha-embed: desks,cash_registers' => FAIL: In both cases the requests are denied because embedding those is not allowed. 4. Apply the first patch 5. Repeat 3 => PARTIAL SUCCESS: GET /libraries does the job! => FAIL: GET /libraries/MPL fails! 6. Apply the second patch and repeat 3 => SUCCESS: Both cases succeed! 7. Sign off :-D
Created attachment 164304 [details] [review] Bug 36482: Allow embedding desks and cash_registers on libraries endpoints Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: David Nind <david@davidnind.com>
Created attachment 164305 [details] [review] Bug 36482: Make embedding work for GET /libraries/:library_id Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: David Nind <david@davidnind.com>
Thanks Tomás! Testing notes (using KTD): 1. Also needed to enable RESTBasicAuth system preference.
Created attachment 164416 [details] [review] Bug 36482: Allow embedding desks and cash_registers on libraries endpoints Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Created attachment 164417 [details] [review] Bug 36482: Make embedding work for GET /libraries/:library_id Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Created attachment 164418 [details] [review] Bug 36482: Add embed tests prove t/db_dependent/api/v1/libraries.t Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
(In reply to Pedro Amorim from comment #12) > Created attachment 164418 [details] [review] [review] > Bug 36482: Add embed tests > > prove t/db_dependent/api/v1/libraries.t > > Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com> Thanks for the missed tests!
Applying: Bug 36482: Allow embedding desks and cash_registers on libraries endpoints error: sha1 information is lacking or useless (api/v1/swagger/paths/libraries.yaml).
I let Tomas know about this yesterday, I think he's working on it once his jetlag lets his brain work again.
Created attachment 164929 [details] [review] Bug 36482: Allow embedding desks and cash_registers on libraries endpoints Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Created attachment 164930 [details] [review] Bug 36482: Make embedding work for GET /libraries/:library_id Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Created attachment 164931 [details] [review] Bug 36482: Add embed tests prove t/db_dependent/api/v1/libraries.t Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Back to PQA, trivial conflict with 'library hours' fixed.
Being a little nit-picky, but shouldn't this be "library default"? + branch_default: + type: boolean + description: If this till is the branch default Adding "additional_work_needed", meaning "Asking for feedback". Not a blocker.
Pushed for 24.05! Well done everyone, thank you!
Pushed to 23.11.x for 23.11.06
Enhancement will not be backported to 23.05.x