From a49aa56faca159f9b90fc76d5d5503a4270a359f Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Thu, 14 Apr 2022 16:06:24 +0100 Subject: [PATCH] Bug 30536: Update spec files This patch removes superflous x-koha-embed defintions at the top level of the endpoint specifications. It also replaces a few x-koha-embeds at the top level with parameter lists where this had been missed in preceeding patches. Signed-off-by: Tomas Cohen Arazi --- .../swagger/paths/acquisitions_baskets.yaml | 11 ++++++-- api/v1/swagger/paths/acquisitions_funds.yaml | 24 +++++++++++++--- api/v1/swagger/paths/acquisitions_orders.yaml | 28 ------------------- api/v1/swagger/paths/biblios.yaml | 5 ---- api/v1/swagger/paths/cash_registers.yaml | 4 --- api/v1/swagger/paths/checkouts.yaml | 4 --- api/v1/swagger/paths/libraries.yaml | 4 --- api/v1/swagger/paths/patrons.yaml | 7 ----- api/v1/swagger/paths/suggestions.yaml | 11 ++++++-- 9 files changed, 38 insertions(+), 60 deletions(-) diff --git a/api/v1/swagger/paths/acquisitions_baskets.yaml b/api/v1/swagger/paths/acquisitions_baskets.yaml index 9237289f00..71bb720994 100644 --- a/api/v1/swagger/paths/acquisitions_baskets.yaml +++ b/api/v1/swagger/paths/acquisitions_baskets.yaml @@ -15,6 +15,15 @@ - $ref: "../swagger.yaml#/parameters/q_param" - $ref: "../swagger.yaml#/parameters/q_body" - $ref: "../swagger.yaml#/parameters/q_header" + - name: x-koha-embed + in: header + required: false + description: Embed list sent as a request header + type: array + items: + type: string + enum: + - extended_attributes produces: - application/json responses: @@ -42,5 +51,3 @@ x-koha-authorization: permissions: acquisition: order_manage - x-koha-embed: - - extended_attributes diff --git a/api/v1/swagger/paths/acquisitions_funds.yaml b/api/v1/swagger/paths/acquisitions_funds.yaml index 309c50b38f..31f0455e5b 100644 --- a/api/v1/swagger/paths/acquisitions_funds.yaml +++ b/api/v1/swagger/paths/acquisitions_funds.yaml @@ -76,6 +76,16 @@ - $ref: "../swagger.yaml#/parameters/q_param" - $ref: "../swagger.yaml#/parameters/q_body" - $ref: "../swagger.yaml#/parameters/q_header" + - name: x-koha-embed + in: header + required: false + description: Embed list sent as a request header + type: array + items: + type: string + enum: + - extended_attributes + collectionFormat: csv produces: - application/json responses: @@ -103,8 +113,6 @@ x-koha-authorization: permissions: acquisition: budget_modify - x-koha-embed: - - extended_attributes /acquisitions/funds/users: get: x-mojo-to: Acquisitions::Funds#list_users @@ -121,6 +129,16 @@ - $ref: "../swagger.yaml#/parameters/q_param" - $ref: "../swagger.yaml#/parameters/q_body" - $ref: "../swagger.yaml#/parameters/q_header" + - name: x-koha-embed + in: header + required: false + description: Embed list sent as a request header + type: array + items: + type: string + enum: + - extended_attributes + collectionFormat: csv produces: - application/json responses: @@ -148,5 +166,3 @@ x-koha-authorization: permissions: acquisition: budget_modify - x-koha-embed: - - extended_attributes diff --git a/api/v1/swagger/paths/acquisitions_orders.yaml b/api/v1/swagger/paths/acquisitions_orders.yaml index 1d740858eb..70668af8d7 100644 --- a/api/v1/swagger/paths/acquisitions_orders.yaml +++ b/api/v1/swagger/paths/acquisitions_orders.yaml @@ -100,20 +100,6 @@ acquisition: - order_manage - order_manage_all - x-koha-embed: - - basket - - basket.basket_group - - basket.creator - - biblio - - biblio.active_orders+count - - biblio.holds+count - - biblio.items+count - - biblio.suggestions.suggester - - fund - - current_item_level_holds+count - - invoice - - items - - subscription post: x-mojo-to: Acquisitions::Orders#add operationId: addOrder @@ -228,20 +214,6 @@ x-koha-authorization: permissions: acquisition: order_manage - x-koha-embed: - - basket - - basket.basket_group - - basket.creator - - biblio - - biblio.active_orders+count - - biblio.holds+count - - biblio.items+count - - biblio.suggestions.suggester - - fund - - current_item_level_holds+count - - invoice - - items - - subscription put: x-mojo-to: Acquisitions::Orders#update operationId: updateOrder diff --git a/api/v1/swagger/paths/biblios.yaml b/api/v1/swagger/paths/biblios.yaml index 0a2cb9489e..60e4e951a4 100644 --- a/api/v1/swagger/paths/biblios.yaml +++ b/api/v1/swagger/paths/biblios.yaml @@ -156,11 +156,6 @@ x-koha-authorization: permissions: circulate: circulate_remaining_permissions - x-koha-embed: - - issuer - - item - - patron - - library "/biblios/{biblio_id}/items": get: x-mojo-to: Biblios#get_items diff --git a/api/v1/swagger/paths/cash_registers.yaml b/api/v1/swagger/paths/cash_registers.yaml index 22ee561ea3..719a932e8e 100644 --- a/api/v1/swagger/paths/cash_registers.yaml +++ b/api/v1/swagger/paths/cash_registers.yaml @@ -57,8 +57,6 @@ x-koha-authorization: permissions: cash_management: cashup - x-koha-embed: - - manager "/cashups/{cashup_id}": get: x-mojo-to: CashRegisters::Cashups#get @@ -107,5 +105,3 @@ x-koha-authorization: permissions: cash_management: cashup - x-koha-embed: - - summary diff --git a/api/v1/swagger/paths/checkouts.yaml b/api/v1/swagger/paths/checkouts.yaml index f82cd36cbd..8802334d14 100644 --- a/api/v1/swagger/paths/checkouts.yaml +++ b/api/v1/swagger/paths/checkouts.yaml @@ -60,8 +60,6 @@ x-koha-authorization: permissions: circulate: circulate_remaining_permissions - x-koha-embed: - - issuer "/checkouts/{checkout_id}": get: x-mojo-to: Checkouts#get @@ -110,8 +108,6 @@ x-koha-authorization: permissions: circulate: circulate_remaining_permissions - x-koha-embed: - - issuer "/checkouts/{checkout_id}/renewal": post: x-mojo-to: Checkouts#renew diff --git a/api/v1/swagger/paths/libraries.yaml b/api/v1/swagger/paths/libraries.yaml index c5e33439cf..b2bd863439 100644 --- a/api/v1/swagger/paths/libraries.yaml +++ b/api/v1/swagger/paths/libraries.yaml @@ -133,8 +133,6 @@ x-koha-authorization: permissions: catalogue: "1" - x-koha-embed: - - smtp_server post: x-mojo-to: Libraries#add operationId: addLibrary @@ -218,8 +216,6 @@ x-koha-authorization: permissions: catalogue: "1" - x-koha-embed: - - smtp_server put: x-mojo-to: Libraries#update operationId: updateLibrary diff --git a/api/v1/swagger/paths/patrons.yaml b/api/v1/swagger/paths/patrons.yaml index 5164cb2858..443e3defcc 100644 --- a/api/v1/swagger/paths/patrons.yaml +++ b/api/v1/swagger/paths/patrons.yaml @@ -397,11 +397,6 @@ - tools: "label_creator" - serials: "routing" - acquisition: "order_manage" - x-koha-embed: - - extended_attributes - - checkouts+count - - overdues+count - - account_balance post: x-mojo-to: Patrons#add operationId: addPatron @@ -511,8 +506,6 @@ x-koha-authorization: permissions: borrowers: edit_borrowers - x-koha-embed: - - extended_attributes put: x-mojo-to: Patrons#update operationId: updatePatron diff --git a/api/v1/swagger/paths/suggestions.yaml b/api/v1/swagger/paths/suggestions.yaml index ecf46837d0..1abc307250 100644 --- a/api/v1/swagger/paths/suggestions.yaml +++ b/api/v1/swagger/paths/suggestions.yaml @@ -231,6 +231,15 @@ - $ref: "../swagger.yaml#/parameters/q_param" - $ref: "../swagger.yaml#/parameters/q_body" - $ref: "../swagger.yaml#/parameters/q_header" + - name: x-koha-embed + in: header + required: false + description: Embed list sent as a request header + type: array + items: + type: string + enum: + - extended_attributes produces: - application/json responses: @@ -258,5 +267,3 @@ x-koha-authorization: permissions: suggestions: suggestions_manage - x-koha-embed: - - extended_attributes -- 2.34.1