Bugzilla – Attachment 147628 Details for
Bug 33103
Add vendor aliases
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 33103: Embed aliases in GET /vendors
Bug-33103-Embed-aliases-in-GET-vendors.patch (text/plain), 3.00 KB, created by
Jonathan Druart
on 2023-03-02 14:34:45 UTC
(
hide
)
Description:
Bug 33103: Embed aliases in GET /vendors
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2023-03-02 14:34:45 UTC
Size:
3.00 KB
patch
obsolete
>From babc1c0971380663de4b3c6993e394f63ec118e9 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Wed, 1 Mar 2023 12:43:44 +0100 >Subject: [PATCH] Bug 33103: Embed aliases in GET /vendors > >--- > api/v1/swagger/definitions/vendor.yaml | 5 +++++ > api/v1/swagger/definitions/vendor_alias.yaml | 15 +++++++++++++++ > api/v1/swagger/paths/acquisitions_vendors.yaml | 10 ++++++++++ > .../prog/js/vue/fetch/acquisition-api-client.js | 3 +++ > 4 files changed, 33 insertions(+) > create mode 100644 api/v1/swagger/definitions/vendor_alias.yaml > >diff --git a/api/v1/swagger/definitions/vendor.yaml b/api/v1/swagger/definitions/vendor.yaml >index 90feafbd81a..3bf8a179772 100644 >--- a/api/v1/swagger/definitions/vendor.yaml >+++ b/api/v1/swagger/definitions/vendor.yaml >@@ -114,6 +114,11 @@ properties: > - string > - "null" > description: External id >+ aliases: >+ type: array >+ description: List of aliases >+ items: >+ $ref: "vendor_alias.yaml" > additionalProperties: false > required: > - name >diff --git a/api/v1/swagger/definitions/vendor_alias.yaml b/api/v1/swagger/definitions/vendor_alias.yaml >new file mode 100644 >index 00000000000..0a9f9ef17bb >--- /dev/null >+++ b/api/v1/swagger/definitions/vendor_alias.yaml >@@ -0,0 +1,15 @@ >+--- >+type: object >+properties: >+ id: >+ description: Internal ID for the extended attribute >+ type: integer >+ vendor_id: >+ description: ID of the vendor >+ type: integer >+ alias: >+ description: The alias >+ type: string >+additionalProperties: false >+required: >+ - alias >diff --git a/api/v1/swagger/paths/acquisitions_vendors.yaml b/api/v1/swagger/paths/acquisitions_vendors.yaml >index f5275ddfe1b..599b213cb09 100644 >--- a/api/v1/swagger/paths/acquisitions_vendors.yaml >+++ b/api/v1/swagger/paths/acquisitions_vendors.yaml >@@ -27,6 +27,16 @@ > - $ref: "../swagger.yaml#/parameters/q_body" > - $ref: "../swagger.yaml#/parameters/q_header" > - $ref: "../swagger.yaml#/parameters/request_id_header" >+ - name: x-koha-embed >+ in: header >+ required: false >+ description: Embed list sent as a request header >+ type: array >+ items: >+ type: string >+ enum: >+ - aliases >+ collectionFormat: csv > responses: > "200": > description: A list of vendors >diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/fetch/acquisition-api-client.js b/koha-tmpl/intranet-tmpl/prog/js/vue/fetch/acquisition-api-client.js >index 4353ef0ad40..edd2137355e 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/vue/fetch/acquisition-api-client.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/vue/fetch/acquisition-api-client.js >@@ -12,6 +12,9 @@ export class AcquisitionAPIClient extends HttpClient { > getAll: (query) => > this.get({ > endpoint: "vendors?" + (query || "_per_page=-1"), >+ headers: { >+ "x-koha-embed": "aliases", >+ }, > }), > }; > } >-- >2.25.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 33103
:
147621
|
147622
|
147623
|
147624
|
147625
|
147626
|
147627
|
147628
|
147629
|
147630
|
147645
|
147646
|
147647
|
147648
|
147649
|
147650
|
147651
|
147652
|
147653
|
147654
|
147827
|
148448
|
148449
|
148450
|
148451
|
148452
|
148453
|
148454
|
148455
|
148456
|
148457
|
148458
|
149414
|
149419
|
149479
|
149480
|
149481
|
149482
|
149483
|
149484
|
149485
|
149486
|
149487
|
149488
|
149489
|
149490
|
149491
|
149606
|
149607
|
149608
|
149609
|
149629
|
149630
|
149788