From faaff9a2aaefe43fdf8e91a59339500dc414839d Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Fri, 8 Apr 2022 11:57:59 +0200 Subject: [PATCH] Bug 30385: Standardize our swagger yaml spec files --- api/v1/swagger/definitions/account_line.yaml | 98 ++- .../definitions/advancededitormacro.yaml | 8 +- .../swagger/definitions/allows_renewal.yaml | 16 +- api/v1/swagger/definitions/basket.yaml | 81 +- api/v1/swagger/definitions/cashup.yaml | 28 +- api/v1/swagger/definitions/checkout.yaml | 110 +-- api/v1/swagger/definitions/checkouts.yaml | 4 +- api/v1/swagger/definitions/city.yaml | 16 +- api/v1/swagger/definitions/club_hold.yaml | 18 +- .../definitions/club_hold_patron_hold.yaml | 26 +- .../definitions/club_hold_patron_holds.yaml | 4 +- api/v1/swagger/definitions/club_holds.yaml | 4 +- api/v1/swagger/definitions/fund.yaml | 83 +- api/v1/swagger/definitions/hold.yaml | 102 ++- api/v1/swagger/definitions/holds.yaml | 4 +- api/v1/swagger/definitions/ill_backend.yaml | 8 +- api/v1/swagger/definitions/ill_backends.yaml | 4 +- .../definitions/import_batch_profile.yaml | 58 +- .../definitions/import_batch_profiles.yaml | 4 +- api/v1/swagger/definitions/invoice.yaml | 44 +- api/v1/swagger/definitions/item.yaml | 217 +++-- api/v1/swagger/definitions/library.yaml | 108 ++- api/v1/swagger/definitions/order.yaml | 256 +++--- api/v1/swagger/definitions/patron.yaml | 364 ++++----- .../definitions/patron_account_credit.yaml | 40 +- .../swagger/definitions/patron_balance.yaml | 14 +- .../patron_extended_attribute.yaml | 6 +- api/v1/swagger/definitions/quote.yaml | 12 +- api/v1/swagger/definitions/return_claim.yaml | 62 +- api/v1/swagger/definitions/smtp_server.yaml | 38 +- api/v1/swagger/definitions/suggestion.yaml | 191 +++-- .../swagger/definitions/transfer_limit.yaml | 24 +- api/v1/swagger/definitions/vendor.yaml | 96 +-- .../swagger/paths/acquisitions_baskets.yaml | 38 +- api/v1/swagger/paths/acquisitions_funds.yaml | 126 +-- api/v1/swagger/paths/acquisitions_orders.yaml | 277 ++++--- .../swagger/paths/acquisitions_vendors.yaml | 218 ++--- .../swagger/paths/advancededitormacros.yaml | 372 ++++----- api/v1/swagger/paths/article_requests.yaml | 94 +-- api/v1/swagger/paths/biblios.yaml | 387 +++++---- api/v1/swagger/paths/cash_registers.yaml | 96 +-- api/v1/swagger/paths/checkouts.yaml | 185 +++-- api/v1/swagger/paths/circulation-rules.yaml | 18 +- api/v1/swagger/paths/cities.yaml | 218 ++--- api/v1/swagger/paths/clubs.yaml | 85 +- api/v1/swagger/paths/config_smtp_servers.yaml | 208 ++--- api/v1/swagger/paths/holds.yaml | 771 +++++++++--------- api/v1/swagger/paths/ill_backends.yaml | 68 +- api/v1/swagger/paths/illrequests.yaml | 102 +-- .../swagger/paths/import_batch_profiles.yaml | 326 ++++---- api/v1/swagger/paths/items.yaml | 150 ++-- api/v1/swagger/paths/libraries.yaml | 378 ++++----- api/v1/swagger/paths/oauth.yaml | 26 +- api/v1/swagger/paths/patrons.yaml | 572 ++++++------- api/v1/swagger/paths/patrons_account.yaml | 72 +- .../paths/patrons_extended_attributes.yaml | 281 ++++--- api/v1/swagger/paths/patrons_holds.yaml | 48 +- api/v1/swagger/paths/patrons_password.yaml | 46 +- api/v1/swagger/paths/public_patrons.yaml | 194 +++-- api/v1/swagger/paths/quotes.yaml | 220 ++--- api/v1/swagger/paths/return_claims.yaml | 245 +++--- api/v1/swagger/paths/rotas.yaml | 50 +- api/v1/swagger/paths/suggestions.yaml | 274 +++---- api/v1/swagger/paths/transfer_limits.yaml | 346 ++++---- 64 files changed, 4303 insertions(+), 4336 deletions(-) diff --git a/api/v1/swagger/definitions/account_line.yaml b/api/v1/swagger/definitions/account_line.yaml index f517350f894..0223a124bfa 100644 --- a/api/v1/swagger/definitions/account_line.yaml +++ b/api/v1/swagger/definitions/account_line.yaml @@ -1,96 +1,94 @@ --- type: object properties: - account_line_id: - type: integer - description: Internal account line identifier - checkout_id: + description: + description: Account line description type: - - integer + - string - "null" - description: Internal identifier for the checkout the account line is related to - patron_id: + account_line_id: + description: Internal account line identifier type: integer - description: Internal identifier for the patron the account line belongs to - item_id: + account_type: + description: Account line type type: - - integer + - string - "null" - description: Internal identifier for the item the account line is related to - date: - type: string - format: date-time - description: Date the account line was created amount: - type: number description: Account line amount - description: + type: number + amount_outstanding: + description: Outstanding amount + type: number + cash_register_id: + description: Internal identifier for the cash register used for the payment (if any) type: - - string + - integer - "null" - description: Account line description - account_type: + checkout_id: + description: Internal identifier for the checkout the account line is related to type: - - string + - integer - "null" - description: Account line type - debit_type: + credit_type: + description: Account line credit type type: - string - "null" + date: + description: Date the account line was created + type: string + format: date-time + debit_type: description: Account line debit type - credit_type: type: - string - "null" - description: Account line credit type - payment_type: + interface: + description: 'Interface in which the account line was generated (values can be: api, cron, commandline, intranet, opac and sip)' type: - string - "null" - description: Payment type - amount_outstanding: - type: number - description: Outstanding amount - last_increment: - type: - - number - - "null" - description: The amount the line was increased last time - timestamp: - type: string - format: date-time - description: Timestamp for the latest line update internal_note: + description: Internal note type: - string - "null" - description: Internal note - user_id: + item_id: + description: Internal identifier for the item the account line is related to type: - integer - "null" - description: Internal patron identifier for the staff member that introduced the - account line + last_increment: + description: The amount the line was increased last time + type: + - number + - "null" library_id: + description: Internal identifier for the library in which the transaction took place type: - string - "null" - description: Internal identifier for the library in which the transaction took place - interface: + patron_id: + description: Internal identifier for the patron the account line belongs to + type: integer + payment_type: + description: Payment type type: - string - "null" - description: "Interface in which the account line was generated (values can be: api, - cron, commandline, intranet, opac and sip)" status: + description: The credit/debit status type: - string - "null" - description: The credit/debit status - cash_register_id: + timestamp: + description: Timestamp for the latest line update + type: string + format: date-time + user_id: + description: Internal patron identifier for the staff member that introduced the account line type: - integer - "null" - description: Internal identifier for the cash register used for the payment (if any) additionalProperties: false diff --git a/api/v1/swagger/definitions/advancededitormacro.yaml b/api/v1/swagger/definitions/advancededitormacro.yaml index d8c3d17f8b3..1fb54dd890c 100644 --- a/api/v1/swagger/definitions/advancededitormacro.yaml +++ b/api/v1/swagger/definitions/advancededitormacro.yaml @@ -2,17 +2,17 @@ type: object properties: macro_id: - type: integer description: Internal advanced editor macro identifier + type: integer readOnly: true - name: - description: macro name - type: string macro_text: description: macro text type: - string - "null" + name: + description: macro name + type: string patron_id: description: borrower number type: diff --git a/api/v1/swagger/definitions/allows_renewal.yaml b/api/v1/swagger/definitions/allows_renewal.yaml index a1278870865..d769255ff22 100644 --- a/api/v1/swagger/definitions/allows_renewal.yaml +++ b/api/v1/swagger/definitions/allows_renewal.yaml @@ -2,20 +2,20 @@ type: object properties: allows_renewal: + description: 'Renewability status; true = renewable, false = not renewable' type: boolean - description: Renewability status; true = renewable, false = not renewable - max_renewals: - type: integer - description: Maximum number of possible renewals current_renewals: - type: integer description: Current used renewals - unseen_renewals: type: integer - description: Number of consecutive times the item was renewed without being seen error: + description: Description on false allows_renewal. type: - string - "null" - description: Description on false allows_renewal. + max_renewals: + description: Maximum number of possible renewals + type: integer + unseen_renewals: + description: Number of consecutive times the item was renewed without being seen + type: integer additionalProperties: false diff --git a/api/v1/swagger/definitions/basket.yaml b/api/v1/swagger/definitions/basket.yaml index 8ab8ff1d69e..ec29ee2120d 100644 --- a/api/v1/swagger/definitions/basket.yaml +++ b/api/v1/swagger/definitions/basket.yaml @@ -1,74 +1,73 @@ --- type: object properties: - basket_id: - type: integer - description: Internal identifier for the basket - name: - type: string - description: Basket name - internal_note: + authorised_by: + description: Internal patron identifier of the basket creator type: - - string + - integer - "null" - description: Internal note - vendor_note: + basket_group_id: + description: links this basket to its group (aqbasketgroups.id) type: - - string + - integer - "null" - description: Vendor note - contract_id: + basket_id: + description: Internal identifier for the basket type: integer - description: Internal identifier of the linked contract - creation_date: + billing_library: + description: basket billing place type: - string - "null" - format: date - description: The date the basket was created close_date: + description: The date the basket was closed type: - string - "null" format: date - description: The date the basket was closed - vendor_id: + contract_id: + description: Internal identifier of the linked contract type: integer - description: Internal identifier for the vendor - authorised_by: - type: - - integer - - "null" - description: Internal patron identifier of the basket creator - basket_group_id: + create_items: + description: "When items should be created for orders in this basket (Options: 'ordering', 'receiving', 'cataloguing'. Null means system wide config)" + type: string + enum: + - ordering + - receiving + - cataloguing + creation_date: + description: The date the basket was created type: - - integer + - string - "null" - description: links this basket to its group (aqbasketgroups.id) + format: date delivery_library: + description: basket delivery place type: - string - "null" - description: basket delivery place - billing_library: + internal_note: + description: Internal note type: - string - "null" - description: basket billing place library_id: + description: Library the basket belongs to type: - integer - "null" - description: Library the basket belongs to + name: + description: Basket name + type: string standing: - type: boolean description: If the orders in this basket are standing - create_items: - type: string - enum: - - ordering - - receiving - - cataloguing - description: "When items should be created for orders in this basket (Options: - 'ordering', 'receiving', 'cataloguing'. Null means system wide config)" + type: boolean + vendor_id: + description: Internal identifier for the vendor + type: integer + vendor_note: + description: Vendor note + type: + - string + - "null" additionalProperties: false diff --git a/api/v1/swagger/definitions/cashup.yaml b/api/v1/swagger/definitions/cashup.yaml index 7d1d5042d10..f88ce607a28 100644 --- a/api/v1/swagger/definitions/cashup.yaml +++ b/api/v1/swagger/definitions/cashup.yaml @@ -1,28 +1,28 @@ --- type: object properties: - cashup_id: - type: integer - description: Internal cashup identifier + summary: + description: A summary of the cashup action + type: object + amount: + description: Account line amount + type: number cash_register_id: - type: integer description: Internal identifier for the register the cashup belongs to - manager_id: type: integer - description: Internal identifier for the manager the cashup was performed by + cashup_id: + description: Internal cashup identifier + type: integer manager: + description: The object representing the manager the cashup was performed by type: - object - "null" - description: The object representing the manager the cashup was performed by - amount: - type: number - description: Account line amount + manager_id: + description: Internal identifier for the manager the cashup was performed by + type: integer timestamp: + description: Timestamp for the latest line update type: string format: date-time - description: Timestamp for the latest line update - summary: - type: object - description: A summary of the cashup action additionalProperties: false diff --git a/api/v1/swagger/definitions/checkout.yaml b/api/v1/swagger/definitions/checkout.yaml index 9ea807224d9..cc41187cad6 100644 --- a/api/v1/swagger/definitions/checkout.yaml +++ b/api/v1/swagger/definitions/checkout.yaml @@ -1,103 +1,103 @@ --- type: object properties: + auto_renew: + description: Auto renewal + type: boolean + auto_renew_error: + description: Auto renewal error + type: + - string + - "null" + checkin_date: + description: Date the item was returned + type: + - string + - "null" + format: date-time + checkout_date: + description: Date the item was issued + type: string + format: date-time checkout_id: - type: integer description: internally assigned checkout identifier - patron_id: - type: integer - description: Internal patron identifier - item_id: type: integer - description: internal identifier of checked out item due_date: + description: Due date type: string format: date-time - description: Due date - library_id: + issuer: + description: The object representing the checkout issuer type: - - string + - object - "null" - description: code of the library the item was checked out issuer_id: + description: internally assigned for the user that processed the checkout type: - integer - "null" - description: internally assigned for the user that processed the checkout - checkin_date: + item: + description: The object representing the checked out item type: - - string + - object - "null" - format: date-time - description: Date the item was returned + item_id: + description: internal identifier of checked out item + type: integer last_renewed_date: + description: Date the item was last renewed type: - string - "null" format: date-time - description: Date the item was last renewed - renewals: - type: - - integer - - "null" - description: Number of renewals - unseen_renewals: + library: + description: The object representing the checkout library type: - - integer + - object - "null" - description: Number of consecutive unseen renewals - auto_renew: - type: boolean - description: Auto renewal - auto_renew_error: + library_id: + description: code of the library the item was checked out type: - string - "null" - description: Auto renewal error - timestamp: - type: string - description: Last update time - checkout_date: - type: string - format: date-time - description: Date the item was issued - onsite_checkout: - type: boolean - description: On site checkout note: + description: Issue note text type: - string - "null" - description: Issue note text note_date: + description: Datetime of the issue note type: - string - "null" format: date - description: Datetime of the issue note note_seen: - type: - - boolean - - "null" description: has the note been seen already - issuer: type: - - object + - boolean - "null" - description: The object representing the checkout issuer - item: + onsite_checkout: + description: On site checkout + type: boolean + patron: + description: The object representing the checkout patron type: - object - "null" - description: The object representing the checked out item - library: + patron_id: + description: Internal patron identifier + type: integer + renewals: + description: Number of renewals type: - - object + - integer - "null" - description: The object representing the checkout library - patron: + timestamp: + description: Last update time + type: string + unseen_renewals: + description: Number of consecutive unseen renewals type: - - object + - integer - "null" - description: The object representing the checkout patron additionalProperties: false diff --git a/api/v1/swagger/definitions/checkouts.yaml b/api/v1/swagger/definitions/checkouts.yaml index 18ce40d0268..1431286c2f7 100644 --- a/api/v1/swagger/definitions/checkouts.yaml +++ b/api/v1/swagger/definitions/checkouts.yaml @@ -1,5 +1,5 @@ --- type: array -items: - $ref: "checkout.yaml" additionalProperties: false +items: + $ref: checkout.yaml diff --git a/api/v1/swagger/definitions/city.yaml b/api/v1/swagger/definitions/city.yaml index 77eb6718dde..74820bbc91e 100644 --- a/api/v1/swagger/definitions/city.yaml +++ b/api/v1/swagger/definitions/city.yaml @@ -2,24 +2,24 @@ type: object properties: city_id: - type: integer description: internally assigned city identifier + type: integer readOnly: true - name: - description: city name - type: string - state: - description: city state + country: + description: city country type: - string - "null" + name: + description: city name + type: string postal_code: description: city postal code type: - string - "null" - country: - description: city country + state: + description: city state type: - string - "null" diff --git a/api/v1/swagger/definitions/club_hold.yaml b/api/v1/swagger/definitions/club_hold.yaml index f98d0d6d5e5..c80dfa88256 100644 --- a/api/v1/swagger/definitions/club_hold.yaml +++ b/api/v1/swagger/definitions/club_hold.yaml @@ -1,22 +1,22 @@ --- type: object properties: - club_hold_id: + biblio_id: + description: Internal biblio identifier type: integer + club_hold_id: description: Internal club hold identifier - club_id: type: integer + club_id: description: Internal club identifier - biblio_id: type: integer - description: Internal biblio identifier + date_created: + description: Date and time the hold was created + type: string + format: date-time item_id: + description: Internal item identifier type: - string - "null" - description: Internal item identifier - date_created: - type: string - format: date-time - description: Date and time the hold was created additionalProperties: false diff --git a/api/v1/swagger/definitions/club_hold_patron_hold.yaml b/api/v1/swagger/definitions/club_hold_patron_hold.yaml index 271fc4827d6..7876064facb 100644 --- a/api/v1/swagger/definitions/club_hold_patron_hold.yaml +++ b/api/v1/swagger/definitions/club_hold_patron_hold.yaml @@ -1,29 +1,29 @@ --- type: object properties: - club_hold_patron_hold_id: - type: integer - description: Internal club hold to patron hold identifier club_hold_id: - type: integer description: Internal club hold identifier - hold_id: - type: - - integer - - "null" - description: Internal hold identifier - patron_id: type: integer - description: Internal patron identifier + club_hold_patron_hold_id: + description: Internal club hold to patron hold identifier + type: integer error_code: + description: Code returned by CanItemBeReserved type: - string - "null" format: date - description: Code returned by CanItemBeReserved error_message: + description: Generic error message type: - string - "null" - description: Generic error message + hold_id: + description: Internal hold identifier + type: + - integer + - "null" + patron_id: + description: Internal patron identifier + type: integer additionalProperties: false diff --git a/api/v1/swagger/definitions/club_hold_patron_holds.yaml b/api/v1/swagger/definitions/club_hold_patron_holds.yaml index 83e291e9c91..ec079dd65d9 100644 --- a/api/v1/swagger/definitions/club_hold_patron_holds.yaml +++ b/api/v1/swagger/definitions/club_hold_patron_holds.yaml @@ -1,5 +1,5 @@ --- type: array -items: - $ref: "club_hold_patron_hold.yaml" additionalProperties: false +items: + $ref: club_hold_patron_hold.yaml diff --git a/api/v1/swagger/definitions/club_holds.yaml b/api/v1/swagger/definitions/club_holds.yaml index a80fdcc14eb..4b5c18a3f7e 100644 --- a/api/v1/swagger/definitions/club_holds.yaml +++ b/api/v1/swagger/definitions/club_holds.yaml @@ -1,5 +1,5 @@ --- type: array -items: - $ref: "club_hold.yaml" additionalProperties: false +items: + $ref: club_hold.yaml diff --git a/api/v1/swagger/definitions/fund.yaml b/api/v1/swagger/definitions/fund.yaml index 263f6e9073c..4b5ec4c65b5 100644 --- a/api/v1/swagger/definitions/fund.yaml +++ b/api/v1/swagger/definitions/fund.yaml @@ -1,81 +1,80 @@ --- type: object properties: - fund_id: - type: integer - description: internally assigned fund identifier - readOnly: true - code: + budget_id: + description: Internal identifier for the budget type: - - string + - number - "null" + code: description: Code assigned to the fund by the user - name: - type: - - string - - "null" - description: Name assigned to the fund by the user - library_id: type: - string - "null" - description: Internal identifier for the library that this fund belongs to - total_amount: + fund_access: + description: 'Level of permission for this fund (1: owner, 2: owner, users and library, 3: owner and users)' type: - number - "null" - description: Total amount for this fund - warn_at_percentage: + fund_id: + description: internally assigned fund identifier + type: integer + readOnly: true + fund_owner_id: + description: Internal identifier for the fund owner type: - number - "null" - description: Warning at percentage - warn_at_amount: + library_id: + description: Internal identifier for the library that this fund belongs to type: - - number + - string - "null" - description: Warning at amount - notes: + name: + description: Name assigned to the fund by the user type: - string - "null" + notes: description: Notes related to this fund - budget_id: - type: - - number - - "null" - description: Internal identifier for the budget - timestamp: type: - string - format: date-time - description: Timestamp - fund_owner_id: - type: - - number - - "null" - description: Internal identifier for the fund owner - fund_access: - type: - - number - "null" - description: "Level of permission for this fund (1: owner, 2: owner, users and library, - 3: owner and users)" parent_fund_id: + description: Internal identifier for parent fund type: - integer - "null" - description: Internal identifier for parent fund statistic1_auth_value_category: + description: Statistical category for this fund type: - string - "null" - description: Statistical category for this fund statistic2_auth_value_category: + description: Second statistical category for this fund type: - string - "null" - description: Second statistical category for this fund + timestamp: + description: Timestamp + type: + - string + format: date-time + total_amount: + description: Total amount for this fund + type: + - number + - "null" + warn_at_amount: + description: Warning at amount + type: + - number + - "null" + warn_at_percentage: + description: Warning at percentage + type: + - number + - "null" additionalProperties: false required: - name diff --git a/api/v1/swagger/definitions/hold.yaml b/api/v1/swagger/definitions/hold.yaml index 1ca8114cf32..c755645b4cb 100644 --- a/api/v1/swagger/definitions/hold.yaml +++ b/api/v1/swagger/definitions/hold.yaml @@ -1,101 +1,99 @@ --- type: object properties: - hold_id: - type: integer - description: Internal hold identifier - patron_id: + biblio_id: + description: Internal biblio identifier type: integer - description: Internal patron identifier - hold_date: + cancellation_date: + description: The date the hold was cancelled type: - string - "null" format: date - description: The date the hold was placed - biblio_id: - type: integer - description: Internal biblio identifier - pickup_library_id: + cancellation_reason: + description: The reason the hold was cancelled type: - string - "null" - description: Internal library identifier for the pickup library desk_id: + description: The id of the desk type: - integer - "null" - description: The id of the desk - cancellation_date: + expiration_date: + description: The date the hold expires type: - string - "null" format: date - description: The date the hold was cancelled - cancellation_reason: + hold_date: + description: The date the hold was placed type: - string - "null" - description: The reason the hold was cancelled - notes: + format: date + hold_id: + description: Internal hold identifier + type: integer + item_id: + description: Internal item identifier type: - string - "null" - description: Notes related to this hold - priority: + item_level: + description: If the hold is placed at item level + type: boolean + item_type: + description: 'If record level hold, the optional itemtype of the item the patron is requesting' type: - - integer + - string - "null" - description: Where in the queue the patron sits - status: + lowest_priority: + description: Controls if the hold is given the lowest priority on the queue + type: boolean + non_priority: + description: Set this hold as non priority + type: boolean + notes: + description: Notes related to this hold type: - string - "null" - description: A one letter code defining what the status of the hold is after it has - been confirmed - timestamp: - type: string - format: date-time - description: Timestamp for the latest hold update - item_id: + patron_id: + description: Internal patron identifier + type: integer + pickup_library_id: + description: Internal library identifier for the pickup library type: - string - "null" - description: Internal item identifier - waiting_date: + priority: + description: Where in the queue the patron sits type: - - string + - integer - "null" - format: date - description: The date the item was marked as waiting for the patron at the library - expiration_date: + status: + description: A one letter code defining what the status of the hold is after it has been confirmed type: - string - "null" - format: date - description: The date the hold expires - lowest_priority: - type: boolean - description: Controls if the hold is given the lowest priority on the queue suspended: - type: boolean description: Controls if the hold is suspended + type: boolean suspended_until: + description: Date until which the hold has been suspended type: - string - "null" format: date-time - description: Date until which the hold has been suspended - non_priority: - description: Set this hold as non priority - type: boolean - item_type: + timestamp: + description: Timestamp for the latest hold update + type: string + format: date-time + waiting_date: + description: The date the item was marked as waiting for the patron at the library type: - string - "null" - description: If record level hold, the optional itemtype of the item the patron is - requesting - item_level: - type: boolean - description: If the hold is placed at item level + format: date additionalProperties: false diff --git a/api/v1/swagger/definitions/holds.yaml b/api/v1/swagger/definitions/holds.yaml index 2a5c053379b..1f7ed253bde 100644 --- a/api/v1/swagger/definitions/holds.yaml +++ b/api/v1/swagger/definitions/holds.yaml @@ -1,5 +1,5 @@ --- type: array -items: - $ref: "hold.yaml" additionalProperties: false +items: + $ref: hold.yaml diff --git a/api/v1/swagger/definitions/ill_backend.yaml b/api/v1/swagger/definitions/ill_backend.yaml index 9d742041b65..1b22112564c 100644 --- a/api/v1/swagger/definitions/ill_backend.yaml +++ b/api/v1/swagger/definitions/ill_backend.yaml @@ -1,10 +1,10 @@ --- type: object properties: - ill_backend_id: - type: string - description: Internal ILL backend identifier capabilities: - type: object description: List of capabilities + type: object + ill_backend_id: + description: Internal ILL backend identifier + type: string additionalProperties: false diff --git a/api/v1/swagger/definitions/ill_backends.yaml b/api/v1/swagger/definitions/ill_backends.yaml index 6b48f6e4aef..0698fb795ca 100644 --- a/api/v1/swagger/definitions/ill_backends.yaml +++ b/api/v1/swagger/definitions/ill_backends.yaml @@ -1,5 +1,5 @@ --- type: array -items: - $ref: "ill_backend.yaml" additionalProperties: false +items: + $ref: ill_backend.yaml diff --git a/api/v1/swagger/definitions/import_batch_profile.yaml b/api/v1/swagger/definitions/import_batch_profile.yaml index 50aa79feb4c..c3e5f363e81 100644 --- a/api/v1/swagger/definitions/import_batch_profile.yaml +++ b/api/v1/swagger/definitions/import_batch_profile.yaml @@ -1,34 +1,41 @@ --- type: object properties: - profile_id: - type: integer - description: Internal profile identifier - name: - description: name of this profile - type: string - matcher_id: - description: the id of the match rule used (matchpoints.matcher_id) + comments: + description: any comments added when the file was uploaded type: - - integer + - string - "null" - template_id: - description: the id of the marc modification template + encoding: + description: file encoding type: - - integer + - string - "null" - overlay_action: - description: how to handle duplicate records + format: + description: marc format type: - string - "null" + item_action: + description: what to do with item records + type: + - string + - "null" + matcher_id: + description: the id of the match rule used (matchpoints.matcher_id) + type: + - integer + - "null" + name: + description: name of this profile + type: string nomatch_action: description: how to handle records where no match is found type: - string - "null" - item_action: - description: what to do with item records + overlay_action: + description: how to handle duplicate records type: - string - "null" @@ -37,24 +44,17 @@ properties: type: - boolean - "null" + profile_id: + description: Internal profile identifier + type: integer record_type: description: type of record in the batch type: - string - "null" - encoding: - description: file encoding - type: - - string - - "null" - format: - description: marc format - type: - - string - - "null" - comments: - description: any comments added when the file was uploaded + template_id: + description: the id of the marc modification template type: - - string + - integer - "null" additionalProperties: false diff --git a/api/v1/swagger/definitions/import_batch_profiles.yaml b/api/v1/swagger/definitions/import_batch_profiles.yaml index 88da6d38b2c..9598df2930d 100644 --- a/api/v1/swagger/definitions/import_batch_profiles.yaml +++ b/api/v1/swagger/definitions/import_batch_profiles.yaml @@ -1,5 +1,5 @@ --- type: array -items: - $ref: "import_batch_profile.yaml" additionalProperties: false +items: + $ref: import_batch_profile.yaml diff --git a/api/v1/swagger/definitions/invoice.yaml b/api/v1/swagger/definitions/invoice.yaml index c85deee0e03..c849414a990 100644 --- a/api/v1/swagger/definitions/invoice.yaml +++ b/api/v1/swagger/definitions/invoice.yaml @@ -1,42 +1,42 @@ --- type: object properties: - invoice_id: - type: integer - description: Internal identifier for the incoide. Generated on POST - invoice_number: + close_date: + description: Invoice close date (only when the invoice is closed) type: string - description: Invoice number assigned by the vendor - vendor_id: - type: integer - description: Internal identifier for the vendor - shipping_date: - type: - - string - - "null" format: date - description: Date of shipping + closed: + description: If the invoice is closed + type: boolean invoice_date: + description: Date of billing type: - string - "null" format: date - description: Date of billing - closed: - type: boolean - description: If the invoice is closed - close_date: + invoice_id: + description: Internal identifier for the incoide. Generated on POST + type: integer + invoice_number: + description: Invoice number assigned by the vendor type: string - format: date - description: Invoice close date (only when the invoice is closed) shipping_cost: + description: Shipping cost type: - integer - "null" - description: Shipping cost shipping_cost_budget_id: + description: Shipping cost linking to budget type: - integer - "null" - description: Shipping cost linking to budget + shipping_date: + description: Date of shipping + type: + - string + - "null" + format: date + vendor_id: + description: Internal identifier for the vendor + type: integer additionalProperties: false diff --git a/api/v1/swagger/definitions/item.yaml b/api/v1/swagger/definitions/item.yaml index 8b00c96c889..048bb1e2ada 100644 --- a/api/v1/swagger/definitions/item.yaml +++ b/api/v1/swagger/definitions/item.yaml @@ -1,216 +1,213 @@ --- type: object properties: - item_id: - type: integer - description: Internal item identifier - biblio_id: - type: integer - description: Internal identifier for the parent bibliographic record - external_id: - type: - - string - - "null" - description: The item's barcode acquisition_date: + description: The date the item was acquired type: - string - "null" format: date - description: The date the item was acquired acquisition_source: - type: - - string - - "null" description: Information about the acquisition source (it is not really a vendor id) - home_library_id: type: - string - "null" - description: Internal library id for the library the item belongs to - purchase_price: + biblio_id: + description: Internal identifier for the parent bibliographic record + type: integer + call_number_sort: + description: '?' type: - - number + - string - "null" - description: Purchase price - replacement_price: + call_number_source: + description: Classification source used on this item type: - - number + - string - "null" - description: Cost the library charges to replace the item (e.g. if lost) - replacement_price_date: + callnumber: + description: Call number for this item type: - string - "null" - format: date - description: The date the replacement price is effective from - last_checkout_date: + checked_out_date: + description: 'Defines if item is checked out (NULL for not checked out, and checkout date for checked out)' type: - string - "null" format: date - description: The date the item was last checked out - last_seen_date: + checkouts_count: + description: Number of times this item has been checked out/issued type: - - string + - integer - "null" - format: date - description: The date the item barcode was last scanned - not_for_loan_status: - type: integer - description: Authorized value defining why this item is not for loan - damaged_status: - type: integer - description: Authorized value defining this item as damaged - damaged_date: + coded_location_qualifier: + description: Coded location qualifier type: - string - "null" - description: The date and time an item was last marked as damaged, NULL if not damaged - lost_status: - type: integer - description: Authorized value defining this item as lost - lost_date: + collection_code: + description: Authorized value for the collection code associated with this item type: - string - "null" - format: date-time - description: The date and time an item was last marked as lost, NULL if not lost - withdrawn: - type: integer - description: Authorized value defining this item as withdrawn - withdrawn_date: + copy_number: + description: Copy number type: - string - "null" - format: date-time - description: The date and time an item was last marked as withdrawn, NULL if not - withdrawn - callnumber: + damaged_date: + description: 'The date and time an item was last marked as damaged, NULL if not damaged' type: - string - "null" - description: Call number for this item - coded_location_qualifier: + damaged_status: + description: Authorized value defining this item as damaged + type: integer + exclude_from_local_holds_priority: + description: Exclude this item from local holds priority. + type: boolean + extended_subfields: + description: Additional 952 subfields in XML format type: - string - "null" - description: Coded location qualifier - checkouts_count: + external_id: + description: The item's barcode type: - - integer + - string - "null" - description: Number of times this item has been checked out/issued - renewals_count: + holding_library_id: + description: Library that is currently in possession item type: - - integer + - string - "null" - description: Number of times this item has been renewed holds_count: - type: - - integer - - "null" description: Number of times this item has been placed on hold/reserved - restricted_status: type: - integer - "null" - description: Authorized value defining use restrictions for this item - public_notes: + home_library_id: + description: Internal library id for the library the item belongs to type: - string - "null" - description: Public notes on this item internal_notes: - type: - - string - - "null" description: Non-public notes on this item - holding_library_id: type: - string - "null" - description: Library that is currently in possession item - timestamp: - type: string - format: date-time - description: Date and time this item was last altered - location: + inventory_number: + description: Inventory number type: - string - "null" - description: Authorized value for the shelving location for this item - permanent_location: + item_id: + description: Internal item identifier + type: integer + item_type_id: + description: Itemtype defining the type for this item type: - string - "null" - description: Linked to the CART and PROC temporary locations feature, stores the - permanent shelving location - checked_out_date: + last_checkout_date: + description: The date the item was last checked out type: - string - "null" format: date - description: Defines if item is checked out (NULL for not checked out, and checkout - date for checked out) - call_number_source: + last_seen_date: + description: The date the item barcode was last scanned type: - string - "null" - description: Classification source used on this item - call_number_sort: + format: date + location: + description: Authorized value for the shelving location for this item type: - string - "null" - description: "?" - collection_code: + lost_date: + description: 'The date and time an item was last marked as lost, NULL if not lost' type: - string - "null" - description: Authorized value for the collection code associated with this item + format: date-time + lost_status: + description: Authorized value defining this item as lost + type: integer materials_notes: + description: Materials specified type: - string - "null" - description: Materials specified - uri: + new_status: + description: "'new' value, whatever free-text information." type: - string - "null" - description: URL for the item - item_type_id: + not_for_loan_status: + description: Authorized value defining why this item is not for loan + type: integer + permanent_location: + description: 'Linked to the CART and PROC temporary locations feature, stores the permanent shelving location' type: - string - "null" - description: Itemtype defining the type for this item - extended_subfields: + public_notes: + description: Public notes on this item type: - string - "null" - description: Additional 952 subfields in XML format - serial_issue_number: + purchase_price: + description: Purchase price + type: + - number + - "null" + renewals_count: + description: Number of times this item has been renewed + type: + - integer + - "null" + replacement_price: + description: Cost the library charges to replace the item (e.g. if lost) + type: + - number + - "null" + replacement_price_date: + description: The date the replacement price is effective from type: - string - "null" + format: date + restricted_status: + description: Authorized value defining use restrictions for this item + type: + - integer + - "null" + serial_issue_number: description: serial enumeration/chronology for the item - copy_number: type: - string - "null" - description: Copy number - inventory_number: + timestamp: + description: Date and time this item was last altered + type: string + format: date-time + uri: + description: URL for the item type: - string - "null" - description: Inventory number - new_status: + withdrawn: + description: Authorized value defining this item as withdrawn + type: integer + withdrawn_date: + description: 'The date and time an item was last marked as withdrawn, NULL if not withdrawn' type: - string - "null" - description: "'new' value, whatever free-text information." - exclude_from_local_holds_priority: - type: boolean - description: Exclude this item from local holds priority. + format: date-time additionalProperties: false required: - item_id diff --git a/api/v1/swagger/definitions/library.yaml b/api/v1/swagger/definitions/library.yaml index c3a4daaff07..492327de24b 100644 --- a/api/v1/swagger/definitions/library.yaml +++ b/api/v1/swagger/definitions/library.yaml @@ -1,125 +1,123 @@ --- type: object properties: - library_id: - type: string - description: internally assigned library identifier - maxLength: 10 - minLength: 1 - name: - type: string - description: Printable name of library address1: - type: - - string - - "null" description: the first address line of the library - address2: type: - string - "null" + address2: description: the second address line of the library - address3: type: - string - "null" + address3: description: the third address line of the library - postal_code: type: - string - "null" - description: the postal code of the library city: - type: - - string - - "null" description: the city or province of the library - state: type: - string - "null" - description: the reqional state of the library country: + description: the county of the library type: - string - "null" - description: the county of the library - phone: + email: + description: the primary email address of the library type: - string - "null" - description: the primary phone of the library fax: + description: the fax number of the library type: - string - "null" - description: the fax number of the library - email: + geolocation: + description: geolocation of your library type: - string - "null" - description: the primary email address of the library illemail: + description: the ILL staff email address of the library type: - string - "null" - description: the ILL staff email address of the library - reply_to_email: + ip: + description: the IP address for your library or branch type: - string - "null" - description: the email to be used as a Reply-To - return_path_email: + library_id: + description: internally assigned library identifier + type: string + maxLength: 10 + minLength: 1 + marc_org_code: + description: 'MARC Organization Code, see http://www.loc.gov/marc/organizations/orgshome.html, when empty defaults to syspref MARCOrgCode' type: - string - "null" - description: the email to be used as Return-Path - url: + name: + description: Printable name of library + type: string + needs_override: + description: If the library needs an override to act as pickup location for a hold + type: boolean + notes: + description: notes related to your library or branch type: - string - "null" - description: the URL for your library or branch's website - ip: + opac_info: + description: HTML that displays in OPAC type: - string - "null" - description: the IP address for your library or branch - notes: + phone: + description: the primary phone of the library type: - string - "null" - description: notes related to your library or branch - opac_info: + pickup_location: + description: If the library can act as a pickup location + type: boolean + postal_code: + description: the postal code of the library type: - string - "null" - description: HTML that displays in OPAC - geolocation: + public: + description: If the library is visible to the public + type: boolean + reply_to_email: + description: the email to be used as a Reply-To type: - string - "null" - description: geolocation of your library - marc_org_code: + return_path_email: + description: the email to be used as Return-Path type: - string - "null" - description: MARC Organization Code, see - http://www.loc.gov/marc/organizations/orgshome.html, when empty defaults - to syspref MARCOrgCode - pickup_location: - type: boolean - description: If the library can act as a pickup location - public: - type: boolean - description: If the library is visible to the public smtp_server: + description: The library effective SMTP server type: - object - "null" - description: The library effective SMTP server - needs_override: - type: boolean - description: If the library needs an override to act as pickup location for a hold + state: + description: the reqional state of the library + type: + - string + - "null" + url: + description: the URL for your library or branch's website + type: + - string + - "null" additionalProperties: false required: - library_id diff --git a/api/v1/swagger/definitions/order.yaml b/api/v1/swagger/definitions/order.yaml index fbe380f6f91..2321ac0df38 100644 --- a/api/v1/swagger/definitions/order.yaml +++ b/api/v1/swagger/definitions/order.yaml @@ -1,210 +1,180 @@ --- type: object properties: - order_id: - type: integer - description: Internally assigned order identifier - biblio_id: + basket: type: - - integer + - object - "null" - description: Identifier for the linked bibliographic record - created_by: + basket_id: + description: Basket this order is linked to type: - integer - "null" - description: Interal patron identifier of the order line creator - entry_date: + biblio: type: - - string + - object - "null" - format: date - description: Date the bib was added to the basket - quantity: + biblio_id: + description: Identifier for the linked bibliographic record type: - integer - "null" - description: Ordered quantity - currency: + cancellation_date: + description: Date the line item was deleted type: - string - "null" - description: Currency used for the purchase - list_price: + format: date + cancellation_reason: + description: Reason of cancellation type: - - number + - string - "null" - description: Vendor price for the line item - replacement_price: + claims_count: + description: Generated claim letters count + type: integer + created_by: + description: Interal patron identifier of the order line creator type: - - number + - integer - "null" - description: Replacement cost for this item - date_received: + currency: + description: Currency used for the purchase type: - string - "null" - format: date + current_item_level_holds_count: + description: Current holds count for associated items + type: integer + date_received: description: Date the order was received - invoice_id: type: - - integer + - string - "null" - description: Id of the order invoice - shipping_cost: + format: date + discount_rate: + description: Discount rate type: - number - "null" - description: Shipping cost - unit_price: + ecost: + description: Effective cost type: - number - "null" - description: The actual cost entered when receiving this line item - unit_price_tax_excluded: + ecost_tax_excluded: + description: Effective cost (tax excluded) type: - number - "null" - description: Unit price excluding tax (on receiving) - unit_price_tax_included: + ecost_tax_included: + description: Effective cost (tax included) type: - number - "null" - description: Unit price including tax (on receiving) - quantity_received: - type: integer - description: Quantity received so far - cancellation_date: + entry_date: + description: Date the bib was added to the basket type: - string - "null" format: date - description: Date the line item was deleted - cancellation_reason: + fund: type: - - string + - object - "null" - description: Reason of cancellation + fund_id: + description: Internal identifier for the fund this order goes against + type: integer internal_note: + description: 'Notes related to this order line, made for staff' type: - string - "null" - description: Notes related to this order line, made for staff - vendor_note: + invoice: type: - - string + - object - "null" - description: Notes related to this order line, made for vendor - basket_id: + invoice_id: + description: Id of the order invoice type: - integer - "null" - description: Basket this order is linked to - timestamp: - type: string - format: date-time - description: Date and time this order line was last modified - rrp: - type: - - number - - "null" - description: Retail cost for this item - rrp_tax_excluded: - type: - - number - - "null" - description: Replacement cost for this item (tax excluded) - rrp_tax_included: + items: + type: array + last_claim_date: + description: Last date a claim letter was generated type: - - number + - string - "null" - description: Replacement cost for this item (tax included) - ecost: + format: date + list_price: + description: Vendor price for the line item type: - number - "null" - description: Effective cost - ecost_tax_excluded: + order_id: + description: Internally assigned order identifier + type: integer + parent_order_id: + description: Order ID of parent order line if exists type: - - number + - integer - "null" - description: Effective cost (tax excluded) - ecost_tax_included: + quantity: + description: Ordered quantity type: - - number + - integer - "null" - description: Effective cost (tax included) - tax_rate_on_ordering: + quantity_received: + description: Quantity received so far + type: integer + replacement_price: + description: Replacement cost for this item type: - number - "null" - description: Tax rate on ordering (%) - tax_rate_on_receiving: + rrp: + description: Retail cost for this item type: - number - "null" - description: Tax rate on receiving (%) - tax_value_on_ordering: + rrp_tax_excluded: + description: Replacement cost for this item (tax excluded) type: - number - "null" - description: Tax value on ordering - tax_value_on_receiving: + rrp_tax_included: + description: Replacement cost for this item (tax included) type: - number - "null" - description: Tax value on receiving - discount_rate: + shipping_cost: + description: Shipping cost type: - number - "null" - description: Discount rate - fund_id: - type: integer - description: Internal identifier for the fund this order goes against statistics_1: - type: - - string - - "null" description: Statistical field - statistics_2: type: - string - "null" - description: Statistical field (2) statistics_1_authcat: + description: Statistical category for this order type: - string - "null" - description: Statistical category for this order - statistics_2_authcat: + statistics_2: + description: Statistical field (2) type: - string - "null" + statistics_2_authcat: description: Statistical category for this order (2) - uncertain_price: - type: boolean - description: If this price was uncertain - claims_count: - type: integer - description: Generated claim letters count - last_claim_date: type: - string - "null" - format: date - description: Last date a claim letter was generated - subscription_id: - type: - - integer - - "null" - description: Subscription ID linking the order to a subscription - parent_order_id: - type: - - integer - - "null" - description: Order ID of parent order line if exists status: + description: The current order status type: string enum: - new @@ -212,30 +182,60 @@ properties: - partial - complete - cancelled - description: The current order status - basket: + subscription: type: - object - "null" - biblio: + subscription_id: + description: Subscription ID linking the order to a subscription type: - - object + - integer - "null" - current_item_level_holds_count: - type: integer - description: Current holds count for associated items - fund: + tax_rate_on_ordering: + description: Tax rate on ordering (%) type: - - object + - number - "null" - invoice: + tax_rate_on_receiving: + description: Tax rate on receiving (%) type: - - object + - number - "null" - items: - type: array - subscription: + tax_value_on_ordering: + description: Tax value on ordering type: - - object + - number + - "null" + tax_value_on_receiving: + description: Tax value on receiving + type: + - number + - "null" + timestamp: + description: Date and time this order line was last modified + type: string + format: date-time + uncertain_price: + description: If this price was uncertain + type: boolean + unit_price: + description: The actual cost entered when receiving this line item + type: + - number + - "null" + unit_price_tax_excluded: + description: Unit price excluding tax (on receiving) + type: + - number + - "null" + unit_price_tax_included: + description: Unit price including tax (on receiving) + type: + - number + - "null" + vendor_note: + description: 'Notes related to this order line, made for vendor' + type: + - string - "null" additionalProperties: false diff --git a/api/v1/swagger/definitions/patron.yaml b/api/v1/swagger/definitions/patron.yaml index 256430ae6c8..f317e417d60 100644 --- a/api/v1/swagger/definitions/patron.yaml +++ b/api/v1/swagger/definitions/patron.yaml @@ -1,364 +1,360 @@ --- type: object properties: - patron_id: - type: integer - description: Internal patron identifier - cardnumber: + account_balance: + description: Balance of the patron's account type: - - string + - number - "null" - description: library assigned user identifier - surname: + address: + description: first address line of patron's primary address type: - string - "null" - description: patron's last name - firstname: + address2: + description: second address line of patron's primary address type: - string - "null" - description: patron's first name - title: + altaddress_address: + description: first address line of patron's alternate address type: - string - "null" - description: patron's title - other_name: + altaddress_address2: + description: second address line of patron's alternate address type: - string - "null" - description: any other names associated with the patron - initials: + altaddress_city: + description: city or town of patron's alternate address type: - string - "null" - description: initials of the patron - street_number: + altaddress_country: + description: country of patron's alternate address type: - string - "null" - description: street number of patron's primary address - street_type: + altaddress_email: + description: email address for patron's alternate address type: - string - "null" - description: street type of patron's primary address - address: + altaddress_notes: + description: a note related to patron's alternate address type: - string - "null" - description: first address line of patron's primary address - address2: + altaddress_phone: + description: phone number for patron's alternate address type: - string - "null" - description: second address line of patron's primary address - city: + altaddress_postal_code: + description: zip or postal code of patron's alternate address type: - string - "null" - description: city or town of patron's primary address - state: + altaddress_state: + description: state or province of patron's alternate address type: - string - "null" - description: state or province of patron's primary address - postal_code: + altaddress_street_number: + description: street number of patron's alternate address type: - string - "null" - description: zip or postal code of patron's primary address - country: + altaddress_street_type: + description: street type of patron's alternate address type: - string - "null" - description: country of patron's primary address - email: + altcontact_address: + description: the first address line for the alternate contact for the patron type: - string - "null" - description: primary email address for patron's primary address - phone: + altcontact_address2: + description: the second address line for the alternate contact for the patron type: - string - "null" - description: primary phone number for patron's primary address - mobile: + altcontact_city: + description: the city for the alternate contact for the patron type: - string - "null" - description: the other phone number for patron's primary address - fax: + altcontact_country: + description: the country for the alternate contact for the patron type: - string - "null" - description: fax number for patron's primary address - secondary_email: + altcontact_firstname: + description: first name of alternate contact for the patron type: - string - "null" - description: secondary email address for patron's primary address - secondary_phone: + altcontact_phone: + description: the phone number for the alternate contact for the patron type: - string - "null" - description: secondary phone number for patron's primary address - altaddress_street_number: + altcontact_postal_code: + description: the zipcode for the alternate contact for the patron type: - string - "null" - description: street number of patron's alternate address - altaddress_street_type: + altcontact_state: + description: the state for the alternate contact for the patron type: - string - "null" - description: street type of patron's alternate address - altaddress_address: + altcontact_surname: + description: surname or last name of the alternate contact for the patron type: - string - "null" - description: first address line of patron's alternate address - altaddress_address2: + anonymized: + description: If the patron has been anonymized + type: boolean + readOnly: true + autorenew_checkouts: + description: indicate whether auto-renewal is allowed for patron + type: boolean + cardnumber: + description: library assigned user identifier type: - string - "null" - description: second address line of patron's alternate address - altaddress_city: + category_id: + description: Internal identifier for the patron's category + type: string + check_previous_checkout: + description: "produce a warning for this patron if this item has previously been checked out to this patron if 'yes', not if 'no', defer to category setting if 'inherit'" + type: string + checkouts_count: + description: Number of checkouts type: - - string + - integer - "null" - description: city or town of patron's alternate address - altaddress_state: + city: + description: city or town of patron's primary address type: - string - "null" - description: state or province of patron's alternate address - altaddress_postal_code: + country: + description: country of patron's primary address type: - string - "null" - description: zip or postal code of patron's alternate address - altaddress_country: + date_enrolled: + description: date the patron was added to Koha type: - string - "null" - description: country of patron's alternate address - altaddress_email: + format: date + date_of_birth: + description: patron's date of birth type: - string - "null" - description: email address for patron's alternate address - altaddress_phone: + format: date + date_renewed: + description: date the patron's card was last renewed type: - string - "null" - description: phone number for patron's alternate address - date_of_birth: + format: date + email: + description: primary email address for patron's primary address type: - string - "null" - format: date - description: patron's date of birth - library_id: - type: string - description: Internal identifier for the patron's home library - category_id: - type: string - description: Internal identifier for the patron's category - date_enrolled: + expiry_date: + description: date the patron's card is set to expire type: - string - "null" format: date - description: date the patron was added to Koha - expiry_date: + extended_attributes: + description: patron's extended attributes + type: array + items: + $ref: patron_extended_attribute.yaml + fax: + description: fax number for patron's primary address type: - string - "null" - format: date - description: date the patron's card is set to expire - date_renewed: + firstname: + description: patron's first name type: - string - "null" - format: date - description: date the patron's card was last renewed - incorrect_address: + gender: + description: patron's gender type: - - boolean + - string - "null" + incorrect_address: description: set to 1 if library marked this patron as having an unconfirmed address - patron_card_lost: type: - boolean - "null" - description: set to 1 if library marked this patron as having lost his card - restricted: - type: boolean - readOnly: true - description: If any restriction applies to the patron - staff_notes: + initials: + description: initials of the patron type: - string - "null" - description: a note on the patron's account - relationship_type: + lang: + description: lang to use to send notices to this patron + type: string + last_seen: + description: last time a patron has been seen (connected at the OPAC or staff interface) type: - string - "null" - description: used for children to include the relationship to their guarantor - gender: + format: date-time + library_id: + description: Internal identifier for the patron's home library + type: string + login_attempts: + description: number of failed login attemps type: - - string + - integer - "null" - description: patron's gender - userid: + mobile: + description: the other phone number for patron's primary address type: - string - "null" - description: patron's login opac_notes: + description: a note on the patron's account visible in OPAC and staff interface type: - string - "null" - description: a note on the patron's account visible in OPAC and staff interface - altaddress_notes: + other_name: + description: any other names associated with the patron type: - string - "null" - description: a note related to patron's alternate address - statistics_1: + overdrive_auth_token: + description: persist OverDrive auth token type: - string - "null" - description: a field that can be used for any information unique to the library - statistics_2: + overdues_count: + description: Number of overdued checkouts type: - - string + - integer - "null" - description: a field that can be used for any information unique to the library - autorenew_checkouts: - type: boolean - description: indicate whether auto-renewal is allowed for patron - altcontact_firstname: + patron_card_lost: + description: set to 1 if library marked this patron as having lost his card type: - - string + - boolean - "null" - description: first name of alternate contact for the patron - altcontact_surname: + patron_id: + description: Internal patron identifier + type: integer + phone: + description: primary phone number for patron's primary address type: - string - "null" - description: surname or last name of the alternate contact for the patron - altcontact_address: + postal_code: + description: zip or postal code of patron's primary address type: - string - "null" - description: the first address line for the alternate contact for the patron - altcontact_address2: + privacy: + description: patron's privacy settings related to their checkout history + type: integer + privacy_guarantor_checkouts: + description: controls if relatives can see this patron's checkouts + type: integer + privacy_guarantor_fines: + description: controls if relatives can see this patron's fines + type: boolean + relationship_type: + description: used for children to include the relationship to their guarantor type: - string - "null" - description: the second address line for the alternate contact for the patron - altcontact_city: + restricted: + description: If any restriction applies to the patron + type: boolean + readOnly: true + secondary_email: + description: secondary email address for patron's primary address type: - string - "null" - description: the city for the alternate contact for the patron - altcontact_state: + secondary_phone: + description: secondary phone number for patron's primary address type: - string - "null" - description: the state for the alternate contact for the patron - altcontact_postal_code: + sms_number: + description: the mobile phone number where the patron would like to receive notices (if SMS turned on) type: - string - "null" - description: the zipcode for the alternate contact for the patron - altcontact_country: + sms_provider_id: + description: the provider of the mobile phone number defined in smsalertnumber type: - - string + - integer - "null" - description: the country for the alternate contact for the patron - altcontact_phone: + staff_notes: + description: a note on the patron's account type: - string - "null" - description: the phone number for the alternate contact for the patron - sms_number: + state: + description: state or province of patron's primary address type: - string - "null" - description: the mobile phone number where the patron would like to receive notices (if - SMS turned on) - sms_provider_id: + statistics_1: + description: a field that can be used for any information unique to the library type: - - integer + - string - "null" - description: the provider of the mobile phone number defined in smsalertnumber - privacy: - type: integer - description: patron's privacy settings related to their checkout history - privacy_guarantor_checkouts: - type: integer - description: controls if relatives can see this patron's checkouts - privacy_guarantor_fines: - type: boolean - description: controls if relatives can see this patron's fines - check_previous_checkout: - type: string - description: produce a warning for this patron if this item has previously been checked - out to this patron if 'yes', not if 'no', defer to category setting if - 'inherit' - updated_on: - type: string - format: date-time - description: time of last change could be useful for synchronization with external - systems (among others) - last_seen: + statistics_2: + description: a field that can be used for any information unique to the library type: - string - "null" - format: date-time - description: last time a patron has been seen (connected at the OPAC or staff interface) - lang: - type: string - description: lang to use to send notices to this patron - login_attempts: + street_number: + description: street number of patron's primary address type: - - integer + - string - "null" - description: number of failed login attemps - overdrive_auth_token: + street_type: + description: street type of patron's primary address type: - string - "null" - description: persist OverDrive auth token - anonymized: - type: boolean - readOnly: true - description: If the patron has been anonymized - extended_attributes: - type: array - description: patron's extended attributes - items: - $ref: "patron_extended_attribute.yaml" - checkouts_count: + surname: + description: patron's last name type: - - integer + - string - "null" - description: Number of checkouts - overdues_count: + title: + description: patron's title type: - - integer + - string - "null" - description: Number of overdued checkouts - account_balance: + updated_on: + description: time of last change could be useful for synchronization with external systems (among others) + type: string + format: date-time + userid: + description: patron's login type: - - number + - string - "null" - description: Balance of the patron's account additionalProperties: false required: - surname diff --git a/api/v1/swagger/definitions/patron_account_credit.yaml b/api/v1/swagger/definitions/patron_account_credit.yaml index cd607fdc908..2bcbcfa5a56 100644 --- a/api/v1/swagger/definitions/patron_account_credit.yaml +++ b/api/v1/swagger/definitions/patron_account_credit.yaml @@ -1,36 +1,36 @@ --- type: object properties: - credit_type: + description: + description: Description type: string - description: Type of credit ('CREDIT', 'FORGIVEN', 'LOST_FOUND', 'PAYMENT', 'WRITEOFF' ) - amount: - type: number - minimum: 0 - description: Credit amount - library_id: - type: - - string - - "null" - description: Internal identifier for the library in which the transaction took place account_lines_ids: + description: List of account line ids the credit goes against (optional) type: array items: type: integer - description: List of account line ids the credit goes against (optional) - payment_type: + amount: + description: Credit amount + type: number + minimum: 0 + credit_type: + description: "Type of credit ('CREDIT', 'FORGIVEN', 'LOST_FOUND', 'PAYMENT', 'WRITEOFF' )" type: string - description: Payment type (only applies when credit_type=payment) date: - type: string - format: date description: Date the credit was recorded (optional) - description: type: string - description: Description + format: date + library_id: + description: Internal identifier for the library in which the transaction took place + type: + - string + - "null" note: - type: string description: Internal note + type: string + payment_type: + description: Payment type (only applies when credit_type=payment) + type: string +additionalProperties: false required: - amount -additionalProperties: false diff --git a/api/v1/swagger/definitions/patron_balance.yaml b/api/v1/swagger/definitions/patron_balance.yaml index 7d40cb3af6b..8c52f109f3e 100644 --- a/api/v1/swagger/definitions/patron_balance.yaml +++ b/api/v1/swagger/definitions/patron_balance.yaml @@ -2,25 +2,25 @@ type: object properties: balance: - type: number description: Signed decimal number + type: number outstanding_credits: properties: - total: - type: number lines: type: array items: - $ref: "account_line.yaml" + $ref: account_line.yaml + total: + type: number outstanding_debits: type: object properties: - total: - type: number lines: type: array items: - $ref: "account_line.yaml" + $ref: account_line.yaml + total: + type: number additionalProperties: false required: - balance diff --git a/api/v1/swagger/definitions/patron_extended_attribute.yaml b/api/v1/swagger/definitions/patron_extended_attribute.yaml index 84343d258b1..bd1320b4dd9 100644 --- a/api/v1/swagger/definitions/patron_extended_attribute.yaml +++ b/api/v1/swagger/definitions/patron_extended_attribute.yaml @@ -1,12 +1,12 @@ --- type: object properties: - extended_attribute_id: - description: Internal ID for the extended attribute - type: integer type: description: Extended attribute type type: string + extended_attribute_id: + description: Internal ID for the extended attribute + type: integer value: description: Extended attribute value type: diff --git a/api/v1/swagger/definitions/quote.yaml b/api/v1/swagger/definitions/quote.yaml index 0af727ee40b..ef9e4e694f4 100644 --- a/api/v1/swagger/definitions/quote.yaml +++ b/api/v1/swagger/definitions/quote.yaml @@ -1,9 +1,14 @@ --- type: object properties: + displayed_on: + description: Last display date + type: + - string + - "null" quote_id: - type: integer description: internally assigned quote identifier + type: integer source: description: source of the quote type: string @@ -12,11 +17,6 @@ properties: type: - string - "null" - displayed_on: - description: Last display date - type: - - string - - "null" additionalProperties: false required: - quote_id diff --git a/api/v1/swagger/definitions/return_claim.yaml b/api/v1/swagger/definitions/return_claim.yaml index cda0cfeec09..835a2d3ad4a 100644 --- a/api/v1/swagger/definitions/return_claim.yaml +++ b/api/v1/swagger/definitions/return_claim.yaml @@ -2,67 +2,67 @@ type: object properties: claim_id: - type: - - integer description: internally assigned return claim identifier - item_id: - type: - - integer - description: internal identifier of the claimed item - issue_id: type: - integer - - "null" - description: internal identifier of the claimed checkout if still checked out - old_issue_id: + created_by: + description: patron id of librarian who made the claim type: - integer - "null" - description: internal identifier of the claimed checkout if not longer checked out - patron_id: - type: integer - description: Internal patron identifier - notes: - type: - - string - - "null" - description: notes about this claim created_on: + description: date of claim creation type: - string - "null" format: date-time - description: date of claim creation - created_by: + issue_id: + description: internal identifier of the claimed checkout if still checked out type: - integer - "null" - description: patron id of librarian who made the claim - updated_on: + item_id: + description: internal identifier of the claimed item + type: + - integer + notes: + description: notes about this claim type: - string - "null" - format: date-time - description: date the claim was last updated - updated_by: + old_issue_id: + description: internal identifier of the claimed checkout if not longer checked out type: - integer - "null" - description: patron id of librarian who last updated the claim + patron_id: + description: Internal patron identifier + type: integer resolution: + description: code of resolution type for this claim type: - string - "null" - description: code of resolution type for this claim + resolved_by: + description: patron id of librarian who resolved this claim + type: + - integer + - "null" resolved_on: + description: date the claim was resolved type: - string - "null" format: date-time - description: date the claim was resolved - resolved_by: + updated_by: + description: patron id of librarian who last updated the claim type: - integer - "null" - description: patron id of librarian who resolved this claim + updated_on: + description: date the claim was last updated + type: + - string + - "null" + format: date-time additionalProperties: false diff --git a/api/v1/swagger/definitions/smtp_server.yaml b/api/v1/swagger/definitions/smtp_server.yaml index c06831eb979..d40cf5dde7a 100644 --- a/api/v1/swagger/definitions/smtp_server.yaml +++ b/api/v1/swagger/definitions/smtp_server.yaml @@ -1,42 +1,42 @@ --- type: object properties: - smtp_server_id: - type: integer - description: Internal SMTP server identifier - readOnly: true - name: + debug: + description: If the SMTP connection is set to debug mode + type: boolean + host: + description: SMTP host name type: string + name: description: Name of the SMTP server - host: type: string - description: SMTP host name + password: + description: The password to use for authentication (optional) + type: + - string + - "null" port: - type: integer description: TCP port number - timeout: type: integer - description: Maximum time in seconds to wait for server + smtp_server_id: + description: Internal SMTP server identifier + type: integer + readOnly: true ssl_mode: + description: If SSL/TLS will be used type: string enum: - disabled - ssl - starttls - description: If SSL/TLS will be used + timeout: + description: Maximum time in seconds to wait for server + type: integer user_name: - type: - - string - - "null" description: The user name to use for authentication (optional) - password: type: - string - "null" - description: The password to use for authentication (optional) - debug: - type: boolean - description: If the SMTP connection is set to debug mode additionalProperties: false required: - name diff --git a/api/v1/swagger/definitions/suggestion.yaml b/api/v1/swagger/definitions/suggestion.yaml index e09f4452968..574df38381f 100644 --- a/api/v1/swagger/definitions/suggestion.yaml +++ b/api/v1/swagger/definitions/suggestion.yaml @@ -1,185 +1,180 @@ --- type: object properties: - suggestion_id: - type: integer - readOnly: true - description: unique identifier assigned automatically by Koha - suggested_by: - type: - - integer - - "null" - description: patron_id for the person making the suggestion, foreign key linking to the - borrowers table - suggestion_date: - type: string - format: date - description: the suggestion was submitted - managed_by: + accepted_by: + description: 'patron_id for the librarian who accepted the suggestion, foreign key linking to the borrowers table' type: - integer - "null" - description: patron_id for the librarian managing the suggestion, foreign key linking - to the borrowers table - managed_date: + accepted_date: + description: date the suggestion was marked as accepted type: - string - "null" format: date - description: date the suggestion was updated - accepted_by: + archived: + description: archived (processed) suggestion type: - - integer + - boolean - "null" - description: patron_id for the librarian who accepted the suggestion, foreign key - linking to the borrowers table - accepted_date: + author: + description: author of the suggested item type: - string - "null" - format: date - description: date the suggestion was marked as accepted - rejected_by: + biblio_id: + description: foreign key linking the suggestion to the biblio table after the suggestion has been ordered type: - integer - "null" - description: patron_id for the librarian who rejected the suggestion, foreign key - linking to the borrowers table - rejected_date: + budget_id: + description: foreign key linking the suggested budget to the aqbudgets table + type: + - integer + - "null" + collection_title: + description: collection name for the suggested item type: - string - "null" - format: date - description: date the suggestion was marked as rejected - last_status_change_by: + copyright_date: + description: copyright date of the suggested item type: - integer - "null" - description: patron the suggestion was last modified by - last_status_change_date: + currency: + description: suggested currency for the suggested price type: - string - "null" - format: date - description: date the suggestion was last modified - status: - type: string - description: Suggestion status - enum: - - ASKED - - CHECKED - - ACCEPTED - - REJECTED - note: + isbn: + description: isbn of the suggested item type: - string - "null" - description: note entered on the suggestion - author: + item_price: + description: suggested price type: - - string + - number - "null" - description: author of the suggested item - title: + item_type: + description: suggested item type type: - string - "null" - description: title of the suggested item - copyright_date: + last_status_change_by: + description: patron the suggestion was last modified by type: - integer - "null" - description: copyright date of the suggested item - publisher_code: + last_status_change_date: + description: date the suggestion was last modified type: - string - "null" - description: publisher of the suggested item - timestamp: + format: date + library_id: + description: foreign key linking the suggested branch to the branches table type: - string - "null" - format: date-time - description: timestamp of date created - volume_desc: + managed_by: + description: 'patron_id for the librarian managing the suggestion, foreign key linking to the borrowers table' type: - - string + - integer - "null" - description: volume description - publication_year: + managed_date: + description: date the suggestion was updated type: - string - "null" - description: year of publication - publication_place: + format: date + note: + description: note entered on the suggestion type: - string - "null" - description: publication place of the suggested item - isbn: + patron_reason: + description: reason for making the suggestion type: - string - "null" - description: isbn of the suggested item - biblio_id: + publication_place: + description: publication place of the suggested item type: - - integer + - string - "null" - description: foreign key linking the suggestion to the biblio table after the - suggestion has been ordered - reason: + publication_year: + description: year of publication type: - string - "null" - description: reason for accepting or rejecting the suggestion - patron_reason: + publisher_code: + description: publisher of the suggested item type: - string - "null" - description: reason for making the suggestion - budget_id: + quantity: + description: suggested quantity to be purchased type: - - integer + - string - "null" - description: foreign key linking the suggested budget to the aqbudgets table - library_id: + reason: + description: reason for accepting or rejecting the suggestion type: - string - "null" - description: foreign key linking the suggested branch to the branches table - collection_title: + rejected_by: + description: 'patron_id for the librarian who rejected the suggestion, foreign key linking to the borrowers table' type: - - string + - integer - "null" - description: collection name for the suggested item - item_type: + rejected_date: + description: date the suggestion was marked as rejected type: - string - "null" - description: suggested item type - quantity: + format: date + status: + description: Suggestion status + type: string + enum: + - ASKED + - CHECKED + - ACCEPTED + - REJECTED + suggested_by: + description: 'patron_id for the person making the suggestion, foreign key linking to the borrowers table' type: - - string + - integer - "null" - description: suggested quantity to be purchased - currency: + suggestion_date: + description: the suggestion was submitted + type: string + format: date + suggestion_id: + description: unique identifier assigned automatically by Koha + type: integer + readOnly: true + timestamp: + description: timestamp of date created type: - string - "null" - description: suggested currency for the suggested price - item_price: + format: date-time + title: + description: title of the suggested item type: - - number + - string - "null" - description: suggested price total_price: + description: suggested total cost (price*quantity updated for currency) type: - string - "null" - description: suggested total cost (price*quantity updated for currency) - archived: + volume_desc: + description: volume description type: - - boolean + - string - "null" - description: archived (processed) suggestion additionalProperties: false diff --git a/api/v1/swagger/definitions/transfer_limit.yaml b/api/v1/swagger/definitions/transfer_limit.yaml index cb0f1b925be..d557f7c4282 100644 --- a/api/v1/swagger/definitions/transfer_limit.yaml +++ b/api/v1/swagger/definitions/transfer_limit.yaml @@ -1,25 +1,25 @@ --- type: object properties: - limit_id: - type: integer - description: Internal transfer limit identifier - to_library_id: - type: string - description: Internal library id for which library the item is going to - from_library_id: - type: string - description: Internal library id for which library the item is coming from - item_type: + collection_code: + description: Authorized value for the collection code associated with this limit type: - string - "null" + from_library_id: + description: Internal library id for which library the item is coming from + type: string + item_type: description: Itemtype defining the type for this limi - collection_code: type: - string - "null" - description: Authorized value for the collection code associated with this limit + limit_id: + description: Internal transfer limit identifier + type: integer + to_library_id: + description: Internal library id for which library the item is going to + type: string additionalProperties: false required: - to_library_id diff --git a/api/v1/swagger/definitions/vendor.yaml b/api/v1/swagger/definitions/vendor.yaml index c311249f7ef..d23bbe5a904 100644 --- a/api/v1/swagger/definitions/vendor.yaml +++ b/api/v1/swagger/definitions/vendor.yaml @@ -1,109 +1,109 @@ --- type: object properties: - id: - type: integer - description: internally assigned vendor identifier - readOnly: true - name: + accountnumber: + description: Vendor account number type: - string - description: Vendor name - address1: + - "null" + active: + description: Is this vendor active type: - - string + - boolean - "null" + address1: description: Vendor physical address (line 1) - address2: type: - string - "null" + address2: description: Vendor physical address (line 2) - address3: type: - string - "null" + address3: description: Vendor physical address (line 3) - address4: type: - string - "null" + address4: description: Vendor physical address (line 4) - phone: type: - string - "null" - description: Vendor phone number - fax: + deliverytime: + description: Expected delivery time (in days) type: - - string + - integer - "null" - description: Vendor fax number - accountnumber: + discount: + description: Default discount rate for items ordered from this vendor type: - - string + - number - "null" - description: Vendor account number - notes: + fax: + description: Vendor fax number type: - string - "null" - description: Vendor notes - postal: + gst: + description: Is the library taxed when buying from this vendor type: - - string + - boolean - "null" - description: Vendor postal address - url: + id: + description: internally assigned vendor identifier + type: integer + readOnly: true + invoice_currency: + description: Invoice prices currency type: - string - "null" - description: Vendor web address - active: + invoice_includes_gst: + description: Invoice prices include taxes type: - boolean - "null" - description: Is this vendor active list_currency: - type: - - string - - "null" description: List prices currency - invoice_currency: type: - string - "null" - description: Invoice prices currency - gst: + list_includes_gst: + description: List prices include taxes type: - boolean - "null" - description: Is the library taxed when buying from this vendor - list_includes_gst: + name: + description: Vendor name type: - - boolean + - string + notes: + description: Vendor notes + type: + - string - "null" - description: List prices include taxes - invoice_includes_gst: + phone: + description: Vendor phone number type: - - boolean + - string - "null" - description: Invoice prices include taxes - tax_rate: + postal: + description: Vendor postal address type: - - number + - string - "null" + tax_rate: description: Default tax rate for items ordered from this vendor - discount: type: - number - "null" - description: Default discount rate for items ordered from this vendor - deliverytime: + url: + description: Vendor web address type: - - integer + - string - "null" - description: Expected delivery time (in days) additionalProperties: false required: - name diff --git a/api/v1/swagger/paths/acquisitions_baskets.yaml b/api/v1/swagger/paths/acquisitions_baskets.yaml index 9237289f005..72f1a752464 100644 --- a/api/v1/swagger/paths/acquisitions_baskets.yaml +++ b/api/v1/swagger/paths/acquisitions_baskets.yaml @@ -3,44 +3,44 @@ get: x-mojo-to: Acquisitions::Baskets#list_managers operationId: listBasketsManagers - description: This resource returns a list of patron allowed to be a manager for baskets - summary: List possibe managers for baskets tags: - baskets - parameters: - - $ref: "../swagger.yaml#/parameters/match" - - $ref: "../swagger.yaml#/parameters/order_by" - - $ref: "../swagger.yaml#/parameters/page" - - $ref: "../swagger.yaml#/parameters/per_page" - - $ref: "../swagger.yaml#/parameters/q_param" - - $ref: "../swagger.yaml#/parameters/q_body" - - $ref: "../swagger.yaml#/parameters/q_header" + summary: List possibe managers for baskets produces: - application/json + parameters: + - $ref: ../swagger.yaml#/parameters/match + - $ref: ../swagger.yaml#/parameters/order_by + - $ref: ../swagger.yaml#/parameters/page + - $ref: ../swagger.yaml#/parameters/per_page + - $ref: ../swagger.yaml#/parameters/q_param + - $ref: ../swagger.yaml#/parameters/q_body + - $ref: ../swagger.yaml#/parameters/q_header responses: - "200": + 200: description: A list of orders' managers schema: type: array items: - $ref: "../swagger.yaml#/definitions/patron" - "403": + $ref: ../swagger.yaml#/definitions/patron + 403: description: Access forbidden schema: - $ref: "../swagger.yaml#/definitions/error" - "500": + $ref: ../swagger.yaml#/definitions/error + 500: description: | Internal server error. Possible `error_code` attribute values: - + * `internal_server_error` schema: - $ref: "../swagger.yaml#/definitions/error" - "503": + $ref: ../swagger.yaml#/definitions/error + 503: description: Under maintenance schema: - $ref: "../swagger.yaml#/definitions/error" + $ref: ../swagger.yaml#/definitions/error x-koha-authorization: permissions: acquisition: order_manage + description: This resource returns a list of patron allowed to be a manager for baskets x-koha-embed: - extended_attributes diff --git a/api/v1/swagger/paths/acquisitions_funds.yaml b/api/v1/swagger/paths/acquisitions_funds.yaml index 309c50b38f6..a1e8fd8e1d6 100644 --- a/api/v1/swagger/paths/acquisitions_funds.yaml +++ b/api/v1/swagger/paths/acquisitions_funds.yaml @@ -9,54 +9,54 @@ produces: - application/json parameters: - - name: name + - description: Case insensitive search on fund name in: query - description: Case insensitive search on fund name + name: name required: false type: string - - name: fund_owner_id + - description: Display only the funds that belongs to the given patron ID in: query - description: Display only the funds that belongs to the given patron ID + name: fund_owner_id required: false type: integer - - $ref: "../swagger.yaml#/parameters/match" - - $ref: "../swagger.yaml#/parameters/order_by" - - $ref: "../swagger.yaml#/parameters/page" - - $ref: "../swagger.yaml#/parameters/per_page" - - $ref: "../swagger.yaml#/parameters/q_param" - - $ref: "../swagger.yaml#/parameters/q_body" - - $ref: "../swagger.yaml#/parameters/q_header" - - $ref: "../swagger.yaml#/parameters/request_id_header" + - $ref: ../swagger.yaml#/parameters/match + - $ref: ../swagger.yaml#/parameters/order_by + - $ref: ../swagger.yaml#/parameters/page + - $ref: ../swagger.yaml#/parameters/per_page + - $ref: ../swagger.yaml#/parameters/q_param + - $ref: ../swagger.yaml#/parameters/q_body + - $ref: ../swagger.yaml#/parameters/q_header + - $ref: ../swagger.yaml#/parameters/request_id_header responses: - "200": + 200: description: A list of funds schema: type: array items: - $ref: "../swagger.yaml#/definitions/fund" - "401": + $ref: ../swagger.yaml#/definitions/fund + 401: description: Authentication required schema: - $ref: "../swagger.yaml#/definitions/error" - "403": + $ref: ../swagger.yaml#/definitions/error + 403: description: Access forbidden schema: - $ref: "../swagger.yaml#/definitions/error" - "404": + $ref: ../swagger.yaml#/definitions/error + 404: description: Fund not found schema: - $ref: "../swagger.yaml#/definitions/error" - "500": + $ref: ../swagger.yaml#/definitions/error + 500: description: | Internal server error. Possible `error_code` attribute values: - + * `internal_server_error` schema: - $ref: "../swagger.yaml#/definitions/error" - "503": + $ref: ../swagger.yaml#/definitions/error + 503: description: Under maintenance schema: - $ref: "../swagger.yaml#/definitions/error" + $ref: ../swagger.yaml#/definitions/error x-koha-authorization: permissions: acquisition: budget_manage_all @@ -64,89 +64,89 @@ get: x-mojo-to: Acquisitions::Funds#list_owners operationId: listFundsOwners - description: This resource returns a list of patron allowed to be owner of funds - summary: List possibe owners for funds tags: - funds - parameters: - - $ref: "../swagger.yaml#/parameters/match" - - $ref: "../swagger.yaml#/parameters/order_by" - - $ref: "../swagger.yaml#/parameters/page" - - $ref: "../swagger.yaml#/parameters/per_page" - - $ref: "../swagger.yaml#/parameters/q_param" - - $ref: "../swagger.yaml#/parameters/q_body" - - $ref: "../swagger.yaml#/parameters/q_header" + summary: List possibe owners for funds produces: - application/json + parameters: + - $ref: ../swagger.yaml#/parameters/match + - $ref: ../swagger.yaml#/parameters/order_by + - $ref: ../swagger.yaml#/parameters/page + - $ref: ../swagger.yaml#/parameters/per_page + - $ref: ../swagger.yaml#/parameters/q_param + - $ref: ../swagger.yaml#/parameters/q_body + - $ref: ../swagger.yaml#/parameters/q_header responses: - "200": + 200: description: A list of funds' owners schema: type: array items: - $ref: "../swagger.yaml#/definitions/patron" - "403": + $ref: ../swagger.yaml#/definitions/patron + 403: description: Access forbidden schema: - $ref: "../swagger.yaml#/definitions/error" - "500": + $ref: ../swagger.yaml#/definitions/error + 500: description: | Internal server error. Possible `error_code` attribute values: - + * `internal_server_error` schema: - $ref: "../swagger.yaml#/definitions/error" - "503": + $ref: ../swagger.yaml#/definitions/error + 503: description: Under maintenance schema: - $ref: "../swagger.yaml#/definitions/error" + $ref: ../swagger.yaml#/definitions/error x-koha-authorization: permissions: acquisition: budget_modify + description: This resource returns a list of patron allowed to be owner of funds x-koha-embed: - extended_attributes /acquisitions/funds/users: get: x-mojo-to: Acquisitions::Funds#list_users operationId: listFundsUsers - description: This resource returns a list of patron allowed to be owner of funds - summary: List possibe users for funds tags: - funds - parameters: - - $ref: "../swagger.yaml#/parameters/match" - - $ref: "../swagger.yaml#/parameters/order_by" - - $ref: "../swagger.yaml#/parameters/page" - - $ref: "../swagger.yaml#/parameters/per_page" - - $ref: "../swagger.yaml#/parameters/q_param" - - $ref: "../swagger.yaml#/parameters/q_body" - - $ref: "../swagger.yaml#/parameters/q_header" + summary: List possibe users for funds produces: - application/json + parameters: + - $ref: ../swagger.yaml#/parameters/match + - $ref: ../swagger.yaml#/parameters/order_by + - $ref: ../swagger.yaml#/parameters/page + - $ref: ../swagger.yaml#/parameters/per_page + - $ref: ../swagger.yaml#/parameters/q_param + - $ref: ../swagger.yaml#/parameters/q_body + - $ref: ../swagger.yaml#/parameters/q_header responses: - "200": + 200: description: A list of funds' users schema: type: array items: - $ref: "../swagger.yaml#/definitions/patron" - "403": + $ref: ../swagger.yaml#/definitions/patron + 403: description: Access forbidden schema: - $ref: "../swagger.yaml#/definitions/error" - "500": + $ref: ../swagger.yaml#/definitions/error + 500: description: | Internal server error. Possible `error_code` attribute values: - + * `internal_server_error` schema: - $ref: "../swagger.yaml#/definitions/error" - "503": + $ref: ../swagger.yaml#/definitions/error + 503: description: Under maintenance schema: - $ref: "../swagger.yaml#/definitions/error" + $ref: ../swagger.yaml#/definitions/error x-koha-authorization: permissions: acquisition: budget_modify + description: This resource returns a list of patron allowed to be owner of funds x-koha-embed: - extended_attributes diff --git a/api/v1/swagger/paths/acquisitions_orders.yaml b/api/v1/swagger/paths/acquisitions_orders.yaml index 1d740858eb8..96186936128 100644 --- a/api/v1/swagger/paths/acquisitions_orders.yaml +++ b/api/v1/swagger/paths/acquisitions_orders.yaml @@ -9,47 +9,43 @@ produces: - application/json parameters: - - name: biblio_id + - description: Identifier for a linked bibliographic record in: query - description: Identifier for a linked bibliographic record + name: biblio_id required: false type: integer - - name: basket_id + - description: Identifier for a linked acquisition basket in: query - description: Identifier for a linked acquisition basket + name: basket_id required: false type: integer - - name: fund_id + - description: Identifier for the fund the order goes against in: query - description: Identifier for the fund the order goes against + name: fund_id required: false type: integer - - name: status + - description: "Current status for the order. Can be 'new', 'ordered', 'partial', 'complete' or 'cancelled'" in: query - description: Current status for the order. Can be 'new', 'ordered', 'partial', - 'complete' or 'cancelled' + name: status required: false type: string - - name: only_active + - description: If only active orders should be listed in: query - description: If only active orders should be listed + name: only_active required: false type: boolean - - $ref: "../swagger.yaml#/parameters/match" - - $ref: "../swagger.yaml#/parameters/order_by" - - $ref: "../swagger.yaml#/parameters/page" - - $ref: "../swagger.yaml#/parameters/per_page" - - $ref: "../swagger.yaml#/parameters/q_param" - - $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 + - $ref: ../swagger.yaml#/parameters/match + - $ref: ../swagger.yaml#/parameters/order_by + - $ref: ../swagger.yaml#/parameters/page + - $ref: ../swagger.yaml#/parameters/per_page + - $ref: ../swagger.yaml#/parameters/q_param + - $ref: ../swagger.yaml#/parameters/q_body + - $ref: ../swagger.yaml#/parameters/q_header + - $ref: ../swagger.yaml#/parameters/request_id_header + - collectionFormat: csv description: Embed list sent as a request header - type: array + in: header items: - type: string enum: - basket - basket.basket_group @@ -64,37 +60,40 @@ - invoice - items - subscription - collectionFormat: csv + type: string + name: x-koha-embed + required: false + type: array responses: - "200": + 200: description: A list of orders schema: type: array items: - $ref: "../swagger.yaml#/definitions/order" - "401": + $ref: ../swagger.yaml#/definitions/order + 401: description: Authentication required schema: - $ref: "../swagger.yaml#/definitions/error" - "403": + $ref: ../swagger.yaml#/definitions/error + 403: description: Access forbidden schema: - $ref: "../swagger.yaml#/definitions/error" - "404": + $ref: ../swagger.yaml#/definitions/error + 404: description: Order not found schema: - $ref: "../swagger.yaml#/definitions/error" - "500": + $ref: ../swagger.yaml#/definitions/error + 500: description: | Internal server error. Possible `error_code` attribute values: - + * `internal_server_error` schema: - $ref: "../swagger.yaml#/definitions/error" - "503": + $ref: ../swagger.yaml#/definitions/error + 503: description: Under maintenance schema: - $ref: "../swagger.yaml#/definitions/error" + $ref: ../swagger.yaml#/definitions/error x-koha-authorization: permissions: acquisition: @@ -120,66 +119,104 @@ tags: - orders summary: Add order + produces: + - application/json parameters: - - name: body + - description: A JSON object representing an order in: body - description: A JSON object representing an order + name: body required: true schema: - $ref: "../swagger.yaml#/definitions/order" - produces: - - application/json + $ref: ../swagger.yaml#/definitions/order responses: - "201": + 201: description: Order added schema: - $ref: "../swagger.yaml#/definitions/order" - "400": + $ref: ../swagger.yaml#/definitions/order + 400: description: Bad request schema: - $ref: "../swagger.yaml#/definitions/error" - "401": + $ref: ../swagger.yaml#/definitions/error + 401: description: Authentication required schema: - $ref: "../swagger.yaml#/definitions/error" - "403": + $ref: ../swagger.yaml#/definitions/error + 403: description: Access forbidden schema: - $ref: "../swagger.yaml#/definitions/error" - "409": + $ref: ../swagger.yaml#/definitions/error + 409: description: Conflict in creating the resource schema: - $ref: "../swagger.yaml#/definitions/error" - "500": + $ref: ../swagger.yaml#/definitions/error + 500: + description: | + Internal server error. Possible `error_code` attribute values: + + * `internal_server_error` + schema: + $ref: ../swagger.yaml#/definitions/error + 503: + description: Under maintenance + schema: + $ref: ../swagger.yaml#/definitions/error + x-koha-authorization: + permissions: + acquisition: order_manage +'/acquisitions/orders/{order_id}': + delete: + x-mojo-to: Acquisitions::Orders#delete + operationId: deleteOrder + tags: + - orders + summary: Delete order + produces: + - application/json + parameters: + - $ref: ../swagger.yaml#/parameters/order_id_pp + responses: + 204: + description: Order deleted + 401: + description: Authentication required + schema: + $ref: ../swagger.yaml#/definitions/error + 403: + description: Access forbidden + schema: + $ref: ../swagger.yaml#/definitions/error + 404: + description: Order not found + schema: + $ref: ../swagger.yaml#/definitions/error + 500: description: | Internal server error. Possible `error_code` attribute values: - + * `internal_server_error` schema: - $ref: "../swagger.yaml#/definitions/error" - "503": + $ref: ../swagger.yaml#/definitions/error + 503: description: Under maintenance schema: - $ref: "../swagger.yaml#/definitions/error" + $ref: ../swagger.yaml#/definitions/error x-koha-authorization: permissions: acquisition: order_manage -"/acquisitions/orders/{order_id}": get: x-mojo-to: Acquisitions::Orders#get operationId: getOrder tags: - orders summary: Get order + produces: + - application/json parameters: - - $ref: "../swagger.yaml#/parameters/order_id_pp" - - name: x-koha-embed - in: header - required: false + - $ref: ../swagger.yaml#/parameters/order_id_pp + - collectionFormat: csv description: Embed list sent as a request header - type: array + in: header items: - type: string enum: - basket - basket.basket_group @@ -194,37 +231,38 @@ - invoice - items - subscription - collectionFormat: csv - produces: - - application/json + type: string + name: x-koha-embed + required: false + type: array responses: - "200": + 200: description: An order schema: - $ref: "../swagger.yaml#/definitions/order" - "401": + $ref: ../swagger.yaml#/definitions/order + 401: description: Authentication required schema: - $ref: "../swagger.yaml#/definitions/error" - "403": + $ref: ../swagger.yaml#/definitions/error + 403: description: Access forbidden schema: - $ref: "../swagger.yaml#/definitions/error" - "404": + $ref: ../swagger.yaml#/definitions/error + 404: description: Order not found schema: - $ref: "../swagger.yaml#/definitions/error" - "500": + $ref: ../swagger.yaml#/definitions/error + 500: description: | Internal server error. Possible `error_code` attribute values: - + * `internal_server_error` schema: - $ref: "../swagger.yaml#/definitions/error" - "503": + $ref: ../swagger.yaml#/definitions/error + 503: description: Under maintenance schema: - $ref: "../swagger.yaml#/definitions/error" + $ref: ../swagger.yaml#/definitions/error x-koha-authorization: permissions: acquisition: order_manage @@ -248,83 +286,44 @@ tags: - orders summary: Update order + produces: + - application/json parameters: - - $ref: "../swagger.yaml#/parameters/order_id_pp" - - name: body + - $ref: ../swagger.yaml#/parameters/order_id_pp + - description: A JSON object representing an order in: body - description: A JSON object representing an order + name: body required: true schema: - $ref: "../swagger.yaml#/definitions/order" - produces: - - application/json + $ref: ../swagger.yaml#/definitions/order responses: - "200": + 200: description: An order schema: - $ref: "../swagger.yaml#/definitions/order" - "401": - description: Authentication required - schema: - $ref: "../swagger.yaml#/definitions/error" - "403": - description: Access forbidden - schema: - $ref: "../swagger.yaml#/definitions/error" - "404": - description: Order not found - schema: - $ref: "../swagger.yaml#/definitions/error" - "500": - description: | - Internal server error. Possible `error_code` attribute values: - - * `internal_server_error` - schema: - $ref: "../swagger.yaml#/definitions/error" - "503": - description: Under maintenance - schema: - $ref: "../swagger.yaml#/definitions/error" - x-koha-authorization: - permissions: - acquisition: order_manage - delete: - x-mojo-to: Acquisitions::Orders#delete - operationId: deleteOrder - tags: - - orders - summary: Delete order - parameters: - - $ref: "../swagger.yaml#/parameters/order_id_pp" - produces: - - application/json - responses: - "204": - description: Order deleted - "401": + $ref: ../swagger.yaml#/definitions/order + 401: description: Authentication required schema: - $ref: "../swagger.yaml#/definitions/error" - "403": + $ref: ../swagger.yaml#/definitions/error + 403: description: Access forbidden schema: - $ref: "../swagger.yaml#/definitions/error" - "404": + $ref: ../swagger.yaml#/definitions/error + 404: description: Order not found schema: - $ref: "../swagger.yaml#/definitions/error" - "500": + $ref: ../swagger.yaml#/definitions/error + 500: description: | Internal server error. Possible `error_code` attribute values: - + * `internal_server_error` schema: - $ref: "../swagger.yaml#/definitions/error" - "503": + $ref: ../swagger.yaml#/definitions/error + 503: description: Under maintenance schema: - $ref: "../swagger.yaml#/definitions/error" + $ref: ../swagger.yaml#/definitions/error x-koha-authorization: permissions: acquisition: order_manage diff --git a/api/v1/swagger/paths/acquisitions_vendors.yaml b/api/v1/swagger/paths/acquisitions_vendors.yaml index f5275ddfe1b..51c784890d4 100644 --- a/api/v1/swagger/paths/acquisitions_vendors.yaml +++ b/api/v1/swagger/paths/acquisitions_vendors.yaml @@ -9,54 +9,54 @@ produces: - application/json parameters: - - name: name + - description: Case insensitive search on vendor name in: query - description: Case insensitive search on vendor name + name: name required: false type: string - - name: accountnumber + - description: Case insensitive search on vendor's account number in: query - description: Case insensitive search on vendor's account number + name: accountnumber required: false type: string - - $ref: "../swagger.yaml#/parameters/match" - - $ref: "../swagger.yaml#/parameters/order_by" - - $ref: "../swagger.yaml#/parameters/page" - - $ref: "../swagger.yaml#/parameters/per_page" - - $ref: "../swagger.yaml#/parameters/q_param" - - $ref: "../swagger.yaml#/parameters/q_body" - - $ref: "../swagger.yaml#/parameters/q_header" - - $ref: "../swagger.yaml#/parameters/request_id_header" + - $ref: ../swagger.yaml#/parameters/match + - $ref: ../swagger.yaml#/parameters/order_by + - $ref: ../swagger.yaml#/parameters/page + - $ref: ../swagger.yaml#/parameters/per_page + - $ref: ../swagger.yaml#/parameters/q_param + - $ref: ../swagger.yaml#/parameters/q_body + - $ref: ../swagger.yaml#/parameters/q_header + - $ref: ../swagger.yaml#/parameters/request_id_header responses: - "200": + 200: description: A list of vendors schema: type: array items: - $ref: "../swagger.yaml#/definitions/vendor" - "401": + $ref: ../swagger.yaml#/definitions/vendor + 401: description: Authentication required schema: - $ref: "../swagger.yaml#/definitions/error" - "403": + $ref: ../swagger.yaml#/definitions/error + 403: description: Access forbidden schema: - $ref: "../swagger.yaml#/definitions/error" - "404": + $ref: ../swagger.yaml#/definitions/error + 404: description: Vendor not found schema: - $ref: "../swagger.yaml#/definitions/error" - "500": + $ref: ../swagger.yaml#/definitions/error + 500: description: | Internal server error. Possible `error_code` attribute values: - + * `internal_server_error` schema: - $ref: "../swagger.yaml#/definitions/error" - "503": + $ref: ../swagger.yaml#/definitions/error + 503: description: Under maintenance schema: - $ref: "../swagger.yaml#/definitions/error" + $ref: ../swagger.yaml#/definitions/error x-koha-authorization: permissions: acquisition: vendors_manage @@ -66,171 +66,171 @@ tags: - vendors summary: Add vendor + produces: + - application/json parameters: - - name: body + - description: A JSON object representing a vendor in: body - description: A JSON object representing a vendor + name: body required: true schema: - $ref: "../swagger.yaml#/definitions/vendor" - produces: - - application/json + $ref: ../swagger.yaml#/definitions/vendor responses: - "201": + 201: description: Vendor added schema: - $ref: "../swagger.yaml#/definitions/vendor" - "401": + $ref: ../swagger.yaml#/definitions/vendor + 401: description: Authentication required schema: - $ref: "../swagger.yaml#/definitions/error" - "403": + $ref: ../swagger.yaml#/definitions/error + 403: description: Access forbidden schema: - $ref: "../swagger.yaml#/definitions/error" - "404": + $ref: ../swagger.yaml#/definitions/error + 404: description: Vendor not found schema: - $ref: "../swagger.yaml#/definitions/error" - "500": + $ref: ../swagger.yaml#/definitions/error + 500: description: | Internal server error. Possible `error_code` attribute values: - + * `internal_server_error` schema: - $ref: "../swagger.yaml#/definitions/error" - "503": + $ref: ../swagger.yaml#/definitions/error + 503: description: Under maintenance schema: - $ref: "../swagger.yaml#/definitions/error" + $ref: ../swagger.yaml#/definitions/error x-koha-authorization: permissions: acquisition: vendors_manage -"/acquisitions/vendors/{vendor_id}": - get: - x-mojo-to: Acquisitions::Vendors#get - operationId: getVendor +'/acquisitions/vendors/{vendor_id}': + delete: + x-mojo-to: Acquisitions::Vendors#delete + operationId: deleteVendor tags: - vendors - summary: Get vendor - parameters: - - $ref: "../swagger.yaml#/parameters/vendor_id_pp" + summary: Delete vendor produces: - application/json + parameters: + - $ref: ../swagger.yaml#/parameters/vendor_id_pp responses: - "200": - description: A vendor - schema: - $ref: "../swagger.yaml#/definitions/vendor" - "401": + 204: + description: Vendor deleted + 401: description: Authentication required schema: - $ref: "../swagger.yaml#/definitions/error" - "403": + $ref: ../swagger.yaml#/definitions/error + 403: description: Access forbidden schema: - $ref: "../swagger.yaml#/definitions/error" - "404": + $ref: ../swagger.yaml#/definitions/error + 404: description: Vendor not found schema: - $ref: "../swagger.yaml#/definitions/error" - "500": + $ref: ../swagger.yaml#/definitions/error + 500: description: | Internal server error. Possible `error_code` attribute values: - + * `internal_server_error` schema: - $ref: "../swagger.yaml#/definitions/error" - "503": + $ref: ../swagger.yaml#/definitions/error + 503: description: Under maintenance schema: - $ref: "../swagger.yaml#/definitions/error" + $ref: ../swagger.yaml#/definitions/error x-koha-authorization: permissions: acquisition: vendors_manage - put: - x-mojo-to: Acquisitions::Vendors#update - operationId: updateVendor + get: + x-mojo-to: Acquisitions::Vendors#get + operationId: getVendor tags: - vendors - summary: Update vendor - parameters: - - $ref: "../swagger.yaml#/parameters/vendor_id_pp" - - name: body - in: body - description: A JSON object representing a vendor - required: true - schema: - $ref: "../swagger.yaml#/definitions/vendor" + summary: Get vendor produces: - application/json + parameters: + - $ref: ../swagger.yaml#/parameters/vendor_id_pp responses: - "200": + 200: description: A vendor schema: - $ref: "../swagger.yaml#/definitions/vendor" - "401": + $ref: ../swagger.yaml#/definitions/vendor + 401: description: Authentication required schema: - $ref: "../swagger.yaml#/definitions/error" - "403": + $ref: ../swagger.yaml#/definitions/error + 403: description: Access forbidden schema: - $ref: "../swagger.yaml#/definitions/error" - "404": + $ref: ../swagger.yaml#/definitions/error + 404: description: Vendor not found schema: - $ref: "../swagger.yaml#/definitions/error" - "500": + $ref: ../swagger.yaml#/definitions/error + 500: description: | Internal server error. Possible `error_code` attribute values: - + * `internal_server_error` schema: - $ref: "../swagger.yaml#/definitions/error" - "503": + $ref: ../swagger.yaml#/definitions/error + 503: description: Under maintenance schema: - $ref: "../swagger.yaml#/definitions/error" + $ref: ../swagger.yaml#/definitions/error x-koha-authorization: permissions: acquisition: vendors_manage - delete: - x-mojo-to: Acquisitions::Vendors#delete - operationId: deleteVendor + put: + x-mojo-to: Acquisitions::Vendors#update + operationId: updateVendor tags: - vendors - summary: Delete vendor - parameters: - - $ref: "../swagger.yaml#/parameters/vendor_id_pp" + summary: Update vendor produces: - application/json + parameters: + - $ref: ../swagger.yaml#/parameters/vendor_id_pp + - description: A JSON object representing a vendor + in: body + name: body + required: true + schema: + $ref: ../swagger.yaml#/definitions/vendor responses: - "204": - description: Vendor deleted - "401": + 200: + description: A vendor + schema: + $ref: ../swagger.yaml#/definitions/vendor + 401: description: Authentication required schema: - $ref: "../swagger.yaml#/definitions/error" - "403": + $ref: ../swagger.yaml#/definitions/error + 403: description: Access forbidden schema: - $ref: "../swagger.yaml#/definitions/error" - "404": + $ref: ../swagger.yaml#/definitions/error + 404: description: Vendor not found schema: - $ref: "../swagger.yaml#/definitions/error" - "500": + $ref: ../swagger.yaml#/definitions/error + 500: description: | Internal server error. Possible `error_code` attribute values: - + * `internal_server_error` schema: - $ref: "../swagger.yaml#/definitions/error" - "503": + $ref: ../swagger.yaml#/definitions/error + 503: description: Under maintenance schema: - $ref: "../swagger.yaml#/definitions/error" + $ref: ../swagger.yaml#/definitions/error x-koha-authorization: permissions: acquisition: vendors_manage diff --git a/api/v1/swagger/paths/advancededitormacros.yaml b/api/v1/swagger/paths/advancededitormacros.yaml index 0cb4c343230..cf1e078b68b 100644 --- a/api/v1/swagger/paths/advancededitormacros.yaml +++ b/api/v1/swagger/paths/advancededitormacros.yaml @@ -9,56 +9,56 @@ produces: - application/json parameters: - - name: name + - description: Case insensative search on macro name in: query - description: Case insensative search on macro name + name: name required: false type: string - - name: macro_text + - description: Case insensative search on macro text in: query - description: Case insensative search on macro text + name: macro_text required: false type: string - - name: patron_id + - description: Search on internal patron_id in: query - description: Search on internal patron_id + name: patron_id required: false type: string - - name: shared + - description: Search on shared macros in: query - description: Search on shared macros + name: shared required: false type: string - - $ref: "../swagger.yaml#/parameters/match" - - $ref: "../swagger.yaml#/parameters/order_by" - - $ref: "../swagger.yaml#/parameters/page" - - $ref: "../swagger.yaml#/parameters/per_page" - - $ref: "../swagger.yaml#/parameters/q_param" - - $ref: "../swagger.yaml#/parameters/q_body" - - $ref: "../swagger.yaml#/parameters/q_header" - - $ref: "../swagger.yaml#/parameters/request_id_header" + - $ref: ../swagger.yaml#/parameters/match + - $ref: ../swagger.yaml#/parameters/order_by + - $ref: ../swagger.yaml#/parameters/page + - $ref: ../swagger.yaml#/parameters/per_page + - $ref: ../swagger.yaml#/parameters/q_param + - $ref: ../swagger.yaml#/parameters/q_body + - $ref: ../swagger.yaml#/parameters/q_header + - $ref: ../swagger.yaml#/parameters/request_id_header responses: - "200": + 200: description: A list of macros schema: type: array items: - $ref: "../swagger.yaml#/definitions/advancededitormacro" - "403": + $ref: ../swagger.yaml#/definitions/advancededitormacro + 403: description: Access forbidden schema: - $ref: "../swagger.yaml#/definitions/error" - "500": + $ref: ../swagger.yaml#/definitions/error + 500: description: | Internal server error. Possible `error_code` attribute values: - + * `internal_server_error` schema: - $ref: "../swagger.yaml#/definitions/error" - "503": + $ref: ../swagger.yaml#/definitions/error + 503: description: Under maintenance schema: - $ref: "../swagger.yaml#/definitions/error" + $ref: ../swagger.yaml#/definitions/error x-koha-authorization: permissions: editcatalogue: advanced_editor @@ -68,36 +68,36 @@ tags: - macros summary: Add advanced editor macros + produces: + - application/json parameters: - - name: body + - description: A JSON object containing informations about the new macro in: body - description: A JSON object containing informations about the new macro + name: body required: true schema: - $ref: "../swagger.yaml#/definitions/advancededitormacro" - produces: - - application/json + $ref: ../swagger.yaml#/definitions/advancededitormacro responses: - "201": + 201: description: Macro added schema: - $ref: "../swagger.yaml#/definitions/advancededitormacro" - "401": + $ref: ../swagger.yaml#/definitions/advancededitormacro + 401: description: Authentication required schema: - $ref: "../swagger.yaml#/definitions/error" - "403": + $ref: ../swagger.yaml#/definitions/error + 403: description: Access forbidden schema: - $ref: "../swagger.yaml#/definitions/error" - "500": + $ref: ../swagger.yaml#/definitions/error + 500: description: Internal error schema: - $ref: "../swagger.yaml#/definitions/error" - "503": + $ref: ../swagger.yaml#/definitions/error + 503: description: Under maintenance schema: - $ref: "../swagger.yaml#/definitions/error" + $ref: ../swagger.yaml#/definitions/error x-koha-authorization: permissions: editcatalogue: advanced_editor @@ -108,276 +108,276 @@ tags: - macros summary: Add shared advanced editor macros + produces: + - application/json parameters: - - name: body + - description: A JSON object containing informations about the new macro in: body - description: A JSON object containing informations about the new macro + name: body required: true schema: - $ref: "../swagger.yaml#/definitions/advancededitormacro" - produces: - - application/json + $ref: ../swagger.yaml#/definitions/advancededitormacro responses: - "201": + 201: description: Macro added schema: - $ref: "../swagger.yaml#/definitions/advancededitormacro" - "401": + $ref: ../swagger.yaml#/definitions/advancededitormacro + 401: description: Authentication required schema: - $ref: "../swagger.yaml#/definitions/error" - "403": + $ref: ../swagger.yaml#/definitions/error + 403: description: Access forbidden schema: - $ref: "../swagger.yaml#/definitions/error" - "500": + $ref: ../swagger.yaml#/definitions/error + 500: description: Internal error schema: - $ref: "../swagger.yaml#/definitions/error" - "503": + $ref: ../swagger.yaml#/definitions/error + 503: description: Under maintenance schema: - $ref: "../swagger.yaml#/definitions/error" + $ref: ../swagger.yaml#/definitions/error x-koha-authorization: permissions: editcatalogue: advanced_editor: 1 create_shared_macros: 1 -"/advanced_editor/macros/{advancededitormacro_id}": - get: - x-mojo-to: AdvancedEditorMacro#get - operationId: getAdvancedEditorMacro +'/advanced_editor/macros/shared/{advancededitormacro_id}': + delete: + x-mojo-to: AdvancedEditorMacro#delete_shared + operationId: deletesharedAdvancedEditorMacro tags: - macros - summary: Get advanced editor macro + summary: Delete shared advanced editor macro + produces: + - application/json parameters: - - $ref: "../swagger.yaml#/parameters/advancededitormacro_id_pp" + - $ref: ../swagger.yaml#/parameters/advancededitormacro_id_pp + responses: + 204: + description: Advanced editor macro deleted + schema: + type: string + 401: + description: Authentication required + schema: + $ref: ../swagger.yaml#/definitions/error + 403: + description: Access forbidden + schema: + $ref: ../swagger.yaml#/definitions/error + 404: + description: Macro not found + schema: + $ref: ../swagger.yaml#/definitions/error + 500: + description: Internal error + schema: + $ref: ../swagger.yaml#/definitions/error + 503: + description: Under maintenance + schema: + $ref: ../swagger.yaml#/definitions/error + x-koha-authorization: + permissions: + editcatalogue: + advanced_editor: 1 + delete_shared_macros: 1 + get: + x-mojo-to: AdvancedEditorMacro#get_shared + operationId: getsharedAdvancedEditorMacro + tags: + - macros + summary: Get shared advanced editor macro produces: - application/json + parameters: + - $ref: ../swagger.yaml#/parameters/advancededitormacro_id_pp responses: - "200": + 200: description: A macro schema: - $ref: "../swagger.yaml#/definitions/advancededitormacro" - "403": + $ref: ../swagger.yaml#/definitions/advancededitormacro + 403: description: Access forbidden schema: - $ref: "../swagger.yaml#/definitions/error" - "404": + $ref: ../swagger.yaml#/definitions/error + 404: description: AdvancedEditorMacro not found schema: - $ref: "../swagger.yaml#/definitions/error" - "500": + $ref: ../swagger.yaml#/definitions/error + 500: description: Internal error schema: - $ref: "../swagger.yaml#/definitions/error" - "503": + $ref: ../swagger.yaml#/definitions/error + 503: description: Under maintenance schema: - $ref: "../swagger.yaml#/definitions/error" + $ref: ../swagger.yaml#/definitions/error x-koha-authorization: permissions: editcatalogue: advanced_editor put: - x-mojo-to: AdvancedEditorMacro#update - operationId: updateAdvancedEditorMacro + x-mojo-to: AdvancedEditorMacro#update_shared + operationId: updatesharedAdvancedEditorMacro tags: - macros - summary: Update advanced editor macro + summary: Update shared advanced editor macro + produces: + - application/json parameters: - - $ref: "../swagger.yaml#/parameters/advancededitormacro_id_pp" - - name: body + - $ref: ../swagger.yaml#/parameters/advancededitormacro_id_pp + - description: An advanced editor macro object in: body - description: An advanced editor macro object + name: body required: true schema: - $ref: "../swagger.yaml#/definitions/advancededitormacro" - produces: - - application/json + $ref: ../swagger.yaml#/definitions/advancededitormacro responses: - "200": + 200: description: An advanced editor macro schema: - $ref: "../swagger.yaml#/definitions/advancededitormacro" - "401": + $ref: ../swagger.yaml#/definitions/advancededitormacro + 401: description: Authentication required schema: - $ref: "../swagger.yaml#/definitions/error" - "403": + $ref: ../swagger.yaml#/definitions/error + 403: description: Access forbidden schema: - $ref: "../swagger.yaml#/definitions/error" - "404": + $ref: ../swagger.yaml#/definitions/error + 404: description: Macro not found schema: - $ref: "../swagger.yaml#/definitions/error" - "500": + $ref: ../swagger.yaml#/definitions/error + 500: description: Internal error schema: - $ref: "../swagger.yaml#/definitions/error" - "503": + $ref: ../swagger.yaml#/definitions/error + 503: description: Under maintenance schema: - $ref: "../swagger.yaml#/definitions/error" + $ref: ../swagger.yaml#/definitions/error x-koha-authorization: permissions: - editcatalogue: advanced_editor + editcatalogue: + advanced_editor: 1 + create_shared_macros: 1 +'/advanced_editor/macros/{advancededitormacro_id}': delete: x-mojo-to: AdvancedEditorMacro#delete operationId: deleteAdvancedEditorMacro tags: - macros summary: Delete advanced editor macro - parameters: - - $ref: "../swagger.yaml#/parameters/advancededitormacro_id_pp" produces: - application/json + parameters: + - $ref: ../swagger.yaml#/parameters/advancededitormacro_id_pp responses: - "204": + 204: description: Advanced editor macro deleted schema: type: string - "401": + 401: description: Authentication required schema: - $ref: "../swagger.yaml#/definitions/error" - "403": + $ref: ../swagger.yaml#/definitions/error + 403: description: Access forbidden schema: - $ref: "../swagger.yaml#/definitions/error" - "404": + $ref: ../swagger.yaml#/definitions/error + 404: description: Macro not found schema: - $ref: "../swagger.yaml#/definitions/error" - "500": + $ref: ../swagger.yaml#/definitions/error + 500: description: Internal error schema: - $ref: "../swagger.yaml#/definitions/error" - "503": + $ref: ../swagger.yaml#/definitions/error + 503: description: Under maintenance schema: - $ref: "../swagger.yaml#/definitions/error" + $ref: ../swagger.yaml#/definitions/error x-koha-authorization: permissions: editcatalogue: advanced_editor -"/advanced_editor/macros/shared/{advancededitormacro_id}": get: - x-mojo-to: AdvancedEditorMacro#get_shared - operationId: getsharedAdvancedEditorMacro + x-mojo-to: AdvancedEditorMacro#get + operationId: getAdvancedEditorMacro tags: - macros - summary: Get shared advanced editor macro - parameters: - - $ref: "../swagger.yaml#/parameters/advancededitormacro_id_pp" + summary: Get advanced editor macro produces: - application/json + parameters: + - $ref: ../swagger.yaml#/parameters/advancededitormacro_id_pp responses: - "200": + 200: description: A macro schema: - $ref: "../swagger.yaml#/definitions/advancededitormacro" - "403": + $ref: ../swagger.yaml#/definitions/advancededitormacro + 403: description: Access forbidden schema: - $ref: "../swagger.yaml#/definitions/error" - "404": + $ref: ../swagger.yaml#/definitions/error + 404: description: AdvancedEditorMacro not found schema: - $ref: "../swagger.yaml#/definitions/error" - "500": + $ref: ../swagger.yaml#/definitions/error + 500: description: Internal error schema: - $ref: "../swagger.yaml#/definitions/error" - "503": + $ref: ../swagger.yaml#/definitions/error + 503: description: Under maintenance schema: - $ref: "../swagger.yaml#/definitions/error" + $ref: ../swagger.yaml#/definitions/error x-koha-authorization: permissions: editcatalogue: advanced_editor put: - x-mojo-to: AdvancedEditorMacro#update_shared - operationId: updatesharedAdvancedEditorMacro + x-mojo-to: AdvancedEditorMacro#update + operationId: updateAdvancedEditorMacro tags: - macros - summary: Update shared advanced editor macro + summary: Update advanced editor macro + produces: + - application/json parameters: - - $ref: "../swagger.yaml#/parameters/advancededitormacro_id_pp" - - name: body + - $ref: ../swagger.yaml#/parameters/advancededitormacro_id_pp + - description: An advanced editor macro object in: body - description: An advanced editor macro object + name: body required: true schema: - $ref: "../swagger.yaml#/definitions/advancededitormacro" - produces: - - application/json + $ref: ../swagger.yaml#/definitions/advancededitormacro responses: - "200": + 200: description: An advanced editor macro schema: - $ref: "../swagger.yaml#/definitions/advancededitormacro" - "401": + $ref: ../swagger.yaml#/definitions/advancededitormacro + 401: description: Authentication required schema: - $ref: "../swagger.yaml#/definitions/error" - "403": + $ref: ../swagger.yaml#/definitions/error + 403: description: Access forbidden schema: - $ref: "../swagger.yaml#/definitions/error" - "404": + $ref: ../swagger.yaml#/definitions/error + 404: description: Macro not found schema: - $ref: "../swagger.yaml#/definitions/error" - "500": + $ref: ../swagger.yaml#/definitions/error + 500: description: Internal error schema: - $ref: "../swagger.yaml#/definitions/error" - "503": + $ref: ../swagger.yaml#/definitions/error + 503: description: Under maintenance schema: - $ref: "../swagger.yaml#/definitions/error" + $ref: ../swagger.yaml#/definitions/error x-koha-authorization: permissions: - editcatalogue: - advanced_editor: 1 - create_shared_macros: 1 - delete: - x-mojo-to: AdvancedEditorMacro#delete_shared - operationId: deletesharedAdvancedEditorMacro - tags: - - macros - summary: Delete shared advanced editor macro - parameters: - - $ref: "../swagger.yaml#/parameters/advancededitormacro_id_pp" - produces: - - application/json - responses: - "204": - description: Advanced editor macro deleted - schema: - type: string - "401": - description: Authentication required - schema: - $ref: "../swagger.yaml#/definitions/error" - "403": - description: Access forbidden - schema: - $ref: "../swagger.yaml#/definitions/error" - "404": - description: Macro not found - schema: - $ref: "../swagger.yaml#/definitions/error" - "500": - description: Internal error - schema: - $ref: "../swagger.yaml#/definitions/error" - "503": - description: Under maintenance - schema: - $ref: "../swagger.yaml#/definitions/error" - x-koha-authorization: - permissions: - editcatalogue: - advanced_editor: 1 - delete_shared_macros: 1 + editcatalogue: advanced_editor diff --git a/api/v1/swagger/paths/article_requests.yaml b/api/v1/swagger/paths/article_requests.yaml index d0fc6985571..cb46e183ce2 100644 --- a/api/v1/swagger/paths/article_requests.yaml +++ b/api/v1/swagger/paths/article_requests.yaml @@ -1,117 +1,117 @@ --- -"/article_requests/{article_request_id}": +'/article_requests/{article_request_id}': delete: x-mojo-to: ArticleRequests#cancel operationId: cancelArticleRequest tags: - article_requests summary: Cancel article requests + produces: + - application/json parameters: - - name: article_request_id + - description: Article request identifier in: path - description: Article request identifier + name: article_request_id required: true type: integer - - name: cancellation_reason + - description: Article request cancellation reason in: query - description: Article request cancellation reason + name: cancellation_reason required: false type: string - - name: notes + - description: Article request custom cancellation reason in: query - description: Article request custom cancellation reason + name: notes required: false type: string - produces: - - application/json responses: - "204": + 204: description: Article request canceled - "400": + 400: description: Bad request schema: - $ref: "../swagger.yaml#/definitions/error" - "401": + $ref: ../swagger.yaml#/definitions/error + 401: description: Authentication required schema: - $ref: "../swagger.yaml#/definitions/error" - "403": + $ref: ../swagger.yaml#/definitions/error + 403: description: Access forbidden schema: - $ref: "../swagger.yaml#/definitions/error" - "404": + $ref: ../swagger.yaml#/definitions/error + 404: description: Patron not found schema: - $ref: "../swagger.yaml#/definitions/error" - "500": + $ref: ../swagger.yaml#/definitions/error + 500: description: | Internal server error. Possible `error_code` attribute values: - + * `internal_server_error` schema: - $ref: "../swagger.yaml#/definitions/error" - "503": + $ref: ../swagger.yaml#/definitions/error + 503: description: Under maintenance schema: - $ref: "../swagger.yaml#/definitions/error" + $ref: ../swagger.yaml#/definitions/error x-koha-authorization: permissions: circulate: circulate_remaining_permissions -"/public/patrons/{patron_id}/article_requests/{article_request_id}": +'/public/patrons/{patron_id}/article_requests/{article_request_id}': delete: x-mojo-to: ArticleRequests#patron_cancel operationId: publicCancelPatronArticleRequest tags: - article_requests summary: Cancel patron's article requests + produces: + - application/json parameters: - - $ref: "../swagger.yaml#/parameters/patron_id_pp" - - name: article_request_id + - $ref: ../swagger.yaml#/parameters/patron_id_pp + - description: Article request identifier in: path - description: Article request identifier + name: article_request_id required: true type: integer - - name: cancellation_reason + - description: Article request cancellation reason in: query - description: Article request cancellation reason + name: cancellation_reason required: false type: string - - name: notes + - description: Article request custom cancellation reason in: query - description: Article request custom cancellation reason + name: notes required: false type: string - produces: - - application/json responses: - "204": + 204: description: Patron's article request canceled - "400": + 400: description: Bad request schema: - $ref: "../swagger.yaml#/definitions/error" - "401": + $ref: ../swagger.yaml#/definitions/error + 401: description: Authentication required schema: - $ref: "../swagger.yaml#/definitions/error" - "403": + $ref: ../swagger.yaml#/definitions/error + 403: description: Access forbidden schema: - $ref: "../swagger.yaml#/definitions/error" - "404": + $ref: ../swagger.yaml#/definitions/error + 404: description: Patron not found schema: - $ref: "../swagger.yaml#/definitions/error" - "500": + $ref: ../swagger.yaml#/definitions/error + 500: description: | Internal server error. Possible `error_code` attribute values: - + * `internal_server_error` schema: - $ref: "../swagger.yaml#/definitions/error" - "503": + $ref: ../swagger.yaml#/definitions/error + 503: description: Under maintenance schema: - $ref: "../swagger.yaml#/definitions/error" + $ref: ../swagger.yaml#/definitions/error x-koha-authorization: allow-owner: true diff --git a/api/v1/swagger/paths/biblios.yaml b/api/v1/swagger/paths/biblios.yaml index 0a2cb9489e1..abc5d83c852 100644 --- a/api/v1/swagger/paths/biblios.yaml +++ b/api/v1/swagger/paths/biblios.yaml @@ -1,158 +1,157 @@ --- -"/biblios/{biblio_id}": - get: - x-mojo-to: Biblios#get - operationId: getBiblio +'/biblios/{biblio_id}': + delete: + x-mojo-to: Biblios#delete + operationId: deleteBiblio tags: - biblios - summary: Get biblio - parameters: - - $ref: "../swagger.yaml#/parameters/biblio_id_pp" + summary: Delete biblio produces: - application/json - - application/marcxml+xml - - application/marc-in-json - - application/marc - - text/plain + parameters: + - $ref: ../swagger.yaml#/parameters/biblio_id_pp responses: - "200": - description: A biblio - "401": + 204: + description: Biblio deleted + schema: + type: string + 401: description: Authentication required schema: - $ref: "../swagger.yaml#/definitions/error" - "403": + $ref: ../swagger.yaml#/definitions/error + 403: description: Access forbidden schema: - $ref: "../swagger.yaml#/definitions/error" - "404": + $ref: ../swagger.yaml#/definitions/error + 404: description: Biblio not found schema: - $ref: "../swagger.yaml#/definitions/error" - "406": - description: Not acceptable + $ref: ../swagger.yaml#/definitions/error + 409: + description: Unable to perform action on biblio schema: - type: array - description: Accepted content-types - items: - type: string - "500": - description: | - Internal server error. Possible `error_code` attribute values: - - * `internal_server_error` + $ref: ../swagger.yaml#/definitions/error + 500: + description: Internal error schema: - $ref: "../swagger.yaml#/definitions/error" - "503": + $ref: ../swagger.yaml#/definitions/error + 503: description: Under maintenance schema: - $ref: "../swagger.yaml#/definitions/error" + $ref: ../swagger.yaml#/definitions/error x-koha-authorization: permissions: - catalogue: "1" - delete: - x-mojo-to: Biblios#delete - operationId: deleteBiblio + editcatalogue: edit_catalogue + get: + x-mojo-to: Biblios#get + operationId: getBiblio tags: - biblios - summary: Delete biblio - parameters: - - $ref: "../swagger.yaml#/parameters/biblio_id_pp" + summary: Get biblio produces: - application/json + - application/marcxml+xml + - application/marc-in-json + - application/marc + - text/plain + parameters: + - $ref: ../swagger.yaml#/parameters/biblio_id_pp responses: - "204": - description: Biblio deleted - schema: - type: string - "401": + 200: + description: A biblio + 401: description: Authentication required schema: - $ref: "../swagger.yaml#/definitions/error" - "403": + $ref: ../swagger.yaml#/definitions/error + 403: description: Access forbidden schema: - $ref: "../swagger.yaml#/definitions/error" - "404": + $ref: ../swagger.yaml#/definitions/error + 404: description: Biblio not found schema: - $ref: "../swagger.yaml#/definitions/error" - "409": - description: Unable to perform action on biblio + $ref: ../swagger.yaml#/definitions/error + 406: + description: Not acceptable schema: - $ref: "../swagger.yaml#/definitions/error" - "500": - description: Internal error + description: Accepted content-types + type: array + items: + type: string + 500: + description: | + Internal server error. Possible `error_code` attribute values: + + * `internal_server_error` schema: - $ref: "../swagger.yaml#/definitions/error" - "503": + $ref: ../swagger.yaml#/definitions/error + 503: description: Under maintenance schema: - $ref: "../swagger.yaml#/definitions/error" + $ref: ../swagger.yaml#/definitions/error x-koha-authorization: permissions: - editcatalogue: edit_catalogue -"/biblios/{biblio_id}/checkouts": + catalogue: 1 +'/biblios/{biblio_id}/checkouts': get: x-mojo-to: Biblios#get_checkouts operationId: listBiblioCheckouts tags: - checkouts summary: List checkouts for a biblio + produces: + - application/json parameters: - - $ref: "../swagger.yaml#/parameters/biblio_id_pp" - - $ref: "../swagger.yaml#/parameters/page" - - $ref: "../swagger.yaml#/parameters/per_page" - - $ref: "../swagger.yaml#/parameters/match" - - $ref: "../swagger.yaml#/parameters/order_by" - - $ref: "../swagger.yaml#/parameters/q_param" - - $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 + - $ref: ../swagger.yaml#/parameters/biblio_id_pp + - $ref: ../swagger.yaml#/parameters/page + - $ref: ../swagger.yaml#/parameters/per_page + - $ref: ../swagger.yaml#/parameters/match + - $ref: ../swagger.yaml#/parameters/order_by + - $ref: ../swagger.yaml#/parameters/q_param + - $ref: ../swagger.yaml#/parameters/q_body + - $ref: ../swagger.yaml#/parameters/q_header + - $ref: ../swagger.yaml#/parameters/request_id_header + - collectionFormat: csv description: Embed list sent as a request header - type: array + in: header items: - type: string enum: - issuer - item - patron - library - collectionFormat: csv - - name: checked_in + type: string + name: x-koha-embed + required: false + type: array + - description: 'By default, current checkouts are returned, when this is true then checked in checkouts are returned as result.' in: query - description: By default, current checkouts are returned, when this is true then - checked in checkouts are returned as result. + name: checked_in type: boolean - produces: - - application/json responses: - "200": + 200: description: A list of checkouts schema: - $ref: "../swagger.yaml#/definitions/checkouts" - "403": + $ref: ../swagger.yaml#/definitions/checkouts + 403: description: Access forbidden schema: - $ref: "../swagger.yaml#/definitions/error" - "404": + $ref: ../swagger.yaml#/definitions/error + 404: description: Biblio not found schema: - $ref: "../swagger.yaml#/definitions/error" - "500": + $ref: ../swagger.yaml#/definitions/error + 500: description: | Internal server error. Possible `error_code` attribute values: - + * `internal_server_error` schema: - $ref: "../swagger.yaml#/definitions/error" - "503": + $ref: ../swagger.yaml#/definitions/error + 503: description: Under maintenance schema: - $ref: "../swagger.yaml#/definitions/error" + $ref: ../swagger.yaml#/definitions/error x-koha-authorization: permissions: circulate: circulate_remaining_permissions @@ -161,230 +160,230 @@ - item - patron - library -"/biblios/{biblio_id}/items": +'/biblios/{biblio_id}/items': get: x-mojo-to: Biblios#get_items operationId: getBiblioItems tags: - biblios summary: Get items for a biblio - parameters: - - $ref: "../swagger.yaml#/parameters/biblio_id_pp" - - $ref: "../swagger.yaml#/parameters/match" - - $ref: "../swagger.yaml#/parameters/order_by" - - $ref: "../swagger.yaml#/parameters/page" - - $ref: "../swagger.yaml#/parameters/per_page" - - $ref: "../swagger.yaml#/parameters/q_param" - - $ref: "../swagger.yaml#/parameters/q_body" - - $ref: "../swagger.yaml#/parameters/q_header" - - $ref: "../swagger.yaml#/parameters/request_id_header" - consumes: - - application/json produces: - application/json + parameters: + - $ref: ../swagger.yaml#/parameters/biblio_id_pp + - $ref: ../swagger.yaml#/parameters/match + - $ref: ../swagger.yaml#/parameters/order_by + - $ref: ../swagger.yaml#/parameters/page + - $ref: ../swagger.yaml#/parameters/per_page + - $ref: ../swagger.yaml#/parameters/q_param + - $ref: ../swagger.yaml#/parameters/q_body + - $ref: ../swagger.yaml#/parameters/q_header + - $ref: ../swagger.yaml#/parameters/request_id_header responses: - "200": + 200: description: A list of the items attached to the record schema: type: array items: - $ref: "../swagger.yaml#/definitions/item" - "401": + $ref: ../swagger.yaml#/definitions/item + 401: description: Authentication required schema: - $ref: "../swagger.yaml#/definitions/error" - "403": + $ref: ../swagger.yaml#/definitions/error + 403: description: Access forbidden schema: - $ref: "../swagger.yaml#/definitions/error" - "404": + $ref: ../swagger.yaml#/definitions/error + 404: description: Biblio not found schema: - $ref: "../swagger.yaml#/definitions/error" - "406": + $ref: ../swagger.yaml#/definitions/error + 406: description: Not acceptable schema: - type: array description: Accepted content-types + type: array items: type: string - "500": + 500: description: | Internal server error. Possible `error_code` attribute values: - + * `internal_server_error` schema: - $ref: "../swagger.yaml#/definitions/error" - "503": + $ref: ../swagger.yaml#/definitions/error + 503: description: Under maintenance schema: - $ref: "../swagger.yaml#/definitions/error" + $ref: ../swagger.yaml#/definitions/error x-koha-authorization: permissions: - catalogue: "1" -"/biblios/{biblio_id}/pickup_locations": + catalogue: 1 + consumes: + - application/json +'/biblios/{biblio_id}/pickup_locations': get: x-mojo-to: Biblios#pickup_locations operationId: getBiblioPickupLocations tags: - biblios summary: Get valid pickup locations for a biblio + produces: + - application/json parameters: - - $ref: "../swagger.yaml#/parameters/biblio_id_pp" - - name: patron_id + - $ref: ../swagger.yaml#/parameters/biblio_id_pp + - description: Internal patron identifier in: query - description: Internal patron identifier + name: patron_id required: true type: integer - - $ref: "../swagger.yaml#/parameters/match" - - $ref: "../swagger.yaml#/parameters/order_by" - - $ref: "../swagger.yaml#/parameters/page" - - $ref: "../swagger.yaml#/parameters/per_page" - - $ref: "../swagger.yaml#/parameters/q_param" - - $ref: "../swagger.yaml#/parameters/q_body" - - $ref: "../swagger.yaml#/parameters/q_header" - consumes: - - application/json - produces: - - application/json + - $ref: ../swagger.yaml#/parameters/match + - $ref: ../swagger.yaml#/parameters/order_by + - $ref: ../swagger.yaml#/parameters/page + - $ref: ../swagger.yaml#/parameters/per_page + - $ref: ../swagger.yaml#/parameters/q_param + - $ref: ../swagger.yaml#/parameters/q_body + - $ref: ../swagger.yaml#/parameters/q_header responses: - "200": + 200: description: Biblio pickup locations schema: type: array items: - $ref: "../swagger.yaml#/definitions/library" - "400": + $ref: ../swagger.yaml#/definitions/library + 400: description: Missing or wrong parameters schema: - $ref: "../swagger.yaml#/definitions/error" - "401": + $ref: ../swagger.yaml#/definitions/error + 401: description: Authentication required schema: - $ref: "../swagger.yaml#/definitions/error" - "403": + $ref: ../swagger.yaml#/definitions/error + 403: description: Access forbidden schema: - $ref: "../swagger.yaml#/definitions/error" - "404": + $ref: ../swagger.yaml#/definitions/error + 404: description: Biblio not found schema: - $ref: "../swagger.yaml#/definitions/error" - "500": + $ref: ../swagger.yaml#/definitions/error + 500: description: | Internal server error. Possible `error_code` attribute values: - + * `internal_server_error` schema: - $ref: "../swagger.yaml#/definitions/error" - "503": + $ref: ../swagger.yaml#/definitions/error + 503: description: Under maintenance schema: - $ref: "../swagger.yaml#/definitions/error" + $ref: ../swagger.yaml#/definitions/error x-koha-authorization: permissions: reserveforothers: place_holds -"/public/biblios/{biblio_id}": + consumes: + - application/json +'/public/biblios/{biblio_id}': get: x-mojo-to: Biblios#get_public operationId: getBiblioPublic tags: - biblios summary: Get biblio (public) - parameters: - - $ref: "../swagger.yaml#/parameters/biblio_id_pp" produces: - application/marcxml+xml - application/marc-in-json - application/marc - text/plain + parameters: + - $ref: ../swagger.yaml#/parameters/biblio_id_pp responses: - "200": + 200: description: A biblio - "401": + 401: description: Authentication required schema: - $ref: "../swagger.yaml#/definitions/error" - "403": + $ref: ../swagger.yaml#/definitions/error + 403: description: Access forbidden schema: - $ref: "../swagger.yaml#/definitions/error" - "404": + $ref: ../swagger.yaml#/definitions/error + 404: description: Biblio not found schema: - $ref: "../swagger.yaml#/definitions/error" - "406": + $ref: ../swagger.yaml#/definitions/error + 406: description: Not acceptable schema: - type: array description: Accepted content-types + type: array items: type: string - "500": + 500: description: | Internal server error. Possible `error_code` attribute values: - + * `internal_server_error` schema: - $ref: "../swagger.yaml#/definitions/error" - "503": + $ref: ../swagger.yaml#/definitions/error + 503: description: Under maintenance schema: - $ref: "../swagger.yaml#/definitions/error" -"/public/biblios/{biblio_id}/items": + $ref: ../swagger.yaml#/definitions/error +'/public/biblios/{biblio_id}/items': get: x-mojo-to: Biblios#get_items_public operationId: getBiblioItemsPublic tags: - biblios - items - parameters: - - $ref: "../swagger.yaml#/parameters/biblio_id_pp" - - $ref: "../swagger.yaml#/parameters/match" - - $ref: "../swagger.yaml#/parameters/order_by" - - $ref: "../swagger.yaml#/parameters/page" - - $ref: "../swagger.yaml#/parameters/per_page" - - $ref: "../swagger.yaml#/parameters/q_param" - - $ref: "../swagger.yaml#/parameters/q_body" - - $ref: "../swagger.yaml#/parameters/q_header" - consumes: - - application/json produces: - application/json + parameters: + - $ref: ../swagger.yaml#/parameters/biblio_id_pp + - $ref: ../swagger.yaml#/parameters/match + - $ref: ../swagger.yaml#/parameters/order_by + - $ref: ../swagger.yaml#/parameters/page + - $ref: ../swagger.yaml#/parameters/per_page + - $ref: ../swagger.yaml#/parameters/q_param + - $ref: ../swagger.yaml#/parameters/q_body + - $ref: ../swagger.yaml#/parameters/q_header responses: - "200": + 200: description: A list of the items attached to the record schema: type: array items: - $ref: "../swagger.yaml#/definitions/item" - "401": + $ref: ../swagger.yaml#/definitions/item + 401: description: Authentication required schema: - $ref: "../swagger.yaml#/definitions/error" - "403": + $ref: ../swagger.yaml#/definitions/error + 403: description: Access forbidden schema: - $ref: "../swagger.yaml#/definitions/error" - "404": + $ref: ../swagger.yaml#/definitions/error + 404: description: Biblio not found schema: - $ref: "../swagger.yaml#/definitions/error" - "406": + $ref: ../swagger.yaml#/definitions/error + 406: description: Not acceptable schema: - type: array description: Accepted content-types + type: array items: type: string - "500": + 500: description: | Internal server error. Possible `error_code` attribute values: - + * `internal_server_error` schema: - $ref: "../swagger.yaml#/definitions/error" - "503": + $ref: ../swagger.yaml#/definitions/error + 503: description: Under maintenance schema: - $ref: "../swagger.yaml#/definitions/error" + $ref: ../swagger.yaml#/definitions/error + consumes: + - application/json diff --git a/api/v1/swagger/paths/cash_registers.yaml b/api/v1/swagger/paths/cash_registers.yaml index 22ee561ea3e..457885030d8 100644 --- a/api/v1/swagger/paths/cash_registers.yaml +++ b/api/v1/swagger/paths/cash_registers.yaml @@ -1,5 +1,5 @@ --- -"/cash_registers/{cash_register_id}/cashups": +'/cash_registers/{cash_register_id}/cashups': get: x-mojo-to: CashRegisters::Cashups#list operationId: listCashups @@ -9,101 +9,101 @@ produces: - application/json parameters: - - $ref: "../swagger.yaml#/parameters/cash_register_id_pp" - - $ref: "../swagger.yaml#/parameters/match" - - $ref: "../swagger.yaml#/parameters/order_by" - - $ref: "../swagger.yaml#/parameters/page" - - $ref: "../swagger.yaml#/parameters/per_page" - - $ref: "../swagger.yaml#/parameters/q_param" - - $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 + - $ref: ../swagger.yaml#/parameters/cash_register_id_pp + - $ref: ../swagger.yaml#/parameters/match + - $ref: ../swagger.yaml#/parameters/order_by + - $ref: ../swagger.yaml#/parameters/page + - $ref: ../swagger.yaml#/parameters/per_page + - $ref: ../swagger.yaml#/parameters/q_param + - $ref: ../swagger.yaml#/parameters/q_body + - $ref: ../swagger.yaml#/parameters/q_header + - $ref: ../swagger.yaml#/parameters/request_id_header + - collectionFormat: csv description: Embed list sent as a request header - type: array + in: header items: - type: string enum: - manager - collectionFormat: csv + type: string + name: x-koha-embed + required: false + type: array responses: - "200": + 200: description: Cashups performed on this register schema: type: array items: - $ref: "../swagger.yaml#/definitions/cashup" - "403": + $ref: ../swagger.yaml#/definitions/cashup + 403: description: Access forbidden schema: - $ref: "../swagger.yaml#/definitions/error" - "404": + $ref: ../swagger.yaml#/definitions/error + 404: description: Register not found schema: - $ref: "../swagger.yaml#/definitions/error" - "500": + $ref: ../swagger.yaml#/definitions/error + 500: description: | Internal server error. Possible `error_code` attribute values: - + * `internal_server_error` schema: - $ref: "../swagger.yaml#/definitions/error" - "503": + $ref: ../swagger.yaml#/definitions/error + 503: description: Under maintenance schema: - $ref: "../swagger.yaml#/definitions/error" + $ref: ../swagger.yaml#/definitions/error x-koha-authorization: permissions: cash_management: cashup x-koha-embed: - manager -"/cashups/{cashup_id}": +'/cashups/{cashup_id}': get: x-mojo-to: CashRegisters::Cashups#get operationId: getCashup tags: - cashups summary: Get cashup + produces: + - application/json parameters: - - $ref: "../swagger.yaml#/parameters/cashup_id_pp" - - name: x-koha-embed - in: header - required: false + - $ref: ../swagger.yaml#/parameters/cashup_id_pp + - collectionFormat: csv description: Embed list sent as a request header - type: array + in: header items: - type: string enum: - summary - collectionFormat: csv - produces: - - application/json + type: string + name: x-koha-embed + required: false + type: array responses: - "200": + 200: description: A cashup schema: - $ref: "../swagger.yaml#/definitions/cashup" - "403": + $ref: ../swagger.yaml#/definitions/cashup + 403: description: Access forbidden schema: - $ref: "../swagger.yaml#/definitions/error" - "404": + $ref: ../swagger.yaml#/definitions/error + 404: description: Patron not found schema: - $ref: "../swagger.yaml#/definitions/error" - "500": + $ref: ../swagger.yaml#/definitions/error + 500: description: | Internal server error. Possible `error_code` attribute values: - + * `internal_server_error` schema: - $ref: "../swagger.yaml#/definitions/error" - "503": + $ref: ../swagger.yaml#/definitions/error + 503: description: Under maintenance schema: - $ref: "../swagger.yaml#/definitions/error" + $ref: ../swagger.yaml#/definitions/error x-koha-authorization: permissions: cash_management: cashup diff --git a/api/v1/swagger/paths/checkouts.yaml b/api/v1/swagger/paths/checkouts.yaml index f82cd36cbd0..cacd5e16caf 100644 --- a/api/v1/swagger/paths/checkouts.yaml +++ b/api/v1/swagger/paths/checkouts.yaml @@ -6,186 +6,185 @@ tags: - checkouts summary: List checkouts + produces: + - application/json parameters: - - $ref: "../swagger.yaml#/parameters/patron_id_qp" - - $ref: "../swagger.yaml#/parameters/page" - - $ref: "../swagger.yaml#/parameters/per_page" - - $ref: "../swagger.yaml#/parameters/match" - - $ref: "../swagger.yaml#/parameters/order_by" - - $ref: "../swagger.yaml#/parameters/q_param" - - $ref: "../swagger.yaml#/parameters/q_body" - - $ref: "../swagger.yaml#/parameters/q_header" - - $ref: "../swagger.yaml#/parameters/request_id_header" - - name: checked_in + - $ref: ../swagger.yaml#/parameters/patron_id_qp + - $ref: ../swagger.yaml#/parameters/page + - $ref: ../swagger.yaml#/parameters/per_page + - $ref: ../swagger.yaml#/parameters/match + - $ref: ../swagger.yaml#/parameters/order_by + - $ref: ../swagger.yaml#/parameters/q_param + - $ref: ../swagger.yaml#/parameters/q_body + - $ref: ../swagger.yaml#/parameters/q_header + - $ref: ../swagger.yaml#/parameters/request_id_header + - description: 'By default, current checkouts are returned, when this is true then checked in checkouts are returned as result.' in: query - description: By default, current checkouts are returned, when this is true then - checked in checkouts are returned as result. + name: checked_in type: boolean - - name: x-koha-embed - in: header - required: false + - collectionFormat: csv description: Embed list sent as a request header - type: array + in: header items: - type: string enum: - issuer - collectionFormat: csv - produces: - - application/json + type: string + name: x-koha-embed + required: false + type: array responses: - "200": + 200: description: A list of checkouts schema: - $ref: "../swagger.yaml#/definitions/checkouts" - "403": + $ref: ../swagger.yaml#/definitions/checkouts + 403: description: Access forbidden schema: - $ref: "../swagger.yaml#/definitions/error" - "404": + $ref: ../swagger.yaml#/definitions/error + 404: description: Patron not found schema: - $ref: "../swagger.yaml#/definitions/error" - "500": + $ref: ../swagger.yaml#/definitions/error + 500: description: | Internal server error. Possible `error_code` attribute values: - + * `internal_server_error` schema: - $ref: "../swagger.yaml#/definitions/error" - "503": + $ref: ../swagger.yaml#/definitions/error + 503: description: Under maintenance schema: - $ref: "../swagger.yaml#/definitions/error" + $ref: ../swagger.yaml#/definitions/error x-koha-authorization: permissions: circulate: circulate_remaining_permissions x-koha-embed: - issuer -"/checkouts/{checkout_id}": +'/checkouts/{checkout_id}': get: x-mojo-to: Checkouts#get operationId: getCheckout tags: - checkouts summary: Get checkout + produces: + - application/json parameters: - - $ref: "../swagger.yaml#/parameters/checkout_id_pp" - - name: x-koha-embed - in: header - required: false + - $ref: ../swagger.yaml#/parameters/checkout_id_pp + - collectionFormat: csv description: Embed list sent as a request header - type: array + in: header items: - type: string enum: - issuer - collectionFormat: csv - produces: - - application/json + type: string + name: x-koha-embed + required: false + type: array responses: - "200": + 200: description: Updated borrower's checkout schema: - $ref: "../swagger.yaml#/definitions/checkout" - "403": + $ref: ../swagger.yaml#/definitions/checkout + 403: description: Access forbidden schema: - $ref: "../swagger.yaml#/definitions/error" - "404": + $ref: ../swagger.yaml#/definitions/error + 404: description: Checkout not found schema: - $ref: "../swagger.yaml#/definitions/error" - "500": + $ref: ../swagger.yaml#/definitions/error + 500: description: | Internal server error. Possible `error_code` attribute values: - + * `internal_server_error` schema: - $ref: "../swagger.yaml#/definitions/error" - "503": + $ref: ../swagger.yaml#/definitions/error + 503: description: Under maintenance schema: - $ref: "../swagger.yaml#/definitions/error" + $ref: ../swagger.yaml#/definitions/error x-koha-authorization: permissions: circulate: circulate_remaining_permissions x-koha-embed: - issuer -"/checkouts/{checkout_id}/renewal": - post: - x-mojo-to: Checkouts#renew - operationId: renewCheckout +'/checkouts/{checkout_id}/allows_renewal': + get: + x-mojo-to: Checkouts#allows_renewal + operationId: allows_renewalCheckout tags: - checkouts - summary: Renew a checkout - parameters: - - $ref: "../swagger.yaml#/parameters/checkout_id_pp" - - $ref: "../swagger.yaml#/parameters/seen_pp" + summary: Get renewability for a checkout produces: - application/json + parameters: + - $ref: ../swagger.yaml#/parameters/checkout_id_pp responses: - "201": - description: Updated borrower's checkout + 200: + description: Checkout renewability information schema: - $ref: "../swagger.yaml#/definitions/checkout" - "403": - description: Cannot renew checkout + $ref: ../swagger.yaml#/definitions/allows_renewal + 403: + description: Forbidden schema: - $ref: "../swagger.yaml#/definitions/error" - "404": + $ref: ../swagger.yaml#/definitions/error + 404: description: Checkout not found schema: - $ref: "../swagger.yaml#/definitions/error" - "500": + $ref: ../swagger.yaml#/definitions/error + 500: description: | Internal server error. Possible `error_code` attribute values: - + * `internal_server_error` schema: - $ref: "../swagger.yaml#/definitions/error" - "503": + $ref: ../swagger.yaml#/definitions/error + 503: description: Under maintenance schema: - $ref: "../swagger.yaml#/definitions/error" + $ref: ../swagger.yaml#/definitions/error x-koha-authorization: permissions: circulate: circulate_remaining_permissions -"/checkouts/{checkout_id}/allows_renewal": - get: - x-mojo-to: Checkouts#allows_renewal - operationId: allows_renewalCheckout +'/checkouts/{checkout_id}/renewal': + post: + x-mojo-to: Checkouts#renew + operationId: renewCheckout tags: - checkouts - summary: Get renewability for a checkout - parameters: - - $ref: "../swagger.yaml#/parameters/checkout_id_pp" + summary: Renew a checkout produces: - application/json + parameters: + - $ref: ../swagger.yaml#/parameters/checkout_id_pp + - $ref: ../swagger.yaml#/parameters/seen_pp responses: - "200": - description: Checkout renewability information + 201: + description: Updated borrower's checkout schema: - $ref: "../swagger.yaml#/definitions/allows_renewal" - "403": - description: Forbidden + $ref: ../swagger.yaml#/definitions/checkout + 403: + description: Cannot renew checkout schema: - $ref: "../swagger.yaml#/definitions/error" - "404": + $ref: ../swagger.yaml#/definitions/error + 404: description: Checkout not found schema: - $ref: "../swagger.yaml#/definitions/error" - "500": + $ref: ../swagger.yaml#/definitions/error + 500: description: | Internal server error. Possible `error_code` attribute values: - + * `internal_server_error` schema: - $ref: "../swagger.yaml#/definitions/error" - "503": + $ref: ../swagger.yaml#/definitions/error + 503: description: Under maintenance schema: - $ref: "../swagger.yaml#/definitions/error" + $ref: ../swagger.yaml#/definitions/error x-koha-authorization: permissions: circulate: circulate_remaining_permissions diff --git a/api/v1/swagger/paths/circulation-rules.yaml b/api/v1/swagger/paths/circulation-rules.yaml index 545f15458a9..e1d10480c7a 100644 --- a/api/v1/swagger/paths/circulation-rules.yaml +++ b/api/v1/swagger/paths/circulation-rules.yaml @@ -9,24 +9,24 @@ produces: - application/json responses: - "200": + 200: description: A map of rule kind information schema: type: object additionalProperties: - $ref: "../swagger.yaml#/definitions/circ-rule-kind" - "403": + $ref: ../swagger.yaml#/definitions/circ-rule-kind + 403: description: Access forbidden schema: - $ref: "../swagger.yaml#/definitions/error" - "500": + $ref: ../swagger.yaml#/definitions/error + 500: description: | Internal server error. Possible `error_code` attribute values: - + * `internal_server_error` schema: - $ref: "../swagger.yaml#/definitions/error" - "503": + $ref: ../swagger.yaml#/definitions/error + 503: description: Under maintenance schema: - $ref: "../swagger.yaml#/definitions/error" + $ref: ../swagger.yaml#/definitions/error diff --git a/api/v1/swagger/paths/cities.yaml b/api/v1/swagger/paths/cities.yaml index c8f29ef663d..2eea9494a12 100644 --- a/api/v1/swagger/paths/cities.yaml +++ b/api/v1/swagger/paths/cities.yaml @@ -9,212 +9,212 @@ produces: - application/json parameters: - - name: name + - description: Case insensative search on city name in: query - description: Case insensative search on city name + name: name required: false type: string - - name: state + - description: Case insensative search on city state in: query - description: Case insensative search on city state + name: state required: false type: string - - name: country + - description: Case insensative search on city country in: query - description: Case insensative search on city country + name: country required: false type: string - - name: postal_code + - description: Case Insensative search on city postal code in: query - description: Case Insensative search on city postal code + name: postal_code required: false type: string - - $ref: "../swagger.yaml#/parameters/match" - - $ref: "../swagger.yaml#/parameters/order_by" - - $ref: "../swagger.yaml#/parameters/page" - - $ref: "../swagger.yaml#/parameters/per_page" - - $ref: "../swagger.yaml#/parameters/q_param" - - $ref: "../swagger.yaml#/parameters/q_body" - - $ref: "../swagger.yaml#/parameters/q_header" - - $ref: "../swagger.yaml#/parameters/request_id_header" + - $ref: ../swagger.yaml#/parameters/match + - $ref: ../swagger.yaml#/parameters/order_by + - $ref: ../swagger.yaml#/parameters/page + - $ref: ../swagger.yaml#/parameters/per_page + - $ref: ../swagger.yaml#/parameters/q_param + - $ref: ../swagger.yaml#/parameters/q_body + - $ref: ../swagger.yaml#/parameters/q_header + - $ref: ../swagger.yaml#/parameters/request_id_header responses: - "200": + 200: description: A list of cities schema: type: array items: - $ref: "../swagger.yaml#/definitions/city" - "403": + $ref: ../swagger.yaml#/definitions/city + 403: description: Access forbidden schema: - $ref: "../swagger.yaml#/definitions/error" - "500": + $ref: ../swagger.yaml#/definitions/error + 500: description: | Internal server error. Possible `error_code` attribute values: - + * `internal_server_error` schema: - $ref: "../swagger.yaml#/definitions/error" - "503": + $ref: ../swagger.yaml#/definitions/error + 503: description: Under maintenance schema: - $ref: "../swagger.yaml#/definitions/error" + $ref: ../swagger.yaml#/definitions/error x-koha-authorization: permissions: - catalogue: "1" + catalogue: 1 post: x-mojo-to: Cities#add operationId: addCity tags: - cities summary: Add city + produces: + - application/json parameters: - - name: body + - description: A JSON object containing informations about the new hold in: body - description: A JSON object containing informations about the new hold + name: body required: true schema: - $ref: "../swagger.yaml#/definitions/city" - produces: - - application/json + $ref: ../swagger.yaml#/definitions/city responses: - "201": + 201: description: City added schema: - $ref: "../swagger.yaml#/definitions/city" - "401": + $ref: ../swagger.yaml#/definitions/city + 401: description: Authentication required schema: - $ref: "../swagger.yaml#/definitions/error" - "403": + $ref: ../swagger.yaml#/definitions/error + 403: description: Access forbidden schema: - $ref: "../swagger.yaml#/definitions/error" - "500": + $ref: ../swagger.yaml#/definitions/error + 500: description: | Internal server error. Possible `error_code` attribute values: - + * `internal_server_error` schema: - $ref: "../swagger.yaml#/definitions/error" - "503": + $ref: ../swagger.yaml#/definitions/error + 503: description: Under maintenance schema: - $ref: "../swagger.yaml#/definitions/error" + $ref: ../swagger.yaml#/definitions/error + x-koha-authorization: + permissions: + parameters: manage_cities +'/cities/{city_id}': + delete: + x-mojo-to: Cities#delete + operationId: deleteCity + tags: + - cities + summary: Delete city + produces: + - application/json + parameters: + - $ref: ../swagger.yaml#/parameters/city_id_pp + responses: + 204: + description: City deleted + 401: + description: Authentication required + schema: + $ref: ../swagger.yaml#/definitions/error + 403: + description: Access forbidden + schema: + $ref: ../swagger.yaml#/definitions/error + 404: + description: City not found + schema: + $ref: ../swagger.yaml#/definitions/error + 500: + description: Internal error + schema: + $ref: ../swagger.yaml#/definitions/error + 503: + description: Under maintenance + schema: + $ref: ../swagger.yaml#/definitions/error x-koha-authorization: permissions: parameters: manage_cities -"/cities/{city_id}": get: x-mojo-to: Cities#get operationId: getCity tags: - cities summary: Get city - parameters: - - $ref: "../swagger.yaml#/parameters/city_id_pp" produces: - application/json + parameters: + - $ref: ../swagger.yaml#/parameters/city_id_pp responses: - "200": + 200: description: A city schema: - $ref: "../swagger.yaml#/definitions/city" - "404": + $ref: ../swagger.yaml#/definitions/city + 404: description: City not found schema: - $ref: "../swagger.yaml#/definitions/error" - "500": + $ref: ../swagger.yaml#/definitions/error + 500: description: | Internal server error. Possible `error_code` attribute values: - + * `internal_server_error` schema: - $ref: "../swagger.yaml#/definitions/error" - "503": + $ref: ../swagger.yaml#/definitions/error + 503: description: Under maintenance schema: - $ref: "../swagger.yaml#/definitions/error" + $ref: ../swagger.yaml#/definitions/error x-koha-authorization: permissions: - catalogue: "1" + catalogue: 1 put: x-mojo-to: Cities#update operationId: updateCity tags: - cities summary: Update city + produces: + - application/json parameters: - - $ref: "../swagger.yaml#/parameters/city_id_pp" - - name: body + - $ref: ../swagger.yaml#/parameters/city_id_pp + - description: A city object in: body - description: A city object + name: body required: true schema: - $ref: "../swagger.yaml#/definitions/city" - produces: - - application/json + $ref: ../swagger.yaml#/definitions/city responses: - "200": + 200: description: A city schema: - $ref: "../swagger.yaml#/definitions/city" - "401": - description: Authentication required - schema: - $ref: "../swagger.yaml#/definitions/error" - "403": - description: Access forbidden - schema: - $ref: "../swagger.yaml#/definitions/error" - "404": - description: City not found - schema: - $ref: "../swagger.yaml#/definitions/error" - "500": - description: Internal error - schema: - $ref: "../swagger.yaml#/definitions/error" - "503": - description: Under maintenance - schema: - $ref: "../swagger.yaml#/definitions/error" - x-koha-authorization: - permissions: - parameters: manage_cities - delete: - x-mojo-to: Cities#delete - operationId: deleteCity - tags: - - cities - summary: Delete city - parameters: - - $ref: "../swagger.yaml#/parameters/city_id_pp" - produces: - - application/json - responses: - "204": - description: City deleted - "401": + $ref: ../swagger.yaml#/definitions/city + 401: description: Authentication required schema: - $ref: "../swagger.yaml#/definitions/error" - "403": + $ref: ../swagger.yaml#/definitions/error + 403: description: Access forbidden schema: - $ref: "../swagger.yaml#/definitions/error" - "404": + $ref: ../swagger.yaml#/definitions/error + 404: description: City not found schema: - $ref: "../swagger.yaml#/definitions/error" - "500": + $ref: ../swagger.yaml#/definitions/error + 500: description: Internal error schema: - $ref: "../swagger.yaml#/definitions/error" - "503": + $ref: ../swagger.yaml#/definitions/error + 503: description: Under maintenance schema: - $ref: "../swagger.yaml#/definitions/error" + $ref: ../swagger.yaml#/definitions/error x-koha-authorization: permissions: parameters: manage_cities diff --git a/api/v1/swagger/paths/clubs.yaml b/api/v1/swagger/paths/clubs.yaml index 7e09954d7c2..4fb221c24bd 100644 --- a/api/v1/swagger/paths/clubs.yaml +++ b/api/v1/swagger/paths/clubs.yaml @@ -1,96 +1,95 @@ --- -"/clubs/{club_id}/holds": +'/clubs/{club_id}/holds': post: x-mojo-to: Clubs::Holds#add operationId: addClubHold tags: - clubs summary: Add a club hold + produces: + - application/json parameters: - - $ref: "../swagger.yaml#/parameters/club_id_pp" - - name: body + - $ref: ../swagger.yaml#/parameters/club_id_pp + - description: A JSON object containing informations about the new hold in: body - description: A JSON object containing informations about the new hold + name: body required: true schema: - type: object + additionalProperties: false properties: biblio_id: description: Internal biblio identifier type: - integer - "null" + default_patron_home: + description: "For each patron, set pickup location to patron's home library if possible" + type: integer + expiration_date: + description: Hold end date + format: date + type: + - string + - "null" item_id: description: Internal item identifier type: - integer - "null" - pickup_library_id: - description: Internal library identifier for the pickup library - type: string - expiration_date: - description: Hold end date + item_type: + description: Limit hold on one itemtype (ignored for item-level holds) type: - string - "null" - format: date notes: description: Notes related to this hold type: - string - "null" - item_type: - description: Limit hold on one itemtype (ignored for item-level holds) - type: - - string - - "null" - default_patron_home: - description: For each patron, set pickup location to patron's home library if - possible - type: integer + pickup_library_id: + description: Internal library identifier for the pickup library + type: string required: - pickup_library_id - additionalProperties: false - consumes: - - application/json - produces: - - application/json + type: object responses: - "201": + 201: description: Created club hold schema: - $ref: "../definitions/club_hold.yaml" - "400": + $ref: ../definitions/club_hold.yaml + 400: description: Missing or wrong parameters schema: - $ref: "../swagger.yaml#/definitions/error" - "401": + $ref: ../swagger.yaml#/definitions/error + 401: description: Authentication required schema: - $ref: "../swagger.yaml#/definitions/error" - "403": + $ref: ../swagger.yaml#/definitions/error + 403: description: Hold not allowed schema: - $ref: "../swagger.yaml#/definitions/error" - "404": + $ref: ../swagger.yaml#/definitions/error + 404: description: Club not found schema: - $ref: "../swagger.yaml#/definitions/error" - "409": + $ref: ../swagger.yaml#/definitions/error + 409: description: Hold not allowed schema: - $ref: "../swagger.yaml#/definitions/error" - "500": + $ref: ../swagger.yaml#/definitions/error + 500: description: | Internal server error. Possible `error_code` attribute values: - + * `internal_server_error` schema: - $ref: "../swagger.yaml#/definitions/error" - "503": + $ref: ../swagger.yaml#/definitions/error + 503: description: Under maintenance schema: - $ref: "../swagger.yaml#/definitions/error" + $ref: ../swagger.yaml#/definitions/error x-koha-authorization: permissions: - reserveforothers: "1" + reserveforothers: 1 + consumes: + - application/json diff --git a/api/v1/swagger/paths/config_smtp_servers.yaml b/api/v1/swagger/paths/config_smtp_servers.yaml index effe1d8642e..c3b079c6830 100644 --- a/api/v1/swagger/paths/config_smtp_servers.yaml +++ b/api/v1/swagger/paths/config_smtp_servers.yaml @@ -9,36 +9,36 @@ produces: - application/json parameters: - - $ref: "../swagger.yaml#/parameters/match" - - $ref: "../swagger.yaml#/parameters/order_by" - - $ref: "../swagger.yaml#/parameters/page" - - $ref: "../swagger.yaml#/parameters/per_page" - - $ref: "../swagger.yaml#/parameters/q_param" - - $ref: "../swagger.yaml#/parameters/q_body" - - $ref: "../swagger.yaml#/parameters/q_header" - - $ref: "../swagger.yaml#/parameters/request_id_header" + - $ref: ../swagger.yaml#/parameters/match + - $ref: ../swagger.yaml#/parameters/order_by + - $ref: ../swagger.yaml#/parameters/page + - $ref: ../swagger.yaml#/parameters/per_page + - $ref: ../swagger.yaml#/parameters/q_param + - $ref: ../swagger.yaml#/parameters/q_body + - $ref: ../swagger.yaml#/parameters/q_header + - $ref: ../swagger.yaml#/parameters/request_id_header responses: - "200": + 200: description: A list of SMTP servers schema: type: array items: - $ref: "../swagger.yaml#/definitions/smtp_server" - "403": + $ref: ../swagger.yaml#/definitions/smtp_server + 403: description: Access forbidden schema: - $ref: "../swagger.yaml#/definitions/error" - "500": + $ref: ../swagger.yaml#/definitions/error + 500: description: | Internal server error. Possible `error_code` attribute values: - + * `internal_server_error` schema: - $ref: "../swagger.yaml#/definitions/error" - "503": + $ref: ../swagger.yaml#/definitions/error + 503: description: Under maintenance schema: - $ref: "../swagger.yaml#/definitions/error" + $ref: ../swagger.yaml#/definitions/error x-koha-authorization: permissions: parameters: manage_smtp_servers @@ -48,167 +48,167 @@ tags: - smtp_servers summary: Add SMTP server + produces: + - application/json parameters: - - name: body + - description: A JSON object representing a new SMTP server configuration in: body - description: A JSON object representing a new SMTP server configuration + name: body required: true schema: - $ref: "../swagger.yaml#/definitions/smtp_server" - produces: - - application/json + $ref: ../swagger.yaml#/definitions/smtp_server responses: - "201": + 201: description: An SMTP server object schema: - $ref: "../swagger.yaml#/definitions/smtp_server" - "401": + $ref: ../swagger.yaml#/definitions/smtp_server + 401: description: Authentication required schema: - $ref: "../swagger.yaml#/definitions/error" - "403": + $ref: ../swagger.yaml#/definitions/error + 403: description: Access forbidden schema: - $ref: "../swagger.yaml#/definitions/error" - "409": + $ref: ../swagger.yaml#/definitions/error + 409: description: Conflict in creating resource schema: - $ref: "../swagger.yaml#/definitions/error" - "500": + $ref: ../swagger.yaml#/definitions/error + 500: description: | Internal server error. Possible `error_code` attribute values: - + * `internal_server_error` schema: - $ref: "../swagger.yaml#/definitions/error" - "503": + $ref: ../swagger.yaml#/definitions/error + 503: description: Under maintenance schema: - $ref: "../swagger.yaml#/definitions/error" + $ref: ../swagger.yaml#/definitions/error x-koha-authorization: permissions: parameters: manage_smtp_servers -"/config/smtp_servers/{smtp_server_id}": - get: - x-mojo-to: Config::SMTP::Servers#get - operationId: getSMTPServer +'/config/smtp_servers/{smtp_server_id}': + delete: + x-mojo-to: Config::SMTP::Servers#delete + operationId: deleteSMTPServer tags: - smtp_servers - summary: Get SMTP server - parameters: - - $ref: "../swagger.yaml#/parameters/smtp_server_id_pp" + summary: Delete SMTP server produces: - application/json + parameters: + - $ref: ../swagger.yaml#/parameters/smtp_server_id_pp responses: - "200": - description: An SMTP server object + 204: + description: SMTP server deleted + 401: + description: Authentication required schema: - $ref: "../swagger.yaml#/definitions/smtp_server" - "404": - description: Object not found + $ref: ../swagger.yaml#/definitions/error + 403: + description: Access forbidden schema: - $ref: "../swagger.yaml#/definitions/error" - "409": - description: Conflict updating resource + $ref: ../swagger.yaml#/definitions/error + 404: + description: Object not found schema: - $ref: "../swagger.yaml#/definitions/error" - "500": + $ref: ../swagger.yaml#/definitions/error + 500: description: | Internal server error. Possible `error_code` attribute values: - + * `internal_server_error` schema: - $ref: "../swagger.yaml#/definitions/error" - "503": + $ref: ../swagger.yaml#/definitions/error + 503: description: Under maintenance schema: - $ref: "../swagger.yaml#/definitions/error" + $ref: ../swagger.yaml#/definitions/error x-koha-authorization: permissions: parameters: manage_smtp_servers - put: - x-mojo-to: Config::SMTP::Servers#update - operationId: updateSMTPServer + get: + x-mojo-to: Config::SMTP::Servers#get + operationId: getSMTPServer tags: - smtp_servers - summary: Update SMTP server - parameters: - - $ref: "../swagger.yaml#/parameters/smtp_server_id_pp" - - name: body - in: body - description: An SMTP server object - required: true - schema: - $ref: "../swagger.yaml#/definitions/smtp_server" + summary: Get SMTP server produces: - application/json + parameters: + - $ref: ../swagger.yaml#/parameters/smtp_server_id_pp responses: - "200": + 200: description: An SMTP server object schema: - $ref: "../swagger.yaml#/definitions/smtp_server" - "401": - description: Authentication required - schema: - $ref: "../swagger.yaml#/definitions/error" - "403": - description: Access forbidden - schema: - $ref: "../swagger.yaml#/definitions/error" - "404": + $ref: ../swagger.yaml#/definitions/smtp_server + 404: description: Object not found schema: - $ref: "../swagger.yaml#/definitions/error" - "500": + $ref: ../swagger.yaml#/definitions/error + 409: + description: Conflict updating resource + schema: + $ref: ../swagger.yaml#/definitions/error + 500: description: | Internal server error. Possible `error_code` attribute values: - + * `internal_server_error` schema: - $ref: "../swagger.yaml#/definitions/error" - "503": + $ref: ../swagger.yaml#/definitions/error + 503: description: Under maintenance schema: - $ref: "../swagger.yaml#/definitions/error" + $ref: ../swagger.yaml#/definitions/error x-koha-authorization: permissions: parameters: manage_smtp_servers - delete: - x-mojo-to: Config::SMTP::Servers#delete - operationId: deleteSMTPServer + put: + x-mojo-to: Config::SMTP::Servers#update + operationId: updateSMTPServer tags: - smtp_servers - summary: Delete SMTP server - parameters: - - $ref: "../swagger.yaml#/parameters/smtp_server_id_pp" + summary: Update SMTP server produces: - application/json + parameters: + - $ref: ../swagger.yaml#/parameters/smtp_server_id_pp + - description: An SMTP server object + in: body + name: body + required: true + schema: + $ref: ../swagger.yaml#/definitions/smtp_server responses: - "204": - description: SMTP server deleted - "401": + 200: + description: An SMTP server object + schema: + $ref: ../swagger.yaml#/definitions/smtp_server + 401: description: Authentication required schema: - $ref: "../swagger.yaml#/definitions/error" - "403": + $ref: ../swagger.yaml#/definitions/error + 403: description: Access forbidden schema: - $ref: "../swagger.yaml#/definitions/error" - "404": + $ref: ../swagger.yaml#/definitions/error + 404: description: Object not found schema: - $ref: "../swagger.yaml#/definitions/error" - "500": + $ref: ../swagger.yaml#/definitions/error + 500: description: | Internal server error. Possible `error_code` attribute values: - + * `internal_server_error` schema: - $ref: "../swagger.yaml#/definitions/error" - "503": + $ref: ../swagger.yaml#/definitions/error + 503: description: Under maintenance schema: - $ref: "../swagger.yaml#/definitions/error" + $ref: ../swagger.yaml#/definitions/error x-koha-authorization: permissions: parameters: manage_smtp_servers diff --git a/api/v1/swagger/paths/holds.yaml b/api/v1/swagger/paths/holds.yaml index a598c7a90d7..10784d6536c 100644 --- a/api/v1/swagger/paths/holds.yaml +++ b/api/v1/swagger/paths/holds.yaml @@ -6,115 +6,115 @@ tags: - holds summary: List holds + produces: + - application/json parameters: - - name: hold_id + - description: Internal hold identifier in: query - description: Internal hold identifier + name: hold_id type: integer - - name: patron_id + - description: Internal patron identifier in: query - description: Internal patron identifier + name: patron_id type: integer - - name: hold_date + - description: Hold + format: date in: query - description: Hold + name: hold_date type: string - format: date - - name: biblio_id + - description: Internal biblio identifier in: query - description: Internal biblio identifier + name: biblio_id type: integer - - name: pickup_library_id + - description: Internal library identifier for the pickup library in: query - description: Internal library identifier for the pickup library + name: pickup_library_id type: string - - name: cancellation_date + - description: The date the hold was cancelled + format: date in: query - description: The date the hold was cancelled + name: cancellation_date type: string - format: date - - name: notes + - description: Notes related to this hold in: query - description: Notes related to this hold + name: notes type: string - - name: priority + - description: Where in the queue the patron sits in: query - description: Where in the queue the patron sits + name: priority type: integer - - name: status + - description: Found status in: query - description: Found status + name: status type: string - - name: timestamp + - description: Time of latest update in: query - description: Time of latest update + name: timestamp type: string - - name: item_id + - description: Internal item identifier in: query - description: Internal item identifier + name: item_id type: integer - - name: waiting_date + - description: Date the item was marked as waiting for the patron in: query - description: Date the item was marked as waiting for the patron + name: waiting_date type: string - - name: expiration_date + - description: Date the hold expires in: query - description: Date the hold expires + name: expiration_date type: string - - name: lowest_priority + - description: Lowest priority in: query - description: Lowest priority + name: lowest_priority type: boolean - - name: suspended + - description: Suspended in: query - description: Suspended + name: suspended type: boolean - - name: suspended_until + - description: Suspended until in: query - description: Suspended until + name: suspended_until type: string - - name: non_priority + - description: Non priority hold in: query - description: Non priority hold + name: non_priority type: boolean - - $ref: "../swagger.yaml#/parameters/match" - - $ref: "../swagger.yaml#/parameters/order_by" - - $ref: "../swagger.yaml#/parameters/page" - - $ref: "../swagger.yaml#/parameters/per_page" - - $ref: "../swagger.yaml#/parameters/q_param" - - $ref: "../swagger.yaml#/parameters/q_body" - - $ref: "../swagger.yaml#/parameters/q_header" - - $ref: "../swagger.yaml#/parameters/request_id_header" - produces: - - application/json + - $ref: ../swagger.yaml#/parameters/match + - $ref: ../swagger.yaml#/parameters/order_by + - $ref: ../swagger.yaml#/parameters/page + - $ref: ../swagger.yaml#/parameters/per_page + - $ref: ../swagger.yaml#/parameters/q_param + - $ref: ../swagger.yaml#/parameters/q_body + - $ref: ../swagger.yaml#/parameters/q_header + - $ref: ../swagger.yaml#/parameters/request_id_header responses: - "200": + 200: description: A list of holds schema: - $ref: "../swagger.yaml#/definitions/holds" - "401": + $ref: ../swagger.yaml#/definitions/holds + 401: description: Authentication required schema: - $ref: "../swagger.yaml#/definitions/error" - "403": + $ref: ../swagger.yaml#/definitions/error + 403: description: Hold not allowed schema: - $ref: "../swagger.yaml#/definitions/error" - "404": + $ref: ../swagger.yaml#/definitions/error + 404: description: Borrower not found schema: - $ref: "../swagger.yaml#/definitions/error" - "500": + $ref: ../swagger.yaml#/definitions/error + 500: description: | Internal server error. Possible `error_code` attribute values: - + * `internal_server_error` schema: - $ref: "../swagger.yaml#/definitions/error" - "503": + $ref: ../swagger.yaml#/definitions/error + 503: description: Under maintenance schema: - $ref: "../swagger.yaml#/definitions/error" + $ref: ../swagger.yaml#/definitions/error x-koha-authorization: permissions: borrowers: edit_borrowers @@ -124,47 +124,38 @@ tags: - holds summary: Place hold + produces: + - application/json parameters: - - name: body + - description: A JSON object containing informations about the new hold in: body - description: A JSON object containing informations about the new hold + name: body required: true schema: - type: object + additionalProperties: false properties: - patron_id: - description: Internal patron identifier - type: integer biblio_id: description: Internal biblio identifier type: - integer - "null" + expiration_date: + description: Hold end date + format: date + type: + - string + - "null" hold_date: description: The date the hold was placed + format: date type: - string - "null" - format: date item_id: description: Internal item identifier type: - integer - "null" - pickup_library_id: - description: Internal library identifier for the pickup library - type: string - expiration_date: - description: Hold end date - type: - - string - - "null" - format: date - notes: - description: Notes related to this hold - type: - - string - - "null" item_type: description: Limit hold on one itemtype (ignored for item-level holds) type: @@ -175,505 +166,513 @@ type: - boolean - "null" + notes: + description: Notes related to this hold + type: + - string + - "null" + patron_id: + description: Internal patron identifier + type: integer + pickup_library_id: + description: Internal library identifier for the pickup library + type: string required: - patron_id - pickup_library_id - additionalProperties: false - - name: x-koha-override - description: "Comma-separated list of overrides (valid values: any)" + type: object + - description: 'Comma-separated list of overrides (valid values: any)' in: header - type: string + name: x-koha-override required: false - consumes: - - application/json - produces: - - application/json + type: string responses: - "201": + 201: description: Created hold schema: - $ref: "../swagger.yaml#/definitions/hold" - "400": + $ref: ../swagger.yaml#/definitions/hold + 400: description: Missing or wrong parameters schema: - $ref: "../swagger.yaml#/definitions/error" - "401": + $ref: ../swagger.yaml#/definitions/error + 401: description: Authentication required schema: - $ref: "../swagger.yaml#/definitions/error" - "403": + $ref: ../swagger.yaml#/definitions/error + 403: description: Hold not allowed schema: - $ref: "../swagger.yaml#/definitions/error" - "404": + $ref: ../swagger.yaml#/definitions/error + 404: description: Borrower not found schema: - $ref: "../swagger.yaml#/definitions/error" - "500": + $ref: ../swagger.yaml#/definitions/error + 500: description: | Internal server error. Possible `error_code` attribute values: - + * `internal_server_error` schema: - $ref: "../swagger.yaml#/definitions/error" - "503": + $ref: ../swagger.yaml#/definitions/error + 503: description: Under maintenance schema: - $ref: "../swagger.yaml#/definitions/error" + $ref: ../swagger.yaml#/definitions/error x-koha-authorization: permissions: - reserveforothers: "1" -"/holds/{hold_id}": + reserveforothers: 1 + consumes: + - application/json +'/holds/{hold_id}': + delete: + x-mojo-to: Holds#delete + operationId: deleteHold + tags: + - holds + summary: Cancel hold + produces: + - application/json + parameters: + - $ref: ../swagger.yaml#/parameters/hold_id_pp + responses: + 204: + description: Hold deleted + 401: + description: Authentication required + schema: + $ref: ../swagger.yaml#/definitions/error + 403: + description: Hold not allowed + schema: + $ref: ../swagger.yaml#/definitions/error + 404: + description: Hold not found + schema: + $ref: ../swagger.yaml#/definitions/error + 500: + description: | + Internal server error. Possible `error_code` attribute values: + + * `internal_server_error` + schema: + $ref: ../swagger.yaml#/definitions/error + 503: + description: Under maintenance + schema: + $ref: ../swagger.yaml#/definitions/error + x-koha-authorization: + permissions: + reserveforothers: 1 patch: x-mojo-to: Holds#edit operationId: editHold tags: - holds summary: Update hold + produces: + - application/json parameters: - - $ref: "../swagger.yaml#/parameters/hold_id_pp" - - name: body + - $ref: ../swagger.yaml#/parameters/hold_id_pp + - description: A JSON object containing fields to modify in: body - description: A JSON object containing fields to modify + name: body required: true schema: - type: object + additionalProperties: false properties: - priority: - description: Position in waiting queue - type: integer - minimum: 1 pickup_library_id: description: Internal library identifier for the pickup library type: string + priority: + description: Position in waiting queue + minimum: 1 + type: integer suspended_until: description: Date until which the hold has been suspended - type: string format: date-time - additionalProperties: false - consumes: - - application/json - produces: - - application/json + type: string + type: object responses: - "200": + 200: description: Updated hold schema: - $ref: "../swagger.yaml#/definitions/hold" - "400": + $ref: ../swagger.yaml#/definitions/hold + 400: description: Missing or wrong parameters schema: - $ref: "../swagger.yaml#/definitions/error" - "401": + $ref: ../swagger.yaml#/definitions/error + 401: description: Authentication required schema: - $ref: "../swagger.yaml#/definitions/error" - "403": + $ref: ../swagger.yaml#/definitions/error + 403: description: Hold not allowed schema: - $ref: "../swagger.yaml#/definitions/error" - "404": + $ref: ../swagger.yaml#/definitions/error + 404: description: Hold not found schema: - $ref: "../swagger.yaml#/definitions/error" - "500": + $ref: ../swagger.yaml#/definitions/error + 500: description: | Internal server error. Possible `error_code` attribute values: - + * `internal_server_error` schema: - $ref: "../swagger.yaml#/definitions/error" - "503": + $ref: ../swagger.yaml#/definitions/error + 503: description: Under maintenance schema: - $ref: "../swagger.yaml#/definitions/error" + $ref: ../swagger.yaml#/definitions/error x-koha-authorization: permissions: - reserveforothers: "1" + reserveforothers: 1 + consumes: + - application/json put: x-mojo-to: Holds#edit operationId: overwriteHold tags: - holds summary: Update hold - description: This route is being deprecated and will be removed in future releases. - Please migrate your project to use PATCH /holds/{hold_id} instead. + produces: + - application/json parameters: - - $ref: "../swagger.yaml#/parameters/hold_id_pp" - - name: body + - $ref: ../swagger.yaml#/parameters/hold_id_pp + - description: A JSON object containing fields to modify in: body - description: A JSON object containing fields to modify + name: body required: true schema: - type: object + additionalProperties: false properties: - priority: - description: Position in waiting queue - type: integer - minimum: 1 pickup_library_id: description: Internal library identifier for the pickup library type: string + priority: + description: Position in waiting queue + minimum: 1 + type: integer suspended_until: description: Date until which the hold has been suspended - type: string format: date-time - additionalProperties: false - consumes: - - application/json - produces: - - application/json + type: string + type: object responses: - "200": + 200: description: Updated hold schema: - $ref: "../swagger.yaml#/definitions/hold" - "400": + $ref: ../swagger.yaml#/definitions/hold + 400: description: Missing or wrong parameters schema: - $ref: "../swagger.yaml#/definitions/error" - "401": + $ref: ../swagger.yaml#/definitions/error + 401: description: Authentication required schema: - $ref: "../swagger.yaml#/definitions/error" - "403": + $ref: ../swagger.yaml#/definitions/error + 403: description: Hold not allowed schema: - $ref: "../swagger.yaml#/definitions/error" - "404": + $ref: ../swagger.yaml#/definitions/error + 404: description: Hold not found schema: - $ref: "../swagger.yaml#/definitions/error" - "500": + $ref: ../swagger.yaml#/definitions/error + 500: description: | Internal server error. Possible `error_code` attribute values: - + * `internal_server_error` schema: - $ref: "../swagger.yaml#/definitions/error" - "503": + $ref: ../swagger.yaml#/definitions/error + 503: description: Under maintenance schema: - $ref: "../swagger.yaml#/definitions/error" + $ref: ../swagger.yaml#/definitions/error x-koha-authorization: permissions: - reserveforothers: "1" - delete: - x-mojo-to: Holds#delete - operationId: deleteHold + reserveforothers: 1 + description: 'This route is being deprecated and will be removed in future releases. Please migrate your project to use PATCH /holds/{hold_id} instead.' + consumes: + - application/json +'/holds/{hold_id}/pickup_location': + put: + x-mojo-to: Holds#update_pickup_location + operationId: updateHoldPickupLocation tags: - holds - summary: Cancel hold - parameters: - - $ref: "../swagger.yaml#/parameters/hold_id_pp" + summary: Update pickup location for the hold produces: - application/json + parameters: + - $ref: ../swagger.yaml#/parameters/hold_id_pp + - description: Pickup location + in: body + name: body + required: true + schema: + additionalProperties: false + properties: + pickup_library_id: + description: Internal identifier for the pickup library + type: string + type: object responses: - "204": - description: Hold deleted - "401": + 200: + description: The new pickup location value for the hold + schema: + type: object + properties: + pickup_library_id: + description: Internal identifier for the pickup library + type: string + additionalProperties: false + 400: + description: Missing or wrong parameters + schema: + $ref: ../swagger.yaml#/definitions/error + 401: description: Authentication required schema: - $ref: "../swagger.yaml#/definitions/error" - "403": - description: Hold not allowed + $ref: ../swagger.yaml#/definitions/error + 403: + description: Access forbidden schema: - $ref: "../swagger.yaml#/definitions/error" - "404": + $ref: ../swagger.yaml#/definitions/error + 404: description: Hold not found schema: - $ref: "../swagger.yaml#/definitions/error" - "500": - description: | - Internal server error. Possible `error_code` attribute values: - - * `internal_server_error` + $ref: ../swagger.yaml#/definitions/error + 409: + description: Unable to perform action on hold + schema: + $ref: ../swagger.yaml#/definitions/error + 500: + description: Internal error schema: - $ref: "../swagger.yaml#/definitions/error" - "503": + $ref: ../swagger.yaml#/definitions/error + 503: description: Under maintenance schema: - $ref: "../swagger.yaml#/definitions/error" + $ref: ../swagger.yaml#/definitions/error x-koha-authorization: permissions: - reserveforothers: "1" -"/holds/{hold_id}/priority": - put: - x-mojo-to: Holds#update_priority - operationId: updateHoldPriority + reserveforothers: place_holds + description: Set a new pickup location for the hold +'/holds/{hold_id}/pickup_locations': + get: + x-mojo-to: Holds#pickup_locations + operationId: getHoldPickupLocations tags: - holds - summary: Update priority for the hold - parameters: - - $ref: "../swagger.yaml#/parameters/hold_id_pp" - - name: body - in: body - description: An integer representing the new priority to be set for the hold - required: true - schema: - type: integer + summary: Get valid pickup locations for hold produces: - application/json + parameters: + - description: 'Comma-separated list of overrides (valid values: any)' + in: header + name: x-koha-override + required: false + type: string + - $ref: ../swagger.yaml#/parameters/hold_id_pp + - $ref: ../swagger.yaml#/parameters/match + - $ref: ../swagger.yaml#/parameters/order_by + - $ref: ../swagger.yaml#/parameters/page + - $ref: ../swagger.yaml#/parameters/per_page + - $ref: ../swagger.yaml#/parameters/q_param + - $ref: ../swagger.yaml#/parameters/q_body + - $ref: ../swagger.yaml#/parameters/q_header + - $ref: ../swagger.yaml#/parameters/request_id_header responses: - "200": - description: The new priority value for the hold + 200: + description: Hold pickup location schema: - type: integer - "401": - description: Authentication required + type: array + items: + $ref: ../swagger.yaml#/definitions/library + 400: + description: Missing or wrong parameters schema: - $ref: "../swagger.yaml#/definitions/error" - "403": - description: Access forbidden + $ref: ../swagger.yaml#/definitions/error + 401: + description: Authentication required schema: - $ref: "../swagger.yaml#/definitions/error" - "404": - description: Biblio not found + $ref: ../swagger.yaml#/definitions/error + 403: + description: Hold pickup location list not allowed schema: - $ref: "../swagger.yaml#/definitions/error" - "409": - description: Unable to perform action on biblio + $ref: ../swagger.yaml#/definitions/error + 404: + description: Hold not found schema: - $ref: "../swagger.yaml#/definitions/error" - "500": + $ref: ../swagger.yaml#/definitions/error + 500: description: | Internal server error. Possible `error_code` attribute values: - + * `internal_server_error` schema: - $ref: "../swagger.yaml#/definitions/error" - "503": + $ref: ../swagger.yaml#/definitions/error + 503: description: Under maintenance schema: - $ref: "../swagger.yaml#/definitions/error" + $ref: ../swagger.yaml#/definitions/error x-koha-authorization: permissions: - reserveforothers: modify_holds_priority -"/holds/{hold_id}/suspension": - post: - x-mojo-to: Holds#suspend - operationId: suspendHold + reserveforothers: place_holds +'/holds/{hold_id}/priority': + put: + x-mojo-to: Holds#update_priority + operationId: updateHoldPriority tags: - holds - summary: Suspend the hold + summary: Update priority for the hold + produces: + - application/json parameters: - - $ref: "../swagger.yaml#/parameters/hold_id_pp" - - name: body + - $ref: ../swagger.yaml#/parameters/hold_id_pp + - description: An integer representing the new priority to be set for the hold in: body - description: A JSON object containing fields to modify - required: false + name: body + required: true schema: - type: object - properties: - end_date: - description: Date the hold suspension expires - type: string - format: date - additionalProperties: false - consumes: - - application/json - produces: - - application/json + type: integer responses: - "201": - description: Hold suspended - "400": - description: Missing or wrong parameters + 200: + description: The new priority value for the hold schema: - $ref: "../swagger.yaml#/definitions/error" - "401": + type: integer + 401: description: Authentication required schema: - $ref: "../swagger.yaml#/definitions/error" - "403": - description: Hold not allowed + $ref: ../swagger.yaml#/definitions/error + 403: + description: Access forbidden schema: - $ref: "../swagger.yaml#/definitions/error" - "404": - description: Hold not found + $ref: ../swagger.yaml#/definitions/error + 404: + description: Biblio not found schema: - $ref: "../swagger.yaml#/definitions/error" - "500": + $ref: ../swagger.yaml#/definitions/error + 409: + description: Unable to perform action on biblio + schema: + $ref: ../swagger.yaml#/definitions/error + 500: description: | Internal server error. Possible `error_code` attribute values: - + * `internal_server_error` schema: - $ref: "../swagger.yaml#/definitions/error" - "503": + $ref: ../swagger.yaml#/definitions/error + 503: description: Under maintenance schema: - $ref: "../swagger.yaml#/definitions/error" + $ref: ../swagger.yaml#/definitions/error x-koha-authorization: permissions: - reserveforothers: "1" + reserveforothers: modify_holds_priority +'/holds/{hold_id}/suspension': delete: x-mojo-to: Holds#resume operationId: resumeHold tags: - holds summary: Resume hold - parameters: - - $ref: "../swagger.yaml#/parameters/hold_id_pp" - consumes: - - application/json produces: - application/json + parameters: + - $ref: ../swagger.yaml#/parameters/hold_id_pp responses: - "204": + 204: description: Hold resumed - "400": + 400: description: Missing or wrong parameters schema: - $ref: "../swagger.yaml#/definitions/error" - "401": + $ref: ../swagger.yaml#/definitions/error + 401: description: Authentication required schema: - $ref: "../swagger.yaml#/definitions/error" - "403": + $ref: ../swagger.yaml#/definitions/error + 403: description: Hold not allowed schema: - $ref: "../swagger.yaml#/definitions/error" - "404": + $ref: ../swagger.yaml#/definitions/error + 404: description: Hold not found schema: - $ref: "../swagger.yaml#/definitions/error" - "500": + $ref: ../swagger.yaml#/definitions/error + 500: description: | Internal server error. Possible `error_code` attribute values: - + * `internal_server_error` schema: - $ref: "../swagger.yaml#/definitions/error" - "503": + $ref: ../swagger.yaml#/definitions/error + 503: description: Under maintenance schema: - $ref: "../swagger.yaml#/definitions/error" + $ref: ../swagger.yaml#/definitions/error x-koha-authorization: permissions: - reserveforothers: "1" -"/holds/{hold_id}/pickup_locations": - get: - x-mojo-to: Holds#pickup_locations - operationId: getHoldPickupLocations + reserveforothers: 1 + consumes: + - application/json + post: + x-mojo-to: Holds#suspend + operationId: suspendHold tags: - holds - summary: Get valid pickup locations for hold - parameters: - - name: x-koha-override - description: "Comma-separated list of overrides (valid values: any)" - in: header - type: string - required: false - - $ref: "../swagger.yaml#/parameters/hold_id_pp" - - $ref: "../swagger.yaml#/parameters/match" - - $ref: "../swagger.yaml#/parameters/order_by" - - $ref: "../swagger.yaml#/parameters/page" - - $ref: "../swagger.yaml#/parameters/per_page" - - $ref: "../swagger.yaml#/parameters/q_param" - - $ref: "../swagger.yaml#/parameters/q_body" - - $ref: "../swagger.yaml#/parameters/q_header" - - $ref: "../swagger.yaml#/parameters/request_id_header" + summary: Suspend the hold produces: - application/json - responses: - "200": - description: Hold pickup location - schema: - type: array - items: - $ref: "../swagger.yaml#/definitions/library" - "400": - description: Missing or wrong parameters - schema: - $ref: "../swagger.yaml#/definitions/error" - "401": - description: Authentication required - schema: - $ref: "../swagger.yaml#/definitions/error" - "403": - description: Hold pickup location list not allowed - schema: - $ref: "../swagger.yaml#/definitions/error" - "404": - description: Hold not found - schema: - $ref: "../swagger.yaml#/definitions/error" - "500": - description: | - Internal server error. Possible `error_code` attribute values: - - * `internal_server_error` - schema: - $ref: "../swagger.yaml#/definitions/error" - "503": - description: Under maintenance - schema: - $ref: "../swagger.yaml#/definitions/error" - x-koha-authorization: - permissions: - reserveforothers: place_holds -"/holds/{hold_id}/pickup_location": - put: - x-mojo-to: Holds#update_pickup_location - operationId: updateHoldPickupLocation - tags: - - holds - summary: Update pickup location for the hold - description: Set a new pickup location for the hold parameters: - - $ref: "../swagger.yaml#/parameters/hold_id_pp" - - name: body + - $ref: ../swagger.yaml#/parameters/hold_id_pp + - description: A JSON object containing fields to modify in: body - description: Pickup location - required: true + name: body + required: false schema: - type: object - properties: - pickup_library_id: - type: string - description: Internal identifier for the pickup library additionalProperties: false - produces: - - application/json - responses: - "200": - description: The new pickup location value for the hold - schema: - type: object properties: - pickup_library_id: + end_date: + description: Date the hold suspension expires + format: date type: string - description: Internal identifier for the pickup library - additionalProperties: false - "400": + type: object + responses: + 201: + description: Hold suspended + 400: description: Missing or wrong parameters schema: - $ref: "../swagger.yaml#/definitions/error" - "401": + $ref: ../swagger.yaml#/definitions/error + 401: description: Authentication required schema: - $ref: "../swagger.yaml#/definitions/error" - "403": - description: Access forbidden + $ref: ../swagger.yaml#/definitions/error + 403: + description: Hold not allowed schema: - $ref: "../swagger.yaml#/definitions/error" - "404": + $ref: ../swagger.yaml#/definitions/error + 404: description: Hold not found schema: - $ref: "../swagger.yaml#/definitions/error" - "409": - description: Unable to perform action on hold - schema: - $ref: "../swagger.yaml#/definitions/error" - "500": - description: Internal error + $ref: ../swagger.yaml#/definitions/error + 500: + description: | + Internal server error. Possible `error_code` attribute values: + + * `internal_server_error` schema: - $ref: "../swagger.yaml#/definitions/error" - "503": + $ref: ../swagger.yaml#/definitions/error + 503: description: Under maintenance schema: - $ref: "../swagger.yaml#/definitions/error" + $ref: ../swagger.yaml#/definitions/error x-koha-authorization: permissions: - reserveforothers: place_holds + reserveforothers: 1 + consumes: + - application/json diff --git a/api/v1/swagger/paths/ill_backends.yaml b/api/v1/swagger/paths/ill_backends.yaml index 3537c37ccae..6eb29d3b395 100644 --- a/api/v1/swagger/paths/ill_backends.yaml +++ b/api/v1/swagger/paths/ill_backends.yaml @@ -6,83 +6,83 @@ tags: - illbackends summary: List ILL backends - parameters: [] produces: - application/json + parameters: [] responses: - "200": + 200: description: A list of ILL backends schema: - $ref: "../swagger.yaml#/definitions/ill_backends" - "401": + $ref: ../swagger.yaml#/definitions/ill_backends + 401: description: Authentication required schema: - $ref: "../swagger.yaml#/definitions/error" - "403": + $ref: ../swagger.yaml#/definitions/error + 403: description: Access forbidden schema: - $ref: "../swagger.yaml#/definitions/error" - "404": + $ref: ../swagger.yaml#/definitions/error + 404: description: ILL backends not found schema: - $ref: "../swagger.yaml#/definitions/error" - "500": + $ref: ../swagger.yaml#/definitions/error + 500: description: | Internal server error. Possible `error_code` attribute values: - + * `internal_server_error` schema: - $ref: "../swagger.yaml#/definitions/error" - "503": + $ref: ../swagger.yaml#/definitions/error + 503: description: Under maintenance schema: - $ref: "../swagger.yaml#/definitions/error" + $ref: ../swagger.yaml#/definitions/error x-koha-authorization: permissions: - ill: "1" -"/ill_backends/{ill_backend_id}": + ill: 1 +'/ill_backends/{ill_backend_id}': get: x-mojo-to: Illbackends#get operationId: getIllbackends tags: - illbackends summary: Get ILL backend + produces: + - application/json parameters: - - name: ill_backend_id + - description: ILL backend id/name in: path - description: ILL backend id/name + name: ill_backend_id required: true type: string - produces: - - application/json responses: - "200": + 200: description: An ILL backends schema: - $ref: "../swagger.yaml#/definitions/ill_backend" - "401": + $ref: ../swagger.yaml#/definitions/ill_backend + 401: description: Authentication required schema: - $ref: "../swagger.yaml#/definitions/error" - "403": + $ref: ../swagger.yaml#/definitions/error + 403: description: Access forbidden schema: - $ref: "../swagger.yaml#/definitions/error" - "404": + $ref: ../swagger.yaml#/definitions/error + 404: description: ILL backends not found schema: - $ref: "../swagger.yaml#/definitions/error" - "500": + $ref: ../swagger.yaml#/definitions/error + 500: description: | Internal server error. Possible `error_code` attribute values: - + * `internal_server_error` schema: - $ref: "../swagger.yaml#/definitions/error" - "503": + $ref: ../swagger.yaml#/definitions/error + 503: description: Under maintenance schema: - $ref: "../swagger.yaml#/definitions/error" + $ref: ../swagger.yaml#/definitions/error x-koha-authorization: permissions: - ill: "1" + ill: 1 diff --git a/api/v1/swagger/paths/illrequests.yaml b/api/v1/swagger/paths/illrequests.yaml index 1e3224bda05..c6ae323b221 100644 --- a/api/v1/swagger/paths/illrequests.yaml +++ b/api/v1/swagger/paths/illrequests.yaml @@ -6,15 +6,13 @@ tags: - illrequests summary: List ILL requests + produces: + - application/json parameters: - - name: embed - in: query + - collectionFormat: csv description: Additional objects that should be embedded in the response - required: false - type: array - collectionFormat: csv + in: query items: - type: string enum: - patron - library @@ -23,109 +21,111 @@ - requested_partners - comments - status_alias - - name: backend + type: string + name: embed + required: false + type: array + - description: The name of a ILL backend in: query - description: The name of a ILL backend + name: backend required: false type: string - - name: orderid + - description: The order ID of a request in: query - description: The order ID of a request + name: orderid required: false type: string - - name: biblionumber + - description: Internal biblio identifier in: query - description: Internal biblio identifier + name: biblionumber required: false type: integer - - name: borrowernumber + - description: Internal patron identifier in: query - description: Internal patron identifier + name: borrowernumber required: false type: integer - - name: completed + - description: The date the request was considered completed in: query - description: The date the request was considered completed + name: completed required: false type: string - - name: completed_formatted + - description: The date the request was considered complete formatted in: query - description: The date the request was considered complete formatted + name: completed_formatted required: false type: string - - name: status + - description: A full status string e.g. REQREV in: query - description: A full status string e.g. REQREV + name: status required: false type: string - - name: cost + - description: The quoted cost of the request in: query - description: The quoted cost of the request + name: cost required: false type: number - - name: price_paid + - description: The final cost of the request in: query - description: The final cost of the request + name: price_paid required: false type: number - - name: medium + - description: The medium of the requested item in: query - description: The medium of the requested item + name: medium required: false type: string - - name: updated + - description: The last updated date of the request in: query - description: The last updated date of the request + name: updated required: false type: string - - name: updated_formatted + - description: The last updated date of the request formatted in: query - description: The last updated date of the request formatted + name: updated_formatted required: false type: string - - name: placed + - description: The date the request was placed in: query - description: The date the request was placed + name: placed required: false type: string - - name: placed_formatted + - description: The date the request was placed formatted in: query - description: The date the request was placed formatted + name: placed_formatted required: false type: string - - name: branchcode + - description: Library ID in: query - description: Library ID + name: branchcode required: false type: string - produces: - - application/json responses: - "200": + 200: description: A list of ILL requests - "401": + 401: description: Authentication required schema: - $ref: "../swagger.yaml#/definitions/error" - "403": + $ref: ../swagger.yaml#/definitions/error + 403: description: Access forbidden schema: - $ref: "../swagger.yaml#/definitions/error" - "404": + $ref: ../swagger.yaml#/definitions/error + 404: description: ILL requests not found schema: - $ref: "../swagger.yaml#/definitions/error" - "500": + $ref: ../swagger.yaml#/definitions/error + 500: description: | Internal server error. Possible `error_code` attribute values: - + * `internal_server_error` schema: - $ref: "../swagger.yaml#/definitions/error" - "503": + $ref: ../swagger.yaml#/definitions/error + 503: description: Under maintenance schema: - $ref: "../swagger.yaml#/definitions/error" + $ref: ../swagger.yaml#/definitions/error x-koha-authorization: permissions: - ill: "1" + ill: 1 diff --git a/api/v1/swagger/paths/import_batch_profiles.yaml b/api/v1/swagger/paths/import_batch_profiles.yaml index d5b9ea1b29f..13a55daef03 100644 --- a/api/v1/swagger/paths/import_batch_profiles.yaml +++ b/api/v1/swagger/paths/import_batch_profiles.yaml @@ -6,90 +6,102 @@ tags: - batch_import_profiles summary: List batch import profiles + produces: + - application/json parameters: - - name: name + - description: Search on profile's name in: query - description: Search on profile's name + name: name required: false type: string - - $ref: "../swagger.yaml#/parameters/match" - - $ref: "../swagger.yaml#/parameters/order_by" - - $ref: "../swagger.yaml#/parameters/page" - - $ref: "../swagger.yaml#/parameters/per_page" - - $ref: "../swagger.yaml#/parameters/q_param" - - $ref: "../swagger.yaml#/parameters/q_body" - - $ref: "../swagger.yaml#/parameters/q_header" - - $ref: "../swagger.yaml#/parameters/request_id_header" - consumes: - - application/json - produces: - - application/json + - $ref: ../swagger.yaml#/parameters/match + - $ref: ../swagger.yaml#/parameters/order_by + - $ref: ../swagger.yaml#/parameters/page + - $ref: ../swagger.yaml#/parameters/per_page + - $ref: ../swagger.yaml#/parameters/q_param + - $ref: ../swagger.yaml#/parameters/q_body + - $ref: ../swagger.yaml#/parameters/q_header + - $ref: ../swagger.yaml#/parameters/request_id_header responses: - "200": + 200: description: A list of import batch profiles schema: - $ref: "../swagger.yaml#/definitions/import_batch_profiles" - "401": + $ref: ../swagger.yaml#/definitions/import_batch_profiles + 401: description: Authentication required schema: - $ref: "../swagger.yaml#/definitions/error" - "403": + $ref: ../swagger.yaml#/definitions/error + 403: description: Access forbidden schema: - $ref: "../swagger.yaml#/definitions/error" - "500": + $ref: ../swagger.yaml#/definitions/error + 500: description: | Internal server error. Possible `error_code` attribute values: - + * `internal_server_error` schema: - $ref: "../swagger.yaml#/definitions/error" - "503": + $ref: ../swagger.yaml#/definitions/error + 503: description: Under maintenance schema: - $ref: "../swagger.yaml#/definitions/error" + $ref: ../swagger.yaml#/definitions/error x-koha-authorization: permissions: tools: stage_marc_import + consumes: + - application/json post: x-mojo-to: ImportBatchProfiles#add operationId: addImportBatchProfiles tags: - batch_import_profiles summary: Add batch import profile + produces: + - application/json parameters: - - name: body + - description: A JSON object containing a import batch profile in: body - description: A JSON object containing a import batch profile + name: body required: true schema: - type: object + additionalProperties: false properties: - name: - description: name of this profile - type: string - matcher_id: - description: the id of the match rule used (matchpoints.matcher_id) + comments: + description: any comments added when the file was uploaded type: - - integer + - string - "null" - template_id: - description: the id of the marc modification template + encoding: + description: file encoding type: - - integer + - string - "null" - overlay_action: - description: how to handle duplicate records + format: + description: marc format + type: + - string + - "null" + item_action: + description: what to do with item records type: - string - "null" + matcher_id: + description: the id of the match rule used (matchpoints.matcher_id) + type: + - integer + - "null" + name: + description: name of this profile + type: string nomatch_action: description: how to handle records where no match is found type: - string - "null" - item_action: - description: what to do with item records + overlay_action: + description: how to handle duplicate records type: - string - "null" @@ -103,102 +115,141 @@ type: - string - "null" - encoding: - description: file encoding - type: - - string - - "null" - format: - description: marc format - type: - - string - - "null" - comments: - description: any comments added when the file was uploaded + template_id: + description: the id of the marc modification template type: - - string + - integer - "null" - additionalProperties: false - consumes: - - application/json - produces: - - application/json + type: object responses: - "201": + 201: description: Created Profile schema: - $ref: "../swagger.yaml#/definitions/import_batch_profile" - "400": + $ref: ../swagger.yaml#/definitions/import_batch_profile + 400: description: Missing or wrong parameters schema: - $ref: "../swagger.yaml#/definitions/error" - "401": + $ref: ../swagger.yaml#/definitions/error + 401: description: Authentication required schema: - $ref: "../swagger.yaml#/definitions/error" - "403": + $ref: ../swagger.yaml#/definitions/error + 403: description: Hold not allowed schema: - $ref: "../swagger.yaml#/definitions/error" - "404": + $ref: ../swagger.yaml#/definitions/error + 404: description: Borrower not found schema: - $ref: "../swagger.yaml#/definitions/error" - "500": + $ref: ../swagger.yaml#/definitions/error + 500: + description: | + Internal server error. Possible `error_code` attribute values: + + * `internal_server_error` + schema: + $ref: ../swagger.yaml#/definitions/error + 503: + description: Under maintenance + schema: + $ref: ../swagger.yaml#/definitions/error + x-koha-authorization: + permissions: + tools: stage_marc_import + consumes: + - application/json +'/import_batch_profiles/{import_batch_profile_id}': + delete: + x-mojo-to: ImportBatchProfiles#delete + operationId: deleteImportBatchProfiles + tags: + - batch_import_profiles + summary: Delete batch import profile + produces: + - application/json + parameters: + - $ref: ../swagger.yaml#/parameters/import_batch_profile_id_pp + responses: + 204: + description: Profile deleted + 401: + description: Authentication required + schema: + $ref: ../swagger.yaml#/definitions/error + 403: + description: Hold not allowed + schema: + $ref: ../swagger.yaml#/definitions/error + 404: + description: Hold not found + schema: + $ref: ../swagger.yaml#/definitions/error + 500: description: | Internal server error. Possible `error_code` attribute values: - + * `internal_server_error` schema: - $ref: "../swagger.yaml#/definitions/error" - "503": + $ref: ../swagger.yaml#/definitions/error + 503: description: Under maintenance schema: - $ref: "../swagger.yaml#/definitions/error" + $ref: ../swagger.yaml#/definitions/error x-koha-authorization: permissions: tools: stage_marc_import -"/import_batch_profiles/{import_batch_profile_id}": put: x-mojo-to: ImportBatchProfiles#edit operationId: editImportBatchProfiles tags: - batch_import_profiles summary: Update batch import profile + produces: + - application/json parameters: - - $ref: "../swagger.yaml#/parameters/import_batch_profile_id_pp" - - name: body + - $ref: ../swagger.yaml#/parameters/import_batch_profile_id_pp + - description: A JSON object containing a import batch profile in: body - description: A JSON object containing a import batch profile + name: body required: true schema: - type: object + additionalProperties: false properties: - name: - description: name of this profile - type: string - matcher_id: - description: the id of the match rule used (matchpoints.matcher_id) + comments: + description: any comments added when the file was uploaded type: - - integer + - string - "null" - template_id: - description: the id of the marc modification template + encoding: + description: file encoding type: - - integer + - string - "null" - overlay_action: - description: how to handle duplicate records + format: + description: marc format + type: + - string + - "null" + item_action: + description: what to do with item records type: - string - "null" + matcher_id: + description: the id of the match rule used (matchpoints.matcher_id) + type: + - integer + - "null" + name: + description: name of this profile + type: string nomatch_action: description: how to handle records where no match is found type: - string - "null" - item_action: - description: what to do with item records + overlay_action: + description: how to handle duplicate records type: - string - "null" @@ -212,97 +263,46 @@ type: - string - "null" - encoding: - description: file encoding - type: - - string - - "null" - format: - description: marc format - type: - - string - - "null" - comments: - description: any comments added when the file was uploaded + template_id: + description: the id of the marc modification template type: - - string + - integer - "null" - additionalProperties: false - consumes: - - application/json - produces: - - application/json + type: object responses: - "200": + 200: description: Updated profile schema: - $ref: "../swagger.yaml#/definitions/import_batch_profile" - "400": + $ref: ../swagger.yaml#/definitions/import_batch_profile + 400: description: Missing or wrong parameters schema: - $ref: "../swagger.yaml#/definitions/error" - "401": + $ref: ../swagger.yaml#/definitions/error + 401: description: Authentication required schema: - $ref: "../swagger.yaml#/definitions/error" - "403": + $ref: ../swagger.yaml#/definitions/error + 403: description: Hold not allowed schema: - $ref: "../swagger.yaml#/definitions/error" - "404": + $ref: ../swagger.yaml#/definitions/error + 404: description: Borrower not found schema: - $ref: "../swagger.yaml#/definitions/error" - "500": + $ref: ../swagger.yaml#/definitions/error + 500: description: | Internal server error. Possible `error_code` attribute values: - + * `internal_server_error` schema: - $ref: "../swagger.yaml#/definitions/error" - "503": + $ref: ../swagger.yaml#/definitions/error + 503: description: Under maintenance schema: - $ref: "../swagger.yaml#/definitions/error" + $ref: ../swagger.yaml#/definitions/error x-koha-authorization: permissions: tools: stage_marc_import - delete: - x-mojo-to: ImportBatchProfiles#delete - operationId: deleteImportBatchProfiles - tags: - - batch_import_profiles - summary: Delete batch import profile - parameters: - - $ref: "../swagger.yaml#/parameters/import_batch_profile_id_pp" - produces: + consumes: - application/json - responses: - "204": - description: Profile deleted - "401": - description: Authentication required - schema: - $ref: "../swagger.yaml#/definitions/error" - "403": - description: Hold not allowed - schema: - $ref: "../swagger.yaml#/definitions/error" - "404": - description: Hold not found - schema: - $ref: "../swagger.yaml#/definitions/error" - "500": - description: | - Internal server error. Possible `error_code` attribute values: - - * `internal_server_error` - schema: - $ref: "../swagger.yaml#/definitions/error" - "503": - description: Under maintenance - schema: - $ref: "../swagger.yaml#/definitions/error" - x-koha-authorization: - permissions: - tools: stage_marc_import diff --git a/api/v1/swagger/paths/items.yaml b/api/v1/swagger/paths/items.yaml index 66fc1ee6a8a..fa05853b42d 100644 --- a/api/v1/swagger/paths/items.yaml +++ b/api/v1/swagger/paths/items.yaml @@ -6,153 +6,153 @@ tags: - items summary: List items + produces: + - application/json parameters: - - name: external_id + - description: Search on the item's barcode in: query - description: Search on the item's barcode + name: external_id required: false type: string - - $ref: "../swagger.yaml#/parameters/match" - - $ref: "../swagger.yaml#/parameters/order_by" - - $ref: "../swagger.yaml#/parameters/page" - - $ref: "../swagger.yaml#/parameters/per_page" - - $ref: "../swagger.yaml#/parameters/q_param" - - $ref: "../swagger.yaml#/parameters/q_body" - - $ref: "../swagger.yaml#/parameters/q_header" - - $ref: "../swagger.yaml#/parameters/request_id_header" - consumes: - - application/json - produces: - - application/json + - $ref: ../swagger.yaml#/parameters/match + - $ref: ../swagger.yaml#/parameters/order_by + - $ref: ../swagger.yaml#/parameters/page + - $ref: ../swagger.yaml#/parameters/per_page + - $ref: ../swagger.yaml#/parameters/q_param + - $ref: ../swagger.yaml#/parameters/q_body + - $ref: ../swagger.yaml#/parameters/q_header + - $ref: ../swagger.yaml#/parameters/request_id_header responses: - "200": + 200: description: A list of item schema: type: array items: - $ref: "../swagger.yaml#/definitions/item" - "401": + $ref: ../swagger.yaml#/definitions/item + 401: description: Authentication required schema: - $ref: "../swagger.yaml#/definitions/error" - "403": + $ref: ../swagger.yaml#/definitions/error + 403: description: Access forbidden schema: - $ref: "../swagger.yaml#/definitions/error" - "500": + $ref: ../swagger.yaml#/definitions/error + 500: description: | Internal server error. Possible `error_code` attribute values: - + * `internal_server_error` schema: - $ref: "../swagger.yaml#/definitions/error" - "503": + $ref: ../swagger.yaml#/definitions/error + 503: description: Under maintenance schema: - $ref: "../swagger.yaml#/definitions/error" + $ref: ../swagger.yaml#/definitions/error x-koha-authorization: permissions: - catalogue: "1" -"/items/{item_id}": + catalogue: 1 + consumes: + - application/json +'/items/{item_id}': get: x-mojo-to: Items#get operationId: getItem tags: - items summary: Get item - parameters: - - $ref: "../swagger.yaml#/parameters/item_id_pp" - consumes: - - application/json produces: - application/json + parameters: + - $ref: ../swagger.yaml#/parameters/item_id_pp responses: - "200": + 200: description: An item schema: - $ref: "../swagger.yaml#/definitions/item" - "400": + $ref: ../swagger.yaml#/definitions/item + 400: description: Missing or wrong parameters schema: - $ref: "../swagger.yaml#/definitions/error" - "404": + $ref: ../swagger.yaml#/definitions/error + 404: description: Item not found schema: - $ref: "../swagger.yaml#/definitions/error" - "500": + $ref: ../swagger.yaml#/definitions/error + 500: description: | Internal server error. Possible `error_code` attribute values: - + * `internal_server_error` schema: - $ref: "../swagger.yaml#/definitions/error" - "503": + $ref: ../swagger.yaml#/definitions/error + 503: description: Under maintenance schema: - $ref: "../swagger.yaml#/definitions/error" + $ref: ../swagger.yaml#/definitions/error x-koha-authorization: permissions: - catalogue: "1" -"/items/{item_id}/pickup_locations": + catalogue: 1 + consumes: + - application/json +'/items/{item_id}/pickup_locations': get: x-mojo-to: Items#pickup_locations operationId: getItemPickupLocations - summary: Get valid pickup locations for an item tags: - items + summary: Get valid pickup locations for an item + produces: + - application/json parameters: - - $ref: "../swagger.yaml#/parameters/item_id_pp" - - name: patron_id + - $ref: ../swagger.yaml#/parameters/item_id_pp + - description: Internal patron identifier in: query - description: Internal patron identifier + name: patron_id required: true type: integer - - $ref: "../swagger.yaml#/parameters/match" - - $ref: "../swagger.yaml#/parameters/order_by" - - $ref: "../swagger.yaml#/parameters/page" - - $ref: "../swagger.yaml#/parameters/per_page" - - $ref: "../swagger.yaml#/parameters/q_param" - - $ref: "../swagger.yaml#/parameters/q_body" - - $ref: "../swagger.yaml#/parameters/q_header" - - $ref: "../swagger.yaml#/parameters/request_id_header" - consumes: - - application/json - produces: - - application/json + - $ref: ../swagger.yaml#/parameters/match + - $ref: ../swagger.yaml#/parameters/order_by + - $ref: ../swagger.yaml#/parameters/page + - $ref: ../swagger.yaml#/parameters/per_page + - $ref: ../swagger.yaml#/parameters/q_param + - $ref: ../swagger.yaml#/parameters/q_body + - $ref: ../swagger.yaml#/parameters/q_header + - $ref: ../swagger.yaml#/parameters/request_id_header responses: - "200": + 200: description: Item pickup locations schema: type: array items: - $ref: "../swagger.yaml#/definitions/library" - "400": + $ref: ../swagger.yaml#/definitions/library + 400: description: Missing or wrong parameters schema: - $ref: "../swagger.yaml#/definitions/error" - "401": + $ref: ../swagger.yaml#/definitions/error + 401: description: Authentication required schema: - $ref: "../swagger.yaml#/definitions/error" - "403": + $ref: ../swagger.yaml#/definitions/error + 403: description: Access forbidden schema: - $ref: "../swagger.yaml#/definitions/error" - "404": + $ref: ../swagger.yaml#/definitions/error + 404: description: Biblio not found schema: - $ref: "../swagger.yaml#/definitions/error" - "500": + $ref: ../swagger.yaml#/definitions/error + 500: description: | Internal server error. Possible `error_code` attribute values: - + * `internal_server_error` schema: - $ref: "../swagger.yaml#/definitions/error" - "503": + $ref: ../swagger.yaml#/definitions/error + 503: description: Under maintenance schema: - $ref: "../swagger.yaml#/definitions/error" + $ref: ../swagger.yaml#/definitions/error x-koha-authorization: permissions: reserveforothers: place_holds + consumes: + - application/json diff --git a/api/v1/swagger/paths/libraries.yaml b/api/v1/swagger/paths/libraries.yaml index c5e33439cf4..a87f5d683f2 100644 --- a/api/v1/swagger/paths/libraries.yaml +++ b/api/v1/swagger/paths/libraries.yaml @@ -6,133 +6,133 @@ tags: - libraries summary: List libraries + produces: + - application/json parameters: - - name: name + - description: Case insensitive 'starts-with' search on name in: query - description: Case insensitive 'starts-with' search on name + name: name required: false type: string - - name: address1 + - description: Case insensitive 'starts-with' search on address1 in: query - description: Case insensitive 'starts-with' search on address1 + name: address1 required: false type: string - - name: address2 + - description: Case insensitive 'starts-with' search on address2 in: query - description: Case insensitive 'starts-with' search on address2 + name: address2 required: false type: string - - name: address3 + - description: Case insensitive 'starts-with' search on address3 in: query - description: Case insensitive 'starts-with' search on address3 + name: address3 required: false type: string - - name: postal_code + - description: Case insensitive 'starts-with' search on postal code in: query - description: Case insensitive 'starts-with' search on postal code + name: postal_code required: false type: string - - name: city + - description: Case insensitive 'starts-with' search on city in: query - description: Case insensitive 'starts-with' search on city + name: city required: false type: string - - name: state + - description: Case insensitive 'starts-with' search on state in: query - description: Case insensitive 'starts-with' search on state + name: state required: false type: string - - name: country + - description: Case insensitive 'starts_with' search on country in: query - description: Case insensitive 'starts_with' search on country + name: country required: false type: string - - name: phone + - description: Case insensitive 'starts_with' search on phone number in: query - description: Case insensitive 'starts_with' search on phone number + name: phone required: false type: string - - name: fax + - description: Case insensitive 'starts_with' search on fax number in: query - description: Case insensitive 'starts_with' search on fax number + name: fax required: false type: string - - name: email + - description: Case insensitive 'starts_with' search on email address in: query - description: Case insensitive 'starts_with' search on email address + name: email required: false type: string - - name: reply_to_email + - description: Case insensitive 'starts_with' search on Reply-To email address in: query - description: Case insensitive 'starts_with' search on Reply-To email address + name: reply_to_email required: false type: string - - name: return_path_email + - description: Case insensitive 'starts_with' search on Return-Path email address in: query - description: Case insensitive 'starts_with' search on Return-Path email address + name: return_path_email required: false type: string - - name: url + - description: Case insensitive 'starts_with' search on website URL in: query - description: Case insensitive 'starts_with' search on website URL + name: url required: false type: string - - name: ip + - description: Case insensitive 'starts_with' search on IP address in: query - description: Case insensitive 'starts_with' search on IP address + name: ip required: false type: string - - name: notes + - description: Case insensitive 'starts_with' search on notes in: query - description: Case insensitive 'starts_with' search on notes + name: notes required: false type: string - - name: opac_info + - description: Case insensitive 'starts-with' search on OPAC info in: query - description: Case insensitive 'starts-with' search on OPAC info + name: opac_info required: false type: string - - $ref: "../swagger.yaml#/parameters/match" - - $ref: "../swagger.yaml#/parameters/order_by" - - $ref: "../swagger.yaml#/parameters/page" - - $ref: "../swagger.yaml#/parameters/per_page" - - $ref: "../swagger.yaml#/parameters/q_param" - - $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 + - $ref: ../swagger.yaml#/parameters/match + - $ref: ../swagger.yaml#/parameters/order_by + - $ref: ../swagger.yaml#/parameters/page + - $ref: ../swagger.yaml#/parameters/per_page + - $ref: ../swagger.yaml#/parameters/q_param + - $ref: ../swagger.yaml#/parameters/q_body + - $ref: ../swagger.yaml#/parameters/q_header + - $ref: ../swagger.yaml#/parameters/request_id_header + - collectionFormat: csv description: Embed list sent as a request header - type: array + in: header items: - type: string enum: - smtp_server - collectionFormat: csv - produces: - - application/json + type: string + name: x-koha-embed + required: false + type: array responses: - "200": + 200: description: A list of libraries schema: type: array items: - $ref: "../swagger.yaml#/definitions/library" - "500": + $ref: ../swagger.yaml#/definitions/library + 500: description: | Internal server error. Possible `error_code` attribute values: - + * `internal_server_error` schema: - $ref: "../swagger.yaml#/definitions/error" - "503": + $ref: ../swagger.yaml#/definitions/error + 503: description: Under maintenance schema: - $ref: "../swagger.yaml#/definitions/error" + $ref: ../swagger.yaml#/definitions/error x-koha-authorization: permissions: - catalogue: "1" + catalogue: 1 x-koha-embed: - smtp_server post: @@ -141,83 +141,124 @@ tags: - libraries summary: Add library + produces: + - application/json parameters: - - name: body + - description: A JSON object containing informations about the new library in: body - description: A JSON object containing informations about the new library + name: body required: true schema: - $ref: "../swagger.yaml#/definitions/library" - produces: - - application/json + $ref: ../swagger.yaml#/definitions/library responses: - "201": + 201: description: Library added schema: - $ref: "../swagger.yaml#/definitions/library" - "400": + $ref: ../swagger.yaml#/definitions/library + 400: description: Bad request schema: - $ref: "../swagger.yaml#/definitions/error" - "401": + $ref: ../swagger.yaml#/definitions/error + 401: description: Authentication required schema: - $ref: "../swagger.yaml#/definitions/error" - "403": + $ref: ../swagger.yaml#/definitions/error + 403: description: Access forbidden schema: - $ref: "../swagger.yaml#/definitions/error" - "409": + $ref: ../swagger.yaml#/definitions/error + 409: description: Conflict in creating resource schema: - $ref: "../swagger.yaml#/definitions/error" - "500": + $ref: ../swagger.yaml#/definitions/error + 500: + description: | + Internal server error. Possible `error_code` attribute values: + + * `internal_server_error` + schema: + $ref: ../swagger.yaml#/definitions/error + 503: + description: Under maintenance + schema: + $ref: ../swagger.yaml#/definitions/error + x-koha-authorization: + permissions: + parameters: manage_libraries +'/libraries/{library_id}': + delete: + x-mojo-to: Libraries#delete + operationId: deleteLibrary + tags: + - libraries + summary: Delete library + produces: + - application/json + parameters: + - $ref: ../swagger.yaml#/parameters/library_id_pp + responses: + 204: + description: Library deleted + schema: + type: string + 401: + description: Authentication required + schema: + $ref: ../swagger.yaml#/definitions/error + 403: + description: Access forbidden + schema: + $ref: ../swagger.yaml#/definitions/error + 404: + description: Library not found + schema: + $ref: ../swagger.yaml#/definitions/error + 500: description: | Internal server error. Possible `error_code` attribute values: - + * `internal_server_error` schema: - $ref: "../swagger.yaml#/definitions/error" - "503": + $ref: ../swagger.yaml#/definitions/error + 503: description: Under maintenance schema: - $ref: "../swagger.yaml#/definitions/error" + $ref: ../swagger.yaml#/definitions/error x-koha-authorization: permissions: parameters: manage_libraries -"/libraries/{library_id}": get: x-mojo-to: Libraries#get operationId: getLibrary tags: - libraries summary: Get library + produces: + - application/json parameters: - - $ref: "../swagger.yaml#/parameters/library_id_pp" - - name: x-koha-embed - in: header - required: false + - $ref: ../swagger.yaml#/parameters/library_id_pp + - collectionFormat: csv description: Embed list sent as a request header - type: array + in: header items: - type: string enum: - smtp_server - collectionFormat: csv - produces: - - application/json + type: string + name: x-koha-embed + required: false + type: array responses: - "200": + 200: description: A library schema: - $ref: "../swagger.yaml#/definitions/library" - "404": + $ref: ../swagger.yaml#/definitions/library + 404: description: Library not found schema: - $ref: "../swagger.yaml#/definitions/error" + $ref: ../swagger.yaml#/definitions/error x-koha-authorization: permissions: - catalogue: "1" + catalogue: 1 x-koha-embed: - smtp_server put: @@ -226,94 +267,53 @@ tags: - libraries summary: Update library + produces: + - application/json parameters: - - $ref: "../swagger.yaml#/parameters/library_id_pp" - - name: body + - $ref: ../swagger.yaml#/parameters/library_id_pp + - description: A JSON object containing information on the library in: body - description: A JSON object containing information on the library + name: body required: true schema: - $ref: "../swagger.yaml#/definitions/library" - consumes: - - application/json - produces: - - application/json + $ref: ../swagger.yaml#/definitions/library responses: - "200": + 200: description: A library schema: - $ref: "../swagger.yaml#/definitions/library" - "400": + $ref: ../swagger.yaml#/definitions/library + 400: description: Bad request schema: - $ref: "../swagger.yaml#/definitions/error" - "401": + $ref: ../swagger.yaml#/definitions/error + 401: description: Authentication required schema: - $ref: "../swagger.yaml#/definitions/error" - "403": + $ref: ../swagger.yaml#/definitions/error + 403: description: Access forbidden schema: - $ref: "../swagger.yaml#/definitions/error" - "404": + $ref: ../swagger.yaml#/definitions/error + 404: description: Library not found schema: - $ref: "../swagger.yaml#/definitions/error" - "500": + $ref: ../swagger.yaml#/definitions/error + 500: description: | Internal server error. Possible `error_code` attribute values: - + * `internal_server_error` schema: - $ref: "../swagger.yaml#/definitions/error" - "503": + $ref: ../swagger.yaml#/definitions/error + 503: description: Under maintenance schema: - $ref: "../swagger.yaml#/definitions/error" + $ref: ../swagger.yaml#/definitions/error x-koha-authorization: permissions: parameters: manage_libraries - delete: - x-mojo-to: Libraries#delete - operationId: deleteLibrary - tags: - - libraries - summary: Delete library - parameters: - - $ref: "../swagger.yaml#/parameters/library_id_pp" - produces: + consumes: - application/json - responses: - "204": - description: Library deleted - schema: - type: string - "401": - description: Authentication required - schema: - $ref: "../swagger.yaml#/definitions/error" - "403": - description: Access forbidden - schema: - $ref: "../swagger.yaml#/definitions/error" - "404": - description: Library not found - schema: - $ref: "../swagger.yaml#/definitions/error" - "500": - description: | - Internal server error. Possible `error_code` attribute values: - - * `internal_server_error` - schema: - $ref: "../swagger.yaml#/definitions/error" - "503": - description: Under maintenance - schema: - $ref: "../swagger.yaml#/definitions/error" - x-koha-authorization: - permissions: - parameters: manage_libraries /public/libraries: get: x-mojo-to: Libraries#list @@ -321,76 +321,76 @@ tags: - libraries summary: List libraries - parameters: - - $ref: "../swagger.yaml#/parameters/match" - - $ref: "../swagger.yaml#/parameters/order_by" - - $ref: "../swagger.yaml#/parameters/page" - - $ref: "../swagger.yaml#/parameters/per_page" - - $ref: "../swagger.yaml#/parameters/q_param" - - $ref: "../swagger.yaml#/parameters/q_body" - - $ref: "../swagger.yaml#/parameters/q_header" - - $ref: "../swagger.yaml#/parameters/request_id_header" produces: - application/json + parameters: + - $ref: ../swagger.yaml#/parameters/match + - $ref: ../swagger.yaml#/parameters/order_by + - $ref: ../swagger.yaml#/parameters/page + - $ref: ../swagger.yaml#/parameters/per_page + - $ref: ../swagger.yaml#/parameters/q_param + - $ref: ../swagger.yaml#/parameters/q_body + - $ref: ../swagger.yaml#/parameters/q_header + - $ref: ../swagger.yaml#/parameters/request_id_header responses: - "200": + 200: description: A list of libraries schema: type: array items: - $ref: "../swagger.yaml#/definitions/library" - "500": + $ref: ../swagger.yaml#/definitions/library + 500: description: | Internal server error. Possible `error_code` attribute values: - + * `internal_server_error` schema: - $ref: "../swagger.yaml#/definitions/error" - "503": + $ref: ../swagger.yaml#/definitions/error + 503: description: Under maintenance schema: - $ref: "../swagger.yaml#/definitions/error" -"/public/libraries/{library_id}": + $ref: ../swagger.yaml#/definitions/error +'/public/libraries/{library_id}': get: x-mojo-to: Libraries#get operationId: getLibraryPublic tags: - libraries summary: Get library (public) - parameters: - - $ref: "../swagger.yaml#/parameters/library_id_pp" produces: - application/json + parameters: + - $ref: ../swagger.yaml#/parameters/library_id_pp responses: - "200": + 200: description: A library - "401": + 401: description: Authentication required schema: - $ref: "../swagger.yaml#/definitions/error" - "403": + $ref: ../swagger.yaml#/definitions/error + 403: description: Access forbidden schema: - $ref: "../swagger.yaml#/definitions/error" - "404": + $ref: ../swagger.yaml#/definitions/error + 404: description: Library not found schema: - $ref: "../swagger.yaml#/definitions/error" - "406": + $ref: ../swagger.yaml#/definitions/error + 406: description: Not acceptable schema: - type: array description: Accepted content-types + type: array items: type: string - "500": + 500: description: | Internal server error. Possible `error_code` attribute values: - + * `internal_server_error` schema: - $ref: "../swagger.yaml#/definitions/error" - "503": + $ref: ../swagger.yaml#/definitions/error + 503: description: Under maintenance schema: - $ref: "../swagger.yaml#/definitions/error" + $ref: ../swagger.yaml#/definitions/error diff --git a/api/v1/swagger/paths/oauth.yaml b/api/v1/swagger/paths/oauth.yaml index 1d74ed6f1f0..9433f70e097 100644 --- a/api/v1/swagger/paths/oauth.yaml +++ b/api/v1/swagger/paths/oauth.yaml @@ -9,37 +9,37 @@ produces: - application/json parameters: - - name: grant_type + - description: grant type (client_credentials) in: formData - description: grant type (client_credentials) + name: grant_type required: true type: string - - name: client_id + - description: client id in: formData - description: client id + name: client_id type: string - - name: client_secret + - description: client secret in: formData - description: client secret + name: client_secret type: string responses: - "200": + 200: description: OK schema: type: object properties: access_token: type: string - token_type: - type: string expires_in: type: integer + token_type: + type: string additionalProperties: false - "400": + 400: description: Bad Request schema: - $ref: "../swagger.yaml#/definitions/error" - "403": + $ref: ../swagger.yaml#/definitions/error + 403: description: Access forbidden schema: - $ref: "../swagger.yaml#/definitions/error" + $ref: ../swagger.yaml#/definitions/error diff --git a/api/v1/swagger/paths/patrons.yaml b/api/v1/swagger/paths/patrons.yaml index 10538a1c1af..3fcefaee67a 100644 --- a/api/v1/swagger/paths/patrons.yaml +++ b/api/v1/swagger/paths/patrons.yaml @@ -9,391 +9,391 @@ produces: - application/json parameters: - - name: patron_id + - description: Search on patron_id in: query - description: Search on patron_id + name: patron_id required: false type: string - - name: cardnumber + - description: Case insensitive search on cardnumber in: query - description: Case insensitive search on cardnumber + name: cardnumber required: false type: string - - name: surname + - description: Case insensitive search on surname in: query - description: Case insensitive search on surname + name: surname required: false type: string - - name: firstname + - description: Case insensitive search on firstname in: query - description: Case insensitive search on firstname + name: firstname required: false type: string - - name: title + - description: Case insensitive search on title in: query - description: Case insensitive search on title + name: title required: false type: string - - name: other_name + - description: Case insensitive search on othernames in: query - description: Case insensitive search on othernames + name: other_name required: false type: string - - name: initials + - description: Case insensitive search on initials in: query - description: Case insensitive search on initials + name: initials required: false type: string - - name: street_number + - description: Case insensitive search on streetnumber in: query - description: Case insensitive search on streetnumber + name: street_number required: false type: string - - name: street_type + - description: Case insensitive search on streettype in: query - description: Case insensitive search on streettype + name: street_type required: false type: string - - name: address + - description: Case insensitive search on address in: query - description: Case insensitive search on address + name: address required: false type: string - - name: address2 + - description: Case insensitive search on address2 in: query - description: Case insensitive search on address2 + name: address2 required: false type: string - - name: city + - description: Case insensitive search on city in: query - description: Case insensitive search on city + name: city required: false type: string - - name: state + - description: Case insensitive search on state in: query - description: Case insensitive search on state + name: state required: false type: string - - name: postal_code + - description: Case insensitive search on zipcode in: query - description: Case insensitive search on zipcode + name: postal_code required: false type: string - - name: country + - description: Case insensitive search on country in: query - description: Case insensitive search on country + name: country required: false type: string - - name: email + - description: Case insensitive search on email in: query - description: Case insensitive search on email + name: email required: false type: string - - name: phone + - description: Case insensitive search on phone in: query - description: Case insensitive search on phone + name: phone required: false type: string - - name: mobile + - description: Case insensitive search on mobile in: query - description: Case insensitive search on mobile + name: mobile required: false type: string - - name: fax + - description: Case insensitive search on fax in: query - description: Case insensitive search on fax + name: fax required: false type: string - - name: secondary_email + - description: Case insensitive search on secondary_email in: query - description: Case insensitive search on secondary_email + name: secondary_email required: false type: string - - name: secondary_phone + - description: Case insensitive search on secondary_phone in: query - description: Case insensitive search on secondary_phone + name: secondary_phone required: false type: string - - name: altaddress_street_number + - description: Case insensitive search on altaddress_street_number in: query - description: Case insensitive search on altaddress_street_number + name: altaddress_street_number required: false type: string - - name: altaddress_street_type + - description: Case insensitive search on altaddress_street_type in: query - description: Case insensitive search on altaddress_street_type + name: altaddress_street_type required: false type: string - - name: altaddress_address + - description: Case insensitive search on altaddress_address in: query - description: Case insensitive search on altaddress_address + name: altaddress_address required: false type: string - - name: altaddress_address2 + - description: Case insensitive search on altaddress_address2 in: query - description: Case insensitive search on altaddress_address2 + name: altaddress_address2 required: false type: string - - name: altaddress_city + - description: Case insensitive search on altaddress_city in: query - description: Case insensitive search on altaddress_city + name: altaddress_city required: false type: string - - name: altaddress_state + - description: Case insensitive search on altaddress_state in: query - description: Case insensitive search on altaddress_state + name: altaddress_state required: false type: string - - name: altaddress_postal_code + - description: Case insensitive search on altaddress_postal_code in: query - description: Case insensitive search on altaddress_postal_code + name: altaddress_postal_code required: false type: string - - name: altaddress_country + - description: Case insensitive search on altaddress_country in: query - description: Case insensitive search on altaddress_country + name: altaddress_country required: false type: string - - name: altaddress_email + - description: Case insensitive search on altaddress_email in: query - description: Case insensitive search on altaddress_email + name: altaddress_email required: false type: string - - name: altaddress_phone + - description: Case insensitive search on altaddress_phone in: query - description: Case insensitive search on altaddress_phone + name: altaddress_phone required: false type: string - - name: date_of_birth + - description: Case insensitive search on date_of_birth in: query - description: Case insensitive search on date_of_birth + name: date_of_birth required: false type: string - - name: library_id + - description: Case insensitive search on library_id in: query - description: Case insensitive search on library_id + name: library_id required: false type: string - - name: category_id + - description: Case insensitive search on category_id in: query - description: Case insensitive search on category_id + name: category_id required: false type: string - - name: date_enrolled + - description: Case insensitive search on date_enrolled in: query - description: Case insensitive search on date_enrolled + name: date_enrolled required: false type: string - - name: expiry_date + - description: Case insensitive search on expiry_date in: query - description: Case insensitive search on expiry_date + name: expiry_date required: false type: string - - name: incorrect_address + - description: Search on incorrect_address in: query - description: Search on incorrect_address + name: incorrect_address required: false type: boolean - - name: patron_card_lost + - description: Search on patron_card_lost in: query - description: Search on patron_card_lost + name: patron_card_lost required: false type: boolean - - name: restricted + - description: Filter search by restricted in: query - description: Filter search by restricted + name: restricted required: false type: boolean - - name: guarantor_id + - description: Search on guarantor_id in: query - description: Search on guarantor_id + name: guarantor_id required: false type: string - - name: staff_notes + - description: Case insensitive search on staff_notes in: query - description: Case insensitive search on staff_notes + name: staff_notes required: false type: string - - name: relationship_type + - description: Case insensitive search on relationship_type in: query - description: Case insensitive search on relationship_type + name: relationship_type required: false type: string - - name: gender + - description: Case insensitive search on gender in: query - description: Case insensitive search on gender + name: gender required: false type: string - - name: userid + - description: Case insensitive search on userid in: query - description: Case insensitive search on userid + name: userid required: false type: string - - name: opac_notes + - description: Case insensitive search on opac_notes in: query - description: Case insensitive search on opac_notes + name: opac_notes required: false type: string - - name: altaddress_notes + - description: Case insensitive search on altaddress_notes in: query - description: Case insensitive search on altaddress_notes + name: altaddress_notes required: false type: string - - name: statistics_1 + - description: Case insensitive search on statistics_1 in: query - description: Case insensitive search on statistics_1 + name: statistics_1 required: false type: string - - name: statistics_2 + - description: Case insensitive search on statistics_2 in: query - description: Case insensitive search on statistics_2 + name: statistics_2 required: false type: string - - name: autorenew_checkouts + - description: Search on autorenew_checkouts in: query - description: Search on autorenew_checkouts + name: autorenew_checkouts required: false type: boolean - - name: altcontact_firstname + - description: Case insensitive search on altcontact_firstname in: query - description: Case insensitive search on altcontact_firstname + name: altcontact_firstname required: false type: string - - name: altcontact_surname + - description: Case insensitive search on altcontact_surname in: query - description: Case insensitive search on altcontact_surname + name: altcontact_surname required: false type: string - - name: altcontact_address + - description: Case insensitive search on altcontact_address in: query - description: Case insensitive search on altcontact_address + name: altcontact_address required: false type: string - - name: altcontact_address2 + - description: Case insensitive search on altcontact_address2 in: query - description: Case insensitive search on altcontact_address2 + name: altcontact_address2 required: false type: string - - name: altcontact_city + - description: Case insensitive search on altcontact_city in: query - description: Case insensitive search on altcontact_city + name: altcontact_city required: false type: string - - name: altcontact_state + - description: Case insensitive search on altcontact_state in: query - description: Case insensitive search on altcontact_state + name: altcontact_state required: false type: string - - name: altcontact_postal_code + - description: Case insensitive search on altcontact_postal_code in: query - description: Case insensitive search on altcontact_postal_code + name: altcontact_postal_code required: false type: string - - name: altcontact_country + - description: Case insensitive search on altcontact_country in: query - description: Case insensitive search on altcontact_country + name: altcontact_country required: false type: string - - name: altcontact_phone + - description: Case insensitive search on altcontact_phone in: query - description: Case insensitive search on altcontact_phone + name: altcontact_phone required: false type: string - - name: sms_number + - description: Case insensitive search on sms_number in: query - description: Case insensitive search on sms_number + name: sms_number required: false type: string - - name: sms_provider_id + - description: Case insensitive search on sms_provider_id in: query - description: Case insensitive search on sms_provider_id + name: sms_provider_id required: false type: string - - name: privacy + - description: Search on privacy in: query - description: Search on privacy + name: privacy required: false type: string - - name: privacy_guarantor_checkouts + - description: Search on privacy_guarantor_checkouts in: query - description: Search on privacy_guarantor_checkouts + name: privacy_guarantor_checkouts required: false type: string - - name: check_previous_checkout + - description: Case insensitive search on check_previous_checkout in: query - description: Case insensitive search on check_previous_checkout + name: check_previous_checkout required: false type: string - - name: updated_on + - description: Search on updated_on in: query - description: Search on updated_on + name: updated_on required: false type: string - - name: last_seen + - description: Case insensitive search on last_seen in: query - description: Case insensitive search on last_seen + name: last_seen required: false type: string - - name: lang + - description: Case insensitive search on lang in: query - description: Case insensitive search on lang + name: lang required: false type: string - - name: login_attempts + - description: Search on login_attempts in: query - description: Search on login_attempts + name: login_attempts required: false type: string - - $ref: "../swagger.yaml#/parameters/match" - - $ref: "../swagger.yaml#/parameters/order_by" - - $ref: "../swagger.yaml#/parameters/page" - - $ref: "../swagger.yaml#/parameters/per_page" - - $ref: "../swagger.yaml#/parameters/q_param" - - $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 + - $ref: ../swagger.yaml#/parameters/match + - $ref: ../swagger.yaml#/parameters/order_by + - $ref: ../swagger.yaml#/parameters/page + - $ref: ../swagger.yaml#/parameters/per_page + - $ref: ../swagger.yaml#/parameters/q_param + - $ref: ../swagger.yaml#/parameters/q_body + - $ref: ../swagger.yaml#/parameters/q_header + - $ref: ../swagger.yaml#/parameters/request_id_header + - collectionFormat: csv description: Embed list sent as a request header - type: array + in: header items: - type: string enum: - extended_attributes - collectionFormat: csv + type: string + name: x-koha-embed + required: false + type: array responses: - "200": + 200: description: A list of patrons schema: type: array items: - $ref: "../swagger.yaml#/definitions/patron" - "401": + $ref: ../swagger.yaml#/definitions/patron + 401: description: Authentication required schema: - $ref: "../swagger.yaml#/definitions/error" - "403": + $ref: ../swagger.yaml#/definitions/error + 403: description: Access forbidden schema: - $ref: "../swagger.yaml#/definitions/error" - "500": + $ref: ../swagger.yaml#/definitions/error + 500: description: | Internal server error. Possible `error_code` attribute values: - + * `internal_server_error` schema: - $ref: "../swagger.yaml#/definitions/error" - "503": + $ref: ../swagger.yaml#/definitions/error + 503: description: Under maintenance schema: - $ref: "../swagger.yaml#/definitions/error" + $ref: ../swagger.yaml#/definitions/error x-koha-authorization: permissions: - - borrowers: "edit_borrowers" - - tools: "label_creator" - - serials: "routing" - - acquisition: "order_manage" + - borrowers: edit_borrowers + - tools: label_creator + - serials: routing + - acquisition: order_manage x-koha-embed: - extended_attributes - checkouts+count @@ -405,106 +405,159 @@ tags: - patrons summary: Add patron + produces: + - application/json parameters: - - name: body + - description: A JSON object containing information about the new patron in: body - description: A JSON object containing information about the new patron + name: body required: true schema: - $ref: "../swagger.yaml#/definitions/patron" - consumes: - - application/json - produces: - - application/json + $ref: ../swagger.yaml#/definitions/patron responses: - "201": + 201: description: A successfully created patron schema: items: - $ref: "../swagger.yaml#/definitions/patron" - "400": + $ref: ../swagger.yaml#/definitions/patron + 400: description: Bad parameter schema: - $ref: "../swagger.yaml#/definitions/error" - "401": + $ref: ../swagger.yaml#/definitions/error + 401: description: Authentication required schema: - $ref: "../swagger.yaml#/definitions/error" - "403": + $ref: ../swagger.yaml#/definitions/error + 403: description: Access forbidden schema: - $ref: "../swagger.yaml#/definitions/error" - "404": + $ref: ../swagger.yaml#/definitions/error + 404: description: Resource not found schema: - $ref: "../swagger.yaml#/definitions/error" - "409": + $ref: ../swagger.yaml#/definitions/error + 409: description: Conflict in creating resource schema: - $ref: "../swagger.yaml#/definitions/error" - "500": + $ref: ../swagger.yaml#/definitions/error + 500: description: | Internal server error. Possible `error_code` attribute values: - + * `internal_server_error` schema: - $ref: "../swagger.yaml#/definitions/error" - "503": + $ref: ../swagger.yaml#/definitions/error + 503: description: Under maintenance schema: - $ref: "../swagger.yaml#/definitions/error" + $ref: ../swagger.yaml#/definitions/error x-koha-authorization: permissions: borrowers: edit_borrowers -"/patrons/{patron_id}": + consumes: + - application/json +'/patrons/{patron_id}': + delete: + x-mojo-to: Patrons#delete + operationId: deletePatron + tags: + - patrons + summary: Delete patron + produces: + - application/json + parameters: + - $ref: ../swagger.yaml#/parameters/patron_id_pp + responses: + 204: + description: Patron deleted + 400: + description: Patron deletion failed + schema: + $ref: ../swagger.yaml#/definitions/error + 401: + description: Authentication required + schema: + $ref: ../swagger.yaml#/definitions/error + 403: + description: Access forbidden + schema: + $ref: ../swagger.yaml#/definitions/error + 404: + description: Patron not found + schema: + $ref: ../swagger.yaml#/definitions/error + 409: + description: | + Conflict. Possible `error_code` attribute values: + + * `has_checkouts`: The patron has pending checkouts + * `has_debt`: The patron has pending debts + * `has_guarantees`: The patron has guarantees + * `is_anonymous_patron`: The system-wide anonymous patron cannot be deleted + schema: + $ref: ../swagger.yaml#/definitions/error + 500: + description: | + Internal server error. Possible `error_code` attribute values: + + * `internal_server_error` + schema: + $ref: ../swagger.yaml#/definitions/error + 503: + description: Under maintenance + schema: + $ref: ../swagger.yaml#/definitions/error + x-koha-authorization: + permissions: + borrowers: delete_borrowers get: x-mojo-to: Patrons#get operationId: getPatron tags: - patrons summary: Get patron + produces: + - application/json parameters: - - $ref: "../swagger.yaml#/parameters/patron_id_pp" - - name: x-koha-embed - in: header - required: false + - $ref: ../swagger.yaml#/parameters/patron_id_pp + - collectionFormat: csv description: Embed list sent as a request header - type: array + in: header items: - type: string enum: - extended_attributes - collectionFormat: csv - produces: - - application/json + type: string + name: x-koha-embed + required: false + type: array responses: - "200": + 200: description: A patron schema: - $ref: "../swagger.yaml#/definitions/patron" - "401": + $ref: ../swagger.yaml#/definitions/patron + 401: description: Authentication required schema: - $ref: "../swagger.yaml#/definitions/error" - "403": + $ref: ../swagger.yaml#/definitions/error + 403: description: Access forbidden schema: - $ref: "../swagger.yaml#/definitions/error" - "404": + $ref: ../swagger.yaml#/definitions/error + 404: description: Patron not found schema: - $ref: "../swagger.yaml#/definitions/error" - "500": + $ref: ../swagger.yaml#/definitions/error + 500: description: | Internal server error. Possible `error_code` attribute values: - + * `internal_server_error` schema: - $ref: "../swagger.yaml#/definitions/error" - "503": + $ref: ../swagger.yaml#/definitions/error + 503: description: Under maintenance schema: - $ref: "../swagger.yaml#/definitions/error" + $ref: ../swagger.yaml#/definitions/error x-koha-authorization: permissions: borrowers: edit_borrowers @@ -516,104 +569,51 @@ tags: - patrons summary: Update patron + produces: + - application/json parameters: - - $ref: "../swagger.yaml#/parameters/patron_id_pp" - - name: body + - $ref: ../swagger.yaml#/parameters/patron_id_pp + - description: A JSON object containing new information about existing patron in: body - description: A JSON object containing new information about existing patron + name: body required: true schema: - $ref: "../swagger.yaml#/definitions/patron" - consumes: - - application/json - produces: - - application/json + $ref: ../swagger.yaml#/definitions/patron responses: - "200": + 200: description: A successfully updated patron schema: items: - $ref: "../swagger.yaml#/definitions/patron" - "400": + $ref: ../swagger.yaml#/definitions/patron + 400: description: Bad parameter schema: - $ref: "../swagger.yaml#/definitions/error" - "403": + $ref: ../swagger.yaml#/definitions/error + 403: description: Access forbidden schema: - $ref: "../swagger.yaml#/definitions/error" - "404": + $ref: ../swagger.yaml#/definitions/error + 404: description: Resource not found schema: - $ref: "../swagger.yaml#/definitions/error" - "409": + $ref: ../swagger.yaml#/definitions/error + 409: description: Conflict in updating resource schema: - $ref: "../swagger.yaml#/definitions/error" - "500": + $ref: ../swagger.yaml#/definitions/error + 500: description: | Internal server error. Possible `error_code` attribute values: - + * `internal_server_error` schema: - $ref: "../swagger.yaml#/definitions/error" - "503": + $ref: ../swagger.yaml#/definitions/error + 503: description: Under maintenance schema: - $ref: "../swagger.yaml#/definitions/error" + $ref: ../swagger.yaml#/definitions/error x-koha-authorization: permissions: - borrowers: "1" - delete: - x-mojo-to: Patrons#delete - operationId: deletePatron - tags: - - patrons - summary: Delete patron - parameters: - - $ref: "../swagger.yaml#/parameters/patron_id_pp" - produces: + borrowers: 1 + consumes: - application/json - responses: - "204": - description: Patron deleted - "400": - description: Patron deletion failed - schema: - $ref: "../swagger.yaml#/definitions/error" - "401": - description: Authentication required - schema: - $ref: "../swagger.yaml#/definitions/error" - "403": - description: Access forbidden - schema: - $ref: "../swagger.yaml#/definitions/error" - "404": - description: Patron not found - schema: - $ref: "../swagger.yaml#/definitions/error" - "409": - description: | - Conflict. Possible `error_code` attribute values: - - * `has_checkouts`: The patron has pending checkouts - * `has_debt`: The patron has pending debts - * `has_guarantees`: The patron has guarantees - * `is_anonymous_patron`: The system-wide anonymous patron cannot be deleted - schema: - $ref: "../swagger.yaml#/definitions/error" - "500": - description: | - Internal server error. Possible `error_code` attribute values: - - * `internal_server_error` - schema: - $ref: "../swagger.yaml#/definitions/error" - "503": - description: Under maintenance - schema: - $ref: "../swagger.yaml#/definitions/error" - x-koha-authorization: - permissions: - borrowers: delete_borrowers diff --git a/api/v1/swagger/paths/patrons_account.yaml b/api/v1/swagger/paths/patrons_account.yaml index 3f763a7aa41..c8b2ca13ef5 100644 --- a/api/v1/swagger/paths/patrons_account.yaml +++ b/api/v1/swagger/paths/patrons_account.yaml @@ -1,92 +1,92 @@ --- -"/patrons/{patron_id}/account": +'/patrons/{patron_id}/account': get: x-mojo-to: Patrons::Account#get operationId: getPatronAccount tags: - patrons summary: Get account information for a patron - parameters: - - $ref: "../swagger.yaml#/parameters/patron_id_pp" produces: - application/json + parameters: + - $ref: ../swagger.yaml#/parameters/patron_id_pp responses: - "200": + 200: description: Patron's account balance schema: - $ref: "../swagger.yaml#/definitions/patron_balance" - "401": + $ref: ../swagger.yaml#/definitions/patron_balance + 401: description: Authentication required schema: - $ref: "../swagger.yaml#/definitions/error" - "403": + $ref: ../swagger.yaml#/definitions/error + 403: description: Access forbidden schema: - $ref: "../swagger.yaml#/definitions/error" - "404": + $ref: ../swagger.yaml#/definitions/error + 404: description: Patron not found schema: - $ref: "../swagger.yaml#/definitions/error" - "500": + $ref: ../swagger.yaml#/definitions/error + 500: description: | Internal server error. Possible `error_code` attribute values: - + * `internal_server_error` schema: - $ref: "../swagger.yaml#/definitions/error" - "503": + $ref: ../swagger.yaml#/definitions/error + 503: description: Under maintenance schema: - $ref: "../swagger.yaml#/definitions/error" + $ref: ../swagger.yaml#/definitions/error x-koha-authorization: permissions: borrowers: edit_borrowers updatecharges: remaining_permissions -"/patrons/{patron_id}/account/credits": +'/patrons/{patron_id}/account/credits': post: x-mojo-to: Patrons::Account#add_credit operationId: addPatronCredit tags: - patrons summary: Add credit to a patron's account + produces: + - application/json parameters: - - $ref: "../swagger.yaml#/parameters/patron_id_pp" - - name: body + - $ref: ../swagger.yaml#/parameters/patron_id_pp + - description: A JSON object containing credit information in: body - description: A JSON object containing credit information + name: body required: true schema: - $ref: "../swagger.yaml#/definitions/patron_account_credit" - produces: - - application/json + $ref: ../swagger.yaml#/definitions/patron_account_credit responses: - "201": + 201: description: Credit added schema: - $ref: "../swagger.yaml#/definitions/account_line" - "401": + $ref: ../swagger.yaml#/definitions/account_line + 401: description: Authentication required schema: - $ref: "../swagger.yaml#/definitions/error" - "403": + $ref: ../swagger.yaml#/definitions/error + 403: description: Access forbidden schema: - $ref: "../swagger.yaml#/definitions/error" - "404": + $ref: ../swagger.yaml#/definitions/error + 404: description: Patron not found schema: - $ref: "../swagger.yaml#/definitions/error" - "500": + $ref: ../swagger.yaml#/definitions/error + 500: description: | Internal server error. Possible `error_code` attribute values: - + * `internal_server_error` schema: - $ref: "../swagger.yaml#/definitions/error" - "503": + $ref: ../swagger.yaml#/definitions/error + 503: description: Under maintenance schema: - $ref: "../swagger.yaml#/definitions/error" + $ref: ../swagger.yaml#/definitions/error x-koha-authorization: permissions: updatecharges: remaining_permissions diff --git a/api/v1/swagger/paths/patrons_extended_attributes.yaml b/api/v1/swagger/paths/patrons_extended_attributes.yaml index 1b29f68a364..02c31f1f60c 100644 --- a/api/v1/swagger/paths/patrons_extended_attributes.yaml +++ b/api/v1/swagger/paths/patrons_extended_attributes.yaml @@ -1,53 +1,53 @@ --- -"/patrons/{patron_id}/extended_attributes": +'/patrons/{patron_id}/extended_attributes': get: x-mojo-to: Patrons::Attributes#list_patron_attributes operationId: getPatronAttributes tags: - patrons summary: List extended attributes for a patron - parameters: - - $ref: "../swagger.yaml#/parameters/patron_id_pp" - - $ref: "../swagger.yaml#/parameters/match" - - $ref: "../swagger.yaml#/parameters/order_by" - - $ref: "../swagger.yaml#/parameters/page" - - $ref: "../swagger.yaml#/parameters/per_page" - - $ref: "../swagger.yaml#/parameters/q_param" - - $ref: "../swagger.yaml#/parameters/q_body" - - $ref: "../swagger.yaml#/parameters/q_header" - - $ref: "../swagger.yaml#/parameters/request_id_header" produces: - application/json + parameters: + - $ref: ../swagger.yaml#/parameters/patron_id_pp + - $ref: ../swagger.yaml#/parameters/match + - $ref: ../swagger.yaml#/parameters/order_by + - $ref: ../swagger.yaml#/parameters/page + - $ref: ../swagger.yaml#/parameters/per_page + - $ref: ../swagger.yaml#/parameters/q_param + - $ref: ../swagger.yaml#/parameters/q_body + - $ref: ../swagger.yaml#/parameters/q_header + - $ref: ../swagger.yaml#/parameters/request_id_header responses: - "200": + 200: description: The patron extended attributes schema: type: array items: - $ref: "../swagger.yaml#/definitions/patron_extended_attribute" - "401": + $ref: ../swagger.yaml#/definitions/patron_extended_attribute + 401: description: Authentication required schema: - $ref: "../swagger.yaml#/definitions/error" - "403": + $ref: ../swagger.yaml#/definitions/error + 403: description: Access forbidden schema: - $ref: "../swagger.yaml#/definitions/error" - "404": + $ref: ../swagger.yaml#/definitions/error + 404: description: Patron not found schema: - $ref: "../swagger.yaml#/definitions/error" - "500": + $ref: ../swagger.yaml#/definitions/error + 500: description: | Internal server error. Possible `error_code` attribute values: - + * `internal_server_error` schema: - $ref: "../swagger.yaml#/definitions/error" - "503": + $ref: ../swagger.yaml#/definitions/error + 503: description: Under maintenance schema: - $ref: "../swagger.yaml#/definitions/error" + $ref: ../swagger.yaml#/definitions/error x-koha-authorization: permissions: borrowers: edit_borrowers @@ -57,52 +57,52 @@ tags: - patrons summary: Add extended attribute for a patron + produces: + - application/json parameters: - - $ref: "../swagger.yaml#/parameters/patron_id_pp" - - name: body + - $ref: ../swagger.yaml#/parameters/patron_id_pp + - description: A JSON representation of the patron extended attribute in: body - description: A JSON representation of the patron extended attribute + name: body required: true schema: - $ref: "../swagger.yaml#/definitions/patron_extended_attribute" - produces: - - application/json + $ref: ../swagger.yaml#/definitions/patron_extended_attribute responses: - "201": + 201: description: A successfully created patron extended attribute schema: - $ref: "../swagger.yaml#/definitions/patron_extended_attribute" - "400": + $ref: ../swagger.yaml#/definitions/patron_extended_attribute + 400: description: Bad parameter schema: - $ref: "../swagger.yaml#/definitions/error" - "401": + $ref: ../swagger.yaml#/definitions/error + 401: description: Authentication required schema: - $ref: "../swagger.yaml#/definitions/error" - "403": + $ref: ../swagger.yaml#/definitions/error + 403: description: Access forbidden schema: - $ref: "../swagger.yaml#/definitions/error" - "404": + $ref: ../swagger.yaml#/definitions/error + 404: description: Patron not found schema: - $ref: "../swagger.yaml#/definitions/error" - "409": + $ref: ../swagger.yaml#/definitions/error + 409: description: Conflict in creating resource schema: - $ref: "../swagger.yaml#/definitions/error" - "500": + $ref: ../swagger.yaml#/definitions/error + 500: description: | Internal server error. Possible `error_code` attribute values: - + * `internal_server_error` schema: - $ref: "../swagger.yaml#/definitions/error" - "503": + $ref: ../swagger.yaml#/definitions/error + 503: description: Under maintenance schema: - $ref: "../swagger.yaml#/definitions/error" + $ref: ../swagger.yaml#/definitions/error x-koha-authorization: permissions: borrowers: edit_borrowers @@ -112,167 +112,166 @@ tags: - patrons summary: Overwrite extended attributes for a patron + produces: + - application/json parameters: - - $ref: "../swagger.yaml#/parameters/patron_id_pp" - - name: body + - $ref: ../swagger.yaml#/parameters/patron_id_pp + - description: A JSON representation of the patron extended attribute in: body - description: A JSON representation of the patron extended attribute + name: body required: true schema: - type: array items: - $ref: "../swagger.yaml#/definitions/patron_extended_attribute" - produces: - - application/json + $ref: ../swagger.yaml#/definitions/patron_extended_attribute + type: array responses: - "200": + 200: description: The successfully created patron extended attributes schema: type: array items: - $ref: "../swagger.yaml#/definitions/patron_extended_attribute" - "400": + $ref: ../swagger.yaml#/definitions/patron_extended_attribute + 400: description: Bad parameters schema: - $ref: "../swagger.yaml#/definitions/error" - "401": + $ref: ../swagger.yaml#/definitions/error + 401: description: Authentication required schema: - $ref: "../swagger.yaml#/definitions/error" - "403": + $ref: ../swagger.yaml#/definitions/error + 403: description: Access forbidden schema: - $ref: "../swagger.yaml#/definitions/error" - "404": + $ref: ../swagger.yaml#/definitions/error + 404: description: Patron not found schema: - $ref: "../swagger.yaml#/definitions/error" - "409": + $ref: ../swagger.yaml#/definitions/error + 409: description: Conflict in creating resource schema: - $ref: "../swagger.yaml#/definitions/error" - "500": + $ref: ../swagger.yaml#/definitions/error + 500: description: | Internal server error. Possible `error_code` attribute values: - + * `internal_server_error` schema: - $ref: "../swagger.yaml#/definitions/error" - "503": + $ref: ../swagger.yaml#/definitions/error + 503: description: Under maintenance schema: - $ref: "../swagger.yaml#/definitions/error" + $ref: ../swagger.yaml#/definitions/error x-koha-authorization: permissions: borrowers: edit_borrowers -"/patrons/{patron_id}/extended_attributes/{extended_attribute_id}": - patch: - x-mojo-to: Patrons::Attributes#update - operationId: updatePatronAttribute +'/patrons/{patron_id}/extended_attributes/{extended_attribute_id}': + delete: + x-mojo-to: Patrons::Attributes#delete + operationId: deletePatronAttribute tags: - patrons - summary: Update extended attribute + summary: Delete extended attribute + produces: + - application/json parameters: - - $ref: "../swagger.yaml#/parameters/patron_id_pp" - - name: extended_attribute_id + - $ref: ../swagger.yaml#/parameters/patron_id_pp + - description: Internal patron extended attribute identifier in: path - description: Internal patron extended attribute identifier - type: integer + name: extended_attribute_id required: true - - name: body - in: body - description: An object containing the updated values for the patron extended - attribute - required: true - schema: - type: object - properties: - value: - description: Extended attribute value - type: string - additionalProperties: false - produces: - - application/json + type: integer responses: - "200": - description: A successfully updated patron extended attribute - schema: - $ref: "../swagger.yaml#/definitions/patron_extended_attribute" - "400": - description: Bad parameter - schema: - $ref: "../swagger.yaml#/definitions/error" - "401": + 204: + description: Extended patron attribute deleted + 401: description: Authentication required schema: - $ref: "../swagger.yaml#/definitions/error" - "403": + $ref: ../swagger.yaml#/definitions/error + 403: description: Access forbidden schema: - $ref: "../swagger.yaml#/definitions/error" - "404": - description: Object not found - schema: - $ref: "../swagger.yaml#/definitions/error" - "409": - description: Conflict in updating resource + $ref: ../swagger.yaml#/definitions/error + 404: + description: Patron not found schema: - $ref: "../swagger.yaml#/definitions/error" - "500": + $ref: ../swagger.yaml#/definitions/error + 500: description: | Internal server error. Possible `error_code` attribute values: - + * `internal_server_error` schema: - $ref: "../swagger.yaml#/definitions/error" - "503": + $ref: ../swagger.yaml#/definitions/error + 503: description: Under maintenance schema: - $ref: "../swagger.yaml#/definitions/error" + $ref: ../swagger.yaml#/definitions/error x-koha-authorization: permissions: borrowers: edit_borrowers - delete: - x-mojo-to: Patrons::Attributes#delete - operationId: deletePatronAttribute + patch: + x-mojo-to: Patrons::Attributes#update + operationId: updatePatronAttribute tags: - patrons - summary: Delete extended attribute + summary: Update extended attribute + produces: + - application/json parameters: - - $ref: "../swagger.yaml#/parameters/patron_id_pp" - - name: extended_attribute_id + - $ref: ../swagger.yaml#/parameters/patron_id_pp + - description: Internal patron extended attribute identifier in: path - description: Internal patron extended attribute identifier + name: extended_attribute_id + required: true type: integer + - description: An object containing the updated values for the patron extended attribute + in: body + name: body required: true - produces: - - application/json + schema: + additionalProperties: false + properties: + value: + description: Extended attribute value + type: string + type: object responses: - "204": - description: Extended patron attribute deleted - "401": + 200: + description: A successfully updated patron extended attribute + schema: + $ref: ../swagger.yaml#/definitions/patron_extended_attribute + 400: + description: Bad parameter + schema: + $ref: ../swagger.yaml#/definitions/error + 401: description: Authentication required schema: - $ref: "../swagger.yaml#/definitions/error" - "403": + $ref: ../swagger.yaml#/definitions/error + 403: description: Access forbidden schema: - $ref: "../swagger.yaml#/definitions/error" - "404": - description: Patron not found + $ref: ../swagger.yaml#/definitions/error + 404: + description: Object not found + schema: + $ref: ../swagger.yaml#/definitions/error + 409: + description: Conflict in updating resource schema: - $ref: "../swagger.yaml#/definitions/error" - "500": + $ref: ../swagger.yaml#/definitions/error + 500: description: | Internal server error. Possible `error_code` attribute values: - + * `internal_server_error` schema: - $ref: "../swagger.yaml#/definitions/error" - "503": + $ref: ../swagger.yaml#/definitions/error + 503: description: Under maintenance schema: - $ref: "../swagger.yaml#/definitions/error" + $ref: ../swagger.yaml#/definitions/error x-koha-authorization: permissions: borrowers: edit_borrowers diff --git a/api/v1/swagger/paths/patrons_holds.yaml b/api/v1/swagger/paths/patrons_holds.yaml index 1284c536071..4e3fe14cb7f 100644 --- a/api/v1/swagger/paths/patrons_holds.yaml +++ b/api/v1/swagger/paths/patrons_holds.yaml @@ -1,53 +1,53 @@ --- -"/patrons/{patron_id}/holds": +'/patrons/{patron_id}/holds': get: x-mojo-to: Patrons::Holds#list operationId: getPatronHolds tags: - holds summary: List holds for a patron - parameters: - - $ref: "../swagger.yaml#/parameters/patron_id_pp" - - $ref: "../swagger.yaml#/parameters/match" - - $ref: "../swagger.yaml#/parameters/order_by" - - $ref: "../swagger.yaml#/parameters/page" - - $ref: "../swagger.yaml#/parameters/per_page" - - $ref: "../swagger.yaml#/parameters/q_param" - - $ref: "../swagger.yaml#/parameters/q_body" - - $ref: "../swagger.yaml#/parameters/q_header" - - $ref: "../swagger.yaml#/parameters/request_id_header" produces: - application/json + parameters: + - $ref: ../swagger.yaml#/parameters/patron_id_pp + - $ref: ../swagger.yaml#/parameters/match + - $ref: ../swagger.yaml#/parameters/order_by + - $ref: ../swagger.yaml#/parameters/page + - $ref: ../swagger.yaml#/parameters/per_page + - $ref: ../swagger.yaml#/parameters/q_param + - $ref: ../swagger.yaml#/parameters/q_body + - $ref: ../swagger.yaml#/parameters/q_header + - $ref: ../swagger.yaml#/parameters/request_id_header responses: - "200": + 200: description: The patron holds schema: type: array items: - $ref: "../swagger.yaml#/definitions/hold" - "401": + $ref: ../swagger.yaml#/definitions/hold + 401: description: Authentication required schema: - $ref: "../swagger.yaml#/definitions/error" - "403": + $ref: ../swagger.yaml#/definitions/error + 403: description: Access forbidden schema: - $ref: "../swagger.yaml#/definitions/error" - "404": + $ref: ../swagger.yaml#/definitions/error + 404: description: Patron not found schema: - $ref: "../swagger.yaml#/definitions/error" - "500": + $ref: ../swagger.yaml#/definitions/error + 500: description: | Internal server error. Possible `error_code` attribute values: - + * `internal_server_error` schema: - $ref: "../swagger.yaml#/definitions/error" - "503": + $ref: ../swagger.yaml#/definitions/error + 503: description: Under maintenance schema: - $ref: "../swagger.yaml#/definitions/error" + $ref: ../swagger.yaml#/definitions/error x-koha-authorization: permissions: borrowers: edit_borrowers diff --git a/api/v1/swagger/paths/patrons_password.yaml b/api/v1/swagger/paths/patrons_password.yaml index 2d2f07e08f3..a2d1a6d3f60 100644 --- a/api/v1/swagger/paths/patrons_password.yaml +++ b/api/v1/swagger/paths/patrons_password.yaml @@ -1,18 +1,20 @@ --- -"/patrons/{patron_id}/password": +'/patrons/{patron_id}/password': post: x-mojo-to: Patrons::Password#set operationId: setPatronPassword tags: - patrons summary: Set password for a patron + produces: + - application/json parameters: - - $ref: "../swagger.yaml#/parameters/patron_id_pp" - - name: body + - $ref: ../swagger.yaml#/parameters/patron_id_pp + - description: A JSON object containing password information in: body - description: A JSON object containing password information + name: body schema: - type: object + additionalProperties: false properties: password: description: New password (plain text) @@ -23,39 +25,37 @@ required: - password - password_2 - additionalProperties: false - produces: - - application/json + type: object responses: - "200": + 200: description: Password changed - "400": + 400: description: Bad request schema: - $ref: "../swagger.yaml#/definitions/error" - "401": + $ref: ../swagger.yaml#/definitions/error + 401: description: Authentication required schema: - $ref: "../swagger.yaml#/definitions/error" - "403": + $ref: ../swagger.yaml#/definitions/error + 403: description: Access forbidden schema: - $ref: "../swagger.yaml#/definitions/error" - "404": + $ref: ../swagger.yaml#/definitions/error + 404: description: Patron not found schema: - $ref: "../swagger.yaml#/definitions/error" - "500": + $ref: ../swagger.yaml#/definitions/error + 500: description: | Internal server error. Possible `error_code` attribute values: - + * `internal_server_error` schema: - $ref: "../swagger.yaml#/definitions/error" - "503": + $ref: ../swagger.yaml#/definitions/error + 503: description: Under maintenance schema: - $ref: "../swagger.yaml#/definitions/error" + $ref: ../swagger.yaml#/definitions/error x-koha-authorization: permissions: - borrowers: "1" + borrowers: 1 diff --git a/api/v1/swagger/paths/public_patrons.yaml b/api/v1/swagger/paths/public_patrons.yaml index 2f92f6751bc..dab12f1ed34 100644 --- a/api/v1/swagger/paths/public_patrons.yaml +++ b/api/v1/swagger/paths/public_patrons.yaml @@ -1,172 +1,170 @@ --- -"/public/patrons/{patron_id}/password": - post: - x-mojo-to: Patrons::Password#set_public - operationId: setPatronPasswordPublic +'/public/patrons/{patron_id}/guarantors/can_see_charges': + put: + x-mojo-to: Patrons#guarantors_can_see_charges + operationId: setPatronGuarantorsCanSeeCharges tags: - patrons - summary: Set password for a patron (public) + summary: Set if guarantors can see charges (public) + produces: + - application/json parameters: - - $ref: "../swagger.yaml#/parameters/patron_id_pp" - - name: body + - $ref: ../swagger.yaml#/parameters/patron_id_pp + - description: A boolean representing if guarantors should be able to see the patron's charges in: body - description: A JSON object containing password information + name: body + required: true schema: - type: object - properties: - password: - description: New password (plain text) - type: string - password_repeated: - description: Repeated new password (plain text) - type: string - old_password: - description: Patron's original password - type: string - required: - - password - - password_repeated - - old_password additionalProperties: false - produces: - - application/json + properties: + allowed: + type: boolean + type: object responses: - "200": - description: Password changed - "400": + 200: + description: Charges view policy for guarantors changed + 400: description: Bad request schema: - $ref: "../swagger.yaml#/definitions/error" - "401": + $ref: ../swagger.yaml#/definitions/error + 401: description: Authentication required schema: - $ref: "../swagger.yaml#/definitions/error" - "403": + $ref: ../swagger.yaml#/definitions/error + 403: description: Access forbidden schema: - $ref: "../swagger.yaml#/definitions/error" - "404": + $ref: ../swagger.yaml#/definitions/error + 404: description: Patron not found schema: - $ref: "../swagger.yaml#/definitions/error" - "500": + $ref: ../swagger.yaml#/definitions/error + 500: description: | Internal server error. Possible `error_code` attribute values: - + * `internal_server_error` schema: - $ref: "../swagger.yaml#/definitions/error" - "503": + $ref: ../swagger.yaml#/definitions/error + 503: description: Under maintenance schema: - $ref: "../swagger.yaml#/definitions/error" + $ref: ../swagger.yaml#/definitions/error x-koha-authorization: allow-owner: true -"/public/patrons/{patron_id}/guarantors/can_see_charges": +'/public/patrons/{patron_id}/guarantors/can_see_checkouts': put: - x-mojo-to: Patrons#guarantors_can_see_charges - operationId: setPatronGuarantorsCanSeeCharges + x-mojo-to: Patrons#guarantors_can_see_checkouts + operationId: setPatronGuarantorsCanSeeCheckouts tags: - patrons - summary: Set if guarantors can see charges (public) + summary: Set if guarantors can see checkouts + produces: + - application/json parameters: - - $ref: "../swagger.yaml#/parameters/patron_id_pp" - - name: body + - $ref: ../swagger.yaml#/parameters/patron_id_pp + - description: A boolean representing if guarantors should be able to see the patron's checkouts in: body - description: A boolean representing if guarantors should be able to see the - patron's charges + name: body required: true schema: - type: object + additionalProperties: false properties: allowed: type: boolean - additionalProperties: false - produces: - - application/json + type: object responses: - "200": - description: Charges view policy for guarantors changed - "400": + 200: + description: Check-out view policy for guarantors changed + 400: description: Bad request schema: - $ref: "../swagger.yaml#/definitions/error" - "401": + $ref: ../swagger.yaml#/definitions/error + 401: description: Authentication required schema: - $ref: "../swagger.yaml#/definitions/error" - "403": + $ref: ../swagger.yaml#/definitions/error + 403: description: Access forbidden schema: - $ref: "../swagger.yaml#/definitions/error" - "404": + $ref: ../swagger.yaml#/definitions/error + 404: description: Patron not found schema: - $ref: "../swagger.yaml#/definitions/error" - "500": + $ref: ../swagger.yaml#/definitions/error + 500: description: | Internal server error. Possible `error_code` attribute values: - + * `internal_server_error` schema: - $ref: "../swagger.yaml#/definitions/error" - "503": + $ref: ../swagger.yaml#/definitions/error + 503: description: Under maintenance schema: - $ref: "../swagger.yaml#/definitions/error" + $ref: ../swagger.yaml#/definitions/error x-koha-authorization: allow-owner: true -"/public/patrons/{patron_id}/guarantors/can_see_checkouts": - put: - x-mojo-to: Patrons#guarantors_can_see_checkouts - operationId: setPatronGuarantorsCanSeeCheckouts +'/public/patrons/{patron_id}/password': + post: + x-mojo-to: Patrons::Password#set_public + operationId: setPatronPasswordPublic tags: - patrons - summary: Set if guarantors can see checkouts + summary: Set password for a patron (public) + produces: + - application/json parameters: - - $ref: "../swagger.yaml#/parameters/patron_id_pp" - - name: body + - $ref: ../swagger.yaml#/parameters/patron_id_pp + - description: A JSON object containing password information in: body - description: A boolean representing if guarantors should be able to see the - patron's checkouts - required: true + name: body schema: - type: object - properties: - allowed: - type: boolean additionalProperties: false - produces: - - application/json + properties: + old_password: + description: Patron's original password + type: string + password: + description: New password (plain text) + type: string + password_repeated: + description: Repeated new password (plain text) + type: string + required: + - password + - password_repeated + - old_password + type: object responses: - "200": - description: Check-out view policy for guarantors changed - "400": + 200: + description: Password changed + 400: description: Bad request schema: - $ref: "../swagger.yaml#/definitions/error" - "401": + $ref: ../swagger.yaml#/definitions/error + 401: description: Authentication required schema: - $ref: "../swagger.yaml#/definitions/error" - "403": + $ref: ../swagger.yaml#/definitions/error + 403: description: Access forbidden schema: - $ref: "../swagger.yaml#/definitions/error" - "404": + $ref: ../swagger.yaml#/definitions/error + 404: description: Patron not found schema: - $ref: "../swagger.yaml#/definitions/error" - "500": + $ref: ../swagger.yaml#/definitions/error + 500: description: | Internal server error. Possible `error_code` attribute values: - + * `internal_server_error` schema: - $ref: "../swagger.yaml#/definitions/error" - "503": + $ref: ../swagger.yaml#/definitions/error + 503: description: Under maintenance schema: - $ref: "../swagger.yaml#/definitions/error" + $ref: ../swagger.yaml#/definitions/error x-koha-authorization: allow-owner: true diff --git a/api/v1/swagger/paths/quotes.yaml b/api/v1/swagger/paths/quotes.yaml index b8646e52eac..307fc3c8661 100644 --- a/api/v1/swagger/paths/quotes.yaml +++ b/api/v1/swagger/paths/quotes.yaml @@ -9,218 +9,218 @@ produces: - application/json parameters: - - name: quote_id + - description: Case insensitive search on quote id in: query - description: Case insensitive search on quote id + name: quote_id required: false type: string - - name: source + - description: Case insensitive search on source in: query - description: Case insensitive search on source + name: source required: false type: string - - name: text + - description: Case insensitive search on text in: query - description: Case insensitive search on text + name: text required: false type: string - - name: displayed_on + - description: Case Insensative search on last displayed date in: query - description: Case Insensative search on last displayed date + name: displayed_on required: false type: string - - $ref: "../swagger.yaml#/parameters/match" - - $ref: "../swagger.yaml#/parameters/order_by" - - $ref: "../swagger.yaml#/parameters/page" - - $ref: "../swagger.yaml#/parameters/per_page" - - $ref: "../swagger.yaml#/parameters/q_param" - - $ref: "../swagger.yaml#/parameters/q_body" - - $ref: "../swagger.yaml#/parameters/q_header" - - $ref: "../swagger.yaml#/parameters/request_id_header" + - $ref: ../swagger.yaml#/parameters/match + - $ref: ../swagger.yaml#/parameters/order_by + - $ref: ../swagger.yaml#/parameters/page + - $ref: ../swagger.yaml#/parameters/per_page + - $ref: ../swagger.yaml#/parameters/q_param + - $ref: ../swagger.yaml#/parameters/q_body + - $ref: ../swagger.yaml#/parameters/q_header + - $ref: ../swagger.yaml#/parameters/request_id_header responses: - "200": + 200: description: A list of quotes schema: type: array items: - $ref: "../swagger.yaml#/definitions/quote" - "403": + $ref: ../swagger.yaml#/definitions/quote + 403: description: Access forbidden schema: - $ref: "../swagger.yaml#/definitions/error" - "500": + $ref: ../swagger.yaml#/definitions/error + 500: description: | Internal server error. Possible `error_code` attribute values: - + * `internal_server_error` schema: - $ref: "../swagger.yaml#/definitions/error" - "503": + $ref: ../swagger.yaml#/definitions/error + 503: description: Under maintenance schema: - $ref: "../swagger.yaml#/definitions/error" + $ref: ../swagger.yaml#/definitions/error x-koha-authorization: permissions: - catalogue: "1" + catalogue: 1 post: x-mojo-to: Quotes#add operationId: addQuote tags: - quotes summary: Add quote + produces: + - application/json parameters: - - name: body + - description: A JSON object containing informations about the new quote in: body - description: A JSON object containing informations about the new quote + name: body required: true schema: - $ref: "../swagger.yaml#/definitions/quote" - produces: - - application/json + $ref: ../swagger.yaml#/definitions/quote responses: - "201": + 201: description: Quote added schema: - $ref: "../swagger.yaml#/definitions/quote" - "401": + $ref: ../swagger.yaml#/definitions/quote + 401: description: Authentication required schema: - $ref: "../swagger.yaml#/definitions/error" - "403": + $ref: ../swagger.yaml#/definitions/error + 403: description: Access forbidden schema: - $ref: "../swagger.yaml#/definitions/error" - "500": + $ref: ../swagger.yaml#/definitions/error + 500: description: | Internal server error. Possible `error_code` attribute values: - + * `internal_server_error` schema: - $ref: "../swagger.yaml#/definitions/error" - "503": + $ref: ../swagger.yaml#/definitions/error + 503: description: Under maintenance schema: - $ref: "../swagger.yaml#/definitions/error" + $ref: ../swagger.yaml#/definitions/error x-koha-authorization: permissions: tools: edit_quotes -"/quotes/{quote_id}": - get: - x-mojo-to: Quotes#get - operationId: getQuote +'/quotes/{quote_id}': + delete: + x-mojo-to: Quotes#delete + operationId: deleteQuote tags: - quotes - summary: Get quote - parameters: - - $ref: "../swagger.yaml#/parameters/quote_id_pp" + summary: Delete quote produces: - application/json + parameters: + - $ref: ../swagger.yaml#/parameters/quote_id_pp responses: - "200": - description: A Quote + 204: + description: Quote deleted + 401: + description: Authentication required schema: - $ref: "../swagger.yaml#/definitions/quote" - "404": + $ref: ../swagger.yaml#/definitions/error + 403: + description: Access forbidden + schema: + $ref: ../swagger.yaml#/definitions/error + 404: description: Quote not found schema: - $ref: "../swagger.yaml#/definitions/error" - "500": + $ref: ../swagger.yaml#/definitions/error + 500: description: | Internal server error. Possible `error_code` attribute values: - + * `internal_server_error` schema: - $ref: "../swagger.yaml#/definitions/error" - "503": + $ref: ../swagger.yaml#/definitions/error + 503: description: Under maintenance schema: - $ref: "../swagger.yaml#/definitions/error" + $ref: ../swagger.yaml#/definitions/error x-koha-authorization: permissions: - catalogue: "1" - put: - x-mojo-to: Quotes#update - operationId: updateQuote + tools: edit_quotes + get: + x-mojo-to: Quotes#get + operationId: getQuote tags: - quotes - summary: Update quote - parameters: - - $ref: "../swagger.yaml#/parameters/quote_id_pp" - - name: body - in: body - description: a quote object - required: true - schema: - $ref: "../swagger.yaml#/definitions/quote" + summary: Get quote produces: - application/json + parameters: + - $ref: ../swagger.yaml#/parameters/quote_id_pp responses: - "200": - description: A quote - schema: - $ref: "../swagger.yaml#/definitions/quote" - "401": - description: Authentication required - schema: - $ref: "../swagger.yaml#/definitions/error" - "403": - description: Access forbidden + 200: + description: A Quote schema: - $ref: "../swagger.yaml#/definitions/error" - "404": + $ref: ../swagger.yaml#/definitions/quote + 404: description: Quote not found schema: - $ref: "../swagger.yaml#/definitions/error" - "500": + $ref: ../swagger.yaml#/definitions/error + 500: description: | Internal server error. Possible `error_code` attribute values: - + * `internal_server_error` schema: - $ref: "../swagger.yaml#/definitions/error" - "503": + $ref: ../swagger.yaml#/definitions/error + 503: description: Under maintenance schema: - $ref: "../swagger.yaml#/definitions/error" + $ref: ../swagger.yaml#/definitions/error x-koha-authorization: permissions: - tools: edit_quotes - delete: - x-mojo-to: Quotes#delete - operationId: deleteQuote + catalogue: 1 + put: + x-mojo-to: Quotes#update + operationId: updateQuote tags: - quotes - summary: Delete quote - parameters: - - $ref: "../swagger.yaml#/parameters/quote_id_pp" + summary: Update quote produces: - application/json + parameters: + - $ref: ../swagger.yaml#/parameters/quote_id_pp + - description: a quote object + in: body + name: body + required: true + schema: + $ref: ../swagger.yaml#/definitions/quote responses: - "204": - description: Quote deleted - "401": + 200: + description: A quote + schema: + $ref: ../swagger.yaml#/definitions/quote + 401: description: Authentication required schema: - $ref: "../swagger.yaml#/definitions/error" - "403": + $ref: ../swagger.yaml#/definitions/error + 403: description: Access forbidden schema: - $ref: "../swagger.yaml#/definitions/error" - "404": + $ref: ../swagger.yaml#/definitions/error + 404: description: Quote not found schema: - $ref: "../swagger.yaml#/definitions/error" - "500": + $ref: ../swagger.yaml#/definitions/error + 500: description: | Internal server error. Possible `error_code` attribute values: - + * `internal_server_error` schema: - $ref: "../swagger.yaml#/definitions/error" - "503": + $ref: ../swagger.yaml#/definitions/error + 503: description: Under maintenance schema: - $ref: "../swagger.yaml#/definitions/error" + $ref: ../swagger.yaml#/definitions/error x-koha-authorization: permissions: tools: edit_quotes diff --git a/api/v1/swagger/paths/return_claims.yaml b/api/v1/swagger/paths/return_claims.yaml index a83d2c43f32..01da41861e8 100644 --- a/api/v1/swagger/paths/return_claims.yaml +++ b/api/v1/swagger/paths/return_claims.yaml @@ -3,250 +3,249 @@ post: x-mojo-to: ReturnClaims#claim_returned operationId: claimReturned - summary: Add a return claim tags: - return_claims + summary: Add a return claim + produces: + - application/json parameters: - - name: body + - description: A JSON object containing fields to modify in: body - description: A JSON object containing fields to modify + name: body required: true schema: - type: object + additionalProperties: false properties: + charge_lost_fee: + description: Charge a lost fee if true and Koha is set to allow a choice. Ignored otherwise. + type: boolean + created_by: + description: User id for the librarian submitting this claim + type: string item_id: description: Internal item id to claim as returned type: integer notes: description: Notes about this return claim type: string - created_by: - description: User id for the librarian submitting this claim - type: string - charge_lost_fee: - description: Charge a lost fee if true and Koha is set to allow a choice. - Ignored otherwise. - type: boolean - additionalProperties: false - produces: - - application/json + type: object responses: - "201": + 201: description: Created claim schema: - $ref: "../swagger.yaml#/definitions/return_claim" - "400": + $ref: ../swagger.yaml#/definitions/return_claim + 400: description: Bad request schema: - $ref: "../swagger.yaml#/definitions/error" - "401": + $ref: ../swagger.yaml#/definitions/error + 401: description: Authentication required schema: - $ref: "../swagger.yaml#/definitions/error" - "403": + $ref: ../swagger.yaml#/definitions/error + 403: description: Access forbidden schema: - $ref: "../swagger.yaml#/definitions/error" - "404": + $ref: ../swagger.yaml#/definitions/error + 404: description: Checkout not found schema: - $ref: "../swagger.yaml#/definitions/error" - "409": + $ref: ../swagger.yaml#/definitions/error + 409: description: Conflict creating the resource schema: - $ref: "../swagger.yaml#/definitions/error" - "500": + $ref: ../swagger.yaml#/definitions/error + 500: description: | Internal server error. Possible `error_code` attribute values: - + * `internal_server_error` schema: - $ref: "../swagger.yaml#/definitions/error" - "503": + $ref: ../swagger.yaml#/definitions/error + 503: description: Under maintenance schema: - $ref: "../swagger.yaml#/definitions/error" + $ref: ../swagger.yaml#/definitions/error x-koha-authorization: permissions: circulate: circulate_remaining_permissions -"/return_claims/{claim_id}/notes": - put: - x-mojo-to: ReturnClaims#update_notes - operationId: updateClaimNotes - summary: Update notes +'/return_claims/{claim_id}': + delete: + x-mojo-to: ReturnClaims#delete_claim + operationId: deletedClaim tags: - return_claims + summary: Delete claim + produces: + - application/json parameters: - - name: claim_id + - description: Unique identifier for the claim to be deleted in: path + name: claim_id required: true - description: Unique identifier for the claim whose notes are to be updated type: integer - - name: body - in: body - description: A JSON object containing fields to modify - required: true - schema: - type: object - properties: - notes: - description: Notes about this return claim - type: string - updated_by: - description: Interal identifier for the librarian updating the claim notes - type: string - additionalProperties: false - produces: - - application/json responses: - "200": - description: Claim notes updated + 204: + description: Claim deleted schema: - $ref: "../swagger.yaml#/definitions/return_claim" - "400": + $ref: ../swagger.yaml#/definitions/return_claim + 400: description: Bad request schema: - $ref: "../swagger.yaml#/definitions/error" - "401": + $ref: ../swagger.yaml#/definitions/error + 401: description: Authentication required schema: - $ref: "../swagger.yaml#/definitions/error" - "403": + $ref: ../swagger.yaml#/definitions/error + 403: description: Access forbidden schema: - $ref: "../swagger.yaml#/definitions/error" - "404": + $ref: ../swagger.yaml#/definitions/error + 404: description: Claim not found schema: - $ref: "../swagger.yaml#/definitions/error" - "500": + $ref: ../swagger.yaml#/definitions/error + 500: description: | Internal server error. Possible `error_code` attribute values: - + * `internal_server_error` schema: - $ref: "../swagger.yaml#/definitions/error" - "503": + $ref: ../swagger.yaml#/definitions/error + 503: description: Under maintenance schema: - $ref: "../swagger.yaml#/definitions/error" + $ref: ../swagger.yaml#/definitions/error x-koha-authorization: permissions: circulate: circulate_remaining_permissions -"/return_claims/{claim_id}": - delete: - x-mojo-to: ReturnClaims#delete_claim - operationId: deletedClaim - summary: Delete claim +'/return_claims/{claim_id}/notes': + put: + x-mojo-to: ReturnClaims#update_notes + operationId: updateClaimNotes tags: - return_claims + summary: Update notes + produces: + - application/json parameters: - - name: claim_id + - description: Unique identifier for the claim whose notes are to be updated in: path + name: claim_id required: true - description: Unique identifier for the claim to be deleted type: integer - produces: - - application/json + - description: A JSON object containing fields to modify + in: body + name: body + required: true + schema: + additionalProperties: false + properties: + notes: + description: Notes about this return claim + type: string + updated_by: + description: Interal identifier for the librarian updating the claim notes + type: string + type: object responses: - "204": - description: Claim deleted + 200: + description: Claim notes updated schema: - $ref: "../swagger.yaml#/definitions/return_claim" - "400": + $ref: ../swagger.yaml#/definitions/return_claim + 400: description: Bad request schema: - $ref: "../swagger.yaml#/definitions/error" - "401": + $ref: ../swagger.yaml#/definitions/error + 401: description: Authentication required schema: - $ref: "../swagger.yaml#/definitions/error" - "403": + $ref: ../swagger.yaml#/definitions/error + 403: description: Access forbidden schema: - $ref: "../swagger.yaml#/definitions/error" - "404": + $ref: ../swagger.yaml#/definitions/error + 404: description: Claim not found schema: - $ref: "../swagger.yaml#/definitions/error" - "500": + $ref: ../swagger.yaml#/definitions/error + 500: description: | Internal server error. Possible `error_code` attribute values: - + * `internal_server_error` schema: - $ref: "../swagger.yaml#/definitions/error" - "503": + $ref: ../swagger.yaml#/definitions/error + 503: description: Under maintenance schema: - $ref: "../swagger.yaml#/definitions/error" + $ref: ../swagger.yaml#/definitions/error x-koha-authorization: permissions: circulate: circulate_remaining_permissions -"/return_claims/{claim_id}/resolve": +'/return_claims/{claim_id}/resolve': put: x-mojo-to: ReturnClaims#resolve_claim operationId: updateClaimResolve - summary: Resolve claim tags: - return_claims + summary: Resolve claim + produces: + - application/json parameters: - - name: claim_id + - description: Unique identifier for the claim to be resolved in: path + name: claim_id required: true - description: Unique identifier for the claim to be resolved type: integer - - name: body + - description: A JSON object containing fields to modify in: body - description: A JSON object containing fields to modify + name: body required: true schema: - type: object + additionalProperties: false properties: + new_lost_status: + description: New lost status to set to the item + type: string resolution: description: The RETURN_CLAIM_RESOLUTION code to be used to resolve the calim type: string resolved_by: description: User id for the librarian resolving the claim type: string - new_lost_status: - description: New lost status to set to the item - type: string - additionalProperties: false - produces: - - application/json + type: object responses: - "200": + 200: description: Claim resolved schema: - $ref: "../swagger.yaml#/definitions/return_claim" - "400": + $ref: ../swagger.yaml#/definitions/return_claim + 400: description: Bad request schema: - $ref: "../swagger.yaml#/definitions/error" - "401": + $ref: ../swagger.yaml#/definitions/error + 401: description: Authentication required schema: - $ref: "../swagger.yaml#/definitions/error" - "403": + $ref: ../swagger.yaml#/definitions/error + 403: description: Access forbidden schema: - $ref: "../swagger.yaml#/definitions/error" - "404": + $ref: ../swagger.yaml#/definitions/error + 404: description: Claim not found schema: - $ref: "../swagger.yaml#/definitions/error" - "500": + $ref: ../swagger.yaml#/definitions/error + 500: description: | Internal server error. Possible `error_code` attribute values: - + * `internal_server_error` schema: - $ref: "../swagger.yaml#/definitions/error" - "503": + $ref: ../swagger.yaml#/definitions/error + 503: description: Under maintenance schema: - $ref: "../swagger.yaml#/definitions/error" + $ref: ../swagger.yaml#/definitions/error x-koha-authorization: permissions: circulate: circulate_remaining_permissions diff --git a/api/v1/swagger/paths/rotas.yaml b/api/v1/swagger/paths/rotas.yaml index 96eef748301..1e4039f3388 100644 --- a/api/v1/swagger/paths/rotas.yaml +++ b/api/v1/swagger/paths/rotas.yaml @@ -1,60 +1,60 @@ --- -"/rotas/{rota_id}/stages/{stage_id}/position": +'/rotas/{rota_id}/stages/{stage_id}/position': put: x-mojo-to: Stage#move operationId: moveStage - summary: Update stage tags: - rotas + summary: Update stage + produces: + - application/json parameters: - - name: rota_id + - description: A rotas ID in: path + name: rota_id required: true - description: A rotas ID type: integer - - name: stage_id + - description: A stages ID in: path + name: stage_id required: true - description: A stages ID type: integer - - name: position + - description: A stages position in the rota in: body + name: position required: true - description: A stages position in the rota schema: type: integer - produces: - - application/json responses: - "200": + 200: description: OK - "400": + 400: description: Bad request schema: - $ref: "../swagger.yaml#/definitions/error" - "401": + $ref: ../swagger.yaml#/definitions/error + 401: description: Authentication required schema: - $ref: "../swagger.yaml#/definitions/error" - "403": + $ref: ../swagger.yaml#/definitions/error + 403: description: Access forbidden schema: - $ref: "../swagger.yaml#/definitions/error" - "404": + $ref: ../swagger.yaml#/definitions/error + 404: description: Position not found schema: - $ref: "../swagger.yaml#/definitions/error" - "500": + $ref: ../swagger.yaml#/definitions/error + 500: description: | Internal server error. Possible `error_code` attribute values: - + * `internal_server_error` schema: - $ref: "../swagger.yaml#/definitions/error" - "503": + $ref: ../swagger.yaml#/definitions/error + 503: description: Under maintenance schema: - $ref: "../swagger.yaml#/definitions/error" + $ref: ../swagger.yaml#/definitions/error x-koha-authorization: permissions: - stockrotation: "1" + stockrotation: 1 diff --git a/api/v1/swagger/paths/suggestions.yaml b/api/v1/swagger/paths/suggestions.yaml index ecf46837d07..da5bf70fd5e 100644 --- a/api/v1/swagger/paths/suggestions.yaml +++ b/api/v1/swagger/paths/suggestions.yaml @@ -3,260 +3,260 @@ get: x-mojo-to: Suggestions#list operationId: listSuggestions - description: This resource returns a list of purchase suggestions - summary: List purchase suggestions tags: - suggestions - parameters: - - $ref: "../swagger.yaml#/parameters/match" - - $ref: "../swagger.yaml#/parameters/order_by" - - $ref: "../swagger.yaml#/parameters/page" - - $ref: "../swagger.yaml#/parameters/per_page" - - $ref: "../swagger.yaml#/parameters/q_param" - - $ref: "../swagger.yaml#/parameters/q_body" - - $ref: "../swagger.yaml#/parameters/q_header" - - $ref: "../swagger.yaml#/parameters/request_id_header" + summary: List purchase suggestions produces: - application/json + parameters: + - $ref: ../swagger.yaml#/parameters/match + - $ref: ../swagger.yaml#/parameters/order_by + - $ref: ../swagger.yaml#/parameters/page + - $ref: ../swagger.yaml#/parameters/per_page + - $ref: ../swagger.yaml#/parameters/q_param + - $ref: ../swagger.yaml#/parameters/q_body + - $ref: ../swagger.yaml#/parameters/q_header + - $ref: ../swagger.yaml#/parameters/request_id_header responses: - "200": + 200: description: A list of suggestions schema: type: array items: - $ref: "../swagger.yaml#/definitions/suggestion" - "403": + $ref: ../swagger.yaml#/definitions/suggestion + 403: description: Access forbidden schema: - $ref: "../swagger.yaml#/definitions/error" - "500": + $ref: ../swagger.yaml#/definitions/error + 500: description: | Internal server error. Possible `error_code` attribute values: - + * `internal_server_error` schema: - $ref: "../swagger.yaml#/definitions/error" - "503": + $ref: ../swagger.yaml#/definitions/error + 503: description: Under maintenance schema: - $ref: "../swagger.yaml#/definitions/error" + $ref: ../swagger.yaml#/definitions/error x-koha-authorization: permissions: suggestions: suggestions_manage + description: This resource returns a list of purchase suggestions post: x-mojo-to: Suggestions#add operationId: addSuggestions - description: This resource accepts a new purchase suggestion and creates it - summary: Add a purchase suggestion tags: - suggestions + summary: Add a purchase suggestion + produces: + - application/json parameters: - - name: body + - description: A JSON object containing informations about the new suggestion in: body - description: A JSON object containing informations about the new suggestion + name: body required: true schema: - $ref: "../swagger.yaml#/definitions/suggestion" - produces: - - application/json + $ref: ../swagger.yaml#/definitions/suggestion responses: - "201": + 201: description: Suggestion added schema: - $ref: "../swagger.yaml#/definitions/suggestion" - "400": + $ref: ../swagger.yaml#/definitions/suggestion + 400: description: Bad request schema: - $ref: "../swagger.yaml#/definitions/error" - "403": + $ref: ../swagger.yaml#/definitions/error + 403: description: Access forbidden schema: - $ref: "../swagger.yaml#/definitions/error" - "500": + $ref: ../swagger.yaml#/definitions/error + 500: description: | Internal server error. Possible `error_code` attribute values: - + * `internal_server_error` schema: - $ref: "../swagger.yaml#/definitions/error" - "503": + $ref: ../swagger.yaml#/definitions/error + 503: description: Under maintenance schema: - $ref: "../swagger.yaml#/definitions/error" + $ref: ../swagger.yaml#/definitions/error x-koha-authorization: permissions: suggestions: suggestions_manage -"/suggestions/{suggestion_id}": + description: This resource accepts a new purchase suggestion and creates it +/suggestions/managers: get: - x-mojo-to: Suggestions#get - operationId: getSuggestion - description: This resource gives access to a specific purchase suggestion - summary: Get purchase suggestion + x-mojo-to: Suggestions#list_managers + operationId: listSuggestionsManagers tags: - suggestions - parameters: - - $ref: "../swagger.yaml#/parameters/suggestion_id_pp" + summary: List possibe managers for suggestions produces: - application/json + parameters: + - $ref: ../swagger.yaml#/parameters/match + - $ref: ../swagger.yaml#/parameters/order_by + - $ref: ../swagger.yaml#/parameters/page + - $ref: ../swagger.yaml#/parameters/per_page + - $ref: ../swagger.yaml#/parameters/q_param + - $ref: ../swagger.yaml#/parameters/q_body + - $ref: ../swagger.yaml#/parameters/q_header responses: - "200": - description: A suggestion + 200: + description: A list of suggestions' managers schema: - $ref: "../swagger.yaml#/definitions/suggestion" - "403": + type: array + items: + $ref: ../swagger.yaml#/definitions/patron + 403: description: Access forbidden schema: - $ref: "../swagger.yaml#/definitions/error" - "404": - description: Suggestion not found - schema: - $ref: "../swagger.yaml#/definitions/error" - "500": + $ref: ../swagger.yaml#/definitions/error + 500: description: | Internal server error. Possible `error_code` attribute values: - + * `internal_server_error` schema: - $ref: "../swagger.yaml#/definitions/error" - "503": + $ref: ../swagger.yaml#/definitions/error + 503: description: Under maintenance schema: - $ref: "../swagger.yaml#/definitions/error" + $ref: ../swagger.yaml#/definitions/error x-koha-authorization: permissions: suggestions: suggestions_manage - put: - x-mojo-to: Suggestions#update - operationId: updateSuggestion - description: This resource allows updating an existing purchase suggestion - summary: Update purchase suggestion + description: This resource returns a list of patron allowed to be a manager for suggestions + x-koha-embed: + - extended_attributes +'/suggestions/{suggestion_id}': + delete: + x-mojo-to: Suggestions#delete + operationId: deleteSuggestion tags: - suggestions - parameters: - - $ref: "../swagger.yaml#/parameters/suggestion_id_pp" - - name: body - in: body - description: A JSON object containing informations about the new hold - required: true - schema: - $ref: "../swagger.yaml#/definitions/suggestion" + summary: Delete purchase suggestion produces: - application/json + parameters: + - $ref: ../swagger.yaml#/parameters/suggestion_id_pp responses: - "200": - description: A suggestion + 204: + description: Suggestion deleted schema: - $ref: "../swagger.yaml#/definitions/suggestion" - "400": - description: Bad request + type: string + 401: + description: Authentication required schema: - $ref: "../swagger.yaml#/definitions/error" - "403": + $ref: ../swagger.yaml#/definitions/error + 403: description: Access forbidden schema: - $ref: "../swagger.yaml#/definitions/error" - "404": + $ref: ../swagger.yaml#/definitions/error + 404: description: Suggestion not found schema: - $ref: "../swagger.yaml#/definitions/error" - "500": + $ref: ../swagger.yaml#/definitions/error + 500: description: | Internal server error. Possible `error_code` attribute values: - + * `internal_server_error` schema: - $ref: "../swagger.yaml#/definitions/error" - "503": + $ref: ../swagger.yaml#/definitions/error + 503: description: Under maintenance schema: - $ref: "../swagger.yaml#/definitions/error" + $ref: ../swagger.yaml#/definitions/error x-koha-authorization: permissions: suggestions: suggestions_manage - delete: - x-mojo-to: Suggestions#delete - operationId: deleteSuggestion description: This resource deletes an existing purchase suggestion - summary: Delete purchase suggestion + get: + x-mojo-to: Suggestions#get + operationId: getSuggestion tags: - suggestions - parameters: - - $ref: "../swagger.yaml#/parameters/suggestion_id_pp" + summary: Get purchase suggestion produces: - application/json + parameters: + - $ref: ../swagger.yaml#/parameters/suggestion_id_pp responses: - "204": - description: Suggestion deleted - schema: - type: string - "401": - description: Authentication required + 200: + description: A suggestion schema: - $ref: "../swagger.yaml#/definitions/error" - "403": + $ref: ../swagger.yaml#/definitions/suggestion + 403: description: Access forbidden schema: - $ref: "../swagger.yaml#/definitions/error" - "404": + $ref: ../swagger.yaml#/definitions/error + 404: description: Suggestion not found schema: - $ref: "../swagger.yaml#/definitions/error" - "500": + $ref: ../swagger.yaml#/definitions/error + 500: description: | Internal server error. Possible `error_code` attribute values: - + * `internal_server_error` schema: - $ref: "../swagger.yaml#/definitions/error" - "503": + $ref: ../swagger.yaml#/definitions/error + 503: description: Under maintenance schema: - $ref: "../swagger.yaml#/definitions/error" + $ref: ../swagger.yaml#/definitions/error x-koha-authorization: permissions: suggestions: suggestions_manage -/suggestions/managers: - get: - x-mojo-to: Suggestions#list_managers - operationId: listSuggestionsManagers - description: This resource returns a list of patron allowed to be a manager for suggestions - summary: List possibe managers for suggestions + description: This resource gives access to a specific purchase suggestion + put: + x-mojo-to: Suggestions#update + operationId: updateSuggestion tags: - suggestions - parameters: - - $ref: "../swagger.yaml#/parameters/match" - - $ref: "../swagger.yaml#/parameters/order_by" - - $ref: "../swagger.yaml#/parameters/page" - - $ref: "../swagger.yaml#/parameters/per_page" - - $ref: "../swagger.yaml#/parameters/q_param" - - $ref: "../swagger.yaml#/parameters/q_body" - - $ref: "../swagger.yaml#/parameters/q_header" + summary: Update purchase suggestion produces: - application/json + parameters: + - $ref: ../swagger.yaml#/parameters/suggestion_id_pp + - description: A JSON object containing informations about the new hold + in: body + name: body + required: true + schema: + $ref: ../swagger.yaml#/definitions/suggestion responses: - "200": - description: A list of suggestions' managers + 200: + description: A suggestion schema: - type: array - items: - $ref: "../swagger.yaml#/definitions/patron" - "403": + $ref: ../swagger.yaml#/definitions/suggestion + 400: + description: Bad request + schema: + $ref: ../swagger.yaml#/definitions/error + 403: description: Access forbidden schema: - $ref: "../swagger.yaml#/definitions/error" - "500": + $ref: ../swagger.yaml#/definitions/error + 404: + description: Suggestion not found + schema: + $ref: ../swagger.yaml#/definitions/error + 500: description: | Internal server error. Possible `error_code` attribute values: - + * `internal_server_error` schema: - $ref: "../swagger.yaml#/definitions/error" - "503": + $ref: ../swagger.yaml#/definitions/error + 503: description: Under maintenance schema: - $ref: "../swagger.yaml#/definitions/error" + $ref: ../swagger.yaml#/definitions/error x-koha-authorization: permissions: suggestions: suggestions_manage - x-koha-embed: - - extended_attributes + description: This resource allows updating an existing purchase suggestion diff --git a/api/v1/swagger/paths/transfer_limits.yaml b/api/v1/swagger/paths/transfer_limits.yaml index 5680dedbcfb..d063283bc3c 100644 --- a/api/v1/swagger/paths/transfer_limits.yaml +++ b/api/v1/swagger/paths/transfer_limits.yaml @@ -1,316 +1,312 @@ +--- /transfer_limits: get: x-mojo-to: TransferLimits#list operationId: listTransferLimits - description: This resource returns a list of existing transfer limits. - summary: List transfer limits tags: - transfer + summary: List transfer limits + produces: + - application/json parameters: - - name: to_library_id + - description: Search on to_library_id in: query - description: Search on to_library_id + name: to_library_id required: false type: string - - name: from_library_id + - description: Search on from_library_id in: query - description: Search on from_library_id + name: from_library_id required: false type: string - - name: item_type + - description: Search on item_type in: query - description: Search on item_type + name: item_type required: false type: string - - name: collection_code + - description: Search on collection_code in: query - description: Search on collection_code + name: collection_code required: false type: string - - $ref: "../swagger.yaml#/parameters/match" - - $ref: "../swagger.yaml#/parameters/order_by" - - $ref: "../swagger.yaml#/parameters/page" - - $ref: "../swagger.yaml#/parameters/per_page" - - $ref: "../swagger.yaml#/parameters/q_param" - - $ref: "../swagger.yaml#/parameters/q_body" - - $ref: "../swagger.yaml#/parameters/q_header" - - $ref: "../swagger.yaml#/parameters/request_id_header" - produces: - - application/json + - $ref: ../swagger.yaml#/parameters/match + - $ref: ../swagger.yaml#/parameters/order_by + - $ref: ../swagger.yaml#/parameters/page + - $ref: ../swagger.yaml#/parameters/per_page + - $ref: ../swagger.yaml#/parameters/q_param + - $ref: ../swagger.yaml#/parameters/q_body + - $ref: ../swagger.yaml#/parameters/q_header + - $ref: ../swagger.yaml#/parameters/request_id_header responses: - "200": + 200: description: A list of transfer limits schema: type: array items: - $ref: "../swagger.yaml#/definitions/transfer_limit" - "500": + $ref: ../swagger.yaml#/definitions/transfer_limit + 500: description: | Internal server error. Possible `error_code` attribute values: - + * `internal_server_error` schema: - $ref: "../swagger.yaml#/definitions/error" - "503": + $ref: ../swagger.yaml#/definitions/error + 503: description: Under maintenance schema: - $ref: "../swagger.yaml#/definitions/error" + $ref: ../swagger.yaml#/definitions/error x-koha-authorization: permissions: parameters: manage_transfers + description: This resource returns a list of existing transfer limits. post: x-mojo-to: TransferLimits#add operationId: addTransferLimit - description: This resource accepts a new transfer limit and creates it if it does not - already exist. tags: - transfer summary: Add a transfer limit + produces: + - application/json parameters: - - name: body + - description: A JSON object containing information about a new transfer limit in: body - description: A JSON object containing information about a new transfer limit + name: body required: true schema: - $ref: "../swagger.yaml#/definitions/transfer_limit" - produces: - - application/json + $ref: ../swagger.yaml#/definitions/transfer_limit responses: - "201": + 201: description: Transfer limit added schema: - $ref: "../swagger.yaml#/definitions/transfer_limit" - "400": + $ref: ../swagger.yaml#/definitions/transfer_limit + 400: description: Bad request schema: - $ref: "../swagger.yaml#/definitions/error" - "401": + $ref: ../swagger.yaml#/definitions/error + 401: description: Authentication required schema: - $ref: "../swagger.yaml#/definitions/error" - "403": + $ref: ../swagger.yaml#/definitions/error + 403: description: Access forbidden schema: - $ref: "../swagger.yaml#/definitions/error" - "409": + $ref: ../swagger.yaml#/definitions/error + 409: description: Conflict in creating resource schema: - $ref: "../swagger.yaml#/definitions/error" - "500": + $ref: ../swagger.yaml#/definitions/error + 500: description: | Internal server error. Possible `error_code` attribute values: - + * `internal_server_error` schema: - $ref: "../swagger.yaml#/definitions/error" - "503": + $ref: ../swagger.yaml#/definitions/error + 503: description: Under maintenance schema: - $ref: "../swagger.yaml#/definitions/error" + $ref: ../swagger.yaml#/definitions/error x-koha-authorization: permissions: parameters: manage_transfers -"/transfer_limits/{limit_id}": + description: This resource accepts a new transfer limit and creates it if it does not already exist. +/transfer_limits/batch: delete: - x-mojo-to: TransferLimits#delete - operationId: deleteTransferLimit - description: This resource deletes a transfer limit for the given limit id + x-mojo-to: TransferLimits#batch_delete + operationId: batchDeleteTransferLimits tags: - transfer - summary: Delete transfer limit - parameters: - - $ref: "../swagger.yaml#/parameters/transfer_limit_id_pp" + summary: Batch delete transfer limits produces: - application/json + parameters: + - description: A JSON object containing information about new transfer limits. + in: body + name: body + required: true + schema: + additionalProperties: false + properties: + collection_code: + description: Authorized value for the collection code associated with this limit + type: + - string + - "null" + from_library_id: + description: Internal library id for which library the item is coming from + type: string + item_type: + description: Itemtype defining the type for this limi + type: + - string + - "null" + to_library_id: + description: Internal library id for which library the item is going to + type: string + type: object responses: - "204": - description: Transfer limit deleted + 204: + description: Transfer limits deleted schema: type: string - "401": + 401: description: Authentication required schema: - $ref: "../swagger.yaml#/definitions/error" - "403": + $ref: ../swagger.yaml#/definitions/error + 403: description: Access forbidden schema: - $ref: "../swagger.yaml#/definitions/error" - "404": + $ref: ../swagger.yaml#/definitions/error + 404: description: Library not found schema: - $ref: "../swagger.yaml#/definitions/error" - "500": + $ref: ../swagger.yaml#/definitions/error + 500: description: | Internal server error. Possible `error_code` attribute values: - + * `internal_server_error` schema: - $ref: "../swagger.yaml#/definitions/error" - "503": + $ref: ../swagger.yaml#/definitions/error + 503: description: Under maintenance schema: - $ref: "../swagger.yaml#/definitions/error" + $ref: ../swagger.yaml#/definitions/error x-koha-authorization: permissions: parameters: manage_transfers -/transfer_limits/batch: + description: 'This endpoint works just like [the POST version](#op-post-transfer_limits-batch), except it deletes transfer in batch rather than creating them.' post: x-mojo-to: TransferLimits#batch_add operationId: batchAddTransferLimits - description: > - - This resource batch creates new transfer limits based on the given data. - - For example, if the paramters `to_library_id: 'BranchA'` and `item_type: 'BOOK'` are passed in - new transfer limits for `BOOK`s will be created, with one transfer limit each for all the - branches defined in Koha. Given 4 branches, 3 limits would be created: - - * to_library_id: 'BranchA', from_library_id: 'BranchB', item_type: 'BOOK' - * to_library_id: 'BranchA', from_library_id: 'BranchC', item_type: 'BOOK' - * to_library_id: 'BranchA', from_library_id: 'BranchD', item_type: 'BOOK' - - - The body of the query would look like - - ``` - - { - 'to_library_id': 'BranchA', - 'item_type': 'BOOK' - - } - - ``` - - As another example, imagine we have an itemtype that is never supposed to be transferred to another library. - If we call that itemtype `LOCAL_ONLY` we would need to just pass `item_type: 'LOCAL_ONLY'`, which would create transfer - limits for all libraries, meaning those items would never be allowed to transfer to another - library. The body of the query would look like - - ``` - - { - 'item_type': 'LOCAL_ONLY' - } - - ``` tags: - transfer summary: Batch add transfer limits + produces: + - application/json parameters: - - name: body + - description: A JSON object containing information about new transfer limits. in: body - description: A JSON object containing information about new transfer limits. + name: body required: true schema: - type: object + additionalProperties: false properties: - to_library_id: - type: string - description: Internal library id for which library the item is going to - from_library_id: - type: string - description: Internal library id for which library the item is coming from - item_type: + collection_code: + description: Authorized value for the collection code associated with this limit type: - string - "null" + from_library_id: + description: Internal library id for which library the item is coming from + type: string + item_type: description: Itemtype defining the type for this limi - collection_code: type: - string - "null" - description: Authorized value for the collection code associated with this - limit - additionalProperties: false - produces: - - application/json + to_library_id: + description: Internal library id for which library the item is going to + type: string + type: object responses: - "201": + 201: description: A list of transfer limits schema: type: array items: - $ref: "../swagger.yaml#/definitions/transfer_limit" - "500": + $ref: ../swagger.yaml#/definitions/transfer_limit + 500: description: | Internal server error. Possible `error_code` attribute values: - + * `internal_server_error` schema: - $ref: "../swagger.yaml#/definitions/error" - "503": + $ref: ../swagger.yaml#/definitions/error + 503: description: Under maintenance schema: - $ref: "../swagger.yaml#/definitions/error" + $ref: ../swagger.yaml#/definitions/error x-koha-authorization: permissions: parameters: manage_transfers + description: |2 + + This resource batch creates new transfer limits based on the given data. + + For example, if the paramters `to_library_id: 'BranchA'` and `item_type: 'BOOK'` are passed in + new transfer limits for `BOOK`s will be created, with one transfer limit each for all the + branches defined in Koha. Given 4 branches, 3 limits would be created: + + * to_library_id: 'BranchA', from_library_id: 'BranchB', item_type: 'BOOK' + * to_library_id: 'BranchA', from_library_id: 'BranchC', item_type: 'BOOK' + * to_library_id: 'BranchA', from_library_id: 'BranchD', item_type: 'BOOK' + + + The body of the query would look like + + ``` + + { + 'to_library_id': 'BranchA', + 'item_type': 'BOOK' + + } + + ``` + + As another example, imagine we have an itemtype that is never supposed to be transferred to another library. + If we call that itemtype `LOCAL_ONLY` we would need to just pass `item_type: 'LOCAL_ONLY'`, which would create transfer + limits for all libraries, meaning those items would never be allowed to transfer to another + library. The body of the query would look like + + ``` + + { + 'item_type': 'LOCAL_ONLY' + } + + ``` +'/transfer_limits/{limit_id}': delete: - x-mojo-to: TransferLimits#batch_delete - operationId: batchDeleteTransferLimits - description: This endpoint works just like [the POST - version](#op-post-transfer_limits-batch), except it deletes transfer in - batch rather than creating them. + x-mojo-to: TransferLimits#delete + operationId: deleteTransferLimit tags: - transfer - summary: Batch delete transfer limits - parameters: - - name: body - in: body - description: A JSON object containing information about new transfer limits. - required: true - schema: - type: object - properties: - to_library_id: - type: string - description: Internal library id for which library the item is going to - from_library_id: - type: string - description: Internal library id for which library the item is coming from - item_type: - type: - - string - - "null" - description: Itemtype defining the type for this limi - collection_code: - type: - - string - - "null" - description: Authorized value for the collection code associated with this - limit - additionalProperties: false + summary: Delete transfer limit produces: - application/json + parameters: + - $ref: ../swagger.yaml#/parameters/transfer_limit_id_pp responses: - "204": - description: Transfer limits deleted + 204: + description: Transfer limit deleted schema: type: string - "401": + 401: description: Authentication required schema: - $ref: "../swagger.yaml#/definitions/error" - "403": + $ref: ../swagger.yaml#/definitions/error + 403: description: Access forbidden schema: - $ref: "../swagger.yaml#/definitions/error" - "404": + $ref: ../swagger.yaml#/definitions/error + 404: description: Library not found schema: - $ref: "../swagger.yaml#/definitions/error" - "500": + $ref: ../swagger.yaml#/definitions/error + 500: description: | Internal server error. Possible `error_code` attribute values: - + * `internal_server_error` schema: - $ref: "../swagger.yaml#/definitions/error" - "503": + $ref: ../swagger.yaml#/definitions/error + 503: description: Under maintenance schema: - $ref: "../swagger.yaml#/definitions/error" + $ref: ../swagger.yaml#/definitions/error x-koha-authorization: permissions: parameters: manage_transfers + description: This resource deletes a transfer limit for the given limit id -- 2.25.1