Koha/api/v1/swagger/paths
Tomas Cohen Arazi 18ee07409a Bug 27855: Add 'extended_attributes' embedding to the spec
This patch just adds:
- The optional 'extended_attribute' attribute to the patron object
  OpenAPI definition. It consists of an array of extended_attribute
  objects.
- Add the x-koha-embed: [ 'extended_attributes' ] definition on the GET
  routes for patrons, allowing immedite availability of the
  'extended_attributes' embedding feature.

To test:
1. Apply this patchset
2. Restart Plack
3. Have some known patron_id/borrowernumber that has some extended
   attributes ('Patron attributes' on the UI).
4. Enable Basic authentication
5. Assuming the known patron_id is 1, point your favourite REST tool to http://kohadev-intra.myDNSname.org:8081/api/v1/patrons/1
   e.g.: if your user/pass is koha/koha
   curl --location --request GET 'http://kohadev-intra.myDNSname.org:8081/api/v1/patrons/1' \
        --header 'Content-Type: application/json' \
        --header 'Authorization: Basic a29oYTprb2hh'
=> SUCCESS: You get the patron object correctly, no extended_attributes
6. Repeat 5, adding the x-koha-embed header like this:
   curl --location --request GET 'http://kohadev-intra.myDNSname.org:8081/api/v1/patrons/1' \
        --header 'Content-Type: application/json' \
        --header 'x-koha-embed: extended_attributes' \
        --header 'Authorization: Basic a29oYTprb2hh'
=> SUCCESS: You get the patron, with the extended attributes inside!
7. Sign off :-D

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-09 10:31:47 +01:00
..
acquisitions_funds.json Bug 24321: Clean /acquisitions/funds 2020-01-08 14:42:28 +00:00
acquisitions_orders.json Bug 20212: Add more embeddable objects to orders 2021-01-28 16:44:11 +01:00
acquisitions_vendors.json Bug 25048: Make successful resource deletion return 204 2020-04-29 16:24:43 +01:00
advancededitormacros.json Bug 25502: Adapt Advanced macros routes to current guidelines 2020-05-19 15:21:16 +01:00
biblios.json Bug 27352: Add GET /biblios/:biblio_id/items 2021-01-29 09:03:45 +01:00
cash_registers.json Bug 26274: Add cashups api routes 2021-02-12 12:33:41 +01:00
checkouts.json Bug 24083: Add support for unseen_renewals 2020-11-11 16:09:58 +01:00
circulation-rules.json Bug 18936: (follow-up) Update REST definition for /.../kinds 2020-02-04 09:56:24 +00:00
cities.json Bug 25279: Add general query parameters to the /cities route 2020-05-12 11:39:36 +01:00
clubs.json Bug 27330: (QA follow-up) Return 409 instead 2021-02-01 16:36:38 +01:00
config_smtp_servers.json Bug 22343: API routes for SMTP servers CRUD 2020-10-02 10:54:40 +02:00
holds.json Bug 26181: Disable override by default in /holds 2021-02-12 12:14:50 +01:00
ill_backends.json Bug 22615: Add endpoint for getting one ill backend 2020-03-05 13:03:40 +00:00
illrequests.json Bug 25944: Schema fix for illrequests route 2020-07-16 15:32:51 +01:00
import_batch_profiles.json Bug 23019: (follow-up) Fix test permissions and API definition bugs 2020-11-11 15:55:49 +01:00
items.json Bug 23667: Add spec 2019-10-29 12:20:35 +00:00
libraries.json Bug 26595: Embed the whole smtp_server object 2020-10-14 15:53:38 +02:00
oauth.json Bug 20402: Implement OAuth2 authentication for REST API 2018-05-08 15:55:42 -03:00
patrons.json Bug 27855: Add 'extended_attributes' embedding to the spec 2021-03-09 10:31:47 +01:00
patrons_account.json Bug 23607: Make /patrons/:patron_id/account staff only 2019-09-27 14:00:48 +01:00
patrons_password.json Bug 17006: OpenAPI spec 2019-01-28 15:25:39 +00:00
public_patrons.json Bug 23584: Add spec for PUT /public/patron/:patron_id/guarantors 2019-09-23 10:52:39 +01:00
quotes.json Bug 27251: Rewrite QOTD with the Koha REST API 2021-01-29 09:03:45 +01:00
return_claims.json Bug 14697: (QA follow-up) Organize tests in subtests 2019-10-31 12:05:14 +00:00
rotas.json Bug 11897: Use 'stockrotation' permission for the endpoint 2018-10-09 15:46:06 +00:00