@@ -, +, @@ $ kshell k$ prove t/db_dependent/api/v1/* --- api/v1/swagger/definitions.json | 95 -- api/v1/swagger/definitions.yaml | 63 ++ api/v1/swagger/definitions/account_line.json | 121 --- api/v1/swagger/definitions/account_line.yaml | 96 ++ .../definitions/advancededitormacro.json | 26 - .../definitions/advancededitormacro.yaml | 29 + .../swagger/definitions/allows_renewal.json | 26 - .../swagger/definitions/allows_renewal.yaml | 21 + api/v1/swagger/definitions/basket.json | 100 -- api/v1/swagger/definitions/basket.yaml | 74 ++ api/v1/swagger/definitions/cashup.json | 38 - api/v1/swagger/definitions/cashup.yaml | 28 + api/v1/swagger/definitions/checkout.json | 110 --- api/v1/swagger/definitions/checkout.yaml | 102 ++ api/v1/swagger/definitions/checkouts.json | 7 - api/v1/swagger/definitions/checkouts.yaml | 5 + .../swagger/definitions/circ-rule-kind.json | 15 - .../swagger/definitions/circ-rule-kind.yaml | 15 + api/v1/swagger/definitions/city.yaml | 2 +- api/v1/swagger/definitions/club_hold.json | 27 - api/v1/swagger/definitions/club_hold.yaml | 22 + .../definitions/club_hold_patron_hold.json | 31 - .../definitions/club_hold_patron_hold.yaml | 29 + .../definitions/club_hold_patron_holds.json | 7 - .../definitions/club_hold_patron_holds.yaml | 5 + api/v1/swagger/definitions/club_holds.json | 7 - api/v1/swagger/definitions/club_holds.yaml | 5 + api/v1/swagger/definitions/error.json | 10 - api/v1/swagger/definitions/error.yaml | 7 + api/v1/swagger/definitions/fund.json | 105 -- api/v1/swagger/definitions/fund.yaml | 79 ++ api/v1/swagger/definitions/hold.json | 96 -- api/v1/swagger/definitions/hold.yaml | 101 ++ api/v1/swagger/definitions/holds.json | 7 - api/v1/swagger/definitions/holds.yaml | 5 + api/v1/swagger/definitions/ill_backend.json | 14 - api/v1/swagger/definitions/ill_backend.yaml | 10 + api/v1/swagger/definitions/ill_backends.json | 7 - api/v1/swagger/definitions/ill_backends.yaml | 5 + .../definitions/import_batch_profile.json | 54 - .../definitions/import_batch_profile.yaml | 60 ++ .../definitions/import_batch_profiles.json | 7 - .../definitions/import_batch_profiles.yaml | 5 + api/v1/swagger/definitions/invoice.json | 57 -- api/v1/swagger/definitions/invoice.yaml | 42 + api/v1/swagger/definitions/library.json | 106 -- api/v1/swagger/definitions/library.yaml | 123 +++ api/v1/swagger/definitions/order.json | 335 ------- api/v1/swagger/definitions/order.yaml | 241 +++++ api/v1/swagger/definitions/patron.json | 296 ------ api/v1/swagger/definitions/patron.yaml | 337 +++++++ .../definitions/patron_account_credit.json | 44 - .../definitions/patron_account_credit.yaml | 36 + .../swagger/definitions/patron_balance.json | 40 - .../swagger/definitions/patron_balance.yaml | 26 + .../patron_extended_attribute.json | 24 - .../patron_extended_attribute.yaml | 17 + api/v1/swagger/definitions/quote.json | 22 - api/v1/swagger/definitions/quote.yaml | 23 + api/v1/swagger/definitions/return_claim.json | 94 -- api/v1/swagger/definitions/return_claim.yaml | 67 ++ api/v1/swagger/definitions/smtp_server.json | 57 -- api/v1/swagger/definitions/smtp_server.yaml | 42 + .../swagger/definitions/transfer_limit.json | 27 - .../swagger/definitions/transfer_limit.yaml | 26 + api/v1/swagger/definitions/vendor.json | 149 --- api/v1/swagger/definitions/vendor.yaml | 107 ++ api/v1/swagger/parameters.json | 126 --- api/v1/swagger/parameters.yaml | 96 ++ .../parameters/advancededitormacro.json | 9 - .../parameters/advancededitormacro.yaml | 7 + api/v1/swagger/parameters/biblio.json | 9 - api/v1/swagger/parameters/biblio.yaml | 7 + api/v1/swagger/parameters/cash_register.json | 9 - api/v1/swagger/parameters/cash_register.yaml | 7 + api/v1/swagger/parameters/cashup.json | 9 - api/v1/swagger/parameters/cashup.yaml | 7 + api/v1/swagger/parameters/checkout.json | 16 - api/v1/swagger/parameters/checkout.yaml | 13 + api/v1/swagger/parameters/city.json | 9 - api/v1/swagger/parameters/city.yaml | 7 + api/v1/swagger/parameters/club.json | 9 - api/v1/swagger/parameters/club.yaml | 7 + api/v1/swagger/parameters/fund.json | 9 - api/v1/swagger/parameters/fund.yaml | 7 + api/v1/swagger/parameters/hold.json | 9 - api/v1/swagger/parameters/hold.yaml | 7 + .../parameters/import_batch_profile.json | 9 - .../parameters/import_batch_profile.yaml | 7 + api/v1/swagger/parameters/item.json | 9 - api/v1/swagger/parameters/item.yaml | 7 + api/v1/swagger/parameters/library.json | 9 - api/v1/swagger/parameters/library.yaml | 7 + api/v1/swagger/parameters/order.json | 9 - api/v1/swagger/parameters/order.yaml | 7 + api/v1/swagger/parameters/patron.json | 15 - api/v1/swagger/parameters/patron.yaml | 12 + api/v1/swagger/parameters/quote.json | 9 - api/v1/swagger/parameters/quote.yaml | 7 + api/v1/swagger/parameters/smtp_server.json | 9 - api/v1/swagger/parameters/smtp_server.yaml | 7 + api/v1/swagger/parameters/suggestion.json | 9 - api/v1/swagger/parameters/suggestion.yaml | 7 + api/v1/swagger/parameters/transfer_limit.json | 9 - api/v1/swagger/parameters/transfer_limit.yaml | 7 + api/v1/swagger/parameters/vendor.json | 9 - api/v1/swagger/parameters/vendor.yaml | 7 + api/v1/swagger/paths.json | 215 ---- api/v1/swagger/paths.yaml | 143 +++ api/v1/swagger/paths/acquisitions_funds.json | 94 -- api/v1/swagger/paths/acquisitions_funds.yaml | 58 ++ api/v1/swagger/paths/acquisitions_orders.json | 395 -------- api/v1/swagger/paths/acquisitions_orders.yaml | 270 +++++ .../swagger/paths/acquisitions_vendors.json | 319 ------ .../swagger/paths/acquisitions_vendors.yaml | 220 +++++ .../swagger/paths/advancededitormacros.json | 557 ----------- .../swagger/paths/advancededitormacros.yaml | 379 +++++++ api/v1/swagger/paths/article_requests.yaml | 26 +- api/v1/swagger/paths/biblios.json | 569 ----------- api/v1/swagger/paths/biblios.yaml | 349 +++++++ api/v1/swagger/paths/cash_registers.json | 109 --- api/v1/swagger/paths/cash_registers.yaml | 68 ++ api/v1/swagger/paths/checkouts.json | 156 --- api/v1/swagger/paths/checkouts.yaml | 126 +++ api/v1/swagger/paths/circulation-rules.json | 36 - api/v1/swagger/paths/circulation-rules.yaml | 25 + api/v1/swagger/paths/cities.yaml | 72 +- api/v1/swagger/paths/clubs.json | 137 --- api/v1/swagger/paths/clubs.yaml | 93 ++ api/v1/swagger/paths/config_smtp_servers.json | 316 ------ api/v1/swagger/paths/config_smtp_servers.yaml | 198 ++++ api/v1/swagger/paths/holds.json | 924 ------------------ api/v1/swagger/paths/holds.yaml | 650 ++++++++++++ api/v1/swagger/paths/ill_backends.json | 120 --- api/v1/swagger/paths/ill_backends.yaml | 82 ++ api/v1/swagger/paths/illrequests.json | 163 --- api/v1/swagger/paths/illrequests.yaml | 128 +++ .../swagger/paths/import_batch_profiles.json | 375 ------- .../swagger/paths/import_batch_profiles.yaml | 295 ++++++ api/v1/swagger/paths/items.yaml | 66 +- api/v1/swagger/paths/libraries.json | 557 ----------- api/v1/swagger/paths/libraries.yaml | 356 +++++++ api/v1/swagger/paths/oauth.json | 66 -- api/v1/swagger/paths/oauth.yaml | 45 + api/v1/swagger/paths/patrons.json | 712 -------------- api/v1/swagger/paths/patrons.yaml | 551 +++++++++++ api/v1/swagger/paths/patrons_account.json | 134 --- api/v1/swagger/paths/patrons_account.yaml | 86 ++ .../paths/patrons_extended_attributes.json | 412 -------- .../paths/patrons_extended_attributes.yaml | 262 +++++ api/v1/swagger/paths/patrons_holds.json | 87 -- api/v1/swagger/paths/patrons_holds.yaml | 49 + api/v1/swagger/paths/patrons_password.json | 86 -- api/v1/swagger/paths/patrons_password.yaml | 58 ++ api/v1/swagger/paths/public_patrons.json | 246 ----- api/v1/swagger/paths/public_patrons.yaml | 163 +++ api/v1/swagger/paths/quotes.json | 332 ------- api/v1/swagger/paths/quotes.yaml | 210 ++++ api/v1/swagger/paths/return_claims.json | 353 ------- api/v1/swagger/paths/return_claims.yaml | 240 +++++ api/v1/swagger/paths/rotas.json | 80 -- api/v1/swagger/paths/rotas.yaml | 57 ++ api/v1/swagger/paths/suggestions.yaml | 74 +- api/v1/swagger/paths/transfer_limits.yaml | 353 +++---- api/v1/swagger/swagger.yaml | 8 +- api/v1/swagger/x-primitives.json | 65 -- api/v1/swagger/x-primitives.yaml | 60 ++ 167 files changed, 7616 insertions(+), 10385 deletions(-) delete mode 100644 api/v1/swagger/definitions.json create mode 100644 api/v1/swagger/definitions.yaml delete mode 100644 api/v1/swagger/definitions/account_line.json create mode 100644 api/v1/swagger/definitions/account_line.yaml delete mode 100644 api/v1/swagger/definitions/advancededitormacro.json create mode 100644 api/v1/swagger/definitions/advancededitormacro.yaml delete mode 100644 api/v1/swagger/definitions/allows_renewal.json create mode 100644 api/v1/swagger/definitions/allows_renewal.yaml delete mode 100644 api/v1/swagger/definitions/basket.json create mode 100644 api/v1/swagger/definitions/basket.yaml delete mode 100644 api/v1/swagger/definitions/cashup.json create mode 100644 api/v1/swagger/definitions/cashup.yaml delete mode 100644 api/v1/swagger/definitions/checkout.json create mode 100644 api/v1/swagger/definitions/checkout.yaml delete mode 100644 api/v1/swagger/definitions/checkouts.json create mode 100644 api/v1/swagger/definitions/checkouts.yaml delete mode 100644 api/v1/swagger/definitions/circ-rule-kind.json create mode 100644 api/v1/swagger/definitions/circ-rule-kind.yaml delete mode 100644 api/v1/swagger/definitions/club_hold.json create mode 100644 api/v1/swagger/definitions/club_hold.yaml delete mode 100644 api/v1/swagger/definitions/club_hold_patron_hold.json create mode 100644 api/v1/swagger/definitions/club_hold_patron_hold.yaml delete mode 100644 api/v1/swagger/definitions/club_hold_patron_holds.json create mode 100644 api/v1/swagger/definitions/club_hold_patron_holds.yaml delete mode 100644 api/v1/swagger/definitions/club_holds.json create mode 100644 api/v1/swagger/definitions/club_holds.yaml delete mode 100644 api/v1/swagger/definitions/error.json create mode 100644 api/v1/swagger/definitions/error.yaml delete mode 100644 api/v1/swagger/definitions/fund.json create mode 100644 api/v1/swagger/definitions/fund.yaml delete mode 100644 api/v1/swagger/definitions/hold.json create mode 100644 api/v1/swagger/definitions/hold.yaml delete mode 100644 api/v1/swagger/definitions/holds.json create mode 100644 api/v1/swagger/definitions/holds.yaml delete mode 100644 api/v1/swagger/definitions/ill_backend.json create mode 100644 api/v1/swagger/definitions/ill_backend.yaml delete mode 100644 api/v1/swagger/definitions/ill_backends.json create mode 100644 api/v1/swagger/definitions/ill_backends.yaml delete mode 100644 api/v1/swagger/definitions/import_batch_profile.json create mode 100644 api/v1/swagger/definitions/import_batch_profile.yaml delete mode 100644 api/v1/swagger/definitions/import_batch_profiles.json create mode 100644 api/v1/swagger/definitions/import_batch_profiles.yaml delete mode 100644 api/v1/swagger/definitions/invoice.json create mode 100644 api/v1/swagger/definitions/invoice.yaml delete mode 100644 api/v1/swagger/definitions/library.json create mode 100644 api/v1/swagger/definitions/library.yaml delete mode 100644 api/v1/swagger/definitions/order.json create mode 100644 api/v1/swagger/definitions/order.yaml delete mode 100644 api/v1/swagger/definitions/patron.json create mode 100644 api/v1/swagger/definitions/patron.yaml delete mode 100644 api/v1/swagger/definitions/patron_account_credit.json create mode 100644 api/v1/swagger/definitions/patron_account_credit.yaml delete mode 100644 api/v1/swagger/definitions/patron_balance.json create mode 100644 api/v1/swagger/definitions/patron_balance.yaml delete mode 100644 api/v1/swagger/definitions/patron_extended_attribute.json create mode 100644 api/v1/swagger/definitions/patron_extended_attribute.yaml delete mode 100644 api/v1/swagger/definitions/quote.json create mode 100644 api/v1/swagger/definitions/quote.yaml delete mode 100644 api/v1/swagger/definitions/return_claim.json create mode 100644 api/v1/swagger/definitions/return_claim.yaml delete mode 100644 api/v1/swagger/definitions/smtp_server.json create mode 100644 api/v1/swagger/definitions/smtp_server.yaml delete mode 100644 api/v1/swagger/definitions/transfer_limit.json create mode 100644 api/v1/swagger/definitions/transfer_limit.yaml delete mode 100644 api/v1/swagger/definitions/vendor.json create mode 100644 api/v1/swagger/definitions/vendor.yaml delete mode 100644 api/v1/swagger/parameters.json create mode 100644 api/v1/swagger/parameters.yaml delete mode 100644 api/v1/swagger/parameters/advancededitormacro.json create mode 100644 api/v1/swagger/parameters/advancededitormacro.yaml delete mode 100644 api/v1/swagger/parameters/biblio.json create mode 100644 api/v1/swagger/parameters/biblio.yaml delete mode 100644 api/v1/swagger/parameters/cash_register.json create mode 100644 api/v1/swagger/parameters/cash_register.yaml delete mode 100644 api/v1/swagger/parameters/cashup.json create mode 100644 api/v1/swagger/parameters/cashup.yaml delete mode 100644 api/v1/swagger/parameters/checkout.json create mode 100644 api/v1/swagger/parameters/checkout.yaml delete mode 100644 api/v1/swagger/parameters/city.json create mode 100644 api/v1/swagger/parameters/city.yaml delete mode 100644 api/v1/swagger/parameters/club.json create mode 100644 api/v1/swagger/parameters/club.yaml delete mode 100644 api/v1/swagger/parameters/fund.json create mode 100644 api/v1/swagger/parameters/fund.yaml delete mode 100644 api/v1/swagger/parameters/hold.json create mode 100644 api/v1/swagger/parameters/hold.yaml delete mode 100644 api/v1/swagger/parameters/import_batch_profile.json create mode 100644 api/v1/swagger/parameters/import_batch_profile.yaml delete mode 100644 api/v1/swagger/parameters/item.json create mode 100644 api/v1/swagger/parameters/item.yaml delete mode 100644 api/v1/swagger/parameters/library.json create mode 100644 api/v1/swagger/parameters/library.yaml delete mode 100644 api/v1/swagger/parameters/order.json create mode 100644 api/v1/swagger/parameters/order.yaml delete mode 100644 api/v1/swagger/parameters/patron.json create mode 100644 api/v1/swagger/parameters/patron.yaml delete mode 100644 api/v1/swagger/parameters/quote.json create mode 100644 api/v1/swagger/parameters/quote.yaml delete mode 100644 api/v1/swagger/parameters/smtp_server.json create mode 100644 api/v1/swagger/parameters/smtp_server.yaml delete mode 100644 api/v1/swagger/parameters/suggestion.json create mode 100644 api/v1/swagger/parameters/suggestion.yaml delete mode 100644 api/v1/swagger/parameters/transfer_limit.json create mode 100644 api/v1/swagger/parameters/transfer_limit.yaml delete mode 100644 api/v1/swagger/parameters/vendor.json create mode 100644 api/v1/swagger/parameters/vendor.yaml delete mode 100644 api/v1/swagger/paths.json create mode 100644 api/v1/swagger/paths.yaml delete mode 100644 api/v1/swagger/paths/acquisitions_funds.json create mode 100644 api/v1/swagger/paths/acquisitions_funds.yaml delete mode 100644 api/v1/swagger/paths/acquisitions_orders.json create mode 100644 api/v1/swagger/paths/acquisitions_orders.yaml delete mode 100644 api/v1/swagger/paths/acquisitions_vendors.json create mode 100644 api/v1/swagger/paths/acquisitions_vendors.yaml delete mode 100644 api/v1/swagger/paths/advancededitormacros.json create mode 100644 api/v1/swagger/paths/advancededitormacros.yaml delete mode 100644 api/v1/swagger/paths/biblios.json create mode 100644 api/v1/swagger/paths/biblios.yaml delete mode 100644 api/v1/swagger/paths/cash_registers.json create mode 100644 api/v1/swagger/paths/cash_registers.yaml delete mode 100644 api/v1/swagger/paths/checkouts.json create mode 100644 api/v1/swagger/paths/checkouts.yaml delete mode 100644 api/v1/swagger/paths/circulation-rules.json create mode 100644 api/v1/swagger/paths/circulation-rules.yaml delete mode 100644 api/v1/swagger/paths/clubs.json create mode 100644 api/v1/swagger/paths/clubs.yaml delete mode 100644 api/v1/swagger/paths/config_smtp_servers.json create mode 100644 api/v1/swagger/paths/config_smtp_servers.yaml delete mode 100644 api/v1/swagger/paths/holds.json create mode 100644 api/v1/swagger/paths/holds.yaml delete mode 100644 api/v1/swagger/paths/ill_backends.json create mode 100644 api/v1/swagger/paths/ill_backends.yaml delete mode 100644 api/v1/swagger/paths/illrequests.json create mode 100644 api/v1/swagger/paths/illrequests.yaml delete mode 100644 api/v1/swagger/paths/import_batch_profiles.json create mode 100644 api/v1/swagger/paths/import_batch_profiles.yaml delete mode 100644 api/v1/swagger/paths/libraries.json create mode 100644 api/v1/swagger/paths/libraries.yaml delete mode 100644 api/v1/swagger/paths/oauth.json create mode 100644 api/v1/swagger/paths/oauth.yaml delete mode 100644 api/v1/swagger/paths/patrons.json create mode 100644 api/v1/swagger/paths/patrons.yaml delete mode 100644 api/v1/swagger/paths/patrons_account.json create mode 100644 api/v1/swagger/paths/patrons_account.yaml delete mode 100644 api/v1/swagger/paths/patrons_extended_attributes.json create mode 100644 api/v1/swagger/paths/patrons_extended_attributes.yaml delete mode 100644 api/v1/swagger/paths/patrons_holds.json create mode 100644 api/v1/swagger/paths/patrons_holds.yaml delete mode 100644 api/v1/swagger/paths/patrons_password.json create mode 100644 api/v1/swagger/paths/patrons_password.yaml delete mode 100644 api/v1/swagger/paths/public_patrons.json create mode 100644 api/v1/swagger/paths/public_patrons.yaml delete mode 100644 api/v1/swagger/paths/quotes.json create mode 100644 api/v1/swagger/paths/quotes.yaml delete mode 100644 api/v1/swagger/paths/return_claims.json create mode 100644 api/v1/swagger/paths/return_claims.yaml delete mode 100644 api/v1/swagger/paths/rotas.json create mode 100644 api/v1/swagger/paths/rotas.yaml delete mode 100644 api/v1/swagger/x-primitives.json create mode 100644 api/v1/swagger/x-primitives.yaml --- a/api/v1/swagger/definitions.json +++ a/api/v1/swagger/definitions.json @@ -1,95 +0,0 @@ -{ - "account_line": { - "$ref": "definitions/account_line.json" - }, - "basket": { - "$ref": "definitions/basket.json" - }, - "cashup": { - "$ref": "definitions/cashup.json" - }, - "circ-rule-kind": { - "$ref": "definitions/circ-rule-kind.json" - }, - "city": { - "$ref": "definitions/city.yaml" - }, - "error": { - "$ref": "definitions/error.json" - }, - "fund": { - "$ref": "definitions/fund.json" - }, - "hold": { - "$ref": "definitions/hold.json" - }, - "invoice": { - "$ref": "definitions/invoice.json" - }, - "item": { - "$ref": "definitions/item.yaml" - }, - "checkouts": { - "$ref": "definitions/checkouts.json" - }, - "checkout": { - "$ref": "definitions/checkout.json" - }, - "holds": { - "$ref": "definitions/holds.json" - }, - "ill_backends": { - "$ref": "definitions/ill_backends.json" - }, - "ill_backend": { - "$ref": "definitions/ill_backend.json" - }, - "import_batch_profile": { - "$ref": "definitions/import_batch_profile.json" - }, - "import_batch_profiles": { - "$ref": "definitions/import_batch_profiles.json" - }, - "library": { - "$ref": "definitions/library.json" - }, - "transfer_limit": { - "$ref": "definitions/transfer_limit.json" - }, - "order": { - "$ref": "definitions/order.json" - }, - "advancededitormacro": { - "$ref": "definitions/advancededitormacro.json" - }, - "patron": { - "$ref": "definitions/patron.json" - }, - "patron_account_credit": { - "$ref": "definitions/patron_account_credit.json" - }, - "patron_balance": { - "$ref": "definitions/patron_balance.json" - }, - "patron_extended_attribute": { - "$ref": "definitions/patron_extended_attribute.json" - }, - "quote": { - "$ref": "definitions/quote.json" - }, - "allows_renewal": { - "$ref": "definitions/allows_renewal.json" - }, - "vendor": { - "$ref": "definitions/vendor.json" - }, - "return_claim": { - "$ref": "definitions/return_claim.json" - }, - "smtp_server": { - "$ref": "definitions/smtp_server.json" - }, - "suggestion": { - "$ref": "definitions/suggestion.yaml" - } -} --- a/api/v1/swagger/definitions.yaml +++ a/api/v1/swagger/definitions.yaml @@ -0,0 +1,63 @@ +--- +account_line: + $ref: definitions/account_line.yaml +advancededitormacro: + $ref: definitions/advancededitormacro.yaml +allows_renewal: + $ref: definitions/allows_renewal.yaml +basket: + $ref: definitions/basket.yaml +cashup: + $ref: definitions/cashup.yaml +checkout: + $ref: definitions/checkout.yaml +checkouts: + $ref: definitions/checkouts.yaml +circ-rule-kind: + $ref: definitions/circ-rule-kind.yaml +city: + $ref: definitions/city.yaml +error: + $ref: definitions/error.yaml +fund: + $ref: definitions/fund.yaml +hold: + $ref: definitions/hold.yaml +holds: + $ref: definitions/holds.yaml +ill_backend: + $ref: definitions/ill_backend.yaml +ill_backends: + $ref: definitions/ill_backends.yaml +import_batch_profile: + $ref: definitions/import_batch_profile.yaml +import_batch_profiles: + $ref: definitions/import_batch_profiles.yaml +invoice: + $ref: definitions/invoice.yaml +item: + $ref: definitions/item.yaml +library: + $ref: definitions/library.yaml +order: + $ref: definitions/order.yaml +patron: + $ref: definitions/patron.yaml +patron_account_credit: + $ref: definitions/patron_account_credit.yaml +patron_balance: + $ref: definitions/patron_balance.yaml +patron_extended_attribute: + $ref: definitions/patron_extended_attribute.yaml +quote: + $ref: definitions/quote.yaml +return_claim: + $ref: definitions/return_claim.yaml +smtp_server: + $ref: definitions/smtp_server.yaml +suggestion: + $ref: definitions/suggestion.yaml +transfer_limit: + $ref: definitions/transfer_limit.yaml +vendor: + $ref: definitions/vendor.yaml --- a/api/v1/swagger/definitions/account_line.json +++ a/api/v1/swagger/definitions/account_line.json @@ -1,121 +0,0 @@ -{ - "type": "object", - "properties": { - "account_line_id": { - "type": "integer", - "description": "Internal account line identifier" - }, - "checkout_id": { - "type": [ - "integer", - "null" - ], - "description": "Internal identifier for the checkout the account line is related to" - }, - "patron_id": { - "type": "integer", - "description": "Internal identifier for the patron the account line belongs to" - }, - "item_id": { - "type": [ - "integer", - "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": [ - "string", - "null" - ], - "description": "Account line description" - }, - "account_type": { - "type": [ - "string", - "null" - ], - "description": "Account line type" - }, - "debit_type": { - "type": [ - "string", - "null" - ], - "description": "Account line debit type" - }, - "credit_type": { - "type": [ - "string", - "null" - ], - "description": "Account line credit type" - }, - "payment_type": { - "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": { - "type": [ - "string", - "null" - ], - "description": "Internal note" - }, - "user_id": { - "type": [ - "integer", - "null" - ], - "description": "Internal patron identifier for the staff member that introduced the account line" - }, - "library_id": { - "type": [ - "string", - "null" - ], - "description": "Internal identifier for the library in which the transaction took place" - }, - "interface": { - "type": [ "string", "null" ], - "description": "Interface in which the account line was generated (values can be: api, cron, commandline, intranet, opac and sip)" - }, - "status": { - "type": [ "string", "null" ], - "description": "The credit/debit status" - }, - "cash_register_id": { - "type": [ "integer", "null" ], - "description": "Internal identifier for the cash register used for the payment (if any)" - } - }, - "additionalProperties": false -} --- a/api/v1/swagger/definitions/account_line.yaml +++ a/api/v1/swagger/definitions/account_line.yaml @@ -0,0 +1,96 @@ +--- +type: object +properties: + account_line_id: + type: integer + description: Internal account line identifier + checkout_id: + type: + - integer + - "null" + description: Internal identifier for the checkout the account line is related to + patron_id: + type: integer + description: Internal identifier for the patron the account line belongs to + item_id: + type: + - integer + - "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: + - string + - "null" + description: Account line description + account_type: + type: + - string + - "null" + description: Account line type + debit_type: + type: + - string + - "null" + description: Account line debit type + credit_type: + type: + - string + - "null" + description: Account line credit type + payment_type: + 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: + type: + - string + - "null" + description: Internal note + user_id: + type: + - integer + - "null" + description: Internal patron identifier for the staff member that introduced the + account line + library_id: + type: + - string + - "null" + description: Internal identifier for the library in which the transaction took place + interface: + type: + - string + - "null" + description: "Interface in which the account line was generated (values can be: api, + cron, commandline, intranet, opac and sip)" + status: + type: + - string + - "null" + description: The credit/debit status + cash_register_id: + type: + - integer + - "null" + description: Internal identifier for the cash register used for the payment (if any) +additionalProperties: false --- a/api/v1/swagger/definitions/advancededitormacro.json +++ a/api/v1/swagger/definitions/advancededitormacro.json @@ -1,26 +0,0 @@ -{ - "type": "object", - "properties": { - "macro_id": { - "$ref": "../x-primitives.json#/advancededitormacro_id" - }, - "name": { - "description": "macro name", - "type": "string" - }, - "macro_text": { - "description": "macro text", - "type": ["string", "null"] - }, - "patron_id": { - "description": "borrower number", - "type": ["integer", "null"] - }, - "shared": { - "description": "is macro shared", - "type": ["boolean", "null"] - } - }, - "additionalProperties": false, - "required": ["name", "macro_text", "patron_id", "shared"] -} --- a/api/v1/swagger/definitions/advancededitormacro.yaml +++ a/api/v1/swagger/definitions/advancededitormacro.yaml @@ -0,0 +1,29 @@ +--- +type: object +properties: + macro_id: + $ref: ../x-primitives.yaml#/advancededitormacro_id + name: + description: macro name + type: string + macro_text: + description: macro text + type: + - string + - "null" + patron_id: + description: borrower number + type: + - integer + - "null" + shared: + description: is macro shared + type: + - boolean + - "null" +additionalProperties: false +required: + - name + - macro_text + - patron_id + - shared --- a/api/v1/swagger/definitions/allows_renewal.json +++ a/api/v1/swagger/definitions/allows_renewal.json @@ -1,26 +0,0 @@ -{ - "type": "object", - "properties": { - "allows_renewal": { - "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": { - "type": ["string", "null"], - "description": "Description on false allows_renewal." - } - }, - "additionalProperties": false -} --- a/api/v1/swagger/definitions/allows_renewal.yaml +++ a/api/v1/swagger/definitions/allows_renewal.yaml @@ -0,0 +1,21 @@ +--- +type: object +properties: + allows_renewal: + 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: + type: + - string + - "null" + description: Description on false allows_renewal. +additionalProperties: false --- a/api/v1/swagger/definitions/basket.json +++ a/api/v1/swagger/definitions/basket.json @@ -1,100 +0,0 @@ -{ - "type": "object", - "properties": { - "basket_id": { - "type": "integer", - "description": "Internal identifier for the basket" - }, - "name": { - "type": "string", - "description": "Basket name" - }, - "internal_note": { - "type": [ - "string", - "null" - ], - "description": "Internal note" - }, - "vendor_note": { - "type": [ - "string", - "null" - ], - "description": "Vendor note" - }, - "contract_id": { - "type": "integer", - "description": "Internal identifier of the linked contract" - }, - "creation_date": { - "type": [ - "string", - "null" - ], - "format": "date", - "description": "The date the basket was created" - }, - "close_date": { - "type": [ - "string", - "null" - ], - "format": "date", - "description": "The date the basket was closed" - }, - "vendor_id": { - "type": "integer", - "description": "Internal identifier for the vendor" - }, - "authorised_by": { - "type": [ - "integer", - "null" - ], - "description": "Internal patron identifier of the basket creator" - }, - "basket_group_id": { - "type": [ - "integer", - "null" - ], - "description": "links this basket to its group (aqbasketgroups.id)" - }, - "delivery_library": { - "type": [ - "string", - "null" - ], - "description": "basket delivery place" - }, - "billing_library": { - "type": [ - "string", - "null" - ], - "description": "basket billing place" - }, - "library_id": { - "type": [ - "integer", - "null" - ], - "description": "Library the basket belongs to" - }, - "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)" - } - }, - "additionalProperties": false -} --- a/api/v1/swagger/definitions/basket.yaml +++ a/api/v1/swagger/definitions/basket.yaml @@ -0,0 +1,74 @@ +--- +type: object +properties: + basket_id: + type: integer + description: Internal identifier for the basket + name: + type: string + description: Basket name + internal_note: + type: + - string + - "null" + description: Internal note + vendor_note: + type: + - string + - "null" + description: Vendor note + contract_id: + type: integer + description: Internal identifier of the linked contract + creation_date: + type: + - string + - "null" + format: date + description: The date the basket was created + close_date: + type: + - string + - "null" + format: date + description: The date the basket was closed + vendor_id: + type: integer + description: Internal identifier for the vendor + authorised_by: + type: + - integer + - "null" + description: Internal patron identifier of the basket creator + basket_group_id: + type: + - integer + - "null" + description: links this basket to its group (aqbasketgroups.id) + delivery_library: + type: + - string + - "null" + description: basket delivery place + billing_library: + type: + - string + - "null" + description: basket billing place + library_id: + type: + - integer + - "null" + description: Library the basket belongs to + 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)" +additionalProperties: false --- a/api/v1/swagger/definitions/cashup.json +++ a/api/v1/swagger/definitions/cashup.json @@ -1,38 +0,0 @@ -{ - "type": "object", - "properties": { - "cashup_id": { - "type": "integer", - "description": "Internal cashup identifier" - }, - "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" - }, - "manager": { - "type": [ - "object", - "null" - ], - "description": "The object representing the manager the cashup was performed by" - }, - "amount": { - "type": "number", - "description": "Account line amount" - }, - "timestamp": { - "type": "string", - "format": "date-time", - "description": "Timestamp for the latest line update" - }, - "summary": { - "type": "object", - "description": "A summary of the cashup action" - } - }, - "additionalProperties": false -} --- a/api/v1/swagger/definitions/cashup.yaml +++ a/api/v1/swagger/definitions/cashup.yaml @@ -0,0 +1,28 @@ +--- +type: object +properties: + cashup_id: + type: integer + description: Internal cashup identifier + 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 + manager: + type: + - object + - "null" + description: The object representing the manager the cashup was performed by + amount: + type: number + description: Account line amount + timestamp: + type: string + format: date-time + description: Timestamp for the latest line update + summary: + type: object + description: A summary of the cashup action +additionalProperties: false --- a/api/v1/swagger/definitions/checkout.json +++ a/api/v1/swagger/definitions/checkout.json @@ -1,110 +0,0 @@ -{ - "type": "object", - "properties": { - "checkout_id": { - "type": "integer", - "description": "internally assigned checkout identifier" - }, - "patron_id": { - "$ref": "../x-primitives.json#/patron_id" - }, - "item_id": { - "type": "integer", - "description": "internal identifier of checked out item" - }, - "due_date": { - "type": "string", - "format": "date-time", - "description": "Due date" - }, - "library_id": { - "type": ["string", "null"], - "description": "code of the library the item was checked out" - }, - "issuer_id": { - "type": [ "integer", "null" ], - "description": "internally assigned for the user that processed the checkout" - }, - "checkin_date": { - "type": ["string", "null"], - "format": "date-time", - "description": "Date the item was returned" - }, - "last_renewed_date": { - "type": ["string", "null"], - "format": "date-time", - "description": "Date the item was last renewed" - }, - "renewals": { - "type": ["integer", "null"], - "description": "Number of renewals" - }, - "unseen_renewals": { - "type": ["integer", "null"], - "description": "Number of consecutive unseen renewals" - }, - "auto_renew": { - "type": "boolean", - "description": "Auto renewal" - }, - "auto_renew_error": { - "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": { - "type": ["string", "null"], - "description": "Issue note text" - }, - "note_date": { - "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", - "null" - ], - "description": "The object representing the checkout issuer" - }, - "item": { - "type": [ - "object", - "null" - ], - "description": "The object representing the checked out item" - }, - "library": { - "type": [ - "object", - "null" - ], - "description": "The object representing the checkout library" - }, - "patron": { - "type": [ - "object", - "null" - ], - "description": "The object representing the checkout patron" - } - }, - "additionalProperties": false -} --- a/api/v1/swagger/definitions/checkout.yaml +++ a/api/v1/swagger/definitions/checkout.yaml @@ -0,0 +1,102 @@ +--- +type: object +properties: + checkout_id: + type: integer + description: internally assigned checkout identifier + patron_id: + $ref: ../x-primitives.yaml#/patron_id + item_id: + type: integer + description: internal identifier of checked out item + due_date: + type: string + format: date-time + description: Due date + library_id: + type: + - string + - "null" + description: code of the library the item was checked out + issuer_id: + type: + - integer + - "null" + description: internally assigned for the user that processed the checkout + checkin_date: + type: + - string + - "null" + format: date-time + description: Date the item was returned + last_renewed_date: + type: + - string + - "null" + format: date-time + description: Date the item was last renewed + renewals: + type: + - integer + - "null" + description: Number of renewals + unseen_renewals: + type: + - integer + - "null" + description: Number of consecutive unseen renewals + auto_renew: + type: boolean + description: Auto renewal + auto_renew_error: + 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: + type: + - string + - "null" + description: Issue note text + note_date: + 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 + - "null" + description: The object representing the checkout issuer + item: + type: + - object + - "null" + description: The object representing the checked out item + library: + type: + - object + - "null" + description: The object representing the checkout library + patron: + type: + - object + - "null" + description: The object representing the checkout patron +additionalProperties: false --- a/api/v1/swagger/definitions/checkouts.json +++ a/api/v1/swagger/definitions/checkouts.json @@ -1,7 +0,0 @@ -{ - "type": "array", - "items": { - "$ref": "checkout.json" - }, - "additionalProperties": false -} --- a/api/v1/swagger/definitions/checkouts.yaml +++ a/api/v1/swagger/definitions/checkouts.yaml @@ -0,0 +1,5 @@ +--- +type: array +items: + $ref: checkout.yaml +additionalProperties: false --- a/api/v1/swagger/definitions/circ-rule-kind.json +++ a/api/v1/swagger/definitions/circ-rule-kind.json @@ -1,15 +0,0 @@ -{ - "type": "object", - "properties": { - "scope": { - "description": "levels that this rule kind can be set for", - "type": "array", - "items": { - "type": "string", - "enum": [ "branchcode", "categorycode", "itemtype" ] - } - } - }, - "additionalProperties": false, - "required": ["scope"] -} --- a/api/v1/swagger/definitions/circ-rule-kind.yaml +++ a/api/v1/swagger/definitions/circ-rule-kind.yaml @@ -0,0 +1,15 @@ +--- +type: object +properties: + scope: + description: levels that this rule kind can be set for + type: array + items: + type: string + enum: + - branchcode + - categorycode + - itemtype +additionalProperties: false +required: + - scope --- a/api/v1/swagger/definitions/city.yaml +++ a/api/v1/swagger/definitions/city.yaml @@ -2,7 +2,7 @@ type: object properties: city_id: - $ref: ../x-primitives.json#/city_id + $ref: ../x-primitives.yaml#/city_id name: description: city name type: string --- a/api/v1/swagger/definitions/club_hold.json +++ a/api/v1/swagger/definitions/club_hold.json @@ -1,27 +0,0 @@ -{ - "type": "object", - "properties": { - "club_hold_id": { - "type": "integer", - "description": "Internal club hold identifier" - }, - "club_id": { - "type": "integer", - "description": "Internal club identifier" - }, - "biblio_id": { - "type": "integer", - "description": "Internal biblio identifier" - }, - "item_id": { - "type": ["string", "null"], - "description": "Internal item identifier" - }, - "date_created": { - "type": "string", - "format": "date-time", - "description": "Date and time the hold was created" - } - }, - "additionalProperties": false -} --- a/api/v1/swagger/definitions/club_hold.yaml +++ a/api/v1/swagger/definitions/club_hold.yaml @@ -0,0 +1,22 @@ +--- +type: object +properties: + club_hold_id: + type: integer + description: Internal club hold identifier + club_id: + type: integer + description: Internal club identifier + biblio_id: + type: integer + description: Internal biblio identifier + item_id: + type: + - string + - "null" + description: Internal item identifier + date_created: + type: string + format: date-time + description: Date and time the hold was created +additionalProperties: false --- a/api/v1/swagger/definitions/club_hold_patron_hold.json +++ a/api/v1/swagger/definitions/club_hold_patron_hold.json @@ -1,31 +0,0 @@ -{ - "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" - }, - "error_code": { - "type": ["string", "null"], - "format": "date", - "description": "Code returned by CanItemBeReserved" - }, - "error_message": { - "type": ["string", "null"], - "description": "Generic error message" - } - }, - "additionalProperties": false -} --- a/api/v1/swagger/definitions/club_hold_patron_hold.yaml +++ a/api/v1/swagger/definitions/club_hold_patron_hold.yaml @@ -0,0 +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 + error_code: + type: + - string + - "null" + format: date + description: Code returned by CanItemBeReserved + error_message: + type: + - string + - "null" + description: Generic error message +additionalProperties: false --- a/api/v1/swagger/definitions/club_hold_patron_holds.json +++ a/api/v1/swagger/definitions/club_hold_patron_holds.json @@ -1,7 +0,0 @@ -{ - "type": "array", - "items": { - "$ref": "club_hold_patron_hold.json" - }, - "additionalProperties": false -} --- a/api/v1/swagger/definitions/club_hold_patron_holds.yaml +++ a/api/v1/swagger/definitions/club_hold_patron_holds.yaml @@ -0,0 +1,5 @@ +--- +type: array +items: + $ref: club_hold_patron_hold.yaml +additionalProperties: false --- a/api/v1/swagger/definitions/club_holds.json +++ a/api/v1/swagger/definitions/club_holds.json @@ -1,7 +0,0 @@ -{ - "type": "array", - "items": { - "$ref": "club_hold.json" - }, - "additionalProperties": false -} --- a/api/v1/swagger/definitions/club_holds.yaml +++ a/api/v1/swagger/definitions/club_holds.yaml @@ -0,0 +1,5 @@ +--- +type: array +items: + $ref: club_hold.yaml +additionalProperties: false --- a/api/v1/swagger/definitions/error.json +++ a/api/v1/swagger/definitions/error.json @@ -1,10 +0,0 @@ -{ - "type": "object", - "properties": { - "error": { - "description": "Error message", - "type": "string" - } - }, - "additionalProperties": true -} --- a/api/v1/swagger/definitions/error.yaml +++ a/api/v1/swagger/definitions/error.yaml @@ -0,0 +1,7 @@ +--- +type: object +properties: + error: + description: Error message + type: string +additionalProperties: true --- a/api/v1/swagger/definitions/fund.json +++ a/api/v1/swagger/definitions/fund.json @@ -1,105 +0,0 @@ -{ - "type": "object", - "properties": { - "fund_id": { - "$ref": "../x-primitives.json#/fund_id" - }, - "code": { - "type": [ - "string", - "null" - ], - "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": { - "type": [ - "number", - "null" - ], - "description": "Total amount for this fund" - }, - "warn_at_percentage": { - "type": [ - "number", - "null" - ], - "description": "Warning at percentage" - }, - "warn_at_amount": { - "type": [ - "number", - "null" - ], - "description": "Warning at amount" - }, - "notes": { - "type": [ - "string", - "null" - ], - "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": { - "type": [ "integer", "null" ], - "description": "Internal identifier for parent fund" - }, - "statistic1_auth_value_category": { - "type": [ - "string", - "null" - ], - "description": "Statistical category for this fund" - }, - "statistic2_auth_value_category": { - "type": [ - "string", - "null" - ], - "description": "Second statistical category for this fund" - } - }, - "additionalProperties": false, - "required": ["name"] -} --- a/api/v1/swagger/definitions/fund.yaml +++ a/api/v1/swagger/definitions/fund.yaml @@ -0,0 +1,79 @@ +--- +type: object +properties: + fund_id: + $ref: ../x-primitives.yaml#/fund_id + code: + type: + - string + - "null" + 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: + type: + - number + - "null" + description: Total amount for this fund + warn_at_percentage: + type: + - number + - "null" + description: Warning at percentage + warn_at_amount: + type: + - number + - "null" + description: Warning at amount + notes: + type: + - string + - "null" + 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: + type: + - integer + - "null" + description: Internal identifier for parent fund + statistic1_auth_value_category: + type: + - string + - "null" + description: Statistical category for this fund + statistic2_auth_value_category: + type: + - string + - "null" + description: Second statistical category for this fund +additionalProperties: false +required: + - name --- a/api/v1/swagger/definitions/hold.json +++ a/api/v1/swagger/definitions/hold.json @@ -1,96 +0,0 @@ -{ - "type": "object", - "properties": { - "hold_id": { - "type": "integer", - "description": "Internal hold identifier" - }, - "patron_id": { - "type": "integer", - "description": "Internal patron identifier" - }, - "hold_date": { - "type": ["string", "null"], - "format": "date", - "description": "The date the hold was placed" - }, - "biblio_id": { - "type": "integer", - "description": "Internal biblio identifier" - }, - "pickup_library_id": { - "type": ["string", "null"], - "description": "Internal library identifier for the pickup library" - }, - "desk_id": { - "type": ["integer", "null"], - "description": "The id of the desk" - }, - "cancellation_date": { - "type": ["string", "null"], - "format": "date", - "description": "The date the hold was cancelled" - }, - "cancellation_reason": { - "type": ["string", "null"], - "description": "The reason the hold was cancelled" - }, - "notes": { - "type": ["string", "null"], - "description": "Notes related to this hold" - }, - "priority": { - "type": ["integer", "null"], - "description": "Where in the queue the patron sits" - }, - "status": { - "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": { - "type": ["string", "null"], - "description": "Internal item identifier" - }, - "waiting_date": { - "type": ["string", "null"], - "format": "date", - "description": "The date the item was marked as waiting for the patron at the library" - }, - "expiration_date": { - "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" - }, - "suspended_until": { - "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": { - "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" - } - }, - "additionalProperties": false -} --- a/api/v1/swagger/definitions/hold.yaml +++ a/api/v1/swagger/definitions/hold.yaml @@ -0,0 +1,101 @@ +--- +type: object +properties: + hold_id: + type: integer + description: Internal hold identifier + patron_id: + type: integer + description: Internal patron identifier + hold_date: + type: + - string + - "null" + format: date + description: The date the hold was placed + biblio_id: + type: integer + description: Internal biblio identifier + pickup_library_id: + type: + - string + - "null" + description: Internal library identifier for the pickup library + desk_id: + type: + - integer + - "null" + description: The id of the desk + cancellation_date: + type: + - string + - "null" + format: date + description: The date the hold was cancelled + cancellation_reason: + type: + - string + - "null" + description: The reason the hold was cancelled + notes: + type: + - string + - "null" + description: Notes related to this hold + priority: + type: + - integer + - "null" + description: Where in the queue the patron sits + status: + 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: + type: + - string + - "null" + description: Internal item identifier + waiting_date: + type: + - string + - "null" + format: date + description: The date the item was marked as waiting for the patron at the library + expiration_date: + 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 + suspended_until: + 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: + 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 +additionalProperties: false --- a/api/v1/swagger/definitions/holds.json +++ a/api/v1/swagger/definitions/holds.json @@ -1,7 +0,0 @@ -{ - "type": "array", - "items": { - "$ref": "hold.json" - }, - "additionalProperties": false -} --- a/api/v1/swagger/definitions/holds.yaml +++ a/api/v1/swagger/definitions/holds.yaml @@ -0,0 +1,5 @@ +--- +type: array +items: + $ref: hold.yaml +additionalProperties: false --- a/api/v1/swagger/definitions/ill_backend.json +++ a/api/v1/swagger/definitions/ill_backend.json @@ -1,14 +0,0 @@ -{ - "type": "object", - "properties": { - "ill_backend_id": { - "type": "string", - "description": "Internal ILL backend identifier" - }, - "capabilities": { - "type": "object", - "description": "List of capabilities" - } - }, - "additionalProperties": false -} --- a/api/v1/swagger/definitions/ill_backend.yaml +++ a/api/v1/swagger/definitions/ill_backend.yaml @@ -0,0 +1,10 @@ +--- +type: object +properties: + ill_backend_id: + type: string + description: Internal ILL backend identifier + capabilities: + type: object + description: List of capabilities +additionalProperties: false --- a/api/v1/swagger/definitions/ill_backends.json +++ a/api/v1/swagger/definitions/ill_backends.json @@ -1,7 +0,0 @@ -{ - "type": "array", - "items": { - "$ref": "ill_backend.json" - }, - "additionalProperties": false -} --- a/api/v1/swagger/definitions/ill_backends.yaml +++ a/api/v1/swagger/definitions/ill_backends.yaml @@ -0,0 +1,5 @@ +--- +type: array +items: + $ref: ill_backend.yaml +additionalProperties: false --- a/api/v1/swagger/definitions/import_batch_profile.json +++ a/api/v1/swagger/definitions/import_batch_profile.json @@ -1,54 +0,0 @@ -{ - "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)", - "type": ["integer", "null"] - }, - "template_id": { - "description": "the id of the marc modification template", - "type": ["integer", "null"] - }, - "overlay_action": { - "description": "how to handle duplicate records", - "type": ["string", "null"] - }, - "nomatch_action": { - "description": "how to handle records where no match is found", - "type": ["string", "null"] - }, - "item_action": { - "description": "what to do with item records", - "type": ["string", "null"] - }, - "parse_items": { - "description": "should items be parsed", - "type": ["boolean", "null"] - }, - "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", - "type": ["string", "null"] - } - }, - "additionalProperties": false -} --- a/api/v1/swagger/definitions/import_batch_profile.yaml +++ a/api/v1/swagger/definitions/import_batch_profile.yaml @@ -0,0 +1,60 @@ +--- +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) + type: + - integer + - "null" + template_id: + description: the id of the marc modification template + type: + - integer + - "null" + overlay_action: + description: how to handle duplicate records + type: + - string + - "null" + nomatch_action: + description: how to handle records where no match is found + type: + - string + - "null" + item_action: + description: what to do with item records + type: + - string + - "null" + parse_items: + description: should items be parsed + type: + - boolean + - "null" + 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 + type: + - string + - "null" +additionalProperties: false --- a/api/v1/swagger/definitions/import_batch_profiles.json +++ a/api/v1/swagger/definitions/import_batch_profiles.json @@ -1,7 +0,0 @@ -{ - "type": "array", - "items": { - "$ref": "import_batch_profile.json" - }, - "additionalProperties": false -} --- a/api/v1/swagger/definitions/import_batch_profiles.yaml +++ a/api/v1/swagger/definitions/import_batch_profiles.yaml @@ -0,0 +1,5 @@ +--- +type: array +items: + $ref: import_batch_profile.yaml +additionalProperties: false --- a/api/v1/swagger/definitions/invoice.json +++ a/api/v1/swagger/definitions/invoice.json @@ -1,57 +0,0 @@ -{ - "type": "object", - "properties": { - "invoice_id": { - "type": "integer", - "description": "Internal identifier for the incoide. Generated on POST" - }, - "invoice_number": { - "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" - }, - "invoice_date": { - "type": [ - "string", - "null" - ], - "format": "date", - "description": "Date of billing" - }, - "closed": { - "type": "boolean", - "description": "If the invoice is closed" - }, - "close_date": { - "type": "string", - "format": "date", - "description": "Invoice close date (only when the invoice is closed)" - }, - "shipping_cost": { - "type": [ - "integer", - "null" - ], - "description": "Shipping cost" - }, - "shipping_cost_budget_id": { - "type": [ - "integer", - "null" - ], - "description": "Shipping cost linking to budget" - } - }, - "additionalProperties": false -} --- a/api/v1/swagger/definitions/invoice.yaml +++ a/api/v1/swagger/definitions/invoice.yaml @@ -0,0 +1,42 @@ +--- +type: object +properties: + invoice_id: + type: integer + description: Internal identifier for the incoide. Generated on POST + invoice_number: + 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 + invoice_date: + type: + - string + - "null" + format: date + description: Date of billing + closed: + type: boolean + description: If the invoice is closed + close_date: + type: string + format: date + description: Invoice close date (only when the invoice is closed) + shipping_cost: + type: + - integer + - "null" + description: Shipping cost + shipping_cost_budget_id: + type: + - integer + - "null" + description: Shipping cost linking to budget +additionalProperties: false --- a/api/v1/swagger/definitions/library.json +++ a/api/v1/swagger/definitions/library.json @@ -1,106 +0,0 @@ -{ - "type": "object", - "properties": { - "library_id": { - "$ref": "../x-primitives.json#/library_id" - }, - "name": { - "type": "string", - "description": "Printable name of library" - }, - "address1": { - "type": ["string", "null"], - "description": "the first address line of the library" - }, - "address2": { - "type": ["string", "null"], - "description": "the second address line of the library" - }, - "address3": { - "type": ["string", "null"], - "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": { - "type": ["string", "null"], - "description": "the county of the library" - }, - "phone": { - "type": ["string", "null"], - "description": "the primary phone of the library" - }, - "fax": { - "type": ["string", "null"], - "description": "the fax number of the library" - }, - "email": { - "type": ["string", "null"], - "description": "the primary email address of the library" - }, - "illemail": { - "type": ["string", "null"], - "description": "the ILL staff email address of the library" - }, - "reply_to_email": { - "type": ["string", "null"], - "description": "the email to be used as a Reply-To" - }, - "return_path_email": { - "type": ["string", "null"], - "description": "the email to be used as Return-Path" - }, - "url": { - "type": ["string", "null"], - "description": "the URL for your library or branch's website" - }, - "ip": { - "type": ["string", "null"], - "description": "the IP address for your library or branch" - }, - "notes": { - "type": ["string", "null"], - "description": "notes related to your library or branch" - }, - "opac_info": { - "type": ["string", "null"], - "description": "HTML that displays in OPAC" - }, - "geolocation": { - "type": ["string", "null"], - "description": "geolocation of your library" - }, - "marc_org_code": { - "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": { - "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" - } - }, - "additionalProperties": false, - "required": ["library_id", "name"] -} --- a/api/v1/swagger/definitions/library.yaml +++ a/api/v1/swagger/definitions/library.yaml @@ -0,0 +1,123 @@ +--- +type: object +properties: + library_id: + $ref: ../x-primitives.yaml#/library_id + name: + type: string + description: Printable name of library + address1: + type: + - string + - "null" + description: the first address line of the library + address2: + type: + - string + - "null" + description: the second address line of the library + address3: + type: + - string + - "null" + 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: + type: + - string + - "null" + description: the county of the library + phone: + type: + - string + - "null" + description: the primary phone of the library + fax: + type: + - string + - "null" + description: the fax number of the library + email: + type: + - string + - "null" + description: the primary email address of the library + illemail: + type: + - string + - "null" + description: the ILL staff email address of the library + reply_to_email: + type: + - string + - "null" + description: the email to be used as a Reply-To + return_path_email: + type: + - string + - "null" + description: the email to be used as Return-Path + url: + type: + - string + - "null" + description: the URL for your library or branch's website + ip: + type: + - string + - "null" + description: the IP address for your library or branch + notes: + type: + - string + - "null" + description: notes related to your library or branch + opac_info: + type: + - string + - "null" + description: HTML that displays in OPAC + geolocation: + type: + - string + - "null" + description: geolocation of your library + marc_org_code: + 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: + 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 +additionalProperties: false +required: + - library_id + - name --- a/api/v1/swagger/definitions/order.json +++ a/api/v1/swagger/definitions/order.json @@ -1,335 +0,0 @@ -{ - "type": "object", - "properties": { - "order_id": { - "type": "integer", - "description": "Internally assigned order identifier" - }, - "biblio_id": { - "type": [ - "integer", - "null" - ], - "description": "Identifier for the linked bibliographic record" - }, - "created_by": { - "type": [ - "integer", - "null" - ], - "description": "Interal patron identifier of the order line creator" - }, - "entry_date": { - "type": [ - "string", - "null" - ], - "format": "date", - "description": "Date the bib was added to the basket" - }, - "quantity": { - "type": [ - "integer", - "null" - ], - "description": "Ordered quantity" - }, - "currency": { - "type": [ - "string", - "null" - ], - "description": "Currency used for the purchase" - }, - "list_price": { - "type": [ - "number", - "null" - ], - "description": "Vendor price for the line item" - }, - "replacement_price": { - "type": [ - "number", - "null" - ], - "description": "Replacement cost for this item" - }, - "date_received": { - "type": [ - "string", - "null" - ], - "format": "date", - "description": "Date the order was received" - }, - "invoice_id": { - "type": [ - "integer", - "null" - ], - "description": "Id of the order invoice" - }, - "shipping_cost": { - "type": [ - "number", - "null" - ], - "description": "Shipping cost" - }, - "unit_price": { - "type": [ - "number", - "null" - ], - "description": "The actual cost entered when receiving this line item" - }, - "unit_price_tax_excluded": { - "type": [ - "number", - "null" - ], - "description": "Unit price excluding tax (on receiving)" - }, - "unit_price_tax_included": { - "type": [ - "number", - "null" - ], - "description": "Unit price including tax (on receiving)" - }, - "quantity_received": { - "type": "integer", - "description": "Quantity received so far" - }, - "cancellation_date": { - "type": [ - "string", - "null" - ], - "format": "date", - "description": "Date the line item was deleted" - }, - "cancellation_reason": { - "type": [ - "string", - "null" - ], - "description": "Reason of cancellation" - }, - "internal_note": { - "type": [ - "string", - "null" - ], - "description": "Notes related to this order line, made for staff" - }, - "vendor_note": { - "type": [ - "string", - "null" - ], - "description": "Notes related to this order line, made for vendor" - }, - "basket_id": { - "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": { - "type": [ - "number", - "null" - ], - "description": "Replacement cost for this item (tax included)" - }, - "ecost": { - "type": [ - "number", - "null" - ], - "description": "Effective cost" - }, - "ecost_tax_excluded": { - "type": [ - "number", - "null" - ], - "description": "Effective cost (tax excluded)" - }, - "ecost_tax_included": { - "type": [ - "number", - "null" - ], - "description": "Effective cost (tax included)" - }, - "tax_rate_on_ordering": { - "type": [ - "number", - "null" - ], - "description": "Tax rate on ordering (%)" - }, - "tax_rate_on_receiving": { - "type": [ - "number", - "null" - ], - "description": "Tax rate on receiving (%)" - }, - "tax_value_on_ordering": { - "type": [ - "number", - "null" - ], - "description": "Tax value on ordering" - }, - "tax_value_on_receiving": { - "type": [ - "number", - "null" - ], - "description": "Tax value on receiving" - }, - "discount_rate": { - "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": { - "type": [ - "string", - "null" - ], - "description": "Statistical category for this order" - }, - "statistics_2_authcat": { - "type": [ - "string", - "null" - ], - "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": { - "type": "string", - "enum": [ - "new", - "ordered", - "partial", - "complete", - "cancelled" - ], - "description": "The current order status" - }, - "basket": { - "type": [ - "object", - "null" - ] - }, - "biblio": { - "type": [ - "object", - "null" - ] - }, - "current_item_level_holds_count": { - "type": "integer", - "description": "Current holds count for associated items" - }, - "fund": { - "type": [ - "object", - "null" - ] - }, - "invoice": { - "type": [ - "object", - "null" - ] - }, - "items": { - "type": "array" - }, - "subscription": { - "type": [ - "object", - "null" - ] - } - }, - "additionalProperties": false -} --- a/api/v1/swagger/definitions/order.yaml +++ a/api/v1/swagger/definitions/order.yaml @@ -0,0 +1,241 @@ +--- +type: object +properties: + order_id: + type: integer + description: Internally assigned order identifier + biblio_id: + type: + - integer + - "null" + description: Identifier for the linked bibliographic record + created_by: + type: + - integer + - "null" + description: Interal patron identifier of the order line creator + entry_date: + type: + - string + - "null" + format: date + description: Date the bib was added to the basket + quantity: + type: + - integer + - "null" + description: Ordered quantity + currency: + type: + - string + - "null" + description: Currency used for the purchase + list_price: + type: + - number + - "null" + description: Vendor price for the line item + replacement_price: + type: + - number + - "null" + description: Replacement cost for this item + date_received: + type: + - string + - "null" + format: date + description: Date the order was received + invoice_id: + type: + - integer + - "null" + description: Id of the order invoice + shipping_cost: + type: + - number + - "null" + description: Shipping cost + unit_price: + type: + - number + - "null" + description: The actual cost entered when receiving this line item + unit_price_tax_excluded: + type: + - number + - "null" + description: Unit price excluding tax (on receiving) + unit_price_tax_included: + type: + - number + - "null" + description: Unit price including tax (on receiving) + quantity_received: + type: integer + description: Quantity received so far + cancellation_date: + type: + - string + - "null" + format: date + description: Date the line item was deleted + cancellation_reason: + type: + - string + - "null" + description: Reason of cancellation + internal_note: + type: + - string + - "null" + description: Notes related to this order line, made for staff + vendor_note: + type: + - string + - "null" + description: Notes related to this order line, made for vendor + basket_id: + 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: + type: + - number + - "null" + description: Replacement cost for this item (tax included) + ecost: + type: + - number + - "null" + description: Effective cost + ecost_tax_excluded: + type: + - number + - "null" + description: Effective cost (tax excluded) + ecost_tax_included: + type: + - number + - "null" + description: Effective cost (tax included) + tax_rate_on_ordering: + type: + - number + - "null" + description: Tax rate on ordering (%) + tax_rate_on_receiving: + type: + - number + - "null" + description: Tax rate on receiving (%) + tax_value_on_ordering: + type: + - number + - "null" + description: Tax value on ordering + tax_value_on_receiving: + type: + - number + - "null" + description: Tax value on receiving + discount_rate: + 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: + type: + - string + - "null" + description: Statistical category for this order + statistics_2_authcat: + type: + - string + - "null" + 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: + type: string + enum: + - new + - ordered + - partial + - complete + - cancelled + description: The current order status + basket: + type: + - object + - "null" + biblio: + type: + - object + - "null" + current_item_level_holds_count: + type: integer + description: Current holds count for associated items + fund: + type: + - object + - "null" + invoice: + type: + - object + - "null" + items: + type: array + subscription: + type: + - object + - "null" +additionalProperties: false --- a/api/v1/swagger/definitions/patron.json +++ a/api/v1/swagger/definitions/patron.json @@ -1,296 +0,0 @@ -{ - "type": "object", - "properties": { - "patron_id": { - "$ref": "../x-primitives.json#/patron_id" - }, - "cardnumber": { - "$ref": "../x-primitives.json#/cardnumber" - }, - "surname": { - "$ref": "../x-primitives.json#/surname" - }, - "firstname": { - "$ref": "../x-primitives.json#/firstname" - }, - "title": { - "type": ["string", "null"], - "description": "patron's title" - }, - "other_name": { - "type": ["string", "null"], - "description": "any other names associated with the patron" - }, - "initials": { - "type": ["string", "null"], - "description": "initials of the patron" - }, - "street_number": { - "type": ["string", "null"], - "description": "street number of patron's primary address" - }, - "street_type": { - "type": ["string", "null"], - "description": "street type of patron's primary address" - }, - "address": { - "type": ["string", "null"], - "description": "first address line of patron's primary address" - }, - "address2": { - "type": ["string", "null"], - "description": "second address line of patron's primary address" - }, - "city": { - "type": ["string", "null"], - "description": "city or town of patron's primary address" - }, - "state": { - "type": ["string", "null"], - "description": "state or province of patron's primary address" - }, - "postal_code": { - "type": ["string", "null"], - "description": "zip or postal code of patron's primary address" - }, - "country": { - "type": ["string", "null"], - "description": "country of patron's primary address" - }, - "email": { - "$ref": "../x-primitives.json#/email" - }, - "phone": { - "$ref": "../x-primitives.json#/phone" - }, - "mobile": { - "type": ["string", "null"], - "description": "the other phone number for patron's primary address" - }, - "fax": { - "type": ["string", "null"], - "description": "fax number for patron's primary address" - }, - "secondary_email": { - "type": ["string", "null"], - "description": "secondary email address for patron's primary address" - }, - "secondary_phone": { - "type": ["string", "null"], - "description": "secondary phone number for patron's primary address" - }, - "altaddress_street_number": { - "type": ["string", "null"], - "description": "street number of patron's alternate address" - }, - "altaddress_street_type": { - "type": ["string", "null"], - "description": "street type of patron's alternate address" - }, - "altaddress_address": { - "type": ["string", "null"], - "description": "first address line of patron's alternate address" - }, - "altaddress_address2": { - "type": ["string", "null"], - "description": "second address line of patron's alternate address" - }, - "altaddress_city": { - "type": ["string", "null"], - "description": "city or town of patron's alternate address" - }, - "altaddress_state": { - "type": ["string", "null"], - "description": "state or province of patron's alternate address" - }, - "altaddress_postal_code": { - "type": ["string", "null"], - "description": "zip or postal code of patron's alternate address" - }, - "altaddress_country": { - "type": ["string", "null"], - "description": "country of patron's alternate address" - }, - "altaddress_email": { - "type": ["string", "null"], - "description": "email address for patron's alternate address" - }, - "altaddress_phone": { - "type": ["string", "null"], - "description": "phone number for patron's alternate address" - }, - "date_of_birth": { - "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": { - "type": ["string", "null"], - "format": "date", - "description": "date the patron was added to Koha" - }, - "expiry_date": { - "type": ["string", "null"], - "format": "date", - "description": "date the patron's card is set to expire" - }, - "date_renewed": { - "type": ["string", "null"], - "format": "date", - "description": "date the patron's card was last renewed" - }, - "incorrect_address": { - "type": ["boolean", "null"], - "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": { - "type": ["string", "null"], - "description": "a note on the patron's account" - }, - "relationship_type": { - "type": ["string", "null"], - "description": "used for children to include the relationship to their guarantor" - }, - "gender": { - "type": ["string", "null"], - "description": "patron's gender" - }, - "userid": { - "type": ["string", "null"], - "description": "patron's login" - }, - "opac_notes": { - "type": ["string", "null"], - "description": "a note on the patron's account visible in OPAC and staff interface" - }, - "altaddress_notes": { - "type": ["string", "null"], - "description": "a note related to patron's alternate address" - }, - "statistics_1": { - "type": ["string", "null"], - "description": "a field that can be used for any information unique to the library" - }, - "statistics_2": { - "type": ["string", "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": { - "type": ["string", "null"], - "description": "first name of alternate contact for the patron" - }, - "altcontact_surname": { - "type": ["string", "null"], - "description": "surname or last name of the alternate contact for the patron" - }, - "altcontact_address": { - "type": ["string", "null"], - "description": "the first address line for the alternate contact for the patron" - }, - "altcontact_address2": { - "type": ["string", "null"], - "description": "the second address line for the alternate contact for the patron" - }, - "altcontact_city": { - "type": ["string", "null"], - "description": "the city for the alternate contact for the patron" - }, - "altcontact_state": { - "type": ["string", "null"], - "description": "the state for the alternate contact for the patron" - }, - "altcontact_postal_code": { - "type": ["string", "null"], - "description": "the zipcode for the alternate contact for the patron" - }, - "altcontact_country": { - "type": ["string", "null"], - "description": "the country for the alternate contact for the patron" - }, - "altcontact_phone": { - "type": ["string", "null"], - "description": "the phone number for the alternate contact for the patron" - }, - "sms_number": { - "type": ["string", "null"], - "description": "the mobile phone number where the patron would like to receive notices (if SMS turned on)" - }, - "sms_provider_id": { - "type": ["integer", "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": { - "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": { - "type": ["integer", "null"], - "description": "number of failed login attemps" - }, - "overdrive_auth_token": { - "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.json" - } - } - }, - "additionalProperties": false, - "required": ["surname", "address", "city", "library_id", "category_id"] -} --- a/api/v1/swagger/definitions/patron.yaml +++ a/api/v1/swagger/definitions/patron.yaml @@ -0,0 +1,337 @@ +--- +type: object +properties: + patron_id: + $ref: ../x-primitives.yaml#/patron_id + cardnumber: + $ref: ../x-primitives.yaml#/cardnumber + surname: + $ref: ../x-primitives.yaml#/surname + firstname: + $ref: ../x-primitives.yaml#/firstname + title: + type: + - string + - "null" + description: patron's title + other_name: + type: + - string + - "null" + description: any other names associated with the patron + initials: + type: + - string + - "null" + description: initials of the patron + street_number: + type: + - string + - "null" + description: street number of patron's primary address + street_type: + type: + - string + - "null" + description: street type of patron's primary address + address: + type: + - string + - "null" + description: first address line of patron's primary address + address2: + type: + - string + - "null" + description: second address line of patron's primary address + city: + type: + - string + - "null" + description: city or town of patron's primary address + state: + type: + - string + - "null" + description: state or province of patron's primary address + postal_code: + type: + - string + - "null" + description: zip or postal code of patron's primary address + country: + type: + - string + - "null" + description: country of patron's primary address + email: + $ref: ../x-primitives.yaml#/email + phone: + $ref: ../x-primitives.yaml#/phone + mobile: + type: + - string + - "null" + description: the other phone number for patron's primary address + fax: + type: + - string + - "null" + description: fax number for patron's primary address + secondary_email: + type: + - string + - "null" + description: secondary email address for patron's primary address + secondary_phone: + type: + - string + - "null" + description: secondary phone number for patron's primary address + altaddress_street_number: + type: + - string + - "null" + description: street number of patron's alternate address + altaddress_street_type: + type: + - string + - "null" + description: street type of patron's alternate address + altaddress_address: + type: + - string + - "null" + description: first address line of patron's alternate address + altaddress_address2: + type: + - string + - "null" + description: second address line of patron's alternate address + altaddress_city: + type: + - string + - "null" + description: city or town of patron's alternate address + altaddress_state: + type: + - string + - "null" + description: state or province of patron's alternate address + altaddress_postal_code: + type: + - string + - "null" + description: zip or postal code of patron's alternate address + altaddress_country: + type: + - string + - "null" + description: country of patron's alternate address + altaddress_email: + type: + - string + - "null" + description: email address for patron's alternate address + altaddress_phone: + type: + - string + - "null" + description: phone number for patron's alternate address + date_of_birth: + 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: + type: + - string + - "null" + format: date + description: date the patron was added to Koha + expiry_date: + type: + - string + - "null" + format: date + description: date the patron's card is set to expire + date_renewed: + type: + - string + - "null" + format: date + description: date the patron's card was last renewed + incorrect_address: + type: + - boolean + - "null" + 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: + type: + - string + - "null" + description: a note on the patron's account + relationship_type: + type: + - string + - "null" + description: used for children to include the relationship to their guarantor + gender: + type: + - string + - "null" + description: patron's gender + userid: + type: + - string + - "null" + description: patron's login + opac_notes: + type: + - string + - "null" + description: a note on the patron's account visible in OPAC and staff interface + altaddress_notes: + type: + - string + - "null" + description: a note related to patron's alternate address + statistics_1: + type: + - string + - "null" + description: a field that can be used for any information unique to the library + statistics_2: + type: + - string + - "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: + type: + - string + - "null" + description: first name of alternate contact for the patron + altcontact_surname: + type: + - string + - "null" + description: surname or last name of the alternate contact for the patron + altcontact_address: + type: + - string + - "null" + description: the first address line for the alternate contact for the patron + altcontact_address2: + type: + - string + - "null" + description: the second address line for the alternate contact for the patron + altcontact_city: + type: + - string + - "null" + description: the city for the alternate contact for the patron + altcontact_state: + type: + - string + - "null" + description: the state for the alternate contact for the patron + altcontact_postal_code: + type: + - string + - "null" + description: the zipcode for the alternate contact for the patron + altcontact_country: + type: + - string + - "null" + description: the country for the alternate contact for the patron + altcontact_phone: + type: + - string + - "null" + description: the phone number for the alternate contact for the patron + sms_number: + type: + - string + - "null" + description: the mobile phone number where the patron would like to receive notices (if + SMS turned on) + sms_provider_id: + type: + - integer + - "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: + 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: + type: + - integer + - "null" + description: number of failed login attemps + overdrive_auth_token: + 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 +additionalProperties: false +required: + - surname + - address + - city + - library_id + - category_id --- a/api/v1/swagger/definitions/patron_account_credit.json +++ a/api/v1/swagger/definitions/patron_account_credit.json @@ -1,44 +0,0 @@ -{ - "type": "object", - "properties": { - "credit_type": { - "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": { - "type": "array", - "items": { - "type": "integer" - }, - "description": "List of account line ids the credit goes against (optional)" - }, - "payment_type": { - "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" - }, - "note": { - "type": "string", - "description": "Internal note" - } - }, - "required": [ "amount" ], - "additionalProperties": false -} --- a/api/v1/swagger/definitions/patron_account_credit.yaml +++ a/api/v1/swagger/definitions/patron_account_credit.yaml @@ -0,0 +1,36 @@ +--- +type: object +properties: + credit_type: + 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: + type: array + items: + type: integer + description: List of account line ids the credit goes against (optional) + payment_type: + 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 + note: + type: string + description: Internal note +required: + - amount +additionalProperties: false --- a/api/v1/swagger/definitions/patron_balance.json +++ a/api/v1/swagger/definitions/patron_balance.json @@ -1,40 +0,0 @@ -{ - "type": "object", - "properties": { - "balance": { - "type": "number", - "description": "Signed decimal number" - }, - "outstanding_credits": { - "properties": { - "total": { - "type": "number" - }, - "lines": { - "type": "array", - "items": { - "$ref": "account_line.json" - } - } - } - }, - "outstanding_debits": { - "type": "object", - "properties": { - "total": { - "type": "number" - }, - "lines": { - "type": "array", - "items": { - "$ref": "account_line.json" - } - } - } - } - }, - "additionalProperties": false, - "required": [ - "balance" - ] -} --- a/api/v1/swagger/definitions/patron_balance.yaml +++ a/api/v1/swagger/definitions/patron_balance.yaml @@ -0,0 +1,26 @@ +--- +type: object +properties: + balance: + type: number + description: Signed decimal number + outstanding_credits: + properties: + total: + type: number + lines: + type: array + items: + $ref: account_line.yaml + outstanding_debits: + type: object + properties: + total: + type: number + lines: + type: array + items: + $ref: account_line.yaml +additionalProperties: false +required: + - balance --- a/api/v1/swagger/definitions/patron_extended_attribute.json +++ a/api/v1/swagger/definitions/patron_extended_attribute.json @@ -1,24 +0,0 @@ -{ - "type": "object", - "properties": { - "extended_attribute_id": { - "description": "Internal ID for the extended attribute", - "type": "integer" - }, - "type": { - "description": "Extended attribute type", - "type": "string" - }, - "value": { - "description": "Extended attribute value", - "type": [ - "string" - ] - } - }, - "additionalProperties": false, - "required": [ - "type", - "value" - ] -} --- a/api/v1/swagger/definitions/patron_extended_attribute.yaml +++ a/api/v1/swagger/definitions/patron_extended_attribute.yaml @@ -0,0 +1,17 @@ +--- +type: object +properties: + extended_attribute_id: + description: Internal ID for the extended attribute + type: integer + type: + description: Extended attribute type + type: string + value: + description: Extended attribute value + type: + - string +additionalProperties: false +required: + - type + - value --- a/api/v1/swagger/definitions/quote.json +++ a/api/v1/swagger/definitions/quote.json @@ -1,22 +0,0 @@ -{ - "type": "object", - "properties": { - "quote_id": { - "$ref": "../x-primitives.json#/quote_id" - }, - "source": { - "description": "source of the quote", - "type": "string" - }, - "text": { - "description": "text", - "type": ["string", "null"] - }, - "displayed_on": { - "description": "Last display date", - "type": ["string", "null"] - } - }, - "additionalProperties": false, - "required": ["quote_id", "source", "text"] -} --- a/api/v1/swagger/definitions/quote.yaml +++ a/api/v1/swagger/definitions/quote.yaml @@ -0,0 +1,23 @@ +--- +type: object +properties: + quote_id: + $ref: ../x-primitives.yaml#/quote_id + source: + description: source of the quote + type: string + text: + description: text + type: + - string + - "null" + displayed_on: + description: Last display date + type: + - string + - "null" +additionalProperties: false +required: + - quote_id + - source + - text --- a/api/v1/swagger/definitions/return_claim.json +++ a/api/v1/swagger/definitions/return_claim.json @@ -1,94 +0,0 @@ -{ - "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": { - "type": [ - "integer", - "null" - ], - "description": "internal identifier of the claimed checkout if not longer checked out" - }, - "patron_id": { - "$ref": "../x-primitives.json#/patron_id" - }, - "notes": { - "type": [ - "string", - "null" - ], - "description": "notes about this claim" - }, - "created_on": { - "type": [ - "string", - "null" - ], - "format": "date-time", - "description": "date of claim creation" - }, - "created_by": { - "type": [ - "integer", - "null" - ], - "description": "patron id of librarian who made the claim" - }, - "updated_on": { - "type": [ - "string", - "null" - ], - "format": "date-time", - "description": "date the claim was last updated" - }, - "updated_by": { - "type": [ - "integer", - "null" - ], - "description": "patron id of librarian who last updated the claim" - }, - "resolution": { - "type": [ - "string", - "null" - ], - "description": "code of resolution type for this claim" - }, - "resolved_on": { - "type": [ - "string", - "null" - ], - "format": "date-time", - "description": "date the claim was resolved" - }, - "resolved_by": { - "type": [ - "integer", - "null" - ], - "description": "patron id of librarian who resolved this claim" - } - }, - "additionalProperties": false -} --- a/api/v1/swagger/definitions/return_claim.yaml +++ a/api/v1/swagger/definitions/return_claim.yaml @@ -0,0 +1,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: + type: + - integer + - "null" + description: internal identifier of the claimed checkout if not longer checked out + patron_id: + $ref: ../x-primitives.yaml#/patron_id + notes: + type: + - string + - "null" + description: notes about this claim + created_on: + type: + - string + - "null" + format: date-time + description: date of claim creation + created_by: + type: + - integer + - "null" + description: patron id of librarian who made the claim + updated_on: + type: + - string + - "null" + format: date-time + description: date the claim was last updated + updated_by: + type: + - integer + - "null" + description: patron id of librarian who last updated the claim + resolution: + type: + - string + - "null" + description: code of resolution type for this claim + resolved_on: + type: + - string + - "null" + format: date-time + description: date the claim was resolved + resolved_by: + type: + - integer + - "null" + description: patron id of librarian who resolved this claim +additionalProperties: false --- a/api/v1/swagger/definitions/smtp_server.json +++ a/api/v1/swagger/definitions/smtp_server.json @@ -1,57 +0,0 @@ -{ - "type": "object", - "properties": { - "smtp_server_id": { - "type": "integer", - "description": "Internal SMTP server identifier", - "readOnly": true - }, - "name": { - "type": "string", - "description": "Name of the SMTP server" - }, - "host": { - "type": "string", - "description": "SMTP host name" - }, - "port": { - "type": "integer", - "description": "TCP port number" - }, - "timeout": { - "type": "integer", - "description": "Maximum time in seconds to wait for server" - }, - "ssl_mode": { - "type": "string", - "enum": [ - "disabled", - "ssl", - "starttls" - ], - "description": "If SSL/TLS will be used" - }, - "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" - ] -} --- a/api/v1/swagger/definitions/smtp_server.yaml +++ a/api/v1/swagger/definitions/smtp_server.yaml @@ -0,0 +1,42 @@ +--- +type: object +properties: + smtp_server_id: + type: integer + description: Internal SMTP server identifier + readOnly: true + name: + type: string + description: Name of the SMTP server + host: + type: string + description: SMTP host name + port: + type: integer + description: TCP port number + timeout: + type: integer + description: Maximum time in seconds to wait for server + ssl_mode: + type: string + enum: + - disabled + - ssl + - starttls + description: If SSL/TLS will be used + 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 --- a/api/v1/swagger/definitions/transfer_limit.json +++ a/api/v1/swagger/definitions/transfer_limit.json @@ -1,27 +0,0 @@ -{ - "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": { - "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, - "required": ["to_library_id", "from_library_id"] -} --- a/api/v1/swagger/definitions/transfer_limit.yaml +++ a/api/v1/swagger/definitions/transfer_limit.yaml @@ -0,0 +1,26 @@ +--- +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: + 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 +required: + - to_library_id + - from_library_id --- a/api/v1/swagger/definitions/vendor.json +++ a/api/v1/swagger/definitions/vendor.json @@ -1,149 +0,0 @@ -{ - "type": "object", - "properties": { - "id": { - "$ref": "../x-primitives.json#/vendor_id" - }, - "name": { - "type": [ - "string" - ], - "description": "Vendor name" - }, - "address1": { - "type": [ - "string", - "null" - ], - "description": "Vendor physical address (line 1)" - }, - "address2": { - "type": [ - "string", - "null" - ], - "description": "Vendor physical address (line 2)" - }, - "address3": { - "type": [ - "string", - "null" - ], - "description": "Vendor physical address (line 3)" - }, - "address4": { - "type": [ - "string", - "null" - ], - "description": "Vendor physical address (line 4)" - }, - "phone": { - "type": [ - "string", - "null" - ], - "description": "Vendor phone number" - }, - "fax": { - "type": [ - "string", - "null" - ], - "description": "Vendor fax number" - }, - "accountnumber": { - "type": [ - "string", - "null" - ], - "description": "Vendor account number" - }, - "notes": { - "type": [ - "string", - "null" - ], - "description": "Vendor notes" - }, - "postal": { - "type": [ - "string", - "null" - ], - "description": "Vendor postal address" - }, - "url": { - "type": [ - "string", - "null" - ], - "description": "Vendor web address" - }, - "active": { - "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": { - "type": [ - "boolean", - "null" - ], - "description": "Is the library taxed when buying from this vendor" - }, - "list_includes_gst": { - "type": [ - "boolean", - "null" - ], - "description": "List prices include taxes" - }, - "invoice_includes_gst": { - "type": [ - "boolean", - "null" - ], - "description": "Invoice prices include taxes" - }, - "tax_rate": { - "type": [ - "number", - "null" - ], - "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": { - "type": [ - "integer", - "null" - ], - "description": "Expected delivery time (in days)" - } - }, - "additionalProperties": false, - "required": ["name"] -} --- a/api/v1/swagger/definitions/vendor.yaml +++ a/api/v1/swagger/definitions/vendor.yaml @@ -0,0 +1,107 @@ +--- +type: object +properties: + id: + $ref: ../x-primitives.yaml#/vendor_id + name: + type: + - string + description: Vendor name + address1: + type: + - string + - "null" + description: Vendor physical address (line 1) + address2: + type: + - string + - "null" + description: Vendor physical address (line 2) + address3: + type: + - string + - "null" + description: Vendor physical address (line 3) + address4: + type: + - string + - "null" + description: Vendor physical address (line 4) + phone: + type: + - string + - "null" + description: Vendor phone number + fax: + type: + - string + - "null" + description: Vendor fax number + accountnumber: + type: + - string + - "null" + description: Vendor account number + notes: + type: + - string + - "null" + description: Vendor notes + postal: + type: + - string + - "null" + description: Vendor postal address + url: + type: + - string + - "null" + description: Vendor web address + active: + 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: + type: + - boolean + - "null" + description: Is the library taxed when buying from this vendor + list_includes_gst: + type: + - boolean + - "null" + description: List prices include taxes + invoice_includes_gst: + type: + - boolean + - "null" + description: Invoice prices include taxes + tax_rate: + type: + - number + - "null" + 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: + type: + - integer + - "null" + description: Expected delivery time (in days) +additionalProperties: false +required: + - name --- a/api/v1/swagger/parameters.json +++ a/api/v1/swagger/parameters.json @@ -1,126 +0,0 @@ -{ - "biblio_id_pp": { - "$ref": "parameters/biblio.json#/biblio_id_pp" - }, - "advancededitormacro_id_pp": { - "$ref": "parameters/advancededitormacro.json#/advancededitormacro_id_pp" - }, - "patron_id_pp": { - "$ref": "parameters/patron.json#/patron_id_pp" - }, - "transfer_limit_id_pp": { - "$ref": "parameters/transfer_limit.json#/transfer_limit_id_pp" - }, - "patron_id_qp": { - "$ref": "parameters/patron.json#/patron_id_qp" - }, - "import_batch_profile_id_pp": { - "$ref": "parameters/import_batch_profile.json#/import_batch_profile_id_pp" - }, - "city_id_pp": { - "$ref": "parameters/city.json#/city_id_pp" - }, - "hold_id_pp": { - "$ref": "parameters/hold.json#/hold_id_pp" - }, - "club_id_pp": { - "$ref": "parameters/club.json#/club_id_pp" - }, - "library_id_pp": { - "$ref": "parameters/library.json#/library_id_pp" - }, - "item_id_pp": { - "$ref": "parameters/item.json#/item_id_pp" - }, - "order_id_pp": { - "$ref": "parameters/order.json#/order_id_pp" - }, - "quote_id_pp": { - "$ref": "parameters/quote.json#/quote_id_pp" - }, - "smtp_server_id_pp": { - "$ref": "parameters/smtp_server.json#/smtp_server_id_pp" - }, - "vendoridPathParam": { - "$ref": "parameters/vendor.json#/vendoridPathParam" - }, - "checkout_id_pp": { - "$ref": "parameters/checkout.json#/checkout_id_pp" - }, - "seen_pp": { - "$ref": "parameters/checkout.json#/seen_pp" - }, - "cash_register_id_pp": { - "$ref": "parameters/cash_register.json#/cash_register_id_pp" - }, - "cashup_id_pp": { - "$ref": "parameters/cashup.json#/cashup_id_pp" - }, - "match": { - "name": "_match", - "in": "query", - "required": false, - "description": "Matching criteria", - "type": "string", - "enum": [ - "contains", - "exact", - "starts_with", - "ends_with" - ] - }, - "order_by": { - "name": "_order_by", - "in": "query", - "required": false, - "description": "Sorting criteria", - "type": "array", - "collectionFormat": "csv", - "items": { - "type": "string" - } - }, - "page": { - "name": "_page", - "in": "query", - "required": false, - "description": "Page number, for paginated object listing", - "type": "integer" - }, - "per_page": { - "name": "_per_page", - "in": "query", - "required": false, - "description": "Page size, for paginated object listing", - "type": "integer" - }, - "q_body": { - "name": "query", - "in": "body", - "required": false, - "description": "Query filter sent through request's body", - "schema": { - "type": ["object", "array"] - } - }, - "q_param": { - "name": "q", - "in": "query", - "required": false, - "description": "Query filter sent as a request parameter", - "type": "string" - }, - "q_header": { - "name": "x-koha-query", - "in": "header", - "required": false, - "description": "Query filter sent as a request header", - "type": "string" - }, - "fundidPathParam": { - "$ref": "parameters/fund.json#/fundidPathParam" - }, - "suggestion_id_pp": { - "$ref": "parameters/suggestion.json#/suggestion_id_pp" - } -} --- a/api/v1/swagger/parameters.yaml +++ a/api/v1/swagger/parameters.yaml @@ -0,0 +1,96 @@ +--- +advancededitormacro_id_pp: + $ref: parameters/advancededitormacro.yaml#/advancededitormacro_id_pp +biblio_id_pp: + $ref: parameters/biblio.yaml#/biblio_id_pp +cash_register_id_pp: + $ref: parameters/cash_register.yaml#/cash_register_id_pp +cashup_id_pp: + $ref: parameters/cashup.yaml#/cashup_id_pp +checkout_id_pp: + $ref: parameters/checkout.yaml#/checkout_id_pp +city_id_pp: + $ref: parameters/city.yaml#/city_id_pp +club_id_pp: + $ref: parameters/club.yaml#/club_id_pp +fundidPathParam: + $ref: parameters/fund.yaml#/fundidPathParam +hold_id_pp: + $ref: parameters/hold.yaml#/hold_id_pp +import_batch_profile_id_pp: + $ref: parameters/import_batch_profile.yaml#/import_batch_profile_id_pp +item_id_pp: + $ref: parameters/item.yaml#/item_id_pp +library_id_pp: + $ref: parameters/library.yaml#/library_id_pp +match: + name: _match + in: query + required: false + description: Matching criteria + type: string + enum: + - contains + - exact + - starts_with + - ends_with +order_by: + name: _order_by + in: query + required: false + description: Sorting criteria + type: array + collectionFormat: csv + items: + type: string +order_id_pp: + $ref: parameters/order.yaml#/order_id_pp +page: + name: _page + in: query + required: false + description: Page number, for paginated object listing + type: integer +patron_id_pp: + $ref: parameters/patron.yaml#/patron_id_pp +patron_id_qp: + $ref: parameters/patron.yaml#/patron_id_qp +per_page: + name: _per_page + in: query + required: false + description: Page size, for paginated object listing + type: integer +q_body: + name: query + in: body + required: false + description: Query filter sent through request's body + schema: + type: + - object + - array +q_param: + name: q + in: query + required: false + description: Query filter sent as a request parameter + type: string +q_header: + name: x-koha-query + in: header + required: false + description: Query filter sent as a request header + type: string +quote_id_pp: + $ref: parameters/quote.yaml#/quote_id_pp +seen_pp: + $ref: parameters/checkout.yaml#/seen_pp +smtp_server_id_pp: + $ref: parameters/smtp_server.yaml#/smtp_server_id_pp +suggestion_id_pp: + $ref: parameters/suggestion.yaml#/suggestion_id_pp +transfer_limit_id_pp: + $ref: parameters/transfer_limit.yaml#/transfer_limit_id_pp +vendoridPathParam: + $ref: parameters/vendor.yaml#/vendoridPathParam --- a/api/v1/swagger/parameters/advancededitormacro.json +++ a/api/v1/swagger/parameters/advancededitormacro.json @@ -1,9 +0,0 @@ -{ - "advancededitormacro_id_pp": { - "name": "advancededitormacro_id", - "in": "path", - "description": "Advanced editor macro internal identifier", - "required": true, - "type": "integer" - } -} --- a/api/v1/swagger/parameters/advancededitormacro.yaml +++ a/api/v1/swagger/parameters/advancededitormacro.yaml @@ -0,0 +1,7 @@ +--- +advancededitormacro_id_pp: + name: advancededitormacro_id + in: path + description: Advanced editor macro internal identifier + required: true + type: integer --- a/api/v1/swagger/parameters/biblio.json +++ a/api/v1/swagger/parameters/biblio.json @@ -1,9 +0,0 @@ -{ - "biblio_id_pp": { - "name": "biblio_id", - "in": "path", - "description": "Record internal identifier", - "required": true, - "type": "integer" - } -} --- a/api/v1/swagger/parameters/biblio.yaml +++ a/api/v1/swagger/parameters/biblio.yaml @@ -0,0 +1,7 @@ +--- +biblio_id_pp: + name: biblio_id + in: path + description: Record internal identifier + required: true + type: integer --- a/api/v1/swagger/parameters/cash_register.json +++ a/api/v1/swagger/parameters/cash_register.json @@ -1,9 +0,0 @@ -{ - "cash_register_id_pp": { - "name": "cash_register_id", - "in": "path", - "description": "Cash register internal identifier", - "required": true, - "type": "integer" - } -} --- a/api/v1/swagger/parameters/cash_register.yaml +++ a/api/v1/swagger/parameters/cash_register.yaml @@ -0,0 +1,7 @@ +--- +cash_register_id_pp: + name: cash_register_id + in: path + description: Cash register internal identifier + required: true + type: integer --- a/api/v1/swagger/parameters/cashup.json +++ a/api/v1/swagger/parameters/cashup.json @@ -1,9 +0,0 @@ -{ - "cashup_id_pp": { - "name": "cashup_id", - "in": "path", - "description": "Cashup internal identifier", - "required": true, - "type": "integer" - } -} --- a/api/v1/swagger/parameters/cashup.yaml +++ a/api/v1/swagger/parameters/cashup.yaml @@ -0,0 +1,7 @@ +--- +cashup_id_pp: + name: cashup_id + in: path + description: Cashup internal identifier + required: true + type: integer --- a/api/v1/swagger/parameters/checkout.json +++ a/api/v1/swagger/parameters/checkout.json @@ -1,16 +0,0 @@ -{ - "checkout_id_pp": { - "name": "checkout_id", - "in": "path", - "description": "Internal checkout identifier", - "required": true, - "type": "integer" - }, - "seen_pp": { - "name": "seen", - "in": "query", - "description": "Item was seen flag", - "required": false, - "type": "integer" - } -} --- a/api/v1/swagger/parameters/checkout.yaml +++ a/api/v1/swagger/parameters/checkout.yaml @@ -0,0 +1,13 @@ +--- +checkout_id_pp: + name: checkout_id + in: path + description: Internal checkout identifier + required: true + type: integer +seen_pp: + name: seen + in: query + description: Item was seen flag + required: false + type: integer --- a/api/v1/swagger/parameters/city.json +++ a/api/v1/swagger/parameters/city.json @@ -1,9 +0,0 @@ -{ - "city_id_pp": { - "name": "city_id", - "in": "path", - "description": "City internal identifier", - "required": true, - "type": "integer" - } -} --- a/api/v1/swagger/parameters/city.yaml +++ a/api/v1/swagger/parameters/city.yaml @@ -0,0 +1,7 @@ +--- +city_id_pp: + name: city_id + in: path + description: City internal identifier + required: true + type: integer --- a/api/v1/swagger/parameters/club.json +++ a/api/v1/swagger/parameters/club.json @@ -1,9 +0,0 @@ -{ - "club_id_pp": { - "name": "club_id", - "in": "path", - "description": "Internal club identifier", - "required": true, - "type": "integer" - } -} --- a/api/v1/swagger/parameters/club.yaml +++ a/api/v1/swagger/parameters/club.yaml @@ -0,0 +1,7 @@ +--- +club_id_pp: + name: club_id + in: path + description: Internal club identifier + required: true + type: integer --- a/api/v1/swagger/parameters/fund.json +++ a/api/v1/swagger/parameters/fund.json @@ -1,9 +0,0 @@ -{ - "fundidPathParam": { - "name": "fund_id", - "in": "path", - "description": "Fund id", - "required": true, - "type": "integer" - } -} --- a/api/v1/swagger/parameters/fund.yaml +++ a/api/v1/swagger/parameters/fund.yaml @@ -0,0 +1,7 @@ +--- +fundidPathParam: + name: fund_id + in: path + description: Fund id + required: true + type: integer --- a/api/v1/swagger/parameters/hold.json +++ a/api/v1/swagger/parameters/hold.json @@ -1,9 +0,0 @@ -{ - "hold_id_pp": { - "name": "hold_id", - "in": "path", - "description": "Internal hold identifier", - "required": true, - "type": "integer" - } -} --- a/api/v1/swagger/parameters/hold.yaml +++ a/api/v1/swagger/parameters/hold.yaml @@ -0,0 +1,7 @@ +--- +hold_id_pp: + name: hold_id + in: path + description: Internal hold identifier + required: true + type: integer --- a/api/v1/swagger/parameters/import_batch_profile.json +++ a/api/v1/swagger/parameters/import_batch_profile.json @@ -1,9 +0,0 @@ -{ - "import_batch_profile_id_pp": { - "name": "import_batch_profile_id", - "in": "path", - "description": "Internal profile identifier", - "required": true, - "type": "integer" - } -} --- a/api/v1/swagger/parameters/import_batch_profile.yaml +++ a/api/v1/swagger/parameters/import_batch_profile.yaml @@ -0,0 +1,7 @@ +--- +import_batch_profile_id_pp: + name: import_batch_profile_id + in: path + description: Internal profile identifier + required: true + type: integer --- a/api/v1/swagger/parameters/item.json +++ a/api/v1/swagger/parameters/item.json @@ -1,9 +0,0 @@ -{ - "item_id_pp": { - "name": "item_id", - "in": "path", - "description": "Internal item identifier", - "required": true, - "type": "integer" - } -} --- a/api/v1/swagger/parameters/item.yaml +++ a/api/v1/swagger/parameters/item.yaml @@ -0,0 +1,7 @@ +--- +item_id_pp: + name: item_id + in: path + description: Internal item identifier + required: true + type: integer --- a/api/v1/swagger/parameters/library.json +++ a/api/v1/swagger/parameters/library.json @@ -1,9 +0,0 @@ -{ - "library_id_pp": { - "name": "library_id", - "in": "path", - "description": "Internal library identifier", - "required": true, - "type": "string" - } -} --- a/api/v1/swagger/parameters/library.yaml +++ a/api/v1/swagger/parameters/library.yaml @@ -0,0 +1,7 @@ +--- +library_id_pp: + name: library_id + in: path + description: Internal library identifier + required: true + type: string --- a/api/v1/swagger/parameters/order.json +++ a/api/v1/swagger/parameters/order.json @@ -1,9 +0,0 @@ -{ - "order_id_pp": { - "name": "order_id", - "in": "path", - "description": "Internal order identifier", - "required": true, - "type": "integer" - } -} --- a/api/v1/swagger/parameters/order.yaml +++ a/api/v1/swagger/parameters/order.yaml @@ -0,0 +1,7 @@ +--- +order_id_pp: + name: order_id + in: path + description: Internal order identifier + required: true + type: integer --- a/api/v1/swagger/parameters/patron.json +++ a/api/v1/swagger/parameters/patron.json @@ -1,15 +0,0 @@ -{ - "patron_id_pp": { - "name": "patron_id", - "in": "path", - "description": "Internal patron identifier", - "required": true, - "type": "integer" - }, - "patron_id_qp": { - "name": "patron_id", - "in": "query", - "description": "Internal patron identifier", - "type": "integer" - } -} --- a/api/v1/swagger/parameters/patron.yaml +++ a/api/v1/swagger/parameters/patron.yaml @@ -0,0 +1,12 @@ +--- +patron_id_pp: + name: patron_id + in: path + description: Internal patron identifier + required: true + type: integer +patron_id_qp: + name: patron_id + in: query + description: Internal patron identifier + type: integer --- a/api/v1/swagger/parameters/quote.json +++ a/api/v1/swagger/parameters/quote.json @@ -1,9 +0,0 @@ -{ - "quote_id_pp": { - "name": "quote_id", - "in": "path", - "description": "Quote internal identifier", - "required": true, - "type": "integer" - } -} --- a/api/v1/swagger/parameters/quote.yaml +++ a/api/v1/swagger/parameters/quote.yaml @@ -0,0 +1,7 @@ +--- +quote_id_pp: + name: quote_id + in: path + description: Quote internal identifier + required: true + type: integer --- a/api/v1/swagger/parameters/smtp_server.json +++ a/api/v1/swagger/parameters/smtp_server.json @@ -1,9 +0,0 @@ -{ - "smtp_server_id_pp": { - "name": "smtp_server_id", - "in": "path", - "description": "SMTP server internal identifier", - "required": true, - "type": "integer" - } -} --- a/api/v1/swagger/parameters/smtp_server.yaml +++ a/api/v1/swagger/parameters/smtp_server.yaml @@ -0,0 +1,7 @@ +--- +smtp_server_id_pp: + name: smtp_server_id + in: path + description: SMTP server internal identifier + required: true + type: integer --- a/api/v1/swagger/parameters/suggestion.json +++ a/api/v1/swagger/parameters/suggestion.json @@ -1,9 +0,0 @@ -{ - "suggestion_id_pp": { - "name": "suggestion_id", - "in": "path", - "description": "Internal suggestion identifier", - "required": true, - "type": "integer" - } -} --- a/api/v1/swagger/parameters/suggestion.yaml +++ a/api/v1/swagger/parameters/suggestion.yaml @@ -0,0 +1,7 @@ +--- +suggestion_id_pp: + name: suggestion_id + in: path + description: Internal suggestion identifier + required: true + type: integer --- a/api/v1/swagger/parameters/transfer_limit.json +++ a/api/v1/swagger/parameters/transfer_limit.json @@ -1,9 +0,0 @@ -{ - "transfer_limit_id_pp": { - "name": "limit_id", - "in": "path", - "description": "Internal transfer limit identifier", - "required": true, - "type": "string" - } -} --- a/api/v1/swagger/parameters/transfer_limit.yaml +++ a/api/v1/swagger/parameters/transfer_limit.yaml @@ -0,0 +1,7 @@ +--- +transfer_limit_id_pp: + name: limit_id + in: path + description: Internal transfer limit identifier + required: true + type: string --- a/api/v1/swagger/parameters/vendor.json +++ a/api/v1/swagger/parameters/vendor.json @@ -1,9 +0,0 @@ -{ - "vendoridPathParam": { - "name": "vendor_id", - "in": "path", - "description": "Vendor id", - "required": true, - "type": "integer" - } -} --- a/api/v1/swagger/parameters/vendor.yaml +++ a/api/v1/swagger/parameters/vendor.yaml @@ -0,0 +1,7 @@ +--- +vendoridPathParam: + name: vendor_id + in: path + description: Vendor id + required: true + type: integer --- a/api/v1/swagger/paths.json +++ a/api/v1/swagger/paths.json @@ -1,215 +0,0 @@ -{ - "/oauth/token": { - "$ref": "paths/oauth.json#/~1oauth~1token" - }, - "/acquisitions/orders": { - "$ref": "paths/acquisitions_orders.json#/~1acquisitions~1orders" - }, - "/acquisitions/orders/{order_id}": { - "$ref": "paths/acquisitions_orders.json#/~1acquisitions~1orders~1{order_id}" - }, - "/acquisitions/vendors": { - "$ref": "paths/acquisitions_vendors.json#/~1acquisitions~1vendors" - }, - "/acquisitions/vendors/{vendor_id}": { - "$ref": "paths/acquisitions_vendors.json#/~1acquisitions~1vendors~1{vendor_id}" - }, - "/acquisitions/funds": { - "$ref": "paths/acquisitions_funds.json#/~1acquisitions~1funds" - }, - "/article_requests/{article_request_id}": { - "$ref": "paths/article_requests.yaml#/~1article_requests~1{article_request_id}" - }, - "/biblios/{biblio_id}": { - "$ref": "paths/biblios.json#/~1biblios~1{biblio_id}" - }, - "/biblios/{biblio_id}/checkouts": { - "$ref": "paths/biblios.json#/~1biblios~1{biblio_id}~1checkouts" - }, - "/biblios/{biblio_id}/items": { - "$ref": "paths/biblios.json#/~1biblios~1{biblio_id}~1items" - }, - "/biblios/{biblio_id}/pickup_locations": { - "$ref": "paths/biblios.json#/~1biblios~1{biblio_id}~1pickup_locations" - }, - "/cash_registers/{cash_register_id}/cashups": { - "$ref": "paths/cash_registers.json#/~1cash_registers~1{cash_register_id}~1cashups" - }, - "/cashups/{cashup_id}": { - "$ref": "paths/cash_registers.json#/~1cashups~1{cashup_id}" - }, - "/checkouts": { - "$ref": "paths/checkouts.json#/~1checkouts" - }, - "/checkouts/{checkout_id}": { - "$ref": "paths/checkouts.json#/~1checkouts~1{checkout_id}" - }, - "/checkouts/{checkout_id}/renewal": { - "$ref": "paths/checkouts.json#/~1checkouts~1{checkout_id}~1renewal" - }, - "/circulation-rules/kinds": { - "$ref": "paths/circulation-rules.json#/~1circulation-rules~1kinds" - }, - "/cities": { - "$ref": "paths/cities.yaml#/~1cities" - }, - "/cities/{city_id}": { - "$ref": "paths/cities.yaml#/~1cities~1{city_id}" - }, - "/clubs/{club_id}/holds": { - "$ref": "paths/clubs.json#/~1clubs~1{club_id}~1holds" - }, - "/config/smtp_servers": { - "$ref": "paths/config_smtp_servers.json#/~1config~1smtp_servers" - }, - "/config/smtp_servers/{smtp_server_id}": { - "$ref": "paths/config_smtp_servers.json#/~1config~1smtp_servers~1{smtp_server_id}" - }, - "/holds": { - "$ref": "paths/holds.json#/~1holds" - }, - "/holds/{hold_id}": { - "$ref": "paths/holds.json#/~1holds~1{hold_id}" - }, - "/holds/{hold_id}/priority": { - "$ref": "paths/holds.json#/~1holds~1{hold_id}~1priority" - }, - "/holds/{hold_id}/suspension": { - "$ref": "paths/holds.json#/~1holds~1{hold_id}~1suspension" - }, - "/holds/{hold_id}/pickup_locations": { - "$ref": "paths/holds.json#/~1holds~1{hold_id}~1pickup_locations" - }, - "/holds/{hold_id}/pickup_location": { - "$ref": "paths/holds.json#/~1holds~1{hold_id}~1pickup_location" - }, - "/items": { - "$ref": "paths/items.yaml#/~1items" - }, - "/items/{item_id}": { - "$ref": "paths/items.yaml#/~1items~1{item_id}" - }, - "/items/{item_id}/pickup_locations": { - "$ref": "paths/items.yaml#/~1items~1{item_id}~1pickup_locations" - }, - "/libraries": { - "$ref": "paths/libraries.json#/~1libraries" - }, - "/libraries/{library_id}": { - "$ref": "paths/libraries.json#/~1libraries~1{library_id}" - }, - "/transfer_limits": { - "$ref": "paths/transfer_limits.yaml#/~1transfer_limits" - }, - "/transfer_limits/{limit_id}": { - "$ref": "paths/transfer_limits.yaml#/~1transfer_limits~1{limit_id}" - }, - "/transfer_limits/batch": { - "$ref": "paths/transfer_limits.yaml#/~1transfer_limits~1batch" - }, - "/checkouts/{checkout_id}/allows_renewal": { - "$ref": "paths/checkouts.json#/~1checkouts~1{checkout_id}~1allows_renewal" - }, - "/advanced_editor/macros": { - "$ref": "paths/advancededitormacros.json#/~1advanced_editor~1macros" - }, - "/advanced_editor/macros/{advancededitormacro_id}": { - "$ref": "paths/advancededitormacros.json#/~1advanced_editor~1macros~1{advancededitormacro_id}" - }, - "/advanced_editor/macros/shared": { - "$ref": "paths/advancededitormacros.json#/~1advanced_editor~1macros~1shared" - }, - "/advanced_editor/macros/shared/{advancededitormacro_id}": { - "$ref": "paths/advancededitormacros.json#/~1advanced_editor~1macros~1shared~1{advancededitormacro_id}" - }, - "/patrons": { - "$ref": "paths/patrons.json#/~1patrons" - }, - "/patrons/{patron_id}": { - "$ref": "paths/patrons.json#/~1patrons~1{patron_id}" - }, - "/patrons/{patron_id}/account": { - "$ref": "paths/patrons_account.json#/~1patrons~1{patron_id}~1account" - }, - "/patrons/{patron_id}/account/credits": { - "$ref": "paths/patrons_account.json#/~1patrons~1{patron_id}~1account~1credits" - }, - "/patrons/{patron_id}/extended_attributes": { - "$ref": "paths/patrons_extended_attributes.json#/~1patrons~1{patron_id}~1extended_attributes" - }, - "/patrons/{patron_id}/extended_attributes/{extended_attribute_id}": { - "$ref": "paths/patrons_extended_attributes.json#/~1patrons~1{patron_id}~1extended_attributes~1{extended_attribute_id}" - }, - "/patrons/{patron_id}/holds": { - "$ref": "paths/patrons_holds.json#/~1patrons~1{patron_id}~1holds" - }, - "/patrons/{patron_id}/password": { - "$ref": "paths/patrons_password.json#/~1patrons~1{patron_id}~1password" - }, - "/ill_backends": { - "$ref": "paths/ill_backends.json#/~1ill_backends" - }, - "/ill_backends/{ill_backend_id}": { - "$ref": "paths/ill_backends.json#/~1ill_backends~1{ill_backend_id}" - }, - "/illrequests": { - "$ref": "paths/illrequests.json#/~1illrequests" - }, - "/import_batch_profiles": { - "$ref": "paths/import_batch_profiles.json#/~1import_batch_profiles" - }, - "/import_batch_profiles/{import_batch_profile_id}": { - "$ref": "paths/import_batch_profiles.json#/~1import_batch_profiles~1{import_batch_profile_id}" - }, - "/rotas/{rota_id}/stages/{stage_id}/position": { - "$ref": "paths/rotas.json#/~1rotas~1{rota_id}~1stages~1{stage_id}~1position" - }, - "/public/biblios/{biblio_id}": { - "$ref": "paths/biblios.json#/~1public~1biblios~1{biblio_id}" - }, - "/public/biblios/{biblio_id}/items": { - "$ref": "paths/biblios.json#/~1public~1biblios~1{biblio_id}~1items" - }, - "/public/libraries": { - "$ref": "paths/libraries.json#/~1public~1libraries" - }, - "/public/libraries/{library_id}": { - "$ref": "paths/libraries.json#/~1public~1libraries~1{library_id}" - }, - "/public/patrons/{patron_id}/article_requests/{article_request_id}": { - "$ref": "paths/article_requests.yaml#/~1public~1patrons~1{patron_id}~1article_requests~1{article_request_id}" - }, - "/public/patrons/{patron_id}/password": { - "$ref": "paths/public_patrons.json#/~1public~1patrons~1{patron_id}~1password" - }, - "/public/patrons/{patron_id}/guarantors/can_see_charges": { - "$ref": "paths/public_patrons.json#/~1public~1patrons~1{patron_id}~1guarantors~1can_see_charges" - }, - "/public/patrons/{patron_id}/guarantors/can_see_checkouts": { - "$ref": "paths/public_patrons.json#/~1public~1patrons~1{patron_id}~1guarantors~1can_see_checkouts" - }, - "/quotes": { - "$ref": "paths/quotes.json#/~1quotes" - }, - "/quotes/{quote_id}": { - "$ref": "paths/quotes.json#/~1quotes~1{quote_id}" - }, - "/return_claims": { - "$ref": "paths/return_claims.json#/~1return_claims" - }, - "/return_claims/{claim_id}/notes": { - "$ref": "paths/return_claims.json#/~1return_claims~1{claim_id}~1notes" - }, - "/return_claims/{claim_id}/resolve": { - "$ref": "paths/return_claims.json#/~1return_claims~1{claim_id}~1resolve" - }, - "/return_claims/{claim_id}": { - "$ref": "paths/return_claims.json#/~1return_claims~1{claim_id}" - }, - "/suggestions": { - "$ref": "paths/suggestions.yaml#/~1suggestions" - }, - "/suggestions/{suggestion_id}": { - "$ref": "paths/suggestions.yaml#/~1suggestions~1{suggestion_id}" - } -} --- a/api/v1/swagger/paths.yaml +++ a/api/v1/swagger/paths.yaml @@ -0,0 +1,143 @@ +--- +/oauth/token: + $ref: paths/oauth.yaml#/~1oauth~1token +/acquisitions/orders: + $ref: paths/acquisitions_orders.yaml#/~1acquisitions~1orders +"/acquisitions/orders/{order_id}": + $ref: paths/acquisitions_orders.yaml#/~1acquisitions~1orders~1{order_id} +/acquisitions/vendors: + $ref: paths/acquisitions_vendors.yaml#/~1acquisitions~1vendors +"/acquisitions/vendors/{vendor_id}": + $ref: paths/acquisitions_vendors.yaml#/~1acquisitions~1vendors~1{vendor_id} +/acquisitions/funds: + $ref: paths/acquisitions_funds.yaml#/~1acquisitions~1funds +"/article_requests/{article_request_id}": + $ref: paths/article_requests.yaml#/~1article_requests~1{article_request_id} +"/biblios/{biblio_id}": + $ref: paths/biblios.yaml#/~1biblios~1{biblio_id} +"/biblios/{biblio_id}/checkouts": + $ref: paths/biblios.yaml#/~1biblios~1{biblio_id}~1checkouts +"/biblios/{biblio_id}/items": + $ref: paths/biblios.yaml#/~1biblios~1{biblio_id}~1items +"/biblios/{biblio_id}/pickup_locations": + $ref: paths/biblios.yaml#/~1biblios~1{biblio_id}~1pickup_locations +"/cash_registers/{cash_register_id}/cashups": + $ref: paths/cash_registers.yaml#/~1cash_registers~1{cash_register_id}~1cashups +"/cashups/{cashup_id}": + $ref: paths/cash_registers.yaml#/~1cashups~1{cashup_id} +/checkouts: + $ref: paths/checkouts.yaml#/~1checkouts +"/checkouts/{checkout_id}": + $ref: paths/checkouts.yaml#/~1checkouts~1{checkout_id} +"/checkouts/{checkout_id}/renewal": + $ref: paths/checkouts.yaml#/~1checkouts~1{checkout_id}~1renewal +/circulation-rules/kinds: + $ref: paths/circulation-rules.yaml#/~1circulation-rules~1kinds +/cities: + $ref: paths/cities.yaml#/~1cities +"/cities/{city_id}": + $ref: paths/cities.yaml#/~1cities~1{city_id} +"/clubs/{club_id}/holds": + $ref: paths/clubs.yaml#/~1clubs~1{club_id}~1holds +/config/smtp_servers: + $ref: paths/config_smtp_servers.yaml#/~1config~1smtp_servers +"/config/smtp_servers/{smtp_server_id}": + $ref: paths/config_smtp_servers.yaml#/~1config~1smtp_servers~1{smtp_server_id} +/holds: + $ref: paths/holds.yaml#/~1holds +"/holds/{hold_id}": + $ref: paths/holds.yaml#/~1holds~1{hold_id} +"/holds/{hold_id}/priority": + $ref: paths/holds.yaml#/~1holds~1{hold_id}~1priority +"/holds/{hold_id}/suspension": + $ref: paths/holds.yaml#/~1holds~1{hold_id}~1suspension +"/holds/{hold_id}/pickup_locations": + $ref: paths/holds.yaml#/~1holds~1{hold_id}~1pickup_locations +"/holds/{hold_id}/pickup_location": + $ref: paths/holds.yaml#/~1holds~1{hold_id}~1pickup_location +/items: + $ref: paths/items.yaml#/~1items +"/items/{item_id}": + $ref: paths/items.yaml#/~1items~1{item_id} +"/items/{item_id}/pickup_locations": + $ref: paths/items.yaml#/~1items~1{item_id}~1pickup_locations +/libraries: + $ref: paths/libraries.yaml#/~1libraries +"/libraries/{library_id}": + $ref: paths/libraries.yaml#/~1libraries~1{library_id} +/transfer_limits: + $ref: paths/transfer_limits.yaml#/~1transfer_limits +"/transfer_limits/{limit_id}": + $ref: paths/transfer_limits.yaml#/~1transfer_limits~1{limit_id} +/transfer_limits/batch: + $ref: paths/transfer_limits.yaml#/~1transfer_limits~1batch +"/checkouts/{checkout_id}/allows_renewal": + $ref: paths/checkouts.yaml#/~1checkouts~1{checkout_id}~1allows_renewal +/advanced_editor/macros: + $ref: paths/advancededitormacros.yaml#/~1advanced_editor~1macros +"/advanced_editor/macros/{advancededitormacro_id}": + $ref: paths/advancededitormacros.yaml#/~1advanced_editor~1macros~1{advancededitormacro_id} +/advanced_editor/macros/shared: + $ref: paths/advancededitormacros.yaml#/~1advanced_editor~1macros~1shared +"/advanced_editor/macros/shared/{advancededitormacro_id}": + $ref: paths/advancededitormacros.yaml#/~1advanced_editor~1macros~1shared~1{advancededitormacro_id} +/patrons: + $ref: paths/patrons.yaml#/~1patrons +"/patrons/{patron_id}": + $ref: paths/patrons.yaml#/~1patrons~1{patron_id} +"/patrons/{patron_id}/account": + $ref: paths/patrons_account.yaml#/~1patrons~1{patron_id}~1account +"/patrons/{patron_id}/account/credits": + $ref: paths/patrons_account.yaml#/~1patrons~1{patron_id}~1account~1credits +"/patrons/{patron_id}/extended_attributes": + $ref: paths/patrons_extended_attributes.yaml#/~1patrons~1{patron_id}~1extended_attributes +"/patrons/{patron_id}/extended_attributes/{extended_attribute_id}": + $ref: paths/patrons_extended_attributes.yaml#/~1patrons~1{patron_id}~1extended_attributes~1{extended_attribute_id} +"/patrons/{patron_id}/holds": + $ref: paths/patrons_holds.yaml#/~1patrons~1{patron_id}~1holds +"/patrons/{patron_id}/password": + $ref: paths/patrons_password.yaml#/~1patrons~1{patron_id}~1password +/ill_backends: + $ref: paths/ill_backends.yaml#/~1ill_backends +"/ill_backends/{ill_backend_id}": + $ref: paths/ill_backends.yaml#/~1ill_backends~1{ill_backend_id} +/illrequests: + $ref: paths/illrequests.yaml#/~1illrequests +/import_batch_profiles: + $ref: paths/import_batch_profiles.yaml#/~1import_batch_profiles +"/import_batch_profiles/{import_batch_profile_id}": + $ref: paths/import_batch_profiles.yaml#/~1import_batch_profiles~1{import_batch_profile_id} +"/rotas/{rota_id}/stages/{stage_id}/position": + $ref: paths/rotas.yaml#/~1rotas~1{rota_id}~1stages~1{stage_id}~1position +"/public/biblios/{biblio_id}": + $ref: paths/biblios.yaml#/~1public~1biblios~1{biblio_id} +"/public/biblios/{biblio_id}/items": + $ref: paths/biblios.yaml#/~1public~1biblios~1{biblio_id}~1items +/public/libraries: + $ref: paths/libraries.yaml#/~1public~1libraries +"/public/libraries/{library_id}": + $ref: paths/libraries.yaml#/~1public~1libraries~1{library_id} +"/public/patrons/{patron_id}/article_requests/{article_request_id}": + $ref: paths/article_requests.yaml#/~1public~1patrons~1{patron_id}~1article_requests~1{article_request_id} +"/public/patrons/{patron_id}/password": + $ref: paths/public_patrons.yaml#/~1public~1patrons~1{patron_id}~1password +"/public/patrons/{patron_id}/guarantors/can_see_charges": + $ref: paths/public_patrons.yaml#/~1public~1patrons~1{patron_id}~1guarantors~1can_see_charges +"/public/patrons/{patron_id}/guarantors/can_see_checkouts": + $ref: paths/public_patrons.yaml#/~1public~1patrons~1{patron_id}~1guarantors~1can_see_checkouts +/quotes: + $ref: paths/quotes.yaml#/~1quotes +"/quotes/{quote_id}": + $ref: paths/quotes.yaml#/~1quotes~1{quote_id} +/return_claims: + $ref: paths/return_claims.yaml#/~1return_claims +"/return_claims/{claim_id}/notes": + $ref: paths/return_claims.yaml#/~1return_claims~1{claim_id}~1notes +"/return_claims/{claim_id}/resolve": + $ref: paths/return_claims.yaml#/~1return_claims~1{claim_id}~1resolve +"/return_claims/{claim_id}": + $ref: paths/return_claims.yaml#/~1return_claims~1{claim_id} +/suggestions: + $ref: paths/suggestions.yaml#/~1suggestions +"/suggestions/{suggestion_id}": + $ref: paths/suggestions.yaml#/~1suggestions~1{suggestion_id} --- a/api/v1/swagger/paths/acquisitions_funds.json +++ a/api/v1/swagger/paths/acquisitions_funds.json @@ -1,94 +0,0 @@ -{ - "/acquisitions/funds": { - "get": { - "x-mojo-to": "Acquisitions::Funds#list", - "operationId": "listFunds", - "tags": ["funds"], - "summary": "List funds", - "produces": [ - "application/json" - ], - "parameters": [{ - "name": "name", - "in": "query", - "description": "Case insensitive search on fund name", - "required": false, - "type": "string" - }, - { - "name": "fund_owner_id", - "in": "query", - "description": "Display only the funds that belongs to the given patron ID", - "required": false, - "type": "integer" - }, - { - "$ref": "../parameters.json#/match" - }, - { - "$ref": "../parameters.json#/order_by" - }, - { - "$ref": "../parameters.json#/page" - }, - { - "$ref": "../parameters.json#/per_page" - }, - { - "$ref": "../parameters.json#/q_param" - }, - { - "$ref": "../parameters.json#/q_body" - }, - { - "$ref": "../parameters.json#/q_header" - }], - "responses": { - "200": { - "description": "A list of funds", - "schema": { - "type": "array", - "items": { - "$ref": "../definitions.json#/fund" - } - } - }, - "401": { - "description": "Authentication required", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "403": { - "description": "Access forbidden", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "404": { - "description": "Fund not found", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "500": { - "description": "Internal server error", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "503": { - "description": "Under maintenance", - "schema": { - "$ref": "../definitions.json#/error" - } - } - }, - "x-koha-authorization": { - "permissions": { - "acquisition": "budget_manage_all" - } - } - } - } -} --- a/api/v1/swagger/paths/acquisitions_funds.yaml +++ a/api/v1/swagger/paths/acquisitions_funds.yaml @@ -0,0 +1,58 @@ +--- +/acquisitions/funds: + get: + x-mojo-to: Acquisitions::Funds#list + operationId: listFunds + tags: + - funds + summary: List funds + produces: + - application/json + parameters: + - name: name + in: query + description: Case insensitive search on fund name + required: false + type: string + - name: fund_owner_id + in: query + description: Display only the funds that belongs to the given patron ID + required: false + type: integer + - $ref: ../parameters.yaml#/match + - $ref: ../parameters.yaml#/order_by + - $ref: ../parameters.yaml#/page + - $ref: ../parameters.yaml#/per_page + - $ref: ../parameters.yaml#/q_param + - $ref: ../parameters.yaml#/q_body + - $ref: ../parameters.yaml#/q_header + responses: + "200": + description: A list of funds + schema: + type: array + items: + $ref: ../definitions.yaml#/fund + "401": + description: Authentication required + schema: + $ref: ../definitions.yaml#/error + "403": + description: Access forbidden + schema: + $ref: ../definitions.yaml#/error + "404": + description: Fund not found + schema: + $ref: ../definitions.yaml#/error + "500": + description: Internal server error + schema: + $ref: ../definitions.yaml#/error + "503": + description: Under maintenance + schema: + $ref: ../definitions.yaml#/error + x-koha-authorization: + permissions: + acquisition: budget_manage_all --- a/api/v1/swagger/paths/acquisitions_orders.json +++ a/api/v1/swagger/paths/acquisitions_orders.json @@ -1,395 +0,0 @@ -{ - "/acquisitions/orders": { - "get": { - "x-mojo-to": "Acquisitions::Orders#list", - "operationId": "listOrders", - "tags": ["orders"], - "summary": "List orders", - "produces": [ - "application/json" - ], - "parameters": [ - { - "name": "biblio_id", - "in": "query", - "description": "Identifier for a linked bibliographic record", - "required": false, - "type": "integer" - }, - { - "name": "basket_id", - "in": "query", - "description": "Identifier for a linked acquisition basket", - "required": false, - "type": "integer" - }, - { - "name": "fund_id", - "in": "query", - "description": "Identifier for the fund the order goes against", - "required": false, - "type": "integer" - }, - { - "name": "status", - "in": "query", - "description": "Current status for the order. Can be 'new', 'ordered', 'partial', 'complete' or 'cancelled'", - "required": false, - "type": "string" - }, - { - "name": "only_active", - "in": "query", - "description": "If only active orders should be listed", - "required": false, - "type": "boolean" - }, - { - "$ref": "../parameters.json#/match" - }, - { - "$ref": "../parameters.json#/order_by" - }, - { - "$ref": "../parameters.json#/page" - }, - { - "$ref": "../parameters.json#/per_page" - }, - { - "$ref": "../parameters.json#/q_param" - }, - { - "$ref": "../parameters.json#/q_body" - }, - { - "$ref": "../parameters.json#/q_header" - } - ], - "responses": { - "200": { - "description": "A list of orders", - "schema": { - "type": "array", - "items": { - "$ref": "../definitions.json#/order" - } - } - }, - "401": { - "description": "Authentication required", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "403": { - "description": "Access forbidden", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "404": { - "description": "Order not found", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "500": { - "description": "Internal server error", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "503": { - "description": "Under maintenance", - "schema": { - "$ref": "../definitions.json#/error" - } - } - }, - "x-koha-authorization": { - "permissions": { - "acquisition": [ "order_manage", "order_manage_all" ] - } - }, - "x-koha-embed": [ - "basket", - "basket.basket_group", - "basket.creator", - "biblio", - "biblio.active_orders+count", - "biblio.holds+count", - "biblio.items+count", - "biblio.suggestions.suggester", - "fund", - "current_item_level_holds+count", - "invoice", - "items", - "subscription" - ] - }, - "post": { - "x-mojo-to": "Acquisitions::Orders#add", - "operationId": "addOrder", - "tags": ["orders"], - "summary": "Add order", - "parameters": [ - { - "name": "body", - "in": "body", - "description": "A JSON object representing an order", - "required": true, - "schema": { - "$ref": "../definitions.json#/order" - } - } - ], - "produces": [ - "application/json" - ], - "responses": { - "201": { - "description": "Order added", - "schema": { - "$ref": "../definitions.json#/order" - } - }, - "400": { - "description": "Bad request", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "401": { - "description": "Authentication required", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "403": { - "description": "Access forbidden", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "409": { - "description": "Conflict in creating the resource", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "500": { - "description": "Internal server error", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "503": { - "description": "Under maintenance", - "schema": { - "$ref": "../definitions.json#/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", - "parameters": [ - { - "$ref": "../parameters.json#/order_id_pp" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "description": "An order", - "schema": { - "$ref": "../definitions.json#/order" - } - }, - "401": { - "description": "Authentication required", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "403": { - "description": "Access forbidden", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "404": { - "description": "Order not found", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "500": { - "description": "Internal server error", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "503": { - "description": "Under maintenance", - "schema": { - "$ref": "../definitions.json#/error" - } - } - }, - "x-koha-authorization": { - "permissions": { - "acquisition": "order_manage" - } - }, - "x-koha-embed": [ - "basket", - "basket.basket_group", - "basket.creator", - "biblio", - "biblio.active_orders+count", - "biblio.holds+count", - "biblio.items+count", - "biblio.suggestions.suggester", - "fund", - "current_item_level_holds+count", - "invoice", - "items", - "subscription" - ] - }, - "put": { - "x-mojo-to": "Acquisitions::Orders#update", - "operationId": "updateOrder", - "tags": ["orders"], - "summary": "Update order", - "parameters": [ - { - "$ref": "../parameters.json#/order_id_pp" - }, - { - "name": "body", - "in": "body", - "description": "A JSON object representing an order", - "required": true, - "schema": { - "$ref": "../definitions.json#/order" - } - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "description": "An order", - "schema": { - "$ref": "../definitions.json#/order" - } - }, - "401": { - "description": "Authentication required", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "403": { - "description": "Access forbidden", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "404": { - "description": "Order not found", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "500": { - "description": "Internal server error", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "503": { - "description": "Under maintenance", - "schema": { - "$ref": "../definitions.json#/error" - } - } - }, - "x-koha-authorization": { - "permissions": { - "acquisition": "order_manage" - } - } - }, - "delete": { - "x-mojo-to": "Acquisitions::Orders#delete", - "operationId": "deleteOrder", - "tags": ["orders"], - "summary": "Delete order", - "parameters": [ - { - "$ref": "../parameters.json#/order_id_pp" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "204": { - "description": "Order deleted" - }, - "401": { - "description": "Authentication required", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "403": { - "description": "Access forbidden", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "404": { - "description": "Order not found", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "500": { - "description": "Internal server error", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "503": { - "description": "Under maintenance", - "schema": { - "$ref": "../definitions.json#/error" - } - } - }, - "x-koha-authorization": { - "permissions": { - "acquisition": "order_manage" - } - } - } - } -} --- a/api/v1/swagger/paths/acquisitions_orders.yaml +++ a/api/v1/swagger/paths/acquisitions_orders.yaml @@ -0,0 +1,270 @@ +--- +/acquisitions/orders: + get: + x-mojo-to: Acquisitions::Orders#list + operationId: listOrders + tags: + - orders + summary: List orders + produces: + - application/json + parameters: + - name: biblio_id + in: query + description: Identifier for a linked bibliographic record + required: false + type: integer + - name: basket_id + in: query + description: Identifier for a linked acquisition basket + required: false + type: integer + - name: fund_id + in: query + description: Identifier for the fund the order goes against + required: false + type: integer + - name: status + in: query + description: Current status for the order. Can be 'new', 'ordered', 'partial', + 'complete' or 'cancelled' + required: false + type: string + - name: only_active + in: query + description: If only active orders should be listed + required: false + type: boolean + - $ref: ../parameters.yaml#/match + - $ref: ../parameters.yaml#/order_by + - $ref: ../parameters.yaml#/page + - $ref: ../parameters.yaml#/per_page + - $ref: ../parameters.yaml#/q_param + - $ref: ../parameters.yaml#/q_body + - $ref: ../parameters.yaml#/q_header + responses: + "200": + description: A list of orders + schema: + type: array + items: + $ref: ../definitions.yaml#/order + "401": + description: Authentication required + schema: + $ref: ../definitions.yaml#/error + "403": + description: Access forbidden + schema: + $ref: ../definitions.yaml#/error + "404": + description: Order not found + schema: + $ref: ../definitions.yaml#/error + "500": + description: Internal server error + schema: + $ref: ../definitions.yaml#/error + "503": + description: Under maintenance + schema: + $ref: ../definitions.yaml#/error + x-koha-authorization: + permissions: + acquisition: + - order_manage + - order_manage_all + x-koha-embed: + - basket + - basket.basket_group + - basket.creator + - biblio + - biblio.active_orders+count + - biblio.holds+count + - biblio.items+count + - biblio.suggestions.suggester + - fund + - current_item_level_holds+count + - invoice + - items + - subscription + post: + x-mojo-to: Acquisitions::Orders#add + operationId: addOrder + tags: + - orders + summary: Add order + parameters: + - name: body + in: body + description: A JSON object representing an order + required: true + schema: + $ref: ../definitions.yaml#/order + produces: + - application/json + responses: + "201": + description: Order added + schema: + $ref: ../definitions.yaml#/order + "400": + description: Bad request + schema: + $ref: ../definitions.yaml#/error + "401": + description: Authentication required + schema: + $ref: ../definitions.yaml#/error + "403": + description: Access forbidden + schema: + $ref: ../definitions.yaml#/error + "409": + description: Conflict in creating the resource + schema: + $ref: ../definitions.yaml#/error + "500": + description: Internal server error + schema: + $ref: ../definitions.yaml#/error + "503": + description: Under maintenance + schema: + $ref: ../definitions.yaml#/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 + parameters: + - $ref: ../parameters.yaml#/order_id_pp + produces: + - application/json + responses: + "200": + description: An order + schema: + $ref: ../definitions.yaml#/order + "401": + description: Authentication required + schema: + $ref: ../definitions.yaml#/error + "403": + description: Access forbidden + schema: + $ref: ../definitions.yaml#/error + "404": + description: Order not found + schema: + $ref: ../definitions.yaml#/error + "500": + description: Internal server error + schema: + $ref: ../definitions.yaml#/error + "503": + description: Under maintenance + schema: + $ref: ../definitions.yaml#/error + x-koha-authorization: + permissions: + acquisition: order_manage + x-koha-embed: + - basket + - basket.basket_group + - basket.creator + - biblio + - biblio.active_orders+count + - biblio.holds+count + - biblio.items+count + - biblio.suggestions.suggester + - fund + - current_item_level_holds+count + - invoice + - items + - subscription + put: + x-mojo-to: Acquisitions::Orders#update + operationId: updateOrder + tags: + - orders + summary: Update order + parameters: + - $ref: ../parameters.yaml#/order_id_pp + - name: body + in: body + description: A JSON object representing an order + required: true + schema: + $ref: ../definitions.yaml#/order + produces: + - application/json + responses: + "200": + description: An order + schema: + $ref: ../definitions.yaml#/order + "401": + description: Authentication required + schema: + $ref: ../definitions.yaml#/error + "403": + description: Access forbidden + schema: + $ref: ../definitions.yaml#/error + "404": + description: Order not found + schema: + $ref: ../definitions.yaml#/error + "500": + description: Internal server error + schema: + $ref: ../definitions.yaml#/error + "503": + description: Under maintenance + schema: + $ref: ../definitions.yaml#/error + x-koha-authorization: + permissions: + acquisition: order_manage + delete: + x-mojo-to: Acquisitions::Orders#delete + operationId: deleteOrder + tags: + - orders + summary: Delete order + parameters: + - $ref: ../parameters.yaml#/order_id_pp + produces: + - application/json + responses: + "204": + description: Order deleted + "401": + description: Authentication required + schema: + $ref: ../definitions.yaml#/error + "403": + description: Access forbidden + schema: + $ref: ../definitions.yaml#/error + "404": + description: Order not found + schema: + $ref: ../definitions.yaml#/error + "500": + description: Internal server error + schema: + $ref: ../definitions.yaml#/error + "503": + description: Under maintenance + schema: + $ref: ../definitions.yaml#/error + x-koha-authorization: + permissions: + acquisition: order_manage --- a/api/v1/swagger/paths/acquisitions_vendors.json +++ a/api/v1/swagger/paths/acquisitions_vendors.json @@ -1,319 +0,0 @@ -{ - "/acquisitions/vendors": { - "get": { - "x-mojo-to": "Acquisitions::Vendors#list", - "operationId": "listVendors", - "tags": ["vendors"], - "summary": "List vendors", - "produces": [ - "application/json" - ], - "parameters": [{ - "name": "name", - "in": "query", - "description": "Case insensitive search on vendor name", - "required": false, - "type": "string" - }, { - "name": "accountnumber", - "in": "query", - "description": "Case insensitive search on vendor's account number", - "required": false, - "type": "string" - }, { - "$ref": "../parameters.json#/match" - }, { - "$ref": "../parameters.json#/order_by" - }, { - "$ref": "../parameters.json#/page" - }, { - "$ref": "../parameters.json#/per_page" - }, { - "$ref": "../parameters.json#/q_param" - }, { - "$ref": "../parameters.json#/q_body" - }, { - "$ref": "../parameters.json#/q_header" - }], - "responses": { - "200": { - "description": "A list of vendors", - "schema": { - "type": "array", - "items": { - "$ref": "../definitions.json#/vendor" - } - } - }, - "401": { - "description": "Authentication required", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "403": { - "description": "Access forbidden", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "404": { - "description": "Vendor not found", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "500": { - "description": "Internal server error", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "503": { - "description": "Under maintenance", - "schema": { - "$ref": "../definitions.json#/error" - } - } - }, - "x-koha-authorization": { - "permissions": { - "acquisition": "vendors_manage" - } - } - }, - "post": { - "x-mojo-to": "Acquisitions::Vendors#add", - "operationId": "addVendor", - "tags": ["vendors"], - "summary": "Add vendor", - "parameters": [{ - "name": "body", - "in": "body", - "description": "A JSON object representing a vendor", - "required": true, - "schema": { - "$ref": "../definitions.json#/vendor" - } - }], - "produces": [ - "application/json" - ], - "responses": { - "201": { - "description": "Vendor added", - "schema": { - "$ref": "../definitions.json#/vendor" - } - }, - "401": { - "description": "Authentication required", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "403": { - "description": "Access forbidden", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "404": { - "description": "Vendor not found", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "500": { - "description": "Internal server error", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "503": { - "description": "Under maintenance", - "schema": { - "$ref": "../definitions.json#/error" - } - } - }, - "x-koha-authorization": { - "permissions": { - "acquisition": "vendors_manage" - } - } - } - }, - "/acquisitions/vendors/{vendor_id}": { - "get": { - "x-mojo-to": "Acquisitions::Vendors#get", - "operationId": "getVendor", - "tags": ["vendors"], - "summary": "Get vendor", - "parameters": [{ - "$ref": "../parameters.json#/vendoridPathParam" - }], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "description": "A vendor", - "schema": { - "$ref": "../definitions.json#/vendor" - } - }, - "401": { - "description": "Authentication required", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "403": { - "description": "Access forbidden", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "404": { - "description": "Vendor not found", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "500": { - "description": "Internal server error", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "503": { - "description": "Under maintenance", - "schema": { - "$ref": "../definitions.json#/error" - } - } - }, - "x-koha-authorization": { - "permissions": { - "acquisition": "vendors_manage" - } - } - }, - "put": { - "x-mojo-to": "Acquisitions::Vendors#update", - "operationId": "updateVendor", - "tags": ["vendors"], - "summary": "Update vendor", - "parameters": [{ - "$ref": "../parameters.json#/vendoridPathParam" - }, { - "name": "body", - "in": "body", - "description": "A JSON object representing a vendor", - "required": true, - "schema": { - "$ref": "../definitions.json#/vendor" - } - }], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "description": "A vendor", - "schema": { - "$ref": "../definitions.json#/vendor" - } - }, - "401": { - "description": "Authentication required", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "403": { - "description": "Access forbidden", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "404": { - "description": "Vendor not found", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "500": { - "description": "Internal server error", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "503": { - "description": "Under maintenance", - "schema": { - "$ref": "../definitions.json#/error" - } - } - }, - "x-koha-authorization": { - "permissions": { - "acquisition": "vendors_manage" - } - } - }, - "delete": { - "x-mojo-to": "Acquisitions::Vendors#delete", - "operationId": "deleteVendor", - "tags": ["vendors"], - "summary": "Delete vendor", - "parameters": [{ - "$ref": "../parameters.json#/vendoridPathParam" - }], - "produces": [ - "application/json" - ], - "responses": { - "204": { - "description": "Vendor deleted" - }, - "401": { - "description": "Authentication required", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "403": { - "description": "Access forbidden", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "404": { - "description": "Vendor not found", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "500": { - "description": "Internal server error", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "503": { - "description": "Under maintenance", - "schema": { - "$ref": "../definitions.json#/error" - } - } - }, - "x-koha-authorization": { - "permissions": { - "acquisition": "vendors_manage" - } - } - } - } -} --- a/api/v1/swagger/paths/acquisitions_vendors.yaml +++ a/api/v1/swagger/paths/acquisitions_vendors.yaml @@ -0,0 +1,220 @@ +--- +/acquisitions/vendors: + get: + x-mojo-to: Acquisitions::Vendors#list + operationId: listVendors + tags: + - vendors + summary: List vendors + produces: + - application/json + parameters: + - name: name + in: query + description: Case insensitive search on vendor name + required: false + type: string + - name: accountnumber + in: query + description: Case insensitive search on vendor's account number + required: false + type: string + - $ref: ../parameters.yaml#/match + - $ref: ../parameters.yaml#/order_by + - $ref: ../parameters.yaml#/page + - $ref: ../parameters.yaml#/per_page + - $ref: ../parameters.yaml#/q_param + - $ref: ../parameters.yaml#/q_body + - $ref: ../parameters.yaml#/q_header + responses: + "200": + description: A list of vendors + schema: + type: array + items: + $ref: ../definitions.yaml#/vendor + "401": + description: Authentication required + schema: + $ref: ../definitions.yaml#/error + "403": + description: Access forbidden + schema: + $ref: ../definitions.yaml#/error + "404": + description: Vendor not found + schema: + $ref: ../definitions.yaml#/error + "500": + description: Internal server error + schema: + $ref: ../definitions.yaml#/error + "503": + description: Under maintenance + schema: + $ref: ../definitions.yaml#/error + x-koha-authorization: + permissions: + acquisition: vendors_manage + post: + x-mojo-to: Acquisitions::Vendors#add + operationId: addVendor + tags: + - vendors + summary: Add vendor + parameters: + - name: body + in: body + description: A JSON object representing a vendor + required: true + schema: + $ref: ../definitions.yaml#/vendor + produces: + - application/json + responses: + "201": + description: Vendor added + schema: + $ref: ../definitions.yaml#/vendor + "401": + description: Authentication required + schema: + $ref: ../definitions.yaml#/error + "403": + description: Access forbidden + schema: + $ref: ../definitions.yaml#/error + "404": + description: Vendor not found + schema: + $ref: ../definitions.yaml#/error + "500": + description: Internal server error + schema: + $ref: ../definitions.yaml#/error + "503": + description: Under maintenance + schema: + $ref: ../definitions.yaml#/error + x-koha-authorization: + permissions: + acquisition: vendors_manage +"/acquisitions/vendors/{vendor_id}": + get: + x-mojo-to: Acquisitions::Vendors#get + operationId: getVendor + tags: + - vendors + summary: Get vendor + parameters: + - $ref: ../parameters.yaml#/vendoridPathParam + produces: + - application/json + responses: + "200": + description: A vendor + schema: + $ref: ../definitions.yaml#/vendor + "401": + description: Authentication required + schema: + $ref: ../definitions.yaml#/error + "403": + description: Access forbidden + schema: + $ref: ../definitions.yaml#/error + "404": + description: Vendor not found + schema: + $ref: ../definitions.yaml#/error + "500": + description: Internal server error + schema: + $ref: ../definitions.yaml#/error + "503": + description: Under maintenance + schema: + $ref: ../definitions.yaml#/error + x-koha-authorization: + permissions: + acquisition: vendors_manage + put: + x-mojo-to: Acquisitions::Vendors#update + operationId: updateVendor + tags: + - vendors + summary: Update vendor + parameters: + - $ref: ../parameters.yaml#/vendoridPathParam + - name: body + in: body + description: A JSON object representing a vendor + required: true + schema: + $ref: ../definitions.yaml#/vendor + produces: + - application/json + responses: + "200": + description: A vendor + schema: + $ref: ../definitions.yaml#/vendor + "401": + description: Authentication required + schema: + $ref: ../definitions.yaml#/error + "403": + description: Access forbidden + schema: + $ref: ../definitions.yaml#/error + "404": + description: Vendor not found + schema: + $ref: ../definitions.yaml#/error + "500": + description: Internal server error + schema: + $ref: ../definitions.yaml#/error + "503": + description: Under maintenance + schema: + $ref: ../definitions.yaml#/error + x-koha-authorization: + permissions: + acquisition: vendors_manage + delete: + x-mojo-to: Acquisitions::Vendors#delete + operationId: deleteVendor + tags: + - vendors + summary: Delete vendor + parameters: + - $ref: ../parameters.yaml#/vendoridPathParam + produces: + - application/json + responses: + "204": + description: Vendor deleted + "401": + description: Authentication required + schema: + $ref: ../definitions.yaml#/error + "403": + description: Access forbidden + schema: + $ref: ../definitions.yaml#/error + "404": + description: Vendor not found + schema: + $ref: ../definitions.yaml#/error + "500": + description: Internal server error + schema: + $ref: ../definitions.yaml#/error + "503": + description: Under maintenance + schema: + $ref: ../definitions.yaml#/error + x-koha-authorization: + permissions: + acquisition: vendors_manage --- a/api/v1/swagger/paths/advancededitormacros.json +++ a/api/v1/swagger/paths/advancededitormacros.json @@ -1,557 +0,0 @@ -{ - "/advanced_editor/macros": { - "get": { - "x-mojo-to": "AdvancedEditorMacro#list", - "operationId": "listMacro", - "tags": ["macros"], - "summary": "List advanced editor macros", - "produces": [ - "application/json" - ], - "parameters": [ - { - "name": "name", - "in": "query", - "description": "Case insensative search on macro name", - "required": false, - "type": "string" - }, - { - "name": "macro_text", - "in": "query", - "description": "Case insensative search on macro text", - "required": false, - "type": "string" - }, - { - "name": "patron_id", - "in": "query", - "description": "Search on internal patron_id", - "required": false, - "type": "string" - }, - { - "name": "shared", - "in": "query", - "description": "Search on shared macros", - "required": false, - "type": "string" - }, - { - "$ref": "../parameters.json#/match" - }, - { - "$ref": "../parameters.json#/order_by" - }, - { - "$ref": "../parameters.json#/page" - }, - { - "$ref": "../parameters.json#/per_page" - }, - { - "$ref": "../parameters.json#/q_param" - }, - { - "$ref": "../parameters.json#/q_body" - }, - { - "$ref": "../parameters.json#/q_header" - } - ], - "responses": { - "200": { - "description": "A list of macros", - "schema": { - "type": "array", - "items": { - "$ref": "../definitions.json#/advancededitormacro" - } - } - }, - "403": { - "description": "Access forbidden", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "500": { - "description": "Internal error", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "503": { - "description": "Under maintenance", - "schema": { - "$ref": "../definitions.json#/error" - } - } - }, - "x-koha-authorization": { - "permissions": { - "editcatalogue": "advanced_editor" - } - } - }, - "post": { - "x-mojo-to": "AdvancedEditorMacro#add", - "operationId": "addAdvancedEditorMacro", - "tags": ["macros"], - "summary": "Add advanced editor macros", - "parameters": [{ - "name": "body", - "in": "body", - "description": "A JSON object containing informations about the new macro", - "required": true, - "schema": { - "$ref": "../definitions.json#/advancededitormacro" - } - }], - "produces": [ - "application/json" - ], - "responses": { - "201": { - "description": "Macro added", - "schema": { - "$ref": "../definitions.json#/advancededitormacro" - } - }, - "401": { - "description": "Authentication required", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "403": { - "description": "Access forbidden", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "500": { - "description": "Internal error", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "503": { - "description": "Under maintenance", - "schema": { - "$ref": "../definitions.json#/error" - } - } - }, - "x-koha-authorization": { - "permissions": { - "editcatalogue": "advanced_editor" - } - } - } - }, - "/advanced_editor/macros/shared": { - "post": { - "x-mojo-to": "AdvancedEditorMacro#add_shared", - "operationId": "addsharedAdvancedEditorMacro", - "tags": ["macros"], - "summary": "Add shared advanced editor macros", - "parameters": [{ - "name": "body", - "in": "body", - "description": "A JSON object containing informations about the new macro", - "required": true, - "schema": { - "$ref": "../definitions.json#/advancededitormacro" - } - }], - "produces": [ - "application/json" - ], - "responses": { - "201": { - "description": "Macro added", - "schema": { - "$ref": "../definitions.json#/advancededitormacro" - } - }, - "401": { - "description": "Authentication required", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "403": { - "description": "Access forbidden", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "500": { - "description": "Internal error", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "503": { - "description": "Under maintenance", - "schema": { - "$ref": "../definitions.json#/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", - "tags": ["macros"], - "summary": "Get advanced editor macro", - "parameters": [{ - "$ref": "../parameters.json#/advancededitormacro_id_pp" - }], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "description": "A macro", - "schema": { - "$ref": "../definitions.json#/advancededitormacro" - } - }, - "403": { - "description": "Access forbidden", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "404": { - "description": "AdvancedEditorMacro not found", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "500": { - "description": "Internal error", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "503": { - "description": "Under maintenance", - "schema": { - "$ref": "../definitions.json#/error" - } - } - }, - "x-koha-authorization": { - "permissions": { - "editcatalogue": "advanced_editor" - } - } - }, - "put": { - "x-mojo-to": "AdvancedEditorMacro#update", - "operationId": "updateAdvancedEditorMacro", - "tags": ["macros"], - "summary": "Update advanced editor macro", - "parameters": [{ - "$ref": "../parameters.json#/advancededitormacro_id_pp" - }, { - "name": "body", - "in": "body", - "description": "An advanced editor macro object", - "required": true, - "schema": { - "$ref": "../definitions.json#/advancededitormacro" - } - }], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "description": "An advanced editor macro", - "schema": { - "$ref": "../definitions.json#/advancededitormacro" - } - }, - "401": { - "description": "Authentication required", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "403": { - "description": "Access forbidden", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "404": { - "description": "Macro not found", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "500": { - "description": "Internal error", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "503": { - "description": "Under maintenance", - "schema": { - "$ref": "../definitions.json#/error" - } - } - }, - "x-koha-authorization": { - "permissions": { - "editcatalogue": "advanced_editor" - } - } - }, - "delete": { - "x-mojo-to": "AdvancedEditorMacro#delete", - "operationId": "deleteAdvancedEditorMacro", - "tags": ["macros"], - "summary": "Delete advanced editor macro", - "parameters": [{ - "$ref": "../parameters.json#/advancededitormacro_id_pp" - }], - "produces": [ - "application/json" - ], - "responses": { - "204": { - "description": "Advanced editor macro deleted", - "schema": { - "type": "string" - } - }, - "401": { - "description": "Authentication required", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "403": { - "description": "Access forbidden", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "404": { - "description": "Macro not found", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "500": { - "description": "Internal error", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "503": { - "description": "Under maintenance", - "schema": { - "$ref": "../definitions.json#/error" - } - } - }, - "x-koha-authorization": { - "permissions": { - "editcatalogue": "advanced_editor" - } - } - } - }, - "/advanced_editor/macros/shared/{advancededitormacro_id}": { - "get": { - "x-mojo-to": "AdvancedEditorMacro#get_shared", - "operationId": "getsharedAdvancedEditorMacro", - "tags": ["macros"], - "summary": "Get shared advanced editor macro", - "parameters": [{ - "$ref": "../parameters.json#/advancededitormacro_id_pp" - }], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "description": "A macro", - "schema": { - "$ref": "../definitions.json#/advancededitormacro" - } - }, - "403": { - "description": "Access forbidden", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "404": { - "description": "AdvancedEditorMacro not found", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "500": { - "description": "Internal error", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "503": { - "description": "Under maintenance", - "schema": { - "$ref": "../definitions.json#/error" - } - } - }, - "x-koha-authorization": { - "permissions": { - "editcatalogue": "advanced_editor" - } - } - }, - "put": { - "x-mojo-to": "AdvancedEditorMacro#update_shared", - "operationId": "updatesharedAdvancedEditorMacro", - "tags": ["macros"], - "summary": "Update shared advanced editor macro", - "parameters": [{ - "$ref": "../parameters.json#/advancededitormacro_id_pp" - }, { - "name": "body", - "in": "body", - "description": "An advanced editor macro object", - "required": true, - "schema": { - "$ref": "../definitions.json#/advancededitormacro" - } - }], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "description": "An advanced editor macro", - "schema": { - "$ref": "../definitions.json#/advancededitormacro" - } - }, - "401": { - "description": "Authentication required", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "403": { - "description": "Access forbidden", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "404": { - "description": "Macro not found", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "500": { - "description": "Internal error", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "503": { - "description": "Under maintenance", - "schema": { - "$ref": "../definitions.json#/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": "../parameters.json#/advancededitormacro_id_pp" - }], - "produces": [ - "application/json" - ], - "responses": { - "204": { - "description": "Advanced editor macro deleted", - "schema": { - "type": "string" - } - }, - "401": { - "description": "Authentication required", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "403": { - "description": "Access forbidden", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "404": { - "description": "Macro not found", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "500": { - "description": "Internal error", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "503": { - "description": "Under maintenance", - "schema": { - "$ref": "../definitions.json#/error" - } - } - }, - "x-koha-authorization": { - "permissions": { - "editcatalogue": { - "advanced_editor": 1, - "delete_shared_macros": 1 - } - } - } - } - } -} --- a/api/v1/swagger/paths/advancededitormacros.yaml +++ a/api/v1/swagger/paths/advancededitormacros.yaml @@ -0,0 +1,379 @@ +--- +/advanced_editor/macros: + get: + x-mojo-to: AdvancedEditorMacro#list + operationId: listMacro + tags: + - macros + summary: List advanced editor macros + produces: + - application/json + parameters: + - name: name + in: query + description: Case insensative search on macro name + required: false + type: string + - name: macro_text + in: query + description: Case insensative search on macro text + required: false + type: string + - name: patron_id + in: query + description: Search on internal patron_id + required: false + type: string + - name: shared + in: query + description: Search on shared macros + required: false + type: string + - $ref: ../parameters.yaml#/match + - $ref: ../parameters.yaml#/order_by + - $ref: ../parameters.yaml#/page + - $ref: ../parameters.yaml#/per_page + - $ref: ../parameters.yaml#/q_param + - $ref: ../parameters.yaml#/q_body + - $ref: ../parameters.yaml#/q_header + responses: + "200": + description: A list of macros + schema: + type: array + items: + $ref: ../definitions.yaml#/advancededitormacro + "403": + description: Access forbidden + schema: + $ref: ../definitions.yaml#/error + "500": + description: Internal error + schema: + $ref: ../definitions.yaml#/error + "503": + description: Under maintenance + schema: + $ref: ../definitions.yaml#/error + x-koha-authorization: + permissions: + editcatalogue: advanced_editor + post: + x-mojo-to: AdvancedEditorMacro#add + operationId: addAdvancedEditorMacro + tags: + - macros + summary: Add advanced editor macros + parameters: + - name: body + in: body + description: A JSON object containing informations about the new macro + required: true + schema: + $ref: ../definitions.yaml#/advancededitormacro + produces: + - application/json + responses: + "201": + description: Macro added + schema: + $ref: ../definitions.yaml#/advancededitormacro + "401": + description: Authentication required + schema: + $ref: ../definitions.yaml#/error + "403": + description: Access forbidden + schema: + $ref: ../definitions.yaml#/error + "500": + description: Internal error + schema: + $ref: ../definitions.yaml#/error + "503": + description: Under maintenance + schema: + $ref: ../definitions.yaml#/error + x-koha-authorization: + permissions: + editcatalogue: advanced_editor +/advanced_editor/macros/shared: + post: + x-mojo-to: AdvancedEditorMacro#add_shared + operationId: addsharedAdvancedEditorMacro + tags: + - macros + summary: Add shared advanced editor macros + parameters: + - name: body + in: body + description: A JSON object containing informations about the new macro + required: true + schema: + $ref: ../definitions.yaml#/advancededitormacro + produces: + - application/json + responses: + "201": + description: Macro added + schema: + $ref: ../definitions.yaml#/advancededitormacro + "401": + description: Authentication required + schema: + $ref: ../definitions.yaml#/error + "403": + description: Access forbidden + schema: + $ref: ../definitions.yaml#/error + "500": + description: Internal error + schema: + $ref: ../definitions.yaml#/error + "503": + description: Under maintenance + schema: + $ref: ../definitions.yaml#/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 + tags: + - macros + summary: Get advanced editor macro + parameters: + - $ref: ../parameters.yaml#/advancededitormacro_id_pp + produces: + - application/json + responses: + "200": + description: A macro + schema: + $ref: ../definitions.yaml#/advancededitormacro + "403": + description: Access forbidden + schema: + $ref: ../definitions.yaml#/error + "404": + description: AdvancedEditorMacro not found + schema: + $ref: ../definitions.yaml#/error + "500": + description: Internal error + schema: + $ref: ../definitions.yaml#/error + "503": + description: Under maintenance + schema: + $ref: ../definitions.yaml#/error + x-koha-authorization: + permissions: + editcatalogue: advanced_editor + put: + x-mojo-to: AdvancedEditorMacro#update + operationId: updateAdvancedEditorMacro + tags: + - macros + summary: Update advanced editor macro + parameters: + - $ref: ../parameters.yaml#/advancededitormacro_id_pp + - name: body + in: body + description: An advanced editor macro object + required: true + schema: + $ref: ../definitions.yaml#/advancededitormacro + produces: + - application/json + responses: + "200": + description: An advanced editor macro + schema: + $ref: ../definitions.yaml#/advancededitormacro + "401": + description: Authentication required + schema: + $ref: ../definitions.yaml#/error + "403": + description: Access forbidden + schema: + $ref: ../definitions.yaml#/error + "404": + description: Macro not found + schema: + $ref: ../definitions.yaml#/error + "500": + description: Internal error + schema: + $ref: ../definitions.yaml#/error + "503": + description: Under maintenance + schema: + $ref: ../definitions.yaml#/error + x-koha-authorization: + permissions: + editcatalogue: advanced_editor + delete: + x-mojo-to: AdvancedEditorMacro#delete + operationId: deleteAdvancedEditorMacro + tags: + - macros + summary: Delete advanced editor macro + parameters: + - $ref: ../parameters.yaml#/advancededitormacro_id_pp + produces: + - application/json + responses: + "204": + description: Advanced editor macro deleted + schema: + type: string + "401": + description: Authentication required + schema: + $ref: ../definitions.yaml#/error + "403": + description: Access forbidden + schema: + $ref: ../definitions.yaml#/error + "404": + description: Macro not found + schema: + $ref: ../definitions.yaml#/error + "500": + description: Internal error + schema: + $ref: ../definitions.yaml#/error + "503": + description: Under maintenance + schema: + $ref: ../definitions.yaml#/error + x-koha-authorization: + permissions: + editcatalogue: advanced_editor +"/advanced_editor/macros/shared/{advancededitormacro_id}": + get: + x-mojo-to: AdvancedEditorMacro#get_shared + operationId: getsharedAdvancedEditorMacro + tags: + - macros + summary: Get shared advanced editor macro + parameters: + - $ref: ../parameters.yaml#/advancededitormacro_id_pp + produces: + - application/json + responses: + "200": + description: A macro + schema: + $ref: ../definitions.yaml#/advancededitormacro + "403": + description: Access forbidden + schema: + $ref: ../definitions.yaml#/error + "404": + description: AdvancedEditorMacro not found + schema: + $ref: ../definitions.yaml#/error + "500": + description: Internal error + schema: + $ref: ../definitions.yaml#/error + "503": + description: Under maintenance + schema: + $ref: ../definitions.yaml#/error + x-koha-authorization: + permissions: + editcatalogue: advanced_editor + put: + x-mojo-to: AdvancedEditorMacro#update_shared + operationId: updatesharedAdvancedEditorMacro + tags: + - macros + summary: Update shared advanced editor macro + parameters: + - $ref: ../parameters.yaml#/advancededitormacro_id_pp + - name: body + in: body + description: An advanced editor macro object + required: true + schema: + $ref: ../definitions.yaml#/advancededitormacro + produces: + - application/json + responses: + "200": + description: An advanced editor macro + schema: + $ref: ../definitions.yaml#/advancededitormacro + "401": + description: Authentication required + schema: + $ref: ../definitions.yaml#/error + "403": + description: Access forbidden + schema: + $ref: ../definitions.yaml#/error + "404": + description: Macro not found + schema: + $ref: ../definitions.yaml#/error + "500": + description: Internal error + schema: + $ref: ../definitions.yaml#/error + "503": + description: Under maintenance + schema: + $ref: ../definitions.yaml#/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: ../parameters.yaml#/advancededitormacro_id_pp + produces: + - application/json + responses: + "204": + description: Advanced editor macro deleted + schema: + type: string + "401": + description: Authentication required + schema: + $ref: ../definitions.yaml#/error + "403": + description: Access forbidden + schema: + $ref: ../definitions.yaml#/error + "404": + description: Macro not found + schema: + $ref: ../definitions.yaml#/error + "500": + description: Internal error + schema: + $ref: ../definitions.yaml#/error + "503": + description: Under maintenance + schema: + $ref: ../definitions.yaml#/error + x-koha-authorization: + permissions: + editcatalogue: + advanced_editor: 1 + delete_shared_macros: 1 --- a/api/v1/swagger/paths/article_requests.yaml +++ a/api/v1/swagger/paths/article_requests.yaml @@ -30,27 +30,27 @@ "400": description: Bad request schema: - $ref: ../definitions.json#/error + $ref: ../definitions.yaml#/error "401": description: Authentication required schema: - $ref: ../definitions.json#/error + $ref: ../definitions.yaml#/error "403": description: Access forbidden schema: - $ref: ../definitions.json#/error + $ref: ../definitions.yaml#/error "404": description: Patron not found schema: - $ref: ../definitions.json#/error + $ref: ../definitions.yaml#/error "500": description: Internal server error schema: - $ref: ../definitions.json#/error + $ref: ../definitions.yaml#/error "503": description: Under maintenance schema: - $ref: ../definitions.json#/error + $ref: ../definitions.yaml#/error x-koha-authorization: permissions: circulate: circulate_remaining_permissions @@ -62,7 +62,7 @@ - article_requests summary: Cancel patron's article requests parameters: - - $ref: ../parameters.json#/patron_id_pp + - $ref: ../parameters.yaml#/patron_id_pp - name: article_request_id in: path description: Article request identifier @@ -86,26 +86,26 @@ "400": description: Bad request schema: - $ref: ../definitions.json#/error + $ref: ../definitions.yaml#/error "401": description: Authentication required schema: - $ref: ../definitions.json#/error + $ref: ../definitions.yaml#/error "403": description: Access forbidden schema: - $ref: ../definitions.json#/error + $ref: ../definitions.yaml#/error "404": description: Patron not found schema: - $ref: ../definitions.json#/error + $ref: ../definitions.yaml#/error "500": description: Internal server error schema: - $ref: ../definitions.json#/error + $ref: ../definitions.yaml#/error "503": description: Under maintenance schema: - $ref: ../definitions.json#/error + $ref: ../definitions.yaml#/error x-koha-authorization: allow-owner: true --- a/api/v1/swagger/paths/biblios.json +++ a/api/v1/swagger/paths/biblios.json @@ -1,569 +0,0 @@ -{ - "/biblios/{biblio_id}": { - "get": { - "x-mojo-to": "Biblios#get", - "operationId": "getBiblio", - "tags": [ "biblios" ], - "summary": "Get biblio", - "parameters": [ - { - "$ref": "../parameters.json#/biblio_id_pp" - } - ], - "produces": [ - "application/json", - "application/marcxml+xml", - "application/marc-in-json", - "application/marc", - "text/plain" - ], - "responses": { - "200": { - "description": "A biblio" - }, - "401": { - "description": "Authentication required", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "403": { - "description": "Access forbidden", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "404": { - "description": "Biblio not found", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "406": { - "description": "Not acceptable", - "schema": { - "type": "array", - "description": "Accepted content-types", - "items": { - "type": "string" - } - } - }, - "500": { - "description": "Internal server error", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "503": { - "description": "Under maintenance", - "schema": { - "$ref": "../definitions.json#/error" - } - } - }, - "x-koha-authorization": { - "permissions": { - "catalogue": "1" - } - } - }, - "delete": { - "x-mojo-to": "Biblios#delete", - "operationId": "deleteBiblio", - "tags": [ "biblios" ], - "summary": "Delete biblio", - "parameters": [ - { - "$ref": "../parameters.json#/biblio_id_pp" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "204": { - "description": "Biblio deleted", - "schema": { - "type": "string" - } - }, - "401": { - "description": "Authentication required", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "403": { - "description": "Access forbidden", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "404": { - "description": "Biblio not found", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "409": { - "description": "Unable to perform action on biblio", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "500": { - "description": "Internal error", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "503": { - "description": "Under maintenance", - "schema": { - "$ref": "../definitions.json#/error" - } - } - }, - "x-koha-authorization": { - "permissions": { - "editcatalogue": "edit_catalogue" - } - } - } - }, - "/biblios/{biblio_id}/checkouts": { - "get": { - "x-mojo-to": "Biblios#get_checkouts", - "operationId": "listBiblioCheckouts", - "tags": [ - "checkouts" - ], - "summary": "List checkouts for a biblio", - "parameters": [ - { - "$ref": "../parameters.json#/biblio_id_pp" - }, - { - "$ref": "../parameters.json#/page" - }, - { - "$ref": "../parameters.json#/per_page" - }, - { - "$ref": "../parameters.json#/match" - }, - { - "$ref": "../parameters.json#/order_by" - }, - { - "$ref": "../parameters.json#/q_param" - }, - { - "$ref": "../parameters.json#/q_body" - }, - { - "$ref": "../parameters.json#/q_header" - }, - { - "name": "checked_in", - "in": "query", - "description": "By default, current checkouts are returned, when this is true then checked in checkouts are returned as result.", - "type": "boolean" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "description": "A list of checkouts", - "schema": { - "$ref": "../definitions.json#/checkouts" - } - }, - "403": { - "description": "Access forbidden", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "404": { - "description": "Biblio not found", - "schema": { - "$ref": "../definitions.json#/error" - } - } - }, - "x-koha-authorization": { - "permissions": { - "circulate": "circulate_remaining_permissions" - } - }, - "x-koha-embed": [ - "issuer", - "item", - "patron", - "library" - ] - } - }, - "/biblios/{biblio_id}/items": { - "get": { - "x-mojo-to": "Biblios#get_items", - "operationId": "getBiblioItems", - "tags": [ - "biblios" - ], - "summary": "Get items for a biblio", - "parameters": [ - { - "$ref": "../parameters.json#/biblio_id_pp" - }, - { - "$ref": "../parameters.json#/match" - }, - { - "$ref": "../parameters.json#/order_by" - }, - { - "$ref": "../parameters.json#/page" - }, - { - "$ref": "../parameters.json#/per_page" - }, - { - "$ref": "../parameters.json#/q_param" - }, - { - "$ref": "../parameters.json#/q_body" - }, - { - "$ref": "../parameters.json#/q_header" - } - ], - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "description": "A list of the items attached to the record", - "schema": { - "type": "array", - "items": { - "$ref": "../definitions.json#/item" - } - } - }, - "401": { - "description": "Authentication required", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "403": { - "description": "Access forbidden", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "404": { - "description": "Biblio not found", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "406": { - "description": "Not acceptable", - "schema": { - "type": "array", - "description": "Accepted content-types", - "items": { - "type": "string" - } - } - }, - "500": { - "description": "Internal server error", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "503": { - "description": "Under maintenance", - "schema": { - "$ref": "../definitions.json#/error" - } - } - }, - "x-koha-authorization": { - "permissions": { - "catalogue": "1" - } - } - } - }, - "/biblios/{biblio_id}/pickup_locations": { - "get": { - "x-mojo-to": "Biblios#pickup_locations", - "operationId": "getBiblioPickupLocations", - "tags": [ - "biblios" - ], - "summary": "Get valid pickup locations for a biblio", - "parameters": [ - { - "$ref": "../parameters.json#/biblio_id_pp" - }, - { - "name": "patron_id", - "in": "query", - "description": "Internal patron identifier", - "required": true, - "type": "integer" - }, - { - "$ref": "../parameters.json#/match" - }, - { - "$ref": "../parameters.json#/order_by" - }, - { - "$ref": "../parameters.json#/page" - }, - { - "$ref": "../parameters.json#/per_page" - }, - { - "$ref": "../parameters.json#/q_param" - }, - { - "$ref": "../parameters.json#/q_body" - }, - { - "$ref": "../parameters.json#/q_header" - } - ], - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "description": "Biblio pickup locations", - "schema": { - "type": "array", - "items": { - "$ref": "../definitions.json#/library" - } - } - }, - "400": { - "description": "Missing or wrong parameters", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "401": { - "description": "Authentication required", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "403": { - "description": "Access forbidden", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "404": { - "description": "Biblio not found", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "500": { - "description": "Internal server error", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "503": { - "description": "Under maintenance", - "schema": { - "$ref": "../definitions.json#/error" - } - } - }, - "x-koha-authorization": { - "permissions": { - "reserveforothers": "place_holds" - } - } - } - }, - "/public/biblios/{biblio_id}": { - "get": { - "x-mojo-to": "Biblios#get_public", - "operationId": "getBiblioPublic", - "tags": [ - "biblios" - ], - "summary": "Get biblio (public)", - "parameters": [ - { - "$ref": "../parameters.json#/biblio_id_pp" - } - ], - "produces": [ - "application/marcxml+xml", - "application/marc-in-json", - "application/marc", - "text/plain" - ], - "responses": { - "200": { - "description": "A biblio" - }, - "401": { - "description": "Authentication required", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "403": { - "description": "Access forbidden", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "404": { - "description": "Biblio not found", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "406": { - "description": "Not acceptable", - "schema": { - "type": "array", - "description": "Accepted content-types", - "items": { - "type": "string" - } - } - }, - "500": { - "description": "Internal server error", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "503": { - "description": "Under maintenance", - "schema": { - "$ref": "../definitions.json#/error" - } - } - } - } - }, - "/public/biblios/{biblio_id}/items": { - "get": { - "x-mojo-to": "Biblios#get_items_public", - "operationId": "getBiblioItemsPublic", - "tags": [ - "biblios", - "items" - ], - "parameters": [ - { - "$ref": "../parameters.json#/biblio_id_pp" - }, - { - "$ref": "../parameters.json#/match" - }, - { - "$ref": "../parameters.json#/order_by" - }, - { - "$ref": "../parameters.json#/page" - }, - { - "$ref": "../parameters.json#/per_page" - }, - { - "$ref": "../parameters.json#/q_param" - }, - { - "$ref": "../parameters.json#/q_body" - }, - { - "$ref": "../parameters.json#/q_header" - } - ], - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "description": "A list of the items attached to the record", - "schema": { - "type": "array", - "items": { - "$ref": "../definitions.json#/item" - } - } - }, - "401": { - "description": "Authentication required", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "403": { - "description": "Access forbidden", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "404": { - "description": "Biblio not found", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "406": { - "description": "Not acceptable", - "schema": { - "type": "array", - "description": "Accepted content-types", - "items": { - "type": "string" - } - } - }, - "500": { - "description": "Internal server error", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "503": { - "description": "Under maintenance", - "schema": { - "$ref": "../definitions.json#/error" - } - } - } - } - } -} --- a/api/v1/swagger/paths/biblios.yaml +++ a/api/v1/swagger/paths/biblios.yaml @@ -0,0 +1,349 @@ +--- +"/biblios/{biblio_id}": + get: + x-mojo-to: Biblios#get + operationId: getBiblio + tags: + - biblios + summary: Get biblio + parameters: + - $ref: ../parameters.yaml#/biblio_id_pp + produces: + - application/json + - application/marcxml+xml + - application/marc-in-json + - application/marc + - text/plain + responses: + "200": + description: A biblio + "401": + description: Authentication required + schema: + $ref: ../definitions.yaml#/error + "403": + description: Access forbidden + schema: + $ref: ../definitions.yaml#/error + "404": + description: Biblio not found + schema: + $ref: ../definitions.yaml#/error + "406": + description: Not acceptable + schema: + type: array + description: Accepted content-types + items: + type: string + "500": + description: Internal server error + schema: + $ref: ../definitions.yaml#/error + "503": + description: Under maintenance + schema: + $ref: ../definitions.yaml#/error + x-koha-authorization: + permissions: + catalogue: "1" + delete: + x-mojo-to: Biblios#delete + operationId: deleteBiblio + tags: + - biblios + summary: Delete biblio + parameters: + - $ref: ../parameters.yaml#/biblio_id_pp + produces: + - application/json + responses: + "204": + description: Biblio deleted + schema: + type: string + "401": + description: Authentication required + schema: + $ref: ../definitions.yaml#/error + "403": + description: Access forbidden + schema: + $ref: ../definitions.yaml#/error + "404": + description: Biblio not found + schema: + $ref: ../definitions.yaml#/error + "409": + description: Unable to perform action on biblio + schema: + $ref: ../definitions.yaml#/error + "500": + description: Internal error + schema: + $ref: ../definitions.yaml#/error + "503": + description: Under maintenance + schema: + $ref: ../definitions.yaml#/error + x-koha-authorization: + permissions: + editcatalogue: edit_catalogue +"/biblios/{biblio_id}/checkouts": + get: + x-mojo-to: Biblios#get_checkouts + operationId: listBiblioCheckouts + tags: + - checkouts + summary: List checkouts for a biblio + parameters: + - $ref: ../parameters.yaml#/biblio_id_pp + - $ref: ../parameters.yaml#/page + - $ref: ../parameters.yaml#/per_page + - $ref: ../parameters.yaml#/match + - $ref: ../parameters.yaml#/order_by + - $ref: ../parameters.yaml#/q_param + - $ref: ../parameters.yaml#/q_body + - $ref: ../parameters.yaml#/q_header + - name: checked_in + in: query + description: By default, current checkouts are returned, when this is true then + checked in checkouts are returned as result. + type: boolean + produces: + - application/json + responses: + "200": + description: A list of checkouts + schema: + $ref: ../definitions.yaml#/checkouts + "403": + description: Access forbidden + schema: + $ref: ../definitions.yaml#/error + "404": + description: Biblio not found + schema: + $ref: ../definitions.yaml#/error + x-koha-authorization: + permissions: + circulate: circulate_remaining_permissions + x-koha-embed: + - issuer + - item + - patron + - library +"/biblios/{biblio_id}/items": + get: + x-mojo-to: Biblios#get_items + operationId: getBiblioItems + tags: + - biblios + summary: Get items for a biblio + parameters: + - $ref: ../parameters.yaml#/biblio_id_pp + - $ref: ../parameters.yaml#/match + - $ref: ../parameters.yaml#/order_by + - $ref: ../parameters.yaml#/page + - $ref: ../parameters.yaml#/per_page + - $ref: ../parameters.yaml#/q_param + - $ref: ../parameters.yaml#/q_body + - $ref: ../parameters.yaml#/q_header + consumes: + - application/json + produces: + - application/json + responses: + "200": + description: A list of the items attached to the record + schema: + type: array + items: + $ref: ../definitions.yaml#/item + "401": + description: Authentication required + schema: + $ref: ../definitions.yaml#/error + "403": + description: Access forbidden + schema: + $ref: ../definitions.yaml#/error + "404": + description: Biblio not found + schema: + $ref: ../definitions.yaml#/error + "406": + description: Not acceptable + schema: + type: array + description: Accepted content-types + items: + type: string + "500": + description: Internal server error + schema: + $ref: ../definitions.yaml#/error + "503": + description: Under maintenance + schema: + $ref: ../definitions.yaml#/error + x-koha-authorization: + permissions: + catalogue: "1" +"/biblios/{biblio_id}/pickup_locations": + get: + x-mojo-to: Biblios#pickup_locations + operationId: getBiblioPickupLocations + tags: + - biblios + summary: Get valid pickup locations for a biblio + parameters: + - $ref: ../parameters.yaml#/biblio_id_pp + - name: patron_id + in: query + description: Internal patron identifier + required: true + type: integer + - $ref: ../parameters.yaml#/match + - $ref: ../parameters.yaml#/order_by + - $ref: ../parameters.yaml#/page + - $ref: ../parameters.yaml#/per_page + - $ref: ../parameters.yaml#/q_param + - $ref: ../parameters.yaml#/q_body + - $ref: ../parameters.yaml#/q_header + consumes: + - application/json + produces: + - application/json + responses: + "200": + description: Biblio pickup locations + schema: + type: array + items: + $ref: ../definitions.yaml#/library + "400": + description: Missing or wrong parameters + schema: + $ref: ../definitions.yaml#/error + "401": + description: Authentication required + schema: + $ref: ../definitions.yaml#/error + "403": + description: Access forbidden + schema: + $ref: ../definitions.yaml#/error + "404": + description: Biblio not found + schema: + $ref: ../definitions.yaml#/error + "500": + description: Internal server error + schema: + $ref: ../definitions.yaml#/error + "503": + description: Under maintenance + schema: + $ref: ../definitions.yaml#/error + x-koha-authorization: + permissions: + reserveforothers: place_holds +"/public/biblios/{biblio_id}": + get: + x-mojo-to: Biblios#get_public + operationId: getBiblioPublic + tags: + - biblios + summary: Get biblio (public) + parameters: + - $ref: ../parameters.yaml#/biblio_id_pp + produces: + - application/marcxml+xml + - application/marc-in-json + - application/marc + - text/plain + responses: + "200": + description: A biblio + "401": + description: Authentication required + schema: + $ref: ../definitions.yaml#/error + "403": + description: Access forbidden + schema: + $ref: ../definitions.yaml#/error + "404": + description: Biblio not found + schema: + $ref: ../definitions.yaml#/error + "406": + description: Not acceptable + schema: + type: array + description: Accepted content-types + items: + type: string + "500": + description: Internal server error + schema: + $ref: ../definitions.yaml#/error + "503": + description: Under maintenance + schema: + $ref: ../definitions.yaml#/error +"/public/biblios/{biblio_id}/items": + get: + x-mojo-to: Biblios#get_items_public + operationId: getBiblioItemsPublic + tags: + - biblios + - items + parameters: + - $ref: ../parameters.yaml#/biblio_id_pp + - $ref: ../parameters.yaml#/match + - $ref: ../parameters.yaml#/order_by + - $ref: ../parameters.yaml#/page + - $ref: ../parameters.yaml#/per_page + - $ref: ../parameters.yaml#/q_param + - $ref: ../parameters.yaml#/q_body + - $ref: ../parameters.yaml#/q_header + consumes: + - application/json + produces: + - application/json + responses: + "200": + description: A list of the items attached to the record + schema: + type: array + items: + $ref: ../definitions.yaml#/item + "401": + description: Authentication required + schema: + $ref: ../definitions.yaml#/error + "403": + description: Access forbidden + schema: + $ref: ../definitions.yaml#/error + "404": + description: Biblio not found + schema: + $ref: ../definitions.yaml#/error + "406": + description: Not acceptable + schema: + type: array + description: Accepted content-types + items: + type: string + "500": + description: Internal server error + schema: + $ref: ../definitions.yaml#/error + "503": + description: Under maintenance + schema: + $ref: ../definitions.yaml#/error --- a/api/v1/swagger/paths/cash_registers.json +++ a/api/v1/swagger/paths/cash_registers.json @@ -1,109 +0,0 @@ -{ - "/cash_registers/{cash_register_id}/cashups": { - "get": { - "x-mojo-to": "CashRegisters::Cashups#list", - "operationId": "listCashups", - "tags": ["cashups"], - "summary": "List cashups for the cash register", - "produces": ["application/json"], - "parameters": [{ - "$ref": "../parameters.json#/cash_register_id_pp" - }, - { - "$ref": "../parameters.json#/match" - }, - { - "$ref": "../parameters.json#/order_by" - }, - { - "$ref": "../parameters.json#/page" - }, - { - "$ref": "../parameters.json#/per_page" - }, - { - "$ref": "../parameters.json#/q_param" - }, - { - "$ref": "../parameters.json#/q_body" - }, - { - "$ref": "../parameters.json#/q_header" - } - ], - "responses": { - "200": { - "description": "Cashups performed on this register", - "schema": { - "type": "array", - "items": { - "$ref": "../definitions.json#/cashup" - } - } - }, - "403": { - "description": "Access forbidden", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "404": { - "description": "Register not found", - "schema": { - "$ref": "../definitions.json#/error" - } - } - }, - "x-koha-authorization": { - "permissions": { - "cash_management": "cashup" - } - }, - "x-koha-embed": [ - "manager" - ] - } - }, - "/cashups/{cashup_id}": { - "get": { - "x-mojo-to": "CashRegisters::Cashups#get", - "operationId": "getCashup", - "tags": ["cashups"], - "summary": "Get cashup", - "parameters": [{ - "$ref": "../parameters.json#/cashup_id_pp" - }], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "description": "A cashup", - "schema": { - "$ref": "../definitions.json#/cashup" - } - }, - "403": { - "description": "Access forbidden", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "404": { - "description": "Patron not found", - "schema": { - "$ref": "../definitions.json#/error" - } - } - }, - "x-koha-authorization": { - "permissions": { - "cash_management": "cashup" - } - }, - "x-koha-embed": [ - "summary" - ] - } - } -} --- a/api/v1/swagger/paths/cash_registers.yaml +++ a/api/v1/swagger/paths/cash_registers.yaml @@ -0,0 +1,68 @@ +--- +"/cash_registers/{cash_register_id}/cashups": + get: + x-mojo-to: CashRegisters::Cashups#list + operationId: listCashups + tags: + - cashups + summary: List cashups for the cash register + produces: + - application/json + parameters: + - $ref: ../parameters.yaml#/cash_register_id_pp + - $ref: ../parameters.yaml#/match + - $ref: ../parameters.yaml#/order_by + - $ref: ../parameters.yaml#/page + - $ref: ../parameters.yaml#/per_page + - $ref: ../parameters.yaml#/q_param + - $ref: ../parameters.yaml#/q_body + - $ref: ../parameters.yaml#/q_header + responses: + "200": + description: Cashups performed on this register + schema: + type: array + items: + $ref: ../definitions.yaml#/cashup + "403": + description: Access forbidden + schema: + $ref: ../definitions.yaml#/error + "404": + description: Register not found + schema: + $ref: ../definitions.yaml#/error + x-koha-authorization: + permissions: + cash_management: cashup + x-koha-embed: + - manager +"/cashups/{cashup_id}": + get: + x-mojo-to: CashRegisters::Cashups#get + operationId: getCashup + tags: + - cashups + summary: Get cashup + parameters: + - $ref: ../parameters.yaml#/cashup_id_pp + produces: + - application/json + responses: + "200": + description: A cashup + schema: + $ref: ../definitions.yaml#/cashup + "403": + description: Access forbidden + schema: + $ref: ../definitions.yaml#/error + "404": + description: Patron not found + schema: + $ref: ../definitions.yaml#/error + x-koha-authorization: + permissions: + cash_management: cashup + x-koha-embed: + - summary --- a/api/v1/swagger/paths/checkouts.json +++ a/api/v1/swagger/paths/checkouts.json @@ -1,156 +0,0 @@ -{ - "/checkouts": { - "get": { - "x-mojo-to": "Checkouts#list", - "operationId": "listCheckouts", - "tags": ["checkouts"], - "summary": "List checkouts", - "parameters": [{ - "$ref": "../parameters.json#/patron_id_qp" - }, { - "$ref": "../parameters.json#/page" - }, { - "$ref": "../parameters.json#/per_page" - }, { - "$ref": "../parameters.json#/match" - }, { - "$ref": "../parameters.json#/order_by" - }, { - "$ref": "../parameters.json#/q_param" - }, { - "$ref": "../parameters.json#/q_body" - }, { - "$ref": "../parameters.json#/q_header" - }, { - "name": "checked_in", - "in": "query", - "description": "By default, current checkouts are returned, when this is true then checked in checkouts are returned as result.", - "type": "boolean" - }], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "description": "A list of checkouts", - "schema": { - "$ref": "../definitions.json#/checkouts" - } - }, - "403": { - "description": "Access forbidden", - "schema": { "$ref": "../definitions.json#/error" } - }, - "404": { - "description": "Patron not found", - "schema": { "$ref": "../definitions.json#/error" } - } - }, - "x-koha-authorization": { - "permissions": { - "circulate": "circulate_remaining_permissions" - } - }, - "x-koha-embed": [ - "issuer" - ] - } - }, - "/checkouts/{checkout_id}": { - "get": { - "x-mojo-to": "Checkouts#get", - "operationId": "getCheckout", - "tags": ["checkouts"], - "summary": "Get checkout", - "parameters": [{ - "$ref": "../parameters.json#/checkout_id_pp" - }], - "produces": ["application/json"], - "responses": { - "200": { - "description": "Updated borrower's checkout", - "schema": { "$ref": "../definitions.json#/checkout" } - }, - "403": { - "description": "Access forbidden", - "schema": { "$ref": "../definitions.json#/error" } - }, - "404": { - "description": "Checkout not found", - "schema": { "$ref": "../definitions.json#/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", - "tags": ["checkouts"], - "summary": "Renew a checkout", - "parameters": [ - { "$ref": "../parameters.json#/checkout_id_pp" }, - { "$ref": "../parameters.json#/seen_pp" } - ], - "produces": ["application/json"], - "responses": { - "201": { - "description": "Updated borrower's checkout", - "schema": { "$ref": "../definitions.json#/checkout" } - }, - "403": { - "description": "Cannot renew checkout", - "schema": { "$ref": "../definitions.json#/error" } - }, - "404": { - "description": "Checkout not found", - "schema": { "$ref": "../definitions.json#/error" } - } - }, - "x-koha-authorization": { - "permissions": { - "circulate": "circulate_remaining_permissions" - } - } - } - }, - "/checkouts/{checkout_id}/allows_renewal": { - "get": { - "x-mojo-to": "Checkouts#allows_renewal", - "operationId": "allows_renewalCheckout", - "tags": ["checkouts"], - "summary": "Get renewability for a checkout", - "parameters": [{ - "$ref": "../parameters.json#/checkout_id_pp" - }], - "produces": ["application/json"], - "responses": { - "200": { - "description": "Checkout renewability information", - "schema": { "$ref": "../definitions.json#/allows_renewal" } - }, - "403": { - "description": "Forbidden", - "schema": { "$ref": "../definitions.json#/error" } - }, - "404": { - "description": "Checkout not found", - "schema": { "$ref": "../definitions.json#/error" } - } - }, - "x-koha-authorization": { - "permissions": { - "circulate": "circulate_remaining_permissions" - } - } - } - } -} --- a/api/v1/swagger/paths/checkouts.yaml +++ a/api/v1/swagger/paths/checkouts.yaml @@ -0,0 +1,126 @@ +--- +/checkouts: + get: + x-mojo-to: Checkouts#list + operationId: listCheckouts + tags: + - checkouts + summary: List checkouts + parameters: + - $ref: ../parameters.yaml#/patron_id_qp + - $ref: ../parameters.yaml#/page + - $ref: ../parameters.yaml#/per_page + - $ref: ../parameters.yaml#/match + - $ref: ../parameters.yaml#/order_by + - $ref: ../parameters.yaml#/q_param + - $ref: ../parameters.yaml#/q_body + - $ref: ../parameters.yaml#/q_header + - name: checked_in + in: query + description: By default, current checkouts are returned, when this is true then + checked in checkouts are returned as result. + type: boolean + produces: + - application/json + responses: + "200": + description: A list of checkouts + schema: + $ref: ../definitions.yaml#/checkouts + "403": + description: Access forbidden + schema: + $ref: ../definitions.yaml#/error + "404": + description: Patron not found + schema: + $ref: ../definitions.yaml#/error + x-koha-authorization: + permissions: + circulate: circulate_remaining_permissions + x-koha-embed: + - issuer +"/checkouts/{checkout_id}": + get: + x-mojo-to: Checkouts#get + operationId: getCheckout + tags: + - checkouts + summary: Get checkout + parameters: + - $ref: ../parameters.yaml#/checkout_id_pp + produces: + - application/json + responses: + "200": + description: Updated borrower's checkout + schema: + $ref: ../definitions.yaml#/checkout + "403": + description: Access forbidden + schema: + $ref: ../definitions.yaml#/error + "404": + description: Checkout not found + schema: + $ref: ../definitions.yaml#/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 + tags: + - checkouts + summary: Renew a checkout + parameters: + - $ref: ../parameters.yaml#/checkout_id_pp + - $ref: ../parameters.yaml#/seen_pp + produces: + - application/json + responses: + "201": + description: Updated borrower's checkout + schema: + $ref: ../definitions.yaml#/checkout + "403": + description: Cannot renew checkout + schema: + $ref: ../definitions.yaml#/error + "404": + description: Checkout not found + schema: + $ref: ../definitions.yaml#/error + x-koha-authorization: + permissions: + circulate: circulate_remaining_permissions +"/checkouts/{checkout_id}/allows_renewal": + get: + x-mojo-to: Checkouts#allows_renewal + operationId: allows_renewalCheckout + tags: + - checkouts + summary: Get renewability for a checkout + parameters: + - $ref: ../parameters.yaml#/checkout_id_pp + produces: + - application/json + responses: + "200": + description: Checkout renewability information + schema: + $ref: ../definitions.yaml#/allows_renewal + "403": + description: Forbidden + schema: + $ref: ../definitions.yaml#/error + "404": + description: Checkout not found + schema: + $ref: ../definitions.yaml#/error + x-koha-authorization: + permissions: + circulate: circulate_remaining_permissions --- a/api/v1/swagger/paths/circulation-rules.json +++ a/api/v1/swagger/paths/circulation-rules.json @@ -1,36 +0,0 @@ -{ - "/circulation-rules/kinds": { - "get": { - "x-mojo-to": "CirculationRules#get_kinds", - "operationId": "getCirculationRuleKinds", - "tags": ["circulation_rules"], - "summary": "Get circulation rules kinds", - "produces": [ - "application/json" - ], - "responses": { - "200": { - "description": "A map of rule kind information", - "schema": { - "type": "object", - "additionalProperties": { - "$ref": "../definitions.json#/circ-rule-kind" - } - } - }, - "403": { - "description": "Access forbidden", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "500": { - "description": "Internal error", - "schema": { - "$ref": "../definitions.json#/error" - } - } - } - } - } -} --- a/api/v1/swagger/paths/circulation-rules.yaml +++ a/api/v1/swagger/paths/circulation-rules.yaml @@ -0,0 +1,25 @@ +--- +/circulation-rules/kinds: + get: + x-mojo-to: CirculationRules#get_kinds + operationId: getCirculationRuleKinds + tags: + - circulation_rules + summary: Get circulation rules kinds + produces: + - application/json + responses: + "200": + description: A map of rule kind information + schema: + type: object + additionalProperties: + $ref: ../definitions.yaml#/circ-rule-kind + "403": + description: Access forbidden + schema: + $ref: ../definitions.yaml#/error + "500": + description: Internal error + schema: + $ref: ../definitions.yaml#/error --- a/api/v1/swagger/paths/cities.yaml +++ a/api/v1/swagger/paths/cities.yaml @@ -29,32 +29,32 @@ description: Case Insensative search on city postal code required: false type: string - - $ref: ../parameters.json#/match - - $ref: ../parameters.json#/order_by - - $ref: ../parameters.json#/page - - $ref: ../parameters.json#/per_page - - $ref: ../parameters.json#/q_param - - $ref: ../parameters.json#/q_body - - $ref: ../parameters.json#/q_header + - $ref: ../parameters.yaml#/match + - $ref: ../parameters.yaml#/order_by + - $ref: ../parameters.yaml#/page + - $ref: ../parameters.yaml#/per_page + - $ref: ../parameters.yaml#/q_param + - $ref: ../parameters.yaml#/q_body + - $ref: ../parameters.yaml#/q_header responses: "200": description: A list of cities schema: type: array items: - $ref: ../definitions.json#/city + $ref: ../definitions.yaml#/city "403": description: Access forbidden schema: - $ref: ../definitions.json#/error + $ref: ../definitions.yaml#/error "500": description: Internal error schema: - $ref: ../definitions.json#/error + $ref: ../definitions.yaml#/error "503": description: Under maintenance schema: - $ref: ../definitions.json#/error + $ref: ../definitions.yaml#/error x-koha-authorization: permissions: catalogue: "1" @@ -70,30 +70,30 @@ description: A JSON object containing informations about the new hold required: true schema: - $ref: ../definitions.json#/city + $ref: ../definitions.yaml#/city produces: - application/json responses: "201": description: City added schema: - $ref: ../definitions.json#/city + $ref: ../definitions.yaml#/city "401": description: Authentication required schema: - $ref: ../definitions.json#/error + $ref: ../definitions.yaml#/error "403": description: Access forbidden schema: - $ref: ../definitions.json#/error + $ref: ../definitions.yaml#/error "500": description: Internal error schema: - $ref: ../definitions.json#/error + $ref: ../definitions.yaml#/error "503": description: Under maintenance schema: - $ref: ../definitions.json#/error + $ref: ../definitions.yaml#/error x-koha-authorization: permissions: parameters: manage_cities @@ -105,26 +105,26 @@ - cities summary: Get city parameters: - - $ref: ../parameters.json#/city_id_pp + - $ref: ../parameters.yaml#/city_id_pp produces: - application/json responses: "200": description: A city schema: - $ref: ../definitions.json#/city + $ref: ../definitions.yaml#/city "404": description: City not found schema: - $ref: ../definitions.json#/error + $ref: ../definitions.yaml#/error "500": description: Internal error schema: - $ref: ../definitions.json#/error + $ref: ../definitions.yaml#/error "503": description: Under maintenance schema: - $ref: ../definitions.json#/error + $ref: ../definitions.yaml#/error x-koha-authorization: permissions: catalogue: "1" @@ -135,40 +135,40 @@ - cities summary: Update city parameters: - - $ref: ../parameters.json#/city_id_pp + - $ref: ../parameters.yaml#/city_id_pp - name: body in: body description: A city object required: true schema: - $ref: ../definitions.json#/city + $ref: ../definitions.yaml#/city produces: - application/json responses: "200": description: A city schema: - $ref: ../definitions.json#/city + $ref: ../definitions.yaml#/city "401": description: Authentication required schema: - $ref: ../definitions.json#/error + $ref: ../definitions.yaml#/error "403": description: Access forbidden schema: - $ref: ../definitions.json#/error + $ref: ../definitions.yaml#/error "404": description: City not found schema: - $ref: ../definitions.json#/error + $ref: ../definitions.yaml#/error "500": description: Internal error schema: - $ref: ../definitions.json#/error + $ref: ../definitions.yaml#/error "503": description: Under maintenance schema: - $ref: ../definitions.json#/error + $ref: ../definitions.yaml#/error x-koha-authorization: permissions: parameters: manage_cities @@ -179,7 +179,7 @@ - cities summary: Delete city parameters: - - $ref: ../parameters.json#/city_id_pp + - $ref: ../parameters.yaml#/city_id_pp produces: - application/json responses: @@ -188,23 +188,23 @@ "401": description: Authentication required schema: - $ref: ../definitions.json#/error + $ref: ../definitions.yaml#/error "403": description: Access forbidden schema: - $ref: ../definitions.json#/error + $ref: ../definitions.yaml#/error "404": description: City not found schema: - $ref: ../definitions.json#/error + $ref: ../definitions.yaml#/error "500": description: Internal error schema: - $ref: ../definitions.json#/error + $ref: ../definitions.yaml#/error "503": description: Under maintenance schema: - $ref: ../definitions.json#/error + $ref: ../definitions.yaml#/error x-koha-authorization: permissions: parameters: manage_cities --- a/api/v1/swagger/paths/clubs.json +++ a/api/v1/swagger/paths/clubs.json @@ -1,137 +0,0 @@ -{ - "/clubs/{club_id}/holds": { - "post": { - "x-mojo-to": "Clubs::Holds#add", - "operationId": "addClubHold", - "tags": [ - "clubs" - ], - "summary": "Add a club hold", - "parameters": [ - { - "$ref": "../parameters.json#/club_id_pp" - }, - { - "name": "body", - "in": "body", - "description": "A JSON object containing informations about the new hold", - "required": true, - "schema": { - "type": "object", - "properties": { - "biblio_id": { - "description": "Internal biblio identifier", - "type": [ - "integer", - "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", - "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" - } - }, - "required": [ - "pickup_library_id" - ], - "additionalProperties": false - } - } - ], - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "responses": { - "201": { - "description": "Created club hold", - "schema": { - "$ref": "../definitions/club_hold.json" - } - }, - "400": { - "description": "Missing or wrong parameters", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "401": { - "description": "Authentication required", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "403": { - "description": "Hold not allowed", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "404": { - "description": "Club not found", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "409": { - "description": "Hold not allowed", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "500": { - "description": "Internal server error", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "503": { - "description": "Under maintenance", - "schema": { - "$ref": "../definitions.json#/error" - } - } - }, - "x-koha-authorization": { - "permissions": { - "reserveforothers": "1" - } - } - } - } -} --- a/api/v1/swagger/paths/clubs.yaml +++ a/api/v1/swagger/paths/clubs.yaml @@ -0,0 +1,93 @@ +--- +"/clubs/{club_id}/holds": + post: + x-mojo-to: Clubs::Holds#add + operationId: addClubHold + tags: + - clubs + summary: Add a club hold + parameters: + - $ref: ../parameters.yaml#/club_id_pp + - name: body + in: body + description: A JSON object containing informations about the new hold + required: true + schema: + type: object + properties: + biblio_id: + description: Internal biblio identifier + type: + - integer + - "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 + 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 + required: + - pickup_library_id + additionalProperties: false + consumes: + - application/json + produces: + - application/json + responses: + "201": + description: Created club hold + schema: + $ref: ../definitions/club_hold.yaml + "400": + description: Missing or wrong parameters + schema: + $ref: ../definitions.yaml#/error + "401": + description: Authentication required + schema: + $ref: ../definitions.yaml#/error + "403": + description: Hold not allowed + schema: + $ref: ../definitions.yaml#/error + "404": + description: Club not found + schema: + $ref: ../definitions.yaml#/error + "409": + description: Hold not allowed + schema: + $ref: ../definitions.yaml#/error + "500": + description: Internal server error + schema: + $ref: ../definitions.yaml#/error + "503": + description: Under maintenance + schema: + $ref: ../definitions.yaml#/error + x-koha-authorization: + permissions: + reserveforothers: "1" --- a/api/v1/swagger/paths/config_smtp_servers.json +++ a/api/v1/swagger/paths/config_smtp_servers.json @@ -1,316 +0,0 @@ -{ - "/config/smtp_servers": { - "get": { - "x-mojo-to": "Config::SMTP::Servers#list", - "operationId": "listSMTPServers", - "tags": [ - "smtp_servers" - ], - "summary": "List SMTP servers", - "produces": [ - "application/json" - ], - "parameters": [ - { - "$ref": "../parameters.json#/match" - }, - { - "$ref": "../parameters.json#/order_by" - }, - { - "$ref": "../parameters.json#/page" - }, - { - "$ref": "../parameters.json#/per_page" - }, - { - "$ref": "../parameters.json#/q_param" - }, - { - "$ref": "../parameters.json#/q_body" - }, - { - "$ref": "../parameters.json#/q_header" - } - ], - "responses": { - "200": { - "description": "A list of SMTP servers", - "schema": { - "type": "array", - "items": { - "$ref": "../definitions.json#/smtp_server" - } - } - }, - "403": { - "description": "Access forbidden", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "500": { - "description": "Internal error", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "503": { - "description": "Under maintenance", - "schema": { - "$ref": "../definitions.json#/error" - } - } - }, - "x-koha-authorization": { - "permissions": { - "parameters": "manage_smtp_servers" - } - } - }, - "post": { - "x-mojo-to": "Config::SMTP::Servers#add", - "operationId": "addSMTPServer", - "tags": [ - "smtp_servers" - ], - "summary": "Add SMTP server", - "parameters": [ - { - "name": "body", - "in": "body", - "description": "A JSON object representing a new SMTP server configuration", - "required": true, - "schema": { - "$ref": "../definitions.json#/smtp_server" - } - } - ], - "produces": [ - "application/json" - ], - "responses": { - "201": { - "description": "An SMTP server object", - "schema": { - "$ref": "../definitions.json#/smtp_server" - } - }, - "401": { - "description": "Authentication required", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "403": { - "description": "Access forbidden", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "409": { - "description": "Conflict in creating resource", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "500": { - "description": "Internal error", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "503": { - "description": "Under maintenance", - "schema": { - "$ref": "../definitions.json#/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", - "tags": [ - "smtp_servers" - ], - "summary": "Get SMTP server", - "parameters": [ - { - "$ref": "../parameters.json#/smtp_server_id_pp" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "description": "An SMTP server object", - "schema": { - "$ref": "../definitions.json#/smtp_server" - } - }, - "404": { - "description": "Object not found", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "409": { - "description": "Conflict updating resource", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "500": { - "description": "Internal error", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "503": { - "description": "Under maintenance", - "schema": { - "$ref": "../definitions.json#/error" - } - } - }, - "x-koha-authorization": { - "permissions": { - "parameters": "manage_smtp_servers" - } - } - }, - "put": { - "x-mojo-to": "Config::SMTP::Servers#update", - "operationId": "updateSMTPServer", - "tags": [ - "smtp_servers" - ], - "summary": "Update SMTP server", - "parameters": [ - { - "$ref": "../parameters.json#/smtp_server_id_pp" - }, - { - "name": "body", - "in": "body", - "description": "An SMTP server object", - "required": true, - "schema": { - "$ref": "../definitions.json#/smtp_server" - } - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "description": "An SMTP server object", - "schema": { - "$ref": "../definitions.json#/smtp_server" - } - }, - "401": { - "description": "Authentication required", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "403": { - "description": "Access forbidden", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "404": { - "description": "Object not found", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "500": { - "description": "Internal error", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "503": { - "description": "Under maintenance", - "schema": { - "$ref": "../definitions.json#/error" - } - } - }, - "x-koha-authorization": { - "permissions": { - "parameters": "manage_smtp_servers" - } - } - }, - "delete": { - "x-mojo-to": "Config::SMTP::Servers#delete", - "operationId": "deleteSMTPServer", - "tags": [ - "smtp_servers" - ], - "summary": "Delete SMTP server", - "parameters": [ - { - "$ref": "../parameters.json#/smtp_server_id_pp" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "204": { - "description": "SMTP server deleted" - }, - "401": { - "description": "Authentication required", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "403": { - "description": "Access forbidden", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "404": { - "description": "Object not found", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "500": { - "description": "Internal error", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "503": { - "description": "Under maintenance", - "schema": { - "$ref": "../definitions.json#/error" - } - } - }, - "x-koha-authorization": { - "permissions": { - "parameters": "manage_smtp_servers" - } - } - } - } -} --- a/api/v1/swagger/paths/config_smtp_servers.yaml +++ a/api/v1/swagger/paths/config_smtp_servers.yaml @@ -0,0 +1,198 @@ +--- +/config/smtp_servers: + get: + x-mojo-to: Config::SMTP::Servers#list + operationId: listSMTPServers + tags: + - smtp_servers + summary: List SMTP servers + produces: + - application/json + parameters: + - $ref: ../parameters.yaml#/match + - $ref: ../parameters.yaml#/order_by + - $ref: ../parameters.yaml#/page + - $ref: ../parameters.yaml#/per_page + - $ref: ../parameters.yaml#/q_param + - $ref: ../parameters.yaml#/q_body + - $ref: ../parameters.yaml#/q_header + responses: + "200": + description: A list of SMTP servers + schema: + type: array + items: + $ref: ../definitions.yaml#/smtp_server + "403": + description: Access forbidden + schema: + $ref: ../definitions.yaml#/error + "500": + description: Internal error + schema: + $ref: ../definitions.yaml#/error + "503": + description: Under maintenance + schema: + $ref: ../definitions.yaml#/error + x-koha-authorization: + permissions: + parameters: manage_smtp_servers + post: + x-mojo-to: Config::SMTP::Servers#add + operationId: addSMTPServer + tags: + - smtp_servers + summary: Add SMTP server + parameters: + - name: body + in: body + description: A JSON object representing a new SMTP server configuration + required: true + schema: + $ref: ../definitions.yaml#/smtp_server + produces: + - application/json + responses: + "201": + description: An SMTP server object + schema: + $ref: ../definitions.yaml#/smtp_server + "401": + description: Authentication required + schema: + $ref: ../definitions.yaml#/error + "403": + description: Access forbidden + schema: + $ref: ../definitions.yaml#/error + "409": + description: Conflict in creating resource + schema: + $ref: ../definitions.yaml#/error + "500": + description: Internal error + schema: + $ref: ../definitions.yaml#/error + "503": + description: Under maintenance + schema: + $ref: ../definitions.yaml#/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 + tags: + - smtp_servers + summary: Get SMTP server + parameters: + - $ref: ../parameters.yaml#/smtp_server_id_pp + produces: + - application/json + responses: + "200": + description: An SMTP server object + schema: + $ref: ../definitions.yaml#/smtp_server + "404": + description: Object not found + schema: + $ref: ../definitions.yaml#/error + "409": + description: Conflict updating resource + schema: + $ref: ../definitions.yaml#/error + "500": + description: Internal error + schema: + $ref: ../definitions.yaml#/error + "503": + description: Under maintenance + schema: + $ref: ../definitions.yaml#/error + x-koha-authorization: + permissions: + parameters: manage_smtp_servers + put: + x-mojo-to: Config::SMTP::Servers#update + operationId: updateSMTPServer + tags: + - smtp_servers + summary: Update SMTP server + parameters: + - $ref: ../parameters.yaml#/smtp_server_id_pp + - name: body + in: body + description: An SMTP server object + required: true + schema: + $ref: ../definitions.yaml#/smtp_server + produces: + - application/json + responses: + "200": + description: An SMTP server object + schema: + $ref: ../definitions.yaml#/smtp_server + "401": + description: Authentication required + schema: + $ref: ../definitions.yaml#/error + "403": + description: Access forbidden + schema: + $ref: ../definitions.yaml#/error + "404": + description: Object not found + schema: + $ref: ../definitions.yaml#/error + "500": + description: Internal error + schema: + $ref: ../definitions.yaml#/error + "503": + description: Under maintenance + schema: + $ref: ../definitions.yaml#/error + x-koha-authorization: + permissions: + parameters: manage_smtp_servers + delete: + x-mojo-to: Config::SMTP::Servers#delete + operationId: deleteSMTPServer + tags: + - smtp_servers + summary: Delete SMTP server + parameters: + - $ref: ../parameters.yaml#/smtp_server_id_pp + produces: + - application/json + responses: + "204": + description: SMTP server deleted + "401": + description: Authentication required + schema: + $ref: ../definitions.yaml#/error + "403": + description: Access forbidden + schema: + $ref: ../definitions.yaml#/error + "404": + description: Object not found + schema: + $ref: ../definitions.yaml#/error + "500": + description: Internal error + schema: + $ref: ../definitions.yaml#/error + "503": + description: Under maintenance + schema: + $ref: ../definitions.yaml#/error + x-koha-authorization: + permissions: + parameters: manage_smtp_servers --- a/api/v1/swagger/paths/holds.json +++ a/api/v1/swagger/paths/holds.json @@ -1,924 +0,0 @@ -{ - "/holds": { - "get": { - "x-mojo-to": "Holds#list", - "operationId": "listHolds", - "tags": ["holds"], - "summary": "List holds", - "parameters": [ - { - "name": "hold_id", - "in": "query", - "description": "Internal hold identifier", - "type": "integer" - }, - { - "name": "patron_id", - "in": "query", - "description": "Internal patron identifier", - "type": "integer" - }, - { - "name": "hold_date", - "in": "query", - "description": "Hold", - "type": "string", - "format": "date" - }, - { - "name": "biblio_id", - "in": "query", - "description": "Internal biblio identifier", - "type": "integer" - }, - { - "name": "pickup_library_id", - "in": "query", - "description": "Internal library identifier for the pickup library", - "type": "string" - }, - { - "name": "cancellation_date", - "in": "query", - "description": "The date the hold was cancelled", - "type": "string", - "format": "date" - }, - { - "name": "notes", - "in": "query", - "description": "Notes related to this hold", - "type": "string" - }, - { - "name": "priority", - "in": "query", - "description": "Where in the queue the patron sits", - "type": "integer" - }, - { - "name": "status", - "in": "query", - "description": "Found status", - "type": "string" - }, - { - "name": "timestamp", - "in": "query", - "description": "Time of latest update", - "type": "string" - }, - { - "name": "item_id", - "in": "query", - "description": "Internal item identifier", - "type": "integer" - }, - { - "name": "waiting_date", - "in": "query", - "description": "Date the item was marked as waiting for the patron", - "type": "string" - }, - { - "name": "expiration_date", - "in": "query", - "description": "Date the hold expires", - "type": "string" - }, - { - "name": "lowest_priority", - "in": "query", - "description": "Lowest priority", - "type": "boolean" - }, - { - "name": "suspended", - "in": "query", - "description": "Suspended", - "type": "boolean" - }, - { - "name": "suspended_until", - "in": "query", - "description": "Suspended until", - "type": "string" - }, - { - "name": "non_priority", - "in": "query", - "description": "Non priority hold", - "type": "boolean" - }, - { - "$ref": "../parameters.json#/match" - }, - { - "$ref": "../parameters.json#/order_by" - }, - { - "$ref": "../parameters.json#/page" - }, - { - "$ref": "../parameters.json#/per_page" - }, - { - "$ref": "../parameters.json#/q_param" - }, - { - "$ref": "../parameters.json#/q_body" - }, - { - "$ref": "../parameters.json#/q_header" - } - ], - "produces": ["application/json"], - "responses": { - "200": { - "description": "A list of holds", - "schema": { - "$ref": "../definitions.json#/holds" - } - }, - "401": { - "description": "Authentication required", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "403": { - "description": "Hold not allowed", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "404": { - "description": "Borrower not found", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "500": { - "description": "Internal server error", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "503": { - "description": "Under maintenance", - "schema": { - "$ref": "../definitions.json#/error" - } - } - }, - "x-koha-authorization": { - "permissions": { - "borrowers": "edit_borrowers" - } - } - }, - "post": { - "x-mojo-to": "Holds#add", - "operationId": "addHold", - "tags": ["holds"], - "summary": "Place hold", - "parameters": [ - { - "name": "body", - "in": "body", - "description": "A JSON object containing informations about the new hold", - "required": true, - "schema": { - "type": "object", - "properties": { - "patron_id": { - "description": "Internal patron identifier", - "type": "integer" - }, - "biblio_id": { - "description": "Internal biblio identifier", - "type": [ "integer", "null" ] - }, - "hold_date": { - "description": "The date the hold was placed", - "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": [ "string", "null" ] - }, - "non_priority": { - "description": "Set this hold as non priority", - "type": [ "boolean", "null" ] - } - }, - "required": [ "patron_id", "pickup_library_id" ], - "additionalProperties": false - } - }, - { - "name": "x-koha-override", - "description": "Comma-separated list of overrides (valid values: any)", - "in": "header", - "type": "string", - "required": false - } - ], - "consumes": ["application/json"], - "produces": ["application/json"], - "responses": { - "201": { - "description": "Created hold", - "schema": { - "$ref": "../definitions.json#/hold" - } - }, - "400": { - "description": "Missing or wrong parameters", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "401": { - "description": "Authentication required", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "403": { - "description": "Hold not allowed", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "404": { - "description": "Borrower not found", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "500": { - "description": "Internal server error", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "503": { - "description": "Under maintenance", - "schema": { - "$ref": "../definitions.json#/error" - } - } - }, - "x-koha-authorization": { - "permissions": { - "reserveforothers": "1" - } - } - } - }, - "/holds/{hold_id}": { - "patch": { - "x-mojo-to": "Holds#edit", - "operationId": "editHold", - "tags": ["holds"], - "summary": "Update hold", - "parameters": [{ - "$ref": "../parameters.json#/hold_id_pp" - }, { - "name": "body", - "in": "body", - "description": "A JSON object containing fields to modify", - "required": true, - "schema": { - "type": "object", - "properties": { - "priority": { - "description": "Position in waiting queue", - "type": "integer", - "minimum": 1 - }, - "pickup_library_id": { - "description": "Internal library identifier for the pickup library", - "type": "string" - }, - "suspended_until": { - "description": "Date until which the hold has been suspended", - "type": "string", - "format": "date-time" - } - }, - "additionalProperties": false - } - } - ], - "consumes": ["application/json"], - "produces": ["application/json"], - "responses": { - "200": { - "description": "Updated hold", - "schema": { - "$ref": "../definitions.json#/hold" - } - }, - "400": { - "description": "Missing or wrong parameters", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "401": { - "description": "Authentication required", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "403": { - "description": "Hold not allowed", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "404": { - "description": "Hold not found", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "500": { - "description": "Internal server error", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "503": { - "description": "Under maintenance", - "schema": { - "$ref": "../definitions.json#/error" - } - } - }, - "x-koha-authorization": { - "permissions": { - "reserveforothers": "1" - } - } - }, - "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.", - "parameters": [{ - "$ref": "../parameters.json#/hold_id_pp" - }, { - "name": "body", - "in": "body", - "description": "A JSON object containing fields to modify", - "required": true, - "schema": { - "type": "object", - "properties": { - "priority": { - "description": "Position in waiting queue", - "type": "integer", - "minimum": 1 - }, - "pickup_library_id": { - "description": "Internal library identifier for the pickup library", - "type": "string" - }, - "suspended_until": { - "description": "Date until which the hold has been suspended", - "type": "string", - "format": "date-time" - } - }, - "additionalProperties": false - } - } - ], - "consumes": ["application/json"], - "produces": ["application/json"], - "responses": { - "200": { - "description": "Updated hold", - "schema": { - "$ref": "../definitions.json#/hold" - } - }, - "400": { - "description": "Missing or wrong parameters", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "401": { - "description": "Authentication required", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "403": { - "description": "Hold not allowed", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "404": { - "description": "Hold not found", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "500": { - "description": "Internal server error", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "503": { - "description": "Under maintenance", - "schema": { - "$ref": "../definitions.json#/error" - } - } - }, - "x-koha-authorization": { - "permissions": { - "reserveforothers": "1" - } - } - }, - "delete": { - "x-mojo-to": "Holds#delete", - "operationId": "deleteHold", - "tags": ["holds"], - "summary": "Cancel hold", - "parameters": [{ - "$ref": "../parameters.json#/hold_id_pp" - } - ], - "produces": ["application/json"], - "responses": { - "204": { - "description": "Hold deleted" - }, - "401": { - "description": "Authentication required", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "403": { - "description": "Hold not allowed", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "404": { - "description": "Hold not found", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "500": { - "description": "Internal server error", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "503": { - "description": "Under maintenance", - "schema": { - "$ref": "../definitions.json#/error" - } - } - }, - "x-koha-authorization": { - "permissions": { - "reserveforothers": "1" - } - } - } - }, - "/holds/{hold_id}/priority": { - "put": { - "x-mojo-to": "Holds#update_priority", - "operationId": "updateHoldPriority", - "tags": [ - "holds" - ], - "summary": "Update priority for the hold", - "parameters": [ - { - "$ref": "../parameters.json#/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" - } - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "description": "The new priority value for the hold", - "schema": { - "type": "integer" - } - }, - "401": { - "description": "Authentication required", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "403": { - "description": "Access forbidden", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "404": { - "description": "Biblio not found", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "409": { - "description": "Unable to perform action on biblio", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "500": { - "description": "Internal error", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "503": { - "description": "Under maintenance", - "schema": { - "$ref": "../definitions.json#/error" - } - } - }, - "x-koha-authorization": { - "permissions": { - "reserveforothers": "modify_holds_priority" - } - } - } - }, - "/holds/{hold_id}/suspension": { - "post": { - "x-mojo-to": "Holds#suspend", - "operationId": "suspendHold", - "tags": ["holds"], - "summary": "Suspend the hold", - "parameters": [{ - "$ref": "../parameters.json#/hold_id_pp" - }, { - "name": "body", - "in": "body", - "description": "A JSON object containing fields to modify", - "required": false, - "schema": { - "type": "object", - "properties": { - "end_date": { - "description": "Date the hold suspension expires", - "type": "string", - "format": "date" - } - }, - "additionalProperties": false - } - } - ], - "consumes": ["application/json"], - "produces": ["application/json"], - "responses": { - "201": { - "description": "Hold suspended" - }, - "400": { - "description": "Missing or wrong parameters", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "401": { - "description": "Authentication required", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "403": { - "description": "Hold not allowed", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "404": { - "description": "Hold not found", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "500": { - "description": "Internal server error", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "503": { - "description": "Under maintenance", - "schema": { - "$ref": "../definitions.json#/error" - } - } - }, - "x-koha-authorization": { - "permissions": { - "reserveforothers": "1" - } - } - }, - "delete": { - "x-mojo-to": "Holds#resume", - "operationId": "resumeHold", - "tags": ["holds"], - "summary": "Resume hold", - "parameters": [ - { - "$ref": "../parameters.json#/hold_id_pp" - } - ], - "consumes": ["application/json"], - "produces": ["application/json"], - "responses": { - "204": { - "description": "Hold resumed" - }, - "400": { - "description": "Missing or wrong parameters", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "401": { - "description": "Authentication required", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "403": { - "description": "Hold not allowed", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "404": { - "description": "Hold not found", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "500": { - "description": "Internal server error", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "503": { - "description": "Under maintenance", - "schema": { - "$ref": "../definitions.json#/error" - } - } - }, - "x-koha-authorization": { - "permissions": { - "reserveforothers": "1" - } - } - } - }, - "/holds/{hold_id}/pickup_locations": { - "get": { - "x-mojo-to": "Holds#pickup_locations", - "operationId": "getHoldPickupLocations", - "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": "../parameters.json#/hold_id_pp" - }, - { - "$ref": "../parameters.json#/match" - }, - { - "$ref": "../parameters.json#/order_by" - }, - { - "$ref": "../parameters.json#/page" - }, - { - "$ref": "../parameters.json#/per_page" - }, - { - "$ref": "../parameters.json#/q_param" - }, - { - "$ref": "../parameters.json#/q_body" - }, - { - "$ref": "../parameters.json#/q_header" - } - ], - "produces": ["application/json"], - "responses": { - "200": { - "description": "Hold pickup location", - "schema": { - "type": "array", - "items": { - "$ref": "../definitions.json#/library" - } - } - }, - "400": { - "description": "Missing or wrong parameters", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "401": { - "description": "Authentication required", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "403": { - "description": "Hold pickup location list not allowed", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "404": { - "description": "Hold not found", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "500": { - "description": "Internal server error", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "503": { - "description": "Under maintenance", - "schema": { - "$ref": "../definitions.json#/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": "../parameters.json#/hold_id_pp" - }, - { - "name": "body", - "in": "body", - "description": "Pickup location", - "required": true, - "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": { - "type": "string", - "description": "Internal identifier for the pickup library" - } - }, - "additionalProperties": false - } - }, - "400": { - "description": "Missing or wrong parameters", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "401": { - "description": "Authentication required", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "403": { - "description": "Access forbidden", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "404": { - "description": "Hold not found", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "409": { - "description": "Unable to perform action on hold", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "500": { - "description": "Internal error", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "503": { - "description": "Under maintenance", - "schema": { - "$ref": "../definitions.json#/error" - } - } - }, - "x-koha-authorization": { - "permissions": { - "reserveforothers": "place_holds" - } - } - } - } -} --- a/api/v1/swagger/paths/holds.yaml +++ a/api/v1/swagger/paths/holds.yaml @@ -0,0 +1,650 @@ +--- +/holds: + get: + x-mojo-to: Holds#list + operationId: listHolds + tags: + - holds + summary: List holds + parameters: + - name: hold_id + in: query + description: Internal hold identifier + type: integer + - name: patron_id + in: query + description: Internal patron identifier + type: integer + - name: hold_date + in: query + description: Hold + type: string + format: date + - name: biblio_id + in: query + description: Internal biblio identifier + type: integer + - name: pickup_library_id + in: query + description: Internal library identifier for the pickup library + type: string + - name: cancellation_date + in: query + description: The date the hold was cancelled + type: string + format: date + - name: notes + in: query + description: Notes related to this hold + type: string + - name: priority + in: query + description: Where in the queue the patron sits + type: integer + - name: status + in: query + description: Found status + type: string + - name: timestamp + in: query + description: Time of latest update + type: string + - name: item_id + in: query + description: Internal item identifier + type: integer + - name: waiting_date + in: query + description: Date the item was marked as waiting for the patron + type: string + - name: expiration_date + in: query + description: Date the hold expires + type: string + - name: lowest_priority + in: query + description: Lowest priority + type: boolean + - name: suspended + in: query + description: Suspended + type: boolean + - name: suspended_until + in: query + description: Suspended until + type: string + - name: non_priority + in: query + description: Non priority hold + type: boolean + - $ref: ../parameters.yaml#/match + - $ref: ../parameters.yaml#/order_by + - $ref: ../parameters.yaml#/page + - $ref: ../parameters.yaml#/per_page + - $ref: ../parameters.yaml#/q_param + - $ref: ../parameters.yaml#/q_body + - $ref: ../parameters.yaml#/q_header + produces: + - application/json + responses: + "200": + description: A list of holds + schema: + $ref: ../definitions.yaml#/holds + "401": + description: Authentication required + schema: + $ref: ../definitions.yaml#/error + "403": + description: Hold not allowed + schema: + $ref: ../definitions.yaml#/error + "404": + description: Borrower not found + schema: + $ref: ../definitions.yaml#/error + "500": + description: Internal server error + schema: + $ref: ../definitions.yaml#/error + "503": + description: Under maintenance + schema: + $ref: ../definitions.yaml#/error + x-koha-authorization: + permissions: + borrowers: edit_borrowers + post: + x-mojo-to: Holds#add + operationId: addHold + tags: + - holds + summary: Place hold + parameters: + - name: body + in: body + description: A JSON object containing informations about the new hold + required: true + schema: + type: object + properties: + patron_id: + description: Internal patron identifier + type: integer + biblio_id: + description: Internal biblio identifier + type: + - integer + - "null" + hold_date: + description: The date the hold was placed + 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: + - string + - "null" + non_priority: + description: Set this hold as non priority + type: + - boolean + - "null" + required: + - patron_id + - pickup_library_id + additionalProperties: false + - name: x-koha-override + description: "Comma-separated list of overrides (valid values: any)" + in: header + type: string + required: false + consumes: + - application/json + produces: + - application/json + responses: + "201": + description: Created hold + schema: + $ref: ../definitions.yaml#/hold + "400": + description: Missing or wrong parameters + schema: + $ref: ../definitions.yaml#/error + "401": + description: Authentication required + schema: + $ref: ../definitions.yaml#/error + "403": + description: Hold not allowed + schema: + $ref: ../definitions.yaml#/error + "404": + description: Borrower not found + schema: + $ref: ../definitions.yaml#/error + "500": + description: Internal server error + schema: + $ref: ../definitions.yaml#/error + "503": + description: Under maintenance + schema: + $ref: ../definitions.yaml#/error + x-koha-authorization: + permissions: + reserveforothers: "1" +"/holds/{hold_id}": + patch: + x-mojo-to: Holds#edit + operationId: editHold + tags: + - holds + summary: Update hold + parameters: + - $ref: ../parameters.yaml#/hold_id_pp + - name: body + in: body + description: A JSON object containing fields to modify + required: true + schema: + type: object + properties: + priority: + description: Position in waiting queue + type: integer + minimum: 1 + pickup_library_id: + description: Internal library identifier for the pickup library + type: string + suspended_until: + description: Date until which the hold has been suspended + type: string + format: date-time + additionalProperties: false + consumes: + - application/json + produces: + - application/json + responses: + "200": + description: Updated hold + schema: + $ref: ../definitions.yaml#/hold + "400": + description: Missing or wrong parameters + schema: + $ref: ../definitions.yaml#/error + "401": + description: Authentication required + schema: + $ref: ../definitions.yaml#/error + "403": + description: Hold not allowed + schema: + $ref: ../definitions.yaml#/error + "404": + description: Hold not found + schema: + $ref: ../definitions.yaml#/error + "500": + description: Internal server error + schema: + $ref: ../definitions.yaml#/error + "503": + description: Under maintenance + schema: + $ref: ../definitions.yaml#/error + x-koha-authorization: + permissions: + reserveforothers: "1" + 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. + parameters: + - $ref: ../parameters.yaml#/hold_id_pp + - name: body + in: body + description: A JSON object containing fields to modify + required: true + schema: + type: object + properties: + priority: + description: Position in waiting queue + type: integer + minimum: 1 + pickup_library_id: + description: Internal library identifier for the pickup library + type: string + suspended_until: + description: Date until which the hold has been suspended + type: string + format: date-time + additionalProperties: false + consumes: + - application/json + produces: + - application/json + responses: + "200": + description: Updated hold + schema: + $ref: ../definitions.yaml#/hold + "400": + description: Missing or wrong parameters + schema: + $ref: ../definitions.yaml#/error + "401": + description: Authentication required + schema: + $ref: ../definitions.yaml#/error + "403": + description: Hold not allowed + schema: + $ref: ../definitions.yaml#/error + "404": + description: Hold not found + schema: + $ref: ../definitions.yaml#/error + "500": + description: Internal server error + schema: + $ref: ../definitions.yaml#/error + "503": + description: Under maintenance + schema: + $ref: ../definitions.yaml#/error + x-koha-authorization: + permissions: + reserveforothers: "1" + delete: + x-mojo-to: Holds#delete + operationId: deleteHold + tags: + - holds + summary: Cancel hold + parameters: + - $ref: ../parameters.yaml#/hold_id_pp + produces: + - application/json + responses: + "204": + description: Hold deleted + "401": + description: Authentication required + schema: + $ref: ../definitions.yaml#/error + "403": + description: Hold not allowed + schema: + $ref: ../definitions.yaml#/error + "404": + description: Hold not found + schema: + $ref: ../definitions.yaml#/error + "500": + description: Internal server error + schema: + $ref: ../definitions.yaml#/error + "503": + description: Under maintenance + schema: + $ref: ../definitions.yaml#/error + x-koha-authorization: + permissions: + reserveforothers: "1" +"/holds/{hold_id}/priority": + put: + x-mojo-to: Holds#update_priority + operationId: updateHoldPriority + tags: + - holds + summary: Update priority for the hold + parameters: + - $ref: ../parameters.yaml#/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 + produces: + - application/json + responses: + "200": + description: The new priority value for the hold + schema: + type: integer + "401": + description: Authentication required + schema: + $ref: ../definitions.yaml#/error + "403": + description: Access forbidden + schema: + $ref: ../definitions.yaml#/error + "404": + description: Biblio not found + schema: + $ref: ../definitions.yaml#/error + "409": + description: Unable to perform action on biblio + schema: + $ref: ../definitions.yaml#/error + "500": + description: Internal error + schema: + $ref: ../definitions.yaml#/error + "503": + description: Under maintenance + schema: + $ref: ../definitions.yaml#/error + x-koha-authorization: + permissions: + reserveforothers: modify_holds_priority +"/holds/{hold_id}/suspension": + post: + x-mojo-to: Holds#suspend + operationId: suspendHold + tags: + - holds + summary: Suspend the hold + parameters: + - $ref: ../parameters.yaml#/hold_id_pp + - name: body + in: body + description: A JSON object containing fields to modify + required: false + schema: + type: object + properties: + end_date: + description: Date the hold suspension expires + type: string + format: date + additionalProperties: false + consumes: + - application/json + produces: + - application/json + responses: + "201": + description: Hold suspended + "400": + description: Missing or wrong parameters + schema: + $ref: ../definitions.yaml#/error + "401": + description: Authentication required + schema: + $ref: ../definitions.yaml#/error + "403": + description: Hold not allowed + schema: + $ref: ../definitions.yaml#/error + "404": + description: Hold not found + schema: + $ref: ../definitions.yaml#/error + "500": + description: Internal server error + schema: + $ref: ../definitions.yaml#/error + "503": + description: Under maintenance + schema: + $ref: ../definitions.yaml#/error + x-koha-authorization: + permissions: + reserveforothers: "1" + delete: + x-mojo-to: Holds#resume + operationId: resumeHold + tags: + - holds + summary: Resume hold + parameters: + - $ref: ../parameters.yaml#/hold_id_pp + consumes: + - application/json + produces: + - application/json + responses: + "204": + description: Hold resumed + "400": + description: Missing or wrong parameters + schema: + $ref: ../definitions.yaml#/error + "401": + description: Authentication required + schema: + $ref: ../definitions.yaml#/error + "403": + description: Hold not allowed + schema: + $ref: ../definitions.yaml#/error + "404": + description: Hold not found + schema: + $ref: ../definitions.yaml#/error + "500": + description: Internal server error + schema: + $ref: ../definitions.yaml#/error + "503": + description: Under maintenance + schema: + $ref: ../definitions.yaml#/error + x-koha-authorization: + permissions: + reserveforothers: "1" +"/holds/{hold_id}/pickup_locations": + get: + x-mojo-to: Holds#pickup_locations + operationId: getHoldPickupLocations + 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: ../parameters.yaml#/hold_id_pp + - $ref: ../parameters.yaml#/match + - $ref: ../parameters.yaml#/order_by + - $ref: ../parameters.yaml#/page + - $ref: ../parameters.yaml#/per_page + - $ref: ../parameters.yaml#/q_param + - $ref: ../parameters.yaml#/q_body + - $ref: ../parameters.yaml#/q_header + produces: + - application/json + responses: + "200": + description: Hold pickup location + schema: + type: array + items: + $ref: ../definitions.yaml#/library + "400": + description: Missing or wrong parameters + schema: + $ref: ../definitions.yaml#/error + "401": + description: Authentication required + schema: + $ref: ../definitions.yaml#/error + "403": + description: Hold pickup location list not allowed + schema: + $ref: ../definitions.yaml#/error + "404": + description: Hold not found + schema: + $ref: ../definitions.yaml#/error + "500": + description: Internal server error + schema: + $ref: ../definitions.yaml#/error + "503": + description: Under maintenance + schema: + $ref: ../definitions.yaml#/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: ../parameters.yaml#/hold_id_pp + - name: body + in: body + description: Pickup location + required: true + 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: + type: string + description: Internal identifier for the pickup library + additionalProperties: false + "400": + description: Missing or wrong parameters + schema: + $ref: ../definitions.yaml#/error + "401": + description: Authentication required + schema: + $ref: ../definitions.yaml#/error + "403": + description: Access forbidden + schema: + $ref: ../definitions.yaml#/error + "404": + description: Hold not found + schema: + $ref: ../definitions.yaml#/error + "409": + description: Unable to perform action on hold + schema: + $ref: ../definitions.yaml#/error + "500": + description: Internal error + schema: + $ref: ../definitions.yaml#/error + "503": + description: Under maintenance + schema: + $ref: ../definitions.yaml#/error + x-koha-authorization: + permissions: + reserveforothers: place_holds --- a/api/v1/swagger/paths/ill_backends.json +++ a/api/v1/swagger/paths/ill_backends.json @@ -1,120 +0,0 @@ -{ - "/ill_backends": { - "get": { - "x-mojo-to": "Illbackends#list", - "operationId": "listIllbackends", - "tags": ["illbackends"], - "summary": "List ILL backends", - "parameters": [], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "description": "A list of ILL backends", - "schema": { - "$ref": "../definitions.json#/ill_backends" - } - }, - "401": { - "description": "Authentication required", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "403": { - "description": "Access forbidden", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "404": { - "description": "ILL backends not found", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "500": { - "description": "Internal server error", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "503": { - "description": "Under maintenance", - "schema": { - "$ref": "../definitions.json#/error" - } - } - }, - "x-koha-authorization": { - "permissions": { - "ill": "1" - } - } - } - }, - "/ill_backends/{ill_backend_id}": { - "get": { - "x-mojo-to": "Illbackends#get", - "operationId": "getIllbackends", - "tags": ["illbackends"], - "summary": "Get ILL backend", - "parameters": [ - { - "name": "ill_backend_id", - "in": "path", - "description": "ILL backend id/name", - "required": true, - "type": "string" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "description": "An ILL backends", - "schema": { - "$ref": "../definitions.json#/ill_backend" - } - }, - "401": { - "description": "Authentication required", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "403": { - "description": "Access forbidden", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "404": { - "description": "ILL backends not found", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "500": { - "description": "Internal server error", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "503": { - "description": "Under maintenance", - "schema": { - "$ref": "../definitions.json#/error" - } - } - }, - "x-koha-authorization": { - "permissions": { - "ill": "1" - } - } - } - } -} --- a/api/v1/swagger/paths/ill_backends.yaml +++ a/api/v1/swagger/paths/ill_backends.yaml @@ -0,0 +1,82 @@ +--- +/ill_backends: + get: + x-mojo-to: Illbackends#list + operationId: listIllbackends + tags: + - illbackends + summary: List ILL backends + parameters: [] + produces: + - application/json + responses: + "200": + description: A list of ILL backends + schema: + $ref: ../definitions.yaml#/ill_backends + "401": + description: Authentication required + schema: + $ref: ../definitions.yaml#/error + "403": + description: Access forbidden + schema: + $ref: ../definitions.yaml#/error + "404": + description: ILL backends not found + schema: + $ref: ../definitions.yaml#/error + "500": + description: Internal server error + schema: + $ref: ../definitions.yaml#/error + "503": + description: Under maintenance + schema: + $ref: ../definitions.yaml#/error + x-koha-authorization: + permissions: + ill: "1" +"/ill_backends/{ill_backend_id}": + get: + x-mojo-to: Illbackends#get + operationId: getIllbackends + tags: + - illbackends + summary: Get ILL backend + parameters: + - name: ill_backend_id + in: path + description: ILL backend id/name + required: true + type: string + produces: + - application/json + responses: + "200": + description: An ILL backends + schema: + $ref: ../definitions.yaml#/ill_backend + "401": + description: Authentication required + schema: + $ref: ../definitions.yaml#/error + "403": + description: Access forbidden + schema: + $ref: ../definitions.yaml#/error + "404": + description: ILL backends not found + schema: + $ref: ../definitions.yaml#/error + "500": + description: Internal server error + schema: + $ref: ../definitions.yaml#/error + "503": + description: Under maintenance + schema: + $ref: ../definitions.yaml#/error + x-koha-authorization: + permissions: + ill: "1" --- a/api/v1/swagger/paths/illrequests.json +++ a/api/v1/swagger/paths/illrequests.json @@ -1,163 +0,0 @@ -{ - "/illrequests": { - "get": { - "x-mojo-to": "Illrequests#list", - "operationId": "listIllrequests", - "tags": ["illrequests"], - "summary": "List ILL requests", - "parameters": [{ - "name": "embed", - "in": "query", - "description": "Additional objects that should be embedded in the response", - "required": false, - "type": "array", - "collectionFormat": "csv", - "items": { - "type": "string", - "enum": [ - "patron", - "library", - "capabilities", - "metadata", - "requested_partners", - "comments", - "status_alias" - ] - } - }, { - "name": "backend", - "in": "query", - "description": "The name of a ILL backend", - "required": false, - "type": "string" - }, { - "name": "orderid", - "in": "query", - "description": "The order ID of a request", - "required": false, - "type": "string" - }, { - "name": "biblionumber", - "in": "query", - "description": "Internal biblio identifier", - "required": false, - "type": "integer" - }, { - "name": "borrowernumber", - "in": "query", - "description": "Internal patron identifier", - "required": false, - "type": "integer" - }, { - "name": "completed", - "in": "query", - "description": "The date the request was considered completed", - "required": false, - "type": "string" - }, { - "name": "completed_formatted", - "in": "query", - "description": "The date the request was considered complete formatted", - "required": false, - "type": "string" - }, { - "name": "status", - "in": "query", - "description": "A full status string e.g. REQREV", - "required": false, - "type": "string" - }, { - "name": "cost", - "in": "query", - "description": "The quoted cost of the request", - "required": false, - "type": "number" - }, { - "name": "price_paid", - "in": "query", - "description": "The final cost of the request", - "required": false, - "type": "number" - }, { - "name": "medium", - "in": "query", - "description": "The medium of the requested item", - "required": false, - "type": "string" - }, { - "name": "updated", - "in": "query", - "description": "The last updated date of the request", - "required": false, - "type": "string" - }, { - "name": "updated_formatted", - "in": "query", - "description": "The last updated date of the request formatted", - "required": false, - "type": "string" - }, { - "name": "placed", - "in": "query", - "description": "The date the request was placed", - "required": false, - "type": "string" - }, { - "name": "placed_formatted", - "in": "query", - "description": "The date the request was placed formatted", - "required": false, - "type": "string" - }, { - "name": "branchcode", - "in": "query", - "description": "Library ID", - "required": false, - "type": "string" - }], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "description": "A list of ILL requests" - }, - "401": { - "description": "Authentication required", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "403": { - "description": "Access forbidden", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "404": { - "description": "ILL requests not found", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "500": { - "description": "Internal server error", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "503": { - "description": "Under maintenance", - "schema": { - "$ref": "../definitions.json#/error" - } - } - }, - "x-koha-authorization": { - "permissions": { - "ill": "1" - } - } - } - } -} --- a/api/v1/swagger/paths/illrequests.yaml +++ a/api/v1/swagger/paths/illrequests.yaml @@ -0,0 +1,128 @@ +--- +/illrequests: + get: + x-mojo-to: Illrequests#list + operationId: listIllrequests + tags: + - illrequests + summary: List ILL requests + parameters: + - name: embed + in: query + description: Additional objects that should be embedded in the response + required: false + type: array + collectionFormat: csv + items: + type: string + enum: + - patron + - library + - capabilities + - metadata + - requested_partners + - comments + - status_alias + - name: backend + in: query + description: The name of a ILL backend + required: false + type: string + - name: orderid + in: query + description: The order ID of a request + required: false + type: string + - name: biblionumber + in: query + description: Internal biblio identifier + required: false + type: integer + - name: borrowernumber + in: query + description: Internal patron identifier + required: false + type: integer + - name: completed + in: query + description: The date the request was considered completed + required: false + type: string + - name: completed_formatted + in: query + description: The date the request was considered complete formatted + required: false + type: string + - name: status + in: query + description: A full status string e.g. REQREV + required: false + type: string + - name: cost + in: query + description: The quoted cost of the request + required: false + type: number + - name: price_paid + in: query + description: The final cost of the request + required: false + type: number + - name: medium + in: query + description: The medium of the requested item + required: false + type: string + - name: updated + in: query + description: The last updated date of the request + required: false + type: string + - name: updated_formatted + in: query + description: The last updated date of the request formatted + required: false + type: string + - name: placed + in: query + description: The date the request was placed + required: false + type: string + - name: placed_formatted + in: query + description: The date the request was placed formatted + required: false + type: string + - name: branchcode + in: query + description: Library ID + required: false + type: string + produces: + - application/json + responses: + "200": + description: A list of ILL requests + "401": + description: Authentication required + schema: + $ref: ../definitions.yaml#/error + "403": + description: Access forbidden + schema: + $ref: ../definitions.yaml#/error + "404": + description: ILL requests not found + schema: + $ref: ../definitions.yaml#/error + "500": + description: Internal server error + schema: + $ref: ../definitions.yaml#/error + "503": + description: Under maintenance + schema: + $ref: ../definitions.yaml#/error + x-koha-authorization: + permissions: + ill: "1" --- a/api/v1/swagger/paths/import_batch_profiles.json +++ a/api/v1/swagger/paths/import_batch_profiles.json @@ -1,375 +0,0 @@ -{ - "/import_batch_profiles": { - "get": { - "x-mojo-to": "ImportBatchProfiles#list", - "operationId": "listImportBatchProfiles", - "tags": [ - "batch_import_profiles" - ], - "summary": "List batch import profiles", - "parameters": [ - { - "name": "name", - "in": "query", - "description": "Search on profile's name", - "required": false, - "type": "string" - }, - { - "$ref": "../parameters.json#/match" - }, - { - "$ref": "../parameters.json#/order_by" - }, - { - "$ref": "../parameters.json#/page" - }, - { - "$ref": "../parameters.json#/per_page" - }, - { - "$ref": "../parameters.json#/q_param" - }, - { - "$ref": "../parameters.json#/q_body" - }, - { - "$ref": "../parameters.json#/q_header" - } - ], - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "description": "A list of import batch profiles", - "schema": { - "$ref": "../definitions.json#/import_batch_profiles" - } - }, - "401": { - "description": "Authentication required", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "403": { - "description": "Access forbidden", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "500": { - "description": "Internal server error", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "503": { - "description": "Under maintenance", - "schema": { - "$ref": "../definitions.json#/error" - } - } - }, - "x-koha-authorization": { - "permissions": { - "tools": "stage_marc_import" - } - } - }, - "post": { - "x-mojo-to": "ImportBatchProfiles#add", - "operationId": "addImportBatchProfiles", - "tags": [ - "batch_import_profiles" - ], - "summary": "Add batch import profile", - "parameters": [ - { - "name": "body", - "in": "body", - "description": "A JSON object containing a import batch profile", - "required": true, - "schema": { - "type": "object", - "properties": { - "name": { - "description": "name of this profile", - "type": "string" - }, - "matcher_id": { - "description": "the id of the match rule used (matchpoints.matcher_id)", - "type": ["integer", "null"] - }, - "template_id": { - "description": "the id of the marc modification template", - "type": ["integer", "null"] - }, - "overlay_action": { - "description": "how to handle duplicate records", - "type": ["string", "null"] - }, - "nomatch_action": { - "description": "how to handle records where no match is found", - "type": ["string", "null"] - }, - "item_action": { - "description": "what to do with item records", - "type": ["string", "null"] - }, - "parse_items": { - "description": "should items be parsed", - "type": ["boolean", "null"] - }, - "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", - "type": ["string", "null"] - } - }, - "additionalProperties": false - } - } - ], - "consumes": ["application/json"], - "produces": ["application/json"], - "responses": { - "201": { - "description": "Created Profile", - "schema": { - "$ref": "../definitions.json#/import_batch_profile" - } - }, - "400": { - "description": "Missing or wrong parameters", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "401": { - "description": "Authentication required", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "403": { - "description": "Hold not allowed", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "404": { - "description": "Borrower not found", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "500": { - "description": "Internal server error", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "503": { - "description": "Under maintenance", - "schema": { - "$ref": "../definitions.json#/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", - "parameters": [ - { - "$ref": "../parameters.json#/import_batch_profile_id_pp" - }, - { - "name": "body", - "in": "body", - "description": "A JSON object containing a import batch profile", - "required": true, - "schema": { - "type": "object", - "properties": { - "name": { - "description": "name of this profile", - "type": "string" - }, - "matcher_id": { - "description": "the id of the match rule used (matchpoints.matcher_id)", - "type": ["integer", "null"] - }, - "template_id": { - "description": "the id of the marc modification template", - "type": ["integer", "null"] - }, - "overlay_action": { - "description": "how to handle duplicate records", - "type": ["string", "null"] - }, - "nomatch_action": { - "description": "how to handle records where no match is found", - "type": ["string", "null"] - }, - "item_action": { - "description": "what to do with item records", - "type": ["string", "null"] - }, - "parse_items": { - "description": "should items be parsed", - "type": ["boolean", "null"] - }, - "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", - "type": ["string", "null"] - } - }, - "additionalProperties": false - } - } - ], - "consumes": ["application/json"], - "produces": ["application/json"], - "responses": { - "200": { - "description": "Updated profile", - "schema": { - "$ref": "../definitions.json#/import_batch_profile" - } - }, - "400": { - "description": "Missing or wrong parameters", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "401": { - "description": "Authentication required", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "403": { - "description": "Hold not allowed", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "404": { - "description": "Borrower not found", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "500": { - "description": "Internal server error", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "503": { - "description": "Under maintenance", - "schema": { - "$ref": "../definitions.json#/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": "../parameters.json#/import_batch_profile_id_pp" - } - ], - "produces": ["application/json"], - "responses": { - "204": { - "description": "Profile deleted" - }, - "401": { - "description": "Authentication required", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "403": { - "description": "Hold not allowed", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "404": { - "description": "Hold not found", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "500": { - "description": "Internal server error", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "503": { - "description": "Under maintenance", - "schema": { - "$ref": "../definitions.json#/error" - } - } - }, - "x-koha-authorization": { - "permissions": { - "tools": "stage_marc_import" - } - } - } - } -} --- a/api/v1/swagger/paths/import_batch_profiles.yaml +++ a/api/v1/swagger/paths/import_batch_profiles.yaml @@ -0,0 +1,295 @@ +--- +/import_batch_profiles: + get: + x-mojo-to: ImportBatchProfiles#list + operationId: listImportBatchProfiles + tags: + - batch_import_profiles + summary: List batch import profiles + parameters: + - name: name + in: query + description: Search on profile's name + required: false + type: string + - $ref: ../parameters.yaml#/match + - $ref: ../parameters.yaml#/order_by + - $ref: ../parameters.yaml#/page + - $ref: ../parameters.yaml#/per_page + - $ref: ../parameters.yaml#/q_param + - $ref: ../parameters.yaml#/q_body + - $ref: ../parameters.yaml#/q_header + consumes: + - application/json + produces: + - application/json + responses: + "200": + description: A list of import batch profiles + schema: + $ref: ../definitions.yaml#/import_batch_profiles + "401": + description: Authentication required + schema: + $ref: ../definitions.yaml#/error + "403": + description: Access forbidden + schema: + $ref: ../definitions.yaml#/error + "500": + description: Internal server error + schema: + $ref: ../definitions.yaml#/error + "503": + description: Under maintenance + schema: + $ref: ../definitions.yaml#/error + x-koha-authorization: + permissions: + tools: stage_marc_import + post: + x-mojo-to: ImportBatchProfiles#add + operationId: addImportBatchProfiles + tags: + - batch_import_profiles + summary: Add batch import profile + parameters: + - name: body + in: body + description: A JSON object containing a import batch profile + required: true + schema: + type: object + properties: + name: + description: name of this profile + type: string + matcher_id: + description: the id of the match rule used (matchpoints.matcher_id) + type: + - integer + - "null" + template_id: + description: the id of the marc modification template + type: + - integer + - "null" + overlay_action: + description: how to handle duplicate records + type: + - string + - "null" + nomatch_action: + description: how to handle records where no match is found + type: + - string + - "null" + item_action: + description: what to do with item records + type: + - string + - "null" + parse_items: + description: should items be parsed + type: + - boolean + - "null" + 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 + type: + - string + - "null" + additionalProperties: false + consumes: + - application/json + produces: + - application/json + responses: + "201": + description: Created Profile + schema: + $ref: ../definitions.yaml#/import_batch_profile + "400": + description: Missing or wrong parameters + schema: + $ref: ../definitions.yaml#/error + "401": + description: Authentication required + schema: + $ref: ../definitions.yaml#/error + "403": + description: Hold not allowed + schema: + $ref: ../definitions.yaml#/error + "404": + description: Borrower not found + schema: + $ref: ../definitions.yaml#/error + "500": + description: Internal server error + schema: + $ref: ../definitions.yaml#/error + "503": + description: Under maintenance + schema: + $ref: ../definitions.yaml#/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 + parameters: + - $ref: ../parameters.yaml#/import_batch_profile_id_pp + - name: body + in: body + description: A JSON object containing a import batch profile + required: true + schema: + type: object + properties: + name: + description: name of this profile + type: string + matcher_id: + description: the id of the match rule used (matchpoints.matcher_id) + type: + - integer + - "null" + template_id: + description: the id of the marc modification template + type: + - integer + - "null" + overlay_action: + description: how to handle duplicate records + type: + - string + - "null" + nomatch_action: + description: how to handle records where no match is found + type: + - string + - "null" + item_action: + description: what to do with item records + type: + - string + - "null" + parse_items: + description: should items be parsed + type: + - boolean + - "null" + 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 + type: + - string + - "null" + additionalProperties: false + consumes: + - application/json + produces: + - application/json + responses: + "200": + description: Updated profile + schema: + $ref: ../definitions.yaml#/import_batch_profile + "400": + description: Missing or wrong parameters + schema: + $ref: ../definitions.yaml#/error + "401": + description: Authentication required + schema: + $ref: ../definitions.yaml#/error + "403": + description: Hold not allowed + schema: + $ref: ../definitions.yaml#/error + "404": + description: Borrower not found + schema: + $ref: ../definitions.yaml#/error + "500": + description: Internal server error + schema: + $ref: ../definitions.yaml#/error + "503": + description: Under maintenance + schema: + $ref: ../definitions.yaml#/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: ../parameters.yaml#/import_batch_profile_id_pp + produces: + - application/json + responses: + "204": + description: Profile deleted + "401": + description: Authentication required + schema: + $ref: ../definitions.yaml#/error + "403": + description: Hold not allowed + schema: + $ref: ../definitions.yaml#/error + "404": + description: Hold not found + schema: + $ref: ../definitions.yaml#/error + "500": + description: Internal server error + schema: + $ref: ../definitions.yaml#/error + "503": + description: Under maintenance + schema: + $ref: ../definitions.yaml#/error + x-koha-authorization: + permissions: + tools: stage_marc_import --- a/api/v1/swagger/paths/items.yaml +++ a/api/v1/swagger/paths/items.yaml @@ -12,13 +12,13 @@ description: Search on the item's barcode required: false type: string - - $ref: ../parameters.json#/match - - $ref: ../parameters.json#/order_by - - $ref: ../parameters.json#/page - - $ref: ../parameters.json#/per_page - - $ref: ../parameters.json#/q_param - - $ref: ../parameters.json#/q_body - - $ref: ../parameters.json#/q_header + - $ref: ../parameters.yaml#/match + - $ref: ../parameters.yaml#/order_by + - $ref: ../parameters.yaml#/page + - $ref: ../parameters.yaml#/per_page + - $ref: ../parameters.yaml#/q_param + - $ref: ../parameters.yaml#/q_body + - $ref: ../parameters.yaml#/q_header consumes: - application/json produces: @@ -29,23 +29,23 @@ schema: type: array items: - $ref: ../definitions.json#/item + $ref: ../definitions.yaml#/item "401": description: Authentication required schema: - $ref: ../definitions.json#/error + $ref: ../definitions.yaml#/error "403": description: Access forbidden schema: - $ref: ../definitions.json#/error + $ref: ../definitions.yaml#/error "500": description: Internal server error schema: - $ref: ../definitions.json#/error + $ref: ../definitions.yaml#/error "503": description: Under maintenance schema: - $ref: ../definitions.json#/error + $ref: ../definitions.yaml#/error x-koha-authorization: permissions: catalogue: "1" @@ -57,7 +57,7 @@ - items summary: Get item parameters: - - $ref: ../parameters.json#/item_id_pp + - $ref: ../parameters.yaml#/item_id_pp consumes: - application/json produces: @@ -66,23 +66,23 @@ "200": description: An item schema: - $ref: ../definitions.json#/item + $ref: ../definitions.yaml#/item "400": description: Missing or wrong parameters schema: - $ref: ../definitions.json#/error + $ref: ../definitions.yaml#/error "404": description: Item not found schema: - $ref: ../definitions.json#/error + $ref: ../definitions.yaml#/error "500": description: Internal server error schema: - $ref: ../definitions.json#/error + $ref: ../definitions.yaml#/error "503": description: Under maintenance schema: - $ref: ../definitions.json#/error + $ref: ../definitions.yaml#/error x-koha-authorization: permissions: catalogue: "1" @@ -94,19 +94,19 @@ tags: - items parameters: - - $ref: ../parameters.json#/item_id_pp + - $ref: ../parameters.yaml#/item_id_pp - name: patron_id in: query description: Internal patron identifier required: true type: integer - - $ref: ../parameters.json#/match - - $ref: ../parameters.json#/order_by - - $ref: ../parameters.json#/page - - $ref: ../parameters.json#/per_page - - $ref: ../parameters.json#/q_param - - $ref: ../parameters.json#/q_body - - $ref: ../parameters.json#/q_header + - $ref: ../parameters.yaml#/match + - $ref: ../parameters.yaml#/order_by + - $ref: ../parameters.yaml#/page + - $ref: ../parameters.yaml#/per_page + - $ref: ../parameters.yaml#/q_param + - $ref: ../parameters.yaml#/q_body + - $ref: ../parameters.yaml#/q_header consumes: - application/json produces: @@ -117,31 +117,31 @@ schema: type: array items: - $ref: ../definitions.json#/library + $ref: ../definitions.yaml#/library "400": description: Missing or wrong parameters schema: - $ref: ../definitions.json#/error + $ref: ../definitions.yaml#/error "401": description: Authentication required schema: - $ref: ../definitions.json#/error + $ref: ../definitions.yaml#/error "403": description: Access forbidden schema: - $ref: ../definitions.json#/error + $ref: ../definitions.yaml#/error "404": description: Biblio not found schema: - $ref: ../definitions.json#/error + $ref: ../definitions.yaml#/error "500": description: Internal server error schema: - $ref: ../definitions.json#/error + $ref: ../definitions.yaml#/error "503": description: Under maintenance schema: - $ref: ../definitions.json#/error + $ref: ../definitions.yaml#/error x-koha-authorization: permissions: reserveforothers: place_holds --- a/api/v1/swagger/paths/libraries.json +++ a/api/v1/swagger/paths/libraries.json @@ -1,557 +0,0 @@ -{ - "/libraries": { - "get": { - "x-mojo-to": "Libraries#list", - "operationId": "listLibraries", - "tags": [ - "libraries" - ], - "summary": "List libraries", - "parameters": [ - { - "name": "name", - "in": "query", - "description": "Case insensitive 'starts-with' search on name", - "required": false, - "type": "string" - }, - { - "name": "address1", - "in": "query", - "description": "Case insensitive 'starts-with' search on address1", - "required": false, - "type": "string" - }, - { - "name": "address2", - "in": "query", - "description": "Case insensitive 'starts-with' search on address2", - "required": false, - "type": "string" - }, - { - "name": "address3", - "in": "query", - "description": "Case insensitive 'starts-with' search on address3", - "required": false, - "type": "string" - }, - { - "name": "postal_code", - "in": "query", - "description": "Case insensitive 'starts-with' search on postal code", - "required": false, - "type": "string" - }, - { - "name": "city", - "in": "query", - "description": "Case insensitive 'starts-with' search on city", - "required": false, - "type": "string" - }, - { - "name": "state", - "in": "query", - "description": "Case insensitive 'starts-with' search on state", - "required": false, - "type": "string" - }, - { - "name": "country", - "in": "query", - "description": "Case insensitive 'starts_with' search on country", - "required": false, - "type": "string" - }, - { - "name": "phone", - "in": "query", - "description": "Case insensitive 'starts_with' search on phone number", - "required": false, - "type": "string" - }, - { - "name": "fax", - "in": "query", - "description": "Case insensitive 'starts_with' search on fax number", - "required": false, - "type": "string" - }, - { - "name": "email", - "in": "query", - "description": "Case insensitive 'starts_with' search on email address", - "required": false, - "type": "string" - }, - { - "name": "reply_to_email", - "in": "query", - "description": "Case insensitive 'starts_with' search on Reply-To email address", - "required": false, - "type": "string" - }, - { - "name": "return_path_email", - "in": "query", - "description": "Case insensitive 'starts_with' search on Return-Path email address", - "required": false, - "type": "string" - }, - { - "name": "url", - "in": "query", - "description": "Case insensitive 'starts_with' search on website URL", - "required": false, - "type": "string" - }, - { - "name": "ip", - "in": "query", - "description": "Case insensitive 'starts_with' search on IP address", - "required": false, - "type": "string" - }, - { - "name": "notes", - "in": "query", - "description": "Case insensitive 'starts_with' search on notes", - "required": false, - "type": "string" - }, - { - "name": "opac_info", - "in": "query", - "description": "Case insensitive 'starts-with' search on OPAC info", - "required": false, - "type": "string" - }, - { - "$ref": "../parameters.json#/match" - }, - { - "$ref": "../parameters.json#/order_by" - }, - { - "$ref": "../parameters.json#/page" - }, - { - "$ref": "../parameters.json#/per_page" - }, - { - "$ref": "../parameters.json#/q_param" - }, - { - "$ref": "../parameters.json#/q_body" - }, - { - "$ref": "../parameters.json#/q_header" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "description": "A list of libraries", - "schema": { - "type": "array", - "items": { - "$ref": "../definitions.json#/library" - } - } - }, - "500": { - "description": "Internal error", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "503": { - "description": "Under maintenance", - "schema": { - "$ref": "../definitions.json#/error" - } - } - }, - "x-koha-authorization": { - "permissions": { - "catalogue": "1" - } - }, - "x-koha-embed": [ - "smtp_server" - ] - }, - "post": { - "x-mojo-to": "Libraries#add", - "operationId": "addLibrary", - "tags": [ - "libraries" - ], - "summary": "Add library", - "parameters": [ - { - "name": "body", - "in": "body", - "description": "A JSON object containing informations about the new library", - "required": true, - "schema": { - "$ref": "../definitions.json#/library" - } - } - ], - "produces": [ - "application/json" - ], - "responses": { - "201": { - "description": "Library added", - "schema": { - "$ref": "../definitions.json#/library" - } - }, - "400": { - "description": "Bad request", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "401": { - "description": "Authentication required", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "403": { - "description": "Access forbidden", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "409": { - "description": "Conflict in creating resource", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "500": { - "description": "Internal error", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "503": { - "description": "Under maintenance", - "schema": { - "$ref": "../definitions.json#/error" - } - } - }, - "x-koha-authorization": { - "permissions": { - "parameters": "manage_libraries" - } - } - } - }, - "/libraries/{library_id}": { - "get": { - "x-mojo-to": "Libraries#get", - "operationId": "getLibrary", - "tags": [ - "libraries" - ], - "summary": "Get library", - "parameters": [ - { - "$ref": "../parameters.json#/library_id_pp" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "description": "A library", - "schema": { - "$ref": "../definitions.json#/library" - } - }, - "404": { - "description": "Library not found", - "schema": { - "$ref": "../definitions.json#/error" - } - } - }, - "x-koha-authorization": { - "permissions": { - "catalogue": "1" - } - }, - "x-koha-embed": [ - "smtp_server" - ] - }, - "put": { - "x-mojo-to": "Libraries#update", - "operationId": "updateLibrary", - "tags": [ - "libraries" - ], - "summary": "Update library", - "parameters": [ - { - "$ref": "../parameters.json#/library_id_pp" - }, - { - "name": "body", - "in": "body", - "description": "A JSON object containing information on the library", - "required": true, - "schema": { - "$ref": "../definitions.json#/library" - } - } - ], - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "description": "A library", - "schema": { - "$ref": "../definitions.json#/library" - } - }, - "400": { - "description": "Bad request", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "401": { - "description": "Authentication required", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "403": { - "description": "Access forbidden", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "404": { - "description": "Library not found", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "500": { - "description": "Internal error", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "503": { - "description": "Under maintenance", - "schema": { - "$ref": "../definitions.json#/error" - } - } - }, - "x-koha-authorization": { - "permissions": { - "parameters": "manage_libraries" - } - } - }, - "delete": { - "x-mojo-to": "Libraries#delete", - "operationId": "deleteLibrary", - "tags": [ - "libraries" - ], - "summary": "Delete library", - "parameters": [ - { - "$ref": "../parameters.json#/library_id_pp" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "204": { - "description": "Library deleted", - "schema": { - "type": "string" - } - }, - "401": { - "description": "Authentication required", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "403": { - "description": "Access forbidden", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "404": { - "description": "Library not found", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "500": { - "description": "Internal error", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "503": { - "description": "Under maintenance", - "schema": { - "$ref": "../definitions.json#/error" - } - } - }, - "x-koha-authorization": { - "permissions": { - "parameters": "manage_libraries" - } - } - } - }, - "/public/libraries": { - "get": { - "x-mojo-to": "Libraries#list", - "operationId": "listLibrariesPublic", - "tags": [ - "libraries" - ], - "summary": "List libraries", - "parameters": [ - { - "$ref": "../parameters.json#/match" - }, - { - "$ref": "../parameters.json#/order_by" - }, - { - "$ref": "../parameters.json#/page" - }, - { - "$ref": "../parameters.json#/per_page" - }, - { - "$ref": "../parameters.json#/q_param" - }, - { - "$ref": "../parameters.json#/q_body" - }, - { - "$ref": "../parameters.json#/q_header" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "description": "A list of libraries", - "schema": { - "type": "array", - "items": { - "$ref": "../definitions.json#/library" - } - } - }, - "500": { - "description": "Internal error", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "503": { - "description": "Under maintenance", - "schema": { - "$ref": "../definitions.json#/error" - } - } - } - } - }, - "/public/libraries/{library_id}": { - "get": { - "x-mojo-to": "Libraries#get", - "operationId": "getLibraryPublic", - "tags": [ - "libraries" - ], - "summary": "Get library (public)", - "parameters": [ - { - "$ref": "../parameters.json#/library_id_pp" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "description": "A library" - }, - "401": { - "description": "Authentication required", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "403": { - "description": "Access forbidden", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "404": { - "description": "Library not found", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "406": { - "description": "Not acceptable", - "schema": { - "type": "array", - "description": "Accepted content-types", - "items": { - "type": "string" - } - } - }, - "500": { - "description": "Internal server error", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "503": { - "description": "Under maintenance", - "schema": { - "$ref": "../definitions.json#/error" - } - } - } - } - } -} --- a/api/v1/swagger/paths/libraries.yaml +++ a/api/v1/swagger/paths/libraries.yaml @@ -0,0 +1,356 @@ +--- +/libraries: + get: + x-mojo-to: Libraries#list + operationId: listLibraries + tags: + - libraries + summary: List libraries + parameters: + - name: name + in: query + description: Case insensitive 'starts-with' search on name + required: false + type: string + - name: address1 + in: query + description: Case insensitive 'starts-with' search on address1 + required: false + type: string + - name: address2 + in: query + description: Case insensitive 'starts-with' search on address2 + required: false + type: string + - name: address3 + in: query + description: Case insensitive 'starts-with' search on address3 + required: false + type: string + - name: postal_code + in: query + description: Case insensitive 'starts-with' search on postal code + required: false + type: string + - name: city + in: query + description: Case insensitive 'starts-with' search on city + required: false + type: string + - name: state + in: query + description: Case insensitive 'starts-with' search on state + required: false + type: string + - name: country + in: query + description: Case insensitive 'starts_with' search on country + required: false + type: string + - name: phone + in: query + description: Case insensitive 'starts_with' search on phone number + required: false + type: string + - name: fax + in: query + description: Case insensitive 'starts_with' search on fax number + required: false + type: string + - name: email + in: query + description: Case insensitive 'starts_with' search on email address + required: false + type: string + - name: reply_to_email + in: query + description: Case insensitive 'starts_with' search on Reply-To email address + required: false + type: string + - name: return_path_email + in: query + description: Case insensitive 'starts_with' search on Return-Path email address + required: false + type: string + - name: url + in: query + description: Case insensitive 'starts_with' search on website URL + required: false + type: string + - name: ip + in: query + description: Case insensitive 'starts_with' search on IP address + required: false + type: string + - name: notes + in: query + description: Case insensitive 'starts_with' search on notes + required: false + type: string + - name: opac_info + in: query + description: Case insensitive 'starts-with' search on OPAC info + required: false + type: string + - $ref: ../parameters.yaml#/match + - $ref: ../parameters.yaml#/order_by + - $ref: ../parameters.yaml#/page + - $ref: ../parameters.yaml#/per_page + - $ref: ../parameters.yaml#/q_param + - $ref: ../parameters.yaml#/q_body + - $ref: ../parameters.yaml#/q_header + produces: + - application/json + responses: + "200": + description: A list of libraries + schema: + type: array + items: + $ref: ../definitions.yaml#/library + "500": + description: Internal error + schema: + $ref: ../definitions.yaml#/error + "503": + description: Under maintenance + schema: + $ref: ../definitions.yaml#/error + x-koha-authorization: + permissions: + catalogue: "1" + x-koha-embed: + - smtp_server + post: + x-mojo-to: Libraries#add + operationId: addLibrary + tags: + - libraries + summary: Add library + parameters: + - name: body + in: body + description: A JSON object containing informations about the new library + required: true + schema: + $ref: ../definitions.yaml#/library + produces: + - application/json + responses: + "201": + description: Library added + schema: + $ref: ../definitions.yaml#/library + "400": + description: Bad request + schema: + $ref: ../definitions.yaml#/error + "401": + description: Authentication required + schema: + $ref: ../definitions.yaml#/error + "403": + description: Access forbidden + schema: + $ref: ../definitions.yaml#/error + "409": + description: Conflict in creating resource + schema: + $ref: ../definitions.yaml#/error + "500": + description: Internal error + schema: + $ref: ../definitions.yaml#/error + "503": + description: Under maintenance + schema: + $ref: ../definitions.yaml#/error + x-koha-authorization: + permissions: + parameters: manage_libraries +"/libraries/{library_id}": + get: + x-mojo-to: Libraries#get + operationId: getLibrary + tags: + - libraries + summary: Get library + parameters: + - $ref: ../parameters.yaml#/library_id_pp + produces: + - application/json + responses: + "200": + description: A library + schema: + $ref: ../definitions.yaml#/library + "404": + description: Library not found + schema: + $ref: ../definitions.yaml#/error + x-koha-authorization: + permissions: + catalogue: "1" + x-koha-embed: + - smtp_server + put: + x-mojo-to: Libraries#update + operationId: updateLibrary + tags: + - libraries + summary: Update library + parameters: + - $ref: ../parameters.yaml#/library_id_pp + - name: body + in: body + description: A JSON object containing information on the library + required: true + schema: + $ref: ../definitions.yaml#/library + consumes: + - application/json + produces: + - application/json + responses: + "200": + description: A library + schema: + $ref: ../definitions.yaml#/library + "400": + description: Bad request + schema: + $ref: ../definitions.yaml#/error + "401": + description: Authentication required + schema: + $ref: ../definitions.yaml#/error + "403": + description: Access forbidden + schema: + $ref: ../definitions.yaml#/error + "404": + description: Library not found + schema: + $ref: ../definitions.yaml#/error + "500": + description: Internal error + schema: + $ref: ../definitions.yaml#/error + "503": + description: Under maintenance + schema: + $ref: ../definitions.yaml#/error + x-koha-authorization: + permissions: + parameters: manage_libraries + delete: + x-mojo-to: Libraries#delete + operationId: deleteLibrary + tags: + - libraries + summary: Delete library + parameters: + - $ref: ../parameters.yaml#/library_id_pp + produces: + - application/json + responses: + "204": + description: Library deleted + schema: + type: string + "401": + description: Authentication required + schema: + $ref: ../definitions.yaml#/error + "403": + description: Access forbidden + schema: + $ref: ../definitions.yaml#/error + "404": + description: Library not found + schema: + $ref: ../definitions.yaml#/error + "500": + description: Internal error + schema: + $ref: ../definitions.yaml#/error + "503": + description: Under maintenance + schema: + $ref: ../definitions.yaml#/error + x-koha-authorization: + permissions: + parameters: manage_libraries +/public/libraries: + get: + x-mojo-to: Libraries#list + operationId: listLibrariesPublic + tags: + - libraries + summary: List libraries + parameters: + - $ref: ../parameters.yaml#/match + - $ref: ../parameters.yaml#/order_by + - $ref: ../parameters.yaml#/page + - $ref: ../parameters.yaml#/per_page + - $ref: ../parameters.yaml#/q_param + - $ref: ../parameters.yaml#/q_body + - $ref: ../parameters.yaml#/q_header + produces: + - application/json + responses: + "200": + description: A list of libraries + schema: + type: array + items: + $ref: ../definitions.yaml#/library + "500": + description: Internal error + schema: + $ref: ../definitions.yaml#/error + "503": + description: Under maintenance + schema: + $ref: ../definitions.yaml#/error +"/public/libraries/{library_id}": + get: + x-mojo-to: Libraries#get + operationId: getLibraryPublic + tags: + - libraries + summary: Get library (public) + parameters: + - $ref: ../parameters.yaml#/library_id_pp + produces: + - application/json + responses: + "200": + description: A library + "401": + description: Authentication required + schema: + $ref: ../definitions.yaml#/error + "403": + description: Access forbidden + schema: + $ref: ../definitions.yaml#/error + "404": + description: Library not found + schema: + $ref: ../definitions.yaml#/error + "406": + description: Not acceptable + schema: + type: array + description: Accepted content-types + items: + type: string + "500": + description: Internal server error + schema: + $ref: ../definitions.yaml#/error + "503": + description: Under maintenance + schema: + $ref: ../definitions.yaml#/error --- a/api/v1/swagger/paths/oauth.json +++ a/api/v1/swagger/paths/oauth.json @@ -1,66 +0,0 @@ -{ - "/oauth/token": { - "post": { - "x-mojo-to": "OAuth#token", - "operationId": "tokenOAuth", - "tags": ["oauth"], - "summary": "Get access token", - "produces": [ - "application/json" - ], - "parameters": [ - { - "name": "grant_type", - "in": "formData", - "description": "grant type (client_credentials)", - "required": true, - "type": "string" - }, - { - "name": "client_id", - "in": "formData", - "description": "client id", - "type": "string" - }, - { - "name": "client_secret", - "in": "formData", - "description": "client secret", - "type": "string" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "type": "object", - "properties": { - "access_token": { - "type": "string" - }, - "token_type": { - "type": "string" - }, - "expires_in": { - "type": "integer" - } - }, - "additionalProperties": false - } - }, - "400": { - "description": "Bad Request", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "403": { - "description": "Access forbidden", - "schema": { - "$ref": "../definitions.json#/error" - } - } - } - } - } -} --- a/api/v1/swagger/paths/oauth.yaml +++ a/api/v1/swagger/paths/oauth.yaml @@ -0,0 +1,45 @@ +--- +/oauth/token: + post: + x-mojo-to: OAuth#token + operationId: tokenOAuth + tags: + - oauth + summary: Get access token + produces: + - application/json + parameters: + - name: grant_type + in: formData + description: grant type (client_credentials) + required: true + type: string + - name: client_id + in: formData + description: client id + type: string + - name: client_secret + in: formData + description: client secret + type: string + responses: + "200": + description: OK + schema: + type: object + properties: + access_token: + type: string + token_type: + type: string + expires_in: + type: integer + additionalProperties: false + "400": + description: Bad Request + schema: + $ref: ../definitions.yaml#/error + "403": + description: Access forbidden + schema: + $ref: ../definitions.yaml#/error --- a/api/v1/swagger/paths/patrons.json +++ a/api/v1/swagger/paths/patrons.json @@ -1,712 +0,0 @@ -{ - "/patrons": { - "get": { - "x-mojo-to": "Patrons#list", - "operationId": "listPatrons", - "tags": ["patrons"], - "summary": "List patrons", - "produces": [ - "application/json" - ], - "parameters": [{ - "name": "patron_id", - "in": "query", - "description": "Search on patron_id", - "required": false, - "type": "string" - }, { - "name": "cardnumber", - "in": "query", - "description": "Case insensitive search on cardnumber", - "required": false, - "type": "string" - }, { - "name": "surname", - "in": "query", - "description": "Case insensitive search on surname", - "required": false, - "type": "string" - }, { - "name": "firstname", - "in": "query", - "description": "Case insensitive search on firstname", - "required": false, - "type": "string" - }, { - "name": "title", - "in": "query", - "description": "Case insensitive search on title", - "required": false, - "type": "string" - }, { - "name": "other_name", - "in": "query", - "description": "Case insensitive search on othernames", - "required": false, - "type": "string" - }, { - "name": "initials", - "in": "query", - "description": "Case insensitive search on initials", - "required": false, - "type": "string" - }, { - "name": "street_number", - "in": "query", - "description": "Case insensitive search on streetnumber", - "required": false, - "type": "string" - }, { - "name": "street_type", - "in": "query", - "description": "Case insensitive search on streettype", - "required": false, - "type": "string" - }, { - "name": "address", - "in": "query", - "description": "Case insensitive search on address", - "required": false, - "type": "string" - }, { - "name": "address2", - "in": "query", - "description": "Case insensitive search on address2", - "required": false, - "type": "string" - }, { - "name": "city", - "in": "query", - "description": "Case insensitive search on city", - "required": false, - "type": "string" - }, { - "name": "state", - "in": "query", - "description": "Case insensitive search on state", - "required": false, - "type": "string" - }, { - "name": "postal_code", - "in": "query", - "description": "Case insensitive search on zipcode", - "required": false, - "type": "string" - }, { - "name": "country", - "in": "query", - "description": "Case insensitive search on country", - "required": false, - "type": "string" - }, { - "name": "email", - "in": "query", - "description": "Case insensitive search on email", - "required": false, - "type": "string" - }, { - "name": "phone", - "in": "query", - "description": "Case insensitive search on phone", - "required": false, - "type": "string" - }, { - "name": "mobile", - "in": "query", - "description": "Case insensitive search on mobile", - "required": false, - "type": "string" - }, { - "name": "fax", - "in": "query", - "description": "Case insensitive search on fax", - "required": false, - "type": "string" - }, { - "name": "secondary_email", - "in": "query", - "description": "Case insensitive search on secondary_email", - "required": false, - "type": "string" - }, { - "name": "secondary_phone", - "in": "query", - "description": "Case insensitive search on secondary_phone", - "required": false, - "type": "string" - }, { - "name": "altaddress_street_number", - "in": "query", - "description": "Case insensitive search on altaddress_street_number", - "required": false, - "type": "string" - }, { - "name": "altaddress_street_type", - "in": "query", - "description": "Case insensitive search on altaddress_street_type", - "required": false, - "type": "string" - }, { - "name": "altaddress_address", - "in": "query", - "description": "Case insensitive search on altaddress_address", - "required": false, - "type": "string" - }, { - "name": "altaddress_address2", - "in": "query", - "description": "Case insensitive search on altaddress_address2", - "required": false, - "type": "string" - }, { - "name": "altaddress_city", - "in": "query", - "description": "Case insensitive search on altaddress_city", - "required": false, - "type": "string" - }, { - "name": "altaddress_state", - "in": "query", - "description": "Case insensitive search on altaddress_state", - "required": false, - "type": "string" - }, { - "name": "altaddress_postal_code", - "in": "query", - "description": "Case insensitive search on altaddress_postal_code", - "required": false, - "type": "string" - }, { - "name": "altaddress_country", - "in": "query", - "description": "Case insensitive search on altaddress_country", - "required": false, - "type": "string" - }, { - "name": "altaddress_email", - "in": "query", - "description": "Case insensitive search on altaddress_email", - "required": false, - "type": "string" - }, { - "name": "altaddress_phone", - "in": "query", - "description": "Case insensitive search on altaddress_phone", - "required": false, - "type": "string" - }, { - "name": "date_of_birth", - "in": "query", - "description": "Case insensitive search on date_of_birth", - "required": false, - "type": "string" - }, { - "name": "library_id", - "in": "query", - "description": "Case insensitive search on library_id", - "required": false, - "type": "string" - }, { - "name": "category_id", - "in": "query", - "description": "Case insensitive search on category_id", - "required": false, - "type": "string" - }, { - "name": "date_enrolled", - "in": "query", - "description": "Case insensitive search on date_enrolled", - "required": false, - "type": "string" - }, { - "name": "expiry_date", - "in": "query", - "description": "Case insensitive search on expiry_date", - "required": false, - "type": "string" - }, { - "name": "incorrect_address", - "in": "query", - "description": "Search on incorrect_address", - "required": false, - "type": "boolean" - }, { - "name": "patron_card_lost", - "in": "query", - "description": "Search on patron_card_lost", - "required": false, - "type": "boolean" - }, { - "name": "restricted", - "in": "query", - "description": "Filter search by restricted", - "required": false, - "type": "boolean" - }, { - "name": "guarantor_id", - "in": "query", - "description": "Search on guarantor_id", - "required": false, - "type": "string" - }, { - "name": "staff_notes", - "in": "query", - "description": "Case insensitive search on staff_notes", - "required": false, - "type": "string" - }, { - "name": "relationship_type", - "in": "query", - "description": "Case insensitive search on relationship_type", - "required": false, - "type": "string" - }, { - "name": "gender", - "in": "query", - "description": "Case insensitive search on gender", - "required": false, - "type": "string" - }, { - "name": "userid", - "in": "query", - "description": "Case insensitive search on userid", - "required": false, - "type": "string" - }, { - "name": "opac_notes", - "in": "query", - "description": "Case insensitive search on opac_notes", - "required": false, - "type": "string" - }, { - "name": "altaddress_notes", - "in": "query", - "description": "Case insensitive search on altaddress_notes", - "required": false, - "type": "string" - }, { - "name": "statistics_1", - "in": "query", - "description": "Case insensitive search on statistics_1", - "required": false, - "type": "string" - }, { - "name": "statistics_2", - "in": "query", - "description": "Case insensitive search on statistics_2", - "required": false, - "type": "string" - }, { - "name": "autorenew_checkouts", - "in": "query", - "description": "Search on autorenew_checkouts", - "required": false, - "type": "boolean" - }, { - "name": "altcontact_firstname", - "in": "query", - "description": "Case insensitive search on altcontact_firstname", - "required": false, - "type": "string" - }, { - "name": "altcontact_surname", - "in": "query", - "description": "Case insensitive search on altcontact_surname", - "required": false, - "type": "string" - }, { - "name": "altcontact_address", - "in": "query", - "description": "Case insensitive search on altcontact_address", - "required": false, - "type": "string" - }, { - "name": "altcontact_address2", - "in": "query", - "description": "Case insensitive search on altcontact_address2", - "required": false, - "type": "string" - }, { - "name": "altcontact_city", - "in": "query", - "description": "Case insensitive search on altcontact_city", - "required": false, - "type": "string" - }, { - "name": "altcontact_state", - "in": "query", - "description": "Case insensitive search on altcontact_state", - "required": false, - "type": "string" - }, { - "name": "altcontact_postal_code", - "in": "query", - "description": "Case insensitive search on altcontact_postal_code", - "required": false, - "type": "string" - }, { - "name": "altcontact_country", - "in": "query", - "description": "Case insensitive search on altcontact_country", - "required": false, - "type": "string" - }, { - "name": "altcontact_phone", - "in": "query", - "description": "Case insensitive search on altcontact_phone", - "required": false, - "type": "string" - }, { - "name": "sms_number", - "in": "query", - "description": "Case insensitive search on sms_number", - "required": false, - "type": "string" - }, { - "name": "sms_provider_id", - "in": "query", - "description": "Case insensitive search on sms_provider_id", - "required": false, - "type": "string" - }, { - "name": "privacy", - "in": "query", - "description": "Search on privacy", - "required": false, - "type": "string" - }, { - "name": "privacy_guarantor_checkouts", - "in": "query", - "description": "Search on privacy_guarantor_checkouts", - "required": false, - "type": "string" - }, { - "name": "check_previous_checkout", - "in": "query", - "description": "Case insensitive search on check_previous_checkout", - "required": false, - "type": "string" - }, { - "name": "updated_on", - "in": "query", - "description": "Search on updated_on", - "required": false, - "type": "string" - }, { - "name": "last_seen", - "in": "query", - "description": "Case insensitive search on last_seen", - "required": false, - "type": "string" - }, { - "name": "lang", - "in": "query", - "description": "Case insensitive search on lang", - "required": false, - "type": "string" - }, { - "name": "login_attempts", - "in": "query", - "description": "Search on login_attempts", - "required": false, - "type": "string" - }, { - "$ref": "../parameters.json#/match" - }, { - "$ref": "../parameters.json#/order_by" - }, { - "$ref": "../parameters.json#/page" - }, { - "$ref": "../parameters.json#/per_page" - }, { - "$ref": "../parameters.json#/q_param" - }, { - "$ref": "../parameters.json#/q_body" - }, { - "$ref": "../parameters.json#/q_header" - }], - "responses": { - "200": { - "description": "A list of patrons", - "schema": { - "type": "array", - "items": { - "$ref": "../definitions.json#/patron" - } - } - }, - "401": { - "description": "Authentication required", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "403": { - "description": "Access forbidden", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "500": { - "description": "Internal server error", - "schema": { - "$ref": "../definitions.json#/error" - } - } - }, - "x-koha-authorization": { - "permissions": { - "borrowers": "1" - } - }, - "x-koha-embed": [ - "extended_attributes" - ] - }, - "post": { - "x-mojo-to": "Patrons#add", - "operationId": "addPatron", - "tags": ["patrons"], - "summary": "Add patron", - "parameters": [{ - "name": "body", - "in": "body", - "description": "A JSON object containing information about the new patron", - "required": true, - "schema": { - "$ref": "../definitions.json#/patron" - } - }], - "consumes": ["application/json"], - "produces": ["application/json"], - "responses": { - "201": { - "description": "A successfully created patron", - "schema": { - "items": { - "$ref": "../definitions.json#/patron" - } - } - }, - "400": { - "description": "Bad parameter", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "401": { - "description": "Authentication required", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "403": { - "description": "Access forbidden", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "404": { - "description": "Resource not found", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "409": { - "description": "Conflict in creating resource", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "500": { - "description": "Internal server error", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "503": { - "description": "Under maintenance", - "schema": { - "$ref": "../definitions.json#/error" - } - } - }, - "x-koha-authorization": { - "permissions": { - "borrowers": "edit_borrowers" - } - } - } - }, - "/patrons/{patron_id}": { - "get": { - "x-mojo-to": "Patrons#get", - "operationId": "getPatron", - "tags": ["patrons"], - "summary": "Get patron", - "parameters": [{ - "$ref": "../parameters.json#/patron_id_pp" - }], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "description": "A patron", - "schema": { - "$ref": "../definitions.json#/patron" - } - }, - "401": { - "description": "Authentication required", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "403": { - "description": "Access forbidden", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "404": { - "description": "Patron not found", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "500": { - "description": "Internal server error", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "503": { - "description": "Under maintenance", - "schema": { - "$ref": "../definitions.json#/error" - } - } - }, - "x-koha-authorization": { - "permissions": { - "borrowers": "edit_borrowers" - } - }, - "x-koha-embed": [ - "extended_attributes" - ] - }, - "put": { - "x-mojo-to": "Patrons#update", - "operationId": "updatePatron", - "tags": ["patrons"], - "summary": "Update patron", - "parameters": [ - { - "$ref": "../parameters.json#/patron_id_pp" - }, - { - "name": "body", - "in": "body", - "description": "A JSON object containing new information about existing patron", - "required": true, - "schema": { - "$ref": "../definitions.json#/patron" - } - } - ], - "consumes": ["application/json"], - "produces": ["application/json"], - "responses": { - "200": { - "description": "A successfully updated patron", - "schema": { - "items": { - "$ref": "../definitions.json#/patron" - } - } - }, - "400": { - "description": "Bad parameter", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "403": { - "description": "Access forbidden", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "404": { - "description": "Resource not found", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "409": { - "description": "Conflict in updating resource", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "500": { - "description": "Internal server error", - "schema": { - "$ref": "../definitions.json#/error" - } - } - }, - "x-koha-authorization": { - "permissions": { - "borrowers": "1" - } - } - }, - "delete": { - "x-mojo-to": "Patrons#delete", - "operationId": "deletePatron", - "tags": ["patrons"], - "summary": "Delete patron", - "parameters": [{ - "$ref": "../parameters.json#/patron_id_pp" - }], - "produces": ["application/json"], - "responses": { - "204": { - "description": "Patron deleted" - }, - "400": { - "description": "Patron deletion failed", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "401": { - "description": "Authentication required", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "403": { - "description": "Access forbidden", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "404": { - "description": "Patron not found", - "schema": { - "$ref": "../definitions.json#/error" - } - } - }, - "x-koha-authorization": { - "permissions": { - "borrowers": "delete_borrowers" - } - } - } - } -} --- a/api/v1/swagger/paths/patrons.yaml +++ a/api/v1/swagger/paths/patrons.yaml @@ -0,0 +1,551 @@ +--- +/patrons: + get: + x-mojo-to: Patrons#list + operationId: listPatrons + tags: + - patrons + summary: List patrons + produces: + - application/json + parameters: + - name: patron_id + in: query + description: Search on patron_id + required: false + type: string + - name: cardnumber + in: query + description: Case insensitive search on cardnumber + required: false + type: string + - name: surname + in: query + description: Case insensitive search on surname + required: false + type: string + - name: firstname + in: query + description: Case insensitive search on firstname + required: false + type: string + - name: title + in: query + description: Case insensitive search on title + required: false + type: string + - name: other_name + in: query + description: Case insensitive search on othernames + required: false + type: string + - name: initials + in: query + description: Case insensitive search on initials + required: false + type: string + - name: street_number + in: query + description: Case insensitive search on streetnumber + required: false + type: string + - name: street_type + in: query + description: Case insensitive search on streettype + required: false + type: string + - name: address + in: query + description: Case insensitive search on address + required: false + type: string + - name: address2 + in: query + description: Case insensitive search on address2 + required: false + type: string + - name: city + in: query + description: Case insensitive search on city + required: false + type: string + - name: state + in: query + description: Case insensitive search on state + required: false + type: string + - name: postal_code + in: query + description: Case insensitive search on zipcode + required: false + type: string + - name: country + in: query + description: Case insensitive search on country + required: false + type: string + - name: email + in: query + description: Case insensitive search on email + required: false + type: string + - name: phone + in: query + description: Case insensitive search on phone + required: false + type: string + - name: mobile + in: query + description: Case insensitive search on mobile + required: false + type: string + - name: fax + in: query + description: Case insensitive search on fax + required: false + type: string + - name: secondary_email + in: query + description: Case insensitive search on secondary_email + required: false + type: string + - name: secondary_phone + in: query + description: Case insensitive search on secondary_phone + required: false + type: string + - name: altaddress_street_number + in: query + description: Case insensitive search on altaddress_street_number + required: false + type: string + - name: altaddress_street_type + in: query + description: Case insensitive search on altaddress_street_type + required: false + type: string + - name: altaddress_address + in: query + description: Case insensitive search on altaddress_address + required: false + type: string + - name: altaddress_address2 + in: query + description: Case insensitive search on altaddress_address2 + required: false + type: string + - name: altaddress_city + in: query + description: Case insensitive search on altaddress_city + required: false + type: string + - name: altaddress_state + in: query + description: Case insensitive search on altaddress_state + required: false + type: string + - name: altaddress_postal_code + in: query + description: Case insensitive search on altaddress_postal_code + required: false + type: string + - name: altaddress_country + in: query + description: Case insensitive search on altaddress_country + required: false + type: string + - name: altaddress_email + in: query + description: Case insensitive search on altaddress_email + required: false + type: string + - name: altaddress_phone + in: query + description: Case insensitive search on altaddress_phone + required: false + type: string + - name: date_of_birth + in: query + description: Case insensitive search on date_of_birth + required: false + type: string + - name: library_id + in: query + description: Case insensitive search on library_id + required: false + type: string + - name: category_id + in: query + description: Case insensitive search on category_id + required: false + type: string + - name: date_enrolled + in: query + description: Case insensitive search on date_enrolled + required: false + type: string + - name: expiry_date + in: query + description: Case insensitive search on expiry_date + required: false + type: string + - name: incorrect_address + in: query + description: Search on incorrect_address + required: false + type: boolean + - name: patron_card_lost + in: query + description: Search on patron_card_lost + required: false + type: boolean + - name: restricted + in: query + description: Filter search by restricted + required: false + type: boolean + - name: guarantor_id + in: query + description: Search on guarantor_id + required: false + type: string + - name: staff_notes + in: query + description: Case insensitive search on staff_notes + required: false + type: string + - name: relationship_type + in: query + description: Case insensitive search on relationship_type + required: false + type: string + - name: gender + in: query + description: Case insensitive search on gender + required: false + type: string + - name: userid + in: query + description: Case insensitive search on userid + required: false + type: string + - name: opac_notes + in: query + description: Case insensitive search on opac_notes + required: false + type: string + - name: altaddress_notes + in: query + description: Case insensitive search on altaddress_notes + required: false + type: string + - name: statistics_1 + in: query + description: Case insensitive search on statistics_1 + required: false + type: string + - name: statistics_2 + in: query + description: Case insensitive search on statistics_2 + required: false + type: string + - name: autorenew_checkouts + in: query + description: Search on autorenew_checkouts + required: false + type: boolean + - name: altcontact_firstname + in: query + description: Case insensitive search on altcontact_firstname + required: false + type: string + - name: altcontact_surname + in: query + description: Case insensitive search on altcontact_surname + required: false + type: string + - name: altcontact_address + in: query + description: Case insensitive search on altcontact_address + required: false + type: string + - name: altcontact_address2 + in: query + description: Case insensitive search on altcontact_address2 + required: false + type: string + - name: altcontact_city + in: query + description: Case insensitive search on altcontact_city + required: false + type: string + - name: altcontact_state + in: query + description: Case insensitive search on altcontact_state + required: false + type: string + - name: altcontact_postal_code + in: query + description: Case insensitive search on altcontact_postal_code + required: false + type: string + - name: altcontact_country + in: query + description: Case insensitive search on altcontact_country + required: false + type: string + - name: altcontact_phone + in: query + description: Case insensitive search on altcontact_phone + required: false + type: string + - name: sms_number + in: query + description: Case insensitive search on sms_number + required: false + type: string + - name: sms_provider_id + in: query + description: Case insensitive search on sms_provider_id + required: false + type: string + - name: privacy + in: query + description: Search on privacy + required: false + type: string + - name: privacy_guarantor_checkouts + in: query + description: Search on privacy_guarantor_checkouts + required: false + type: string + - name: check_previous_checkout + in: query + description: Case insensitive search on check_previous_checkout + required: false + type: string + - name: updated_on + in: query + description: Search on updated_on + required: false + type: string + - name: last_seen + in: query + description: Case insensitive search on last_seen + required: false + type: string + - name: lang + in: query + description: Case insensitive search on lang + required: false + type: string + - name: login_attempts + in: query + description: Search on login_attempts + required: false + type: string + - $ref: ../parameters.yaml#/match + - $ref: ../parameters.yaml#/order_by + - $ref: ../parameters.yaml#/page + - $ref: ../parameters.yaml#/per_page + - $ref: ../parameters.yaml#/q_param + - $ref: ../parameters.yaml#/q_body + - $ref: ../parameters.yaml#/q_header + responses: + "200": + description: A list of patrons + schema: + type: array + items: + $ref: ../definitions.yaml#/patron + "401": + description: Authentication required + schema: + $ref: ../definitions.yaml#/error + "403": + description: Access forbidden + schema: + $ref: ../definitions.yaml#/error + "500": + description: Internal server error + schema: + $ref: ../definitions.yaml#/error + x-koha-authorization: + permissions: + borrowers: "1" + x-koha-embed: + - extended_attributes + post: + x-mojo-to: Patrons#add + operationId: addPatron + tags: + - patrons + summary: Add patron + parameters: + - name: body + in: body + description: A JSON object containing information about the new patron + required: true + schema: + $ref: ../definitions.yaml#/patron + consumes: + - application/json + produces: + - application/json + responses: + "201": + description: A successfully created patron + schema: + items: + $ref: ../definitions.yaml#/patron + "400": + description: Bad parameter + schema: + $ref: ../definitions.yaml#/error + "401": + description: Authentication required + schema: + $ref: ../definitions.yaml#/error + "403": + description: Access forbidden + schema: + $ref: ../definitions.yaml#/error + "404": + description: Resource not found + schema: + $ref: ../definitions.yaml#/error + "409": + description: Conflict in creating resource + schema: + $ref: ../definitions.yaml#/error + "500": + description: Internal server error + schema: + $ref: ../definitions.yaml#/error + "503": + description: Under maintenance + schema: + $ref: ../definitions.yaml#/error + x-koha-authorization: + permissions: + borrowers: edit_borrowers +"/patrons/{patron_id}": + get: + x-mojo-to: Patrons#get + operationId: getPatron + tags: + - patrons + summary: Get patron + parameters: + - $ref: ../parameters.yaml#/patron_id_pp + produces: + - application/json + responses: + "200": + description: A patron + schema: + $ref: ../definitions.yaml#/patron + "401": + description: Authentication required + schema: + $ref: ../definitions.yaml#/error + "403": + description: Access forbidden + schema: + $ref: ../definitions.yaml#/error + "404": + description: Patron not found + schema: + $ref: ../definitions.yaml#/error + "500": + description: Internal server error + schema: + $ref: ../definitions.yaml#/error + "503": + description: Under maintenance + schema: + $ref: ../definitions.yaml#/error + x-koha-authorization: + permissions: + borrowers: edit_borrowers + x-koha-embed: + - extended_attributes + put: + x-mojo-to: Patrons#update + operationId: updatePatron + tags: + - patrons + summary: Update patron + parameters: + - $ref: ../parameters.yaml#/patron_id_pp + - name: body + in: body + description: A JSON object containing new information about existing patron + required: true + schema: + $ref: ../definitions.yaml#/patron + consumes: + - application/json + produces: + - application/json + responses: + "200": + description: A successfully updated patron + schema: + items: + $ref: ../definitions.yaml#/patron + "400": + description: Bad parameter + schema: + $ref: ../definitions.yaml#/error + "403": + description: Access forbidden + schema: + $ref: ../definitions.yaml#/error + "404": + description: Resource not found + schema: + $ref: ../definitions.yaml#/error + "409": + description: Conflict in updating resource + schema: + $ref: ../definitions.yaml#/error + "500": + description: Internal server error + schema: + $ref: ../definitions.yaml#/error + x-koha-authorization: + permissions: + borrowers: "1" + delete: + x-mojo-to: Patrons#delete + operationId: deletePatron + tags: + - patrons + summary: Delete patron + parameters: + - $ref: ../parameters.yaml#/patron_id_pp + produces: + - application/json + responses: + "204": + description: Patron deleted + "400": + description: Patron deletion failed + schema: + $ref: ../definitions.yaml#/error + "401": + description: Authentication required + schema: + $ref: ../definitions.yaml#/error + "403": + description: Access forbidden + schema: + $ref: ../definitions.yaml#/error + "404": + description: Patron not found + schema: + $ref: ../definitions.yaml#/error + x-koha-authorization: + permissions: + borrowers: delete_borrowers --- a/api/v1/swagger/paths/patrons_account.json +++ a/api/v1/swagger/paths/patrons_account.json @@ -1,134 +0,0 @@ -{ - "/patrons/{patron_id}/account": { - "get": { - "x-mojo-to": "Patrons::Account#get", - "operationId": "getPatronAccount", - "tags": [ - "patrons" - ], - "summary": "Get account information for a patron", - "parameters": [ - { - "$ref": "../parameters.json#/patron_id_pp" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "description": "Patron's account balance", - "schema": { - "$ref": "../definitions.json#/patron_balance" - } - }, - "401": { - "description": "Authentication required", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "403": { - "description": "Access forbidden", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "404": { - "description": "Patron not found", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "500": { - "description": "Internal server error", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "503": { - "description": "Under maintenance", - "schema": { - "$ref": "../definitions.json#/error" - } - } - }, - "x-koha-authorization": { - "permissions": { - "borrowers": "edit_borrowers", - "updatecharges": "remaining_permissions" - } - } - } - }, - "/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", - "parameters": [ - { - "$ref": "../parameters.json#/patron_id_pp" - }, - { - "name": "body", - "in": "body", - "description": "A JSON object containing credit information", - "required": true, - "schema": { - "$ref": "../definitions.json#/patron_account_credit" - } - } - ], - "produces": [ - "application/json" - ], - "responses": { - "201": { - "description": "Credit added", - "schema": { - "$ref": "../definitions.json#/account_line" - } - }, - "401": { - "description": "Authentication required", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "403": { - "description": "Access forbidden", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "404": { - "description": "Patron not found", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "500": { - "description": "Internal server error", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "503": { - "description": "Under maintenance", - "schema": { - "$ref": "../definitions.json#/error" - } - } - }, - "x-koha-authorization": { - "permissions": { - "updatecharges": "remaining_permissions" - } - } - } - } -} --- a/api/v1/swagger/paths/patrons_account.yaml +++ a/api/v1/swagger/paths/patrons_account.yaml @@ -0,0 +1,86 @@ +--- +"/patrons/{patron_id}/account": + get: + x-mojo-to: Patrons::Account#get + operationId: getPatronAccount + tags: + - patrons + summary: Get account information for a patron + parameters: + - $ref: ../parameters.yaml#/patron_id_pp + produces: + - application/json + responses: + "200": + description: Patron's account balance + schema: + $ref: ../definitions.yaml#/patron_balance + "401": + description: Authentication required + schema: + $ref: ../definitions.yaml#/error + "403": + description: Access forbidden + schema: + $ref: ../definitions.yaml#/error + "404": + description: Patron not found + schema: + $ref: ../definitions.yaml#/error + "500": + description: Internal server error + schema: + $ref: ../definitions.yaml#/error + "503": + description: Under maintenance + schema: + $ref: ../definitions.yaml#/error + x-koha-authorization: + permissions: + borrowers: edit_borrowers + updatecharges: remaining_permissions +"/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 + parameters: + - $ref: ../parameters.yaml#/patron_id_pp + - name: body + in: body + description: A JSON object containing credit information + required: true + schema: + $ref: ../definitions.yaml#/patron_account_credit + produces: + - application/json + responses: + "201": + description: Credit added + schema: + $ref: ../definitions.yaml#/account_line + "401": + description: Authentication required + schema: + $ref: ../definitions.yaml#/error + "403": + description: Access forbidden + schema: + $ref: ../definitions.yaml#/error + "404": + description: Patron not found + schema: + $ref: ../definitions.yaml#/error + "500": + description: Internal server error + schema: + $ref: ../definitions.yaml#/error + "503": + description: Under maintenance + schema: + $ref: ../definitions.yaml#/error + x-koha-authorization: + permissions: + updatecharges: remaining_permissions --- a/api/v1/swagger/paths/patrons_extended_attributes.json +++ a/api/v1/swagger/paths/patrons_extended_attributes.json @@ -1,412 +0,0 @@ -{ - "/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": "../parameters.json#/patron_id_pp" - }, - { - "$ref": "../parameters.json#/match" - }, - { - "$ref": "../parameters.json#/order_by" - }, - { - "$ref": "../parameters.json#/page" - }, - { - "$ref": "../parameters.json#/per_page" - }, - { - "$ref": "../parameters.json#/q_param" - }, - { - "$ref": "../parameters.json#/q_body" - }, - { - "$ref": "../parameters.json#/q_header" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "description": "The patron extended attributes", - "schema": { - "type": "array", - "items": { - "$ref": "../definitions.json#/patron_extended_attribute" - } - } - }, - "401": { - "description": "Authentication required", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "403": { - "description": "Access forbidden", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "404": { - "description": "Patron not found", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "500": { - "description": "Internal server error", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "503": { - "description": "Under maintenance", - "schema": { - "$ref": "../definitions.json#/error" - } - } - }, - "x-koha-authorization": { - "permissions": { - "borrowers": "edit_borrowers" - } - } - }, - "post": { - "x-mojo-to": "Patrons::Attributes#add", - "operationId": "addPatronAttribute", - "tags": [ - "patrons" - ], - "summary": "Add extended attribute for a patron", - "parameters": [ - { - "$ref": "../parameters.json#/patron_id_pp" - }, - { - "name": "body", - "in": "body", - "description": "A JSON representation of the patron extended attribute", - "required": true, - "schema": { - "$ref": "../definitions.json#/patron_extended_attribute" - } - } - ], - "produces": [ - "application/json" - ], - "responses": { - "201": { - "description": "A successfully created patron extended attribute", - "schema": { - "$ref": "../definitions.json#/patron_extended_attribute" - } - }, - "400": { - "description": "Bad parameter", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "401": { - "description": "Authentication required", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "403": { - "description": "Access forbidden", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "404": { - "description": "Patron not found", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "409": { - "description": "Conflict in creating resource", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "500": { - "description": "Internal server error", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "503": { - "description": "Under maintenance", - "schema": { - "$ref": "../definitions.json#/error" - } - } - }, - "x-koha-authorization": { - "permissions": { - "borrowers": "edit_borrowers" - } - } - }, - "put": { - "x-mojo-to": "Patrons::Attributes#overwrite", - "operationId": "overwritePatronAttributes", - "tags": [ - "patrons" - ], - "summary": "Overwrite extended attributes for a patron", - "parameters": [ - { - "$ref": "../parameters.json#/patron_id_pp" - }, - { - "name": "body", - "in": "body", - "description": "A JSON representation of the patron extended attribute", - "required": true, - "schema": { - "type": "array", - "items": { - "$ref": "../definitions.json#/patron_extended_attribute" - } - } - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "description": "The successfully created patron extended attributes", - "schema": { - "type": "array", - "items": { - "$ref": "../definitions.json#/patron_extended_attribute" - } - } - }, - "400": { - "description": "Bad parameters", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "401": { - "description": "Authentication required", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "403": { - "description": "Access forbidden", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "404": { - "description": "Patron not found", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "409": { - "description": "Conflict in creating resource", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "500": { - "description": "Internal server error", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "503": { - "description": "Under maintenance", - "schema": { - "$ref": "../definitions.json#/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", - "tags": [ - "patrons" - ], - "summary": "Update extended attribute", - "parameters": [ - { - "$ref": "../parameters.json#/patron_id_pp" - }, - { - "name": "extended_attribute_id", - "in": "path", - "description": "Internal patron extended attribute identifier", - "type": "integer", - "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" - ], - "responses": { - "200": { - "description": "A successfully updated patron extended attribute", - "schema": { - "$ref": "../definitions.json#/patron_extended_attribute" - } - }, - "400": { - "description": "Bad parameter", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "401": { - "description": "Authentication required", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "403": { - "description": "Access forbidden", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "404": { - "description": "Object not found", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "409": { - "description": "Conflict in updating resource", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "500": { - "description": "Internal server error", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "503": { - "description": "Under maintenance", - "schema": { - "$ref": "../definitions.json#/error" - } - } - }, - "x-koha-authorization": { - "permissions": { - "borrowers": "edit_borrowers" - } - } - }, - "delete": { - "x-mojo-to": "Patrons::Attributes#delete", - "operationId": "deletePatronAttribute", - "tags": [ - "patrons" - ], - "summary": "Delete extended attribute", - "parameters": [ - { - "$ref": "../parameters.json#/patron_id_pp" - }, - { - "name": "extended_attribute_id", - "in": "path", - "description": "Internal patron extended attribute identifier", - "type": "integer", - "required": true - } - ], - "produces": [ - "application/json" - ], - "responses": { - "204": { - "description": "Extended patron attribute deleted" - }, - "401": { - "description": "Authentication required", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "403": { - "description": "Access forbidden", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "404": { - "description": "Patron not found", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "500": { - "description": "Internal server error", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "503": { - "description": "Under maintenance", - "schema": { - "$ref": "../definitions.json#/error" - } - } - }, - "x-koha-authorization": { - "permissions": { - "borrowers": "edit_borrowers" - } - } - } - } -} --- a/api/v1/swagger/paths/patrons_extended_attributes.yaml +++ a/api/v1/swagger/paths/patrons_extended_attributes.yaml @@ -0,0 +1,262 @@ +--- +"/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: ../parameters.yaml#/patron_id_pp + - $ref: ../parameters.yaml#/match + - $ref: ../parameters.yaml#/order_by + - $ref: ../parameters.yaml#/page + - $ref: ../parameters.yaml#/per_page + - $ref: ../parameters.yaml#/q_param + - $ref: ../parameters.yaml#/q_body + - $ref: ../parameters.yaml#/q_header + produces: + - application/json + responses: + "200": + description: The patron extended attributes + schema: + type: array + items: + $ref: ../definitions.yaml#/patron_extended_attribute + "401": + description: Authentication required + schema: + $ref: ../definitions.yaml#/error + "403": + description: Access forbidden + schema: + $ref: ../definitions.yaml#/error + "404": + description: Patron not found + schema: + $ref: ../definitions.yaml#/error + "500": + description: Internal server error + schema: + $ref: ../definitions.yaml#/error + "503": + description: Under maintenance + schema: + $ref: ../definitions.yaml#/error + x-koha-authorization: + permissions: + borrowers: edit_borrowers + post: + x-mojo-to: Patrons::Attributes#add + operationId: addPatronAttribute + tags: + - patrons + summary: Add extended attribute for a patron + parameters: + - $ref: ../parameters.yaml#/patron_id_pp + - name: body + in: body + description: A JSON representation of the patron extended attribute + required: true + schema: + $ref: ../definitions.yaml#/patron_extended_attribute + produces: + - application/json + responses: + "201": + description: A successfully created patron extended attribute + schema: + $ref: ../definitions.yaml#/patron_extended_attribute + "400": + description: Bad parameter + schema: + $ref: ../definitions.yaml#/error + "401": + description: Authentication required + schema: + $ref: ../definitions.yaml#/error + "403": + description: Access forbidden + schema: + $ref: ../definitions.yaml#/error + "404": + description: Patron not found + schema: + $ref: ../definitions.yaml#/error + "409": + description: Conflict in creating resource + schema: + $ref: ../definitions.yaml#/error + "500": + description: Internal server error + schema: + $ref: ../definitions.yaml#/error + "503": + description: Under maintenance + schema: + $ref: ../definitions.yaml#/error + x-koha-authorization: + permissions: + borrowers: edit_borrowers + put: + x-mojo-to: Patrons::Attributes#overwrite + operationId: overwritePatronAttributes + tags: + - patrons + summary: Overwrite extended attributes for a patron + parameters: + - $ref: ../parameters.yaml#/patron_id_pp + - name: body + in: body + description: A JSON representation of the patron extended attribute + required: true + schema: + type: array + items: + $ref: ../definitions.yaml#/patron_extended_attribute + produces: + - application/json + responses: + "200": + description: The successfully created patron extended attributes + schema: + type: array + items: + $ref: ../definitions.yaml#/patron_extended_attribute + "400": + description: Bad parameters + schema: + $ref: ../definitions.yaml#/error + "401": + description: Authentication required + schema: + $ref: ../definitions.yaml#/error + "403": + description: Access forbidden + schema: + $ref: ../definitions.yaml#/error + "404": + description: Patron not found + schema: + $ref: ../definitions.yaml#/error + "409": + description: Conflict in creating resource + schema: + $ref: ../definitions.yaml#/error + "500": + description: Internal server error + schema: + $ref: ../definitions.yaml#/error + "503": + description: Under maintenance + schema: + $ref: ../definitions.yaml#/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 + tags: + - patrons + summary: Update extended attribute + parameters: + - $ref: ../parameters.yaml#/patron_id_pp + - name: extended_attribute_id + in: path + description: Internal patron extended attribute identifier + type: integer + 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 + responses: + "200": + description: A successfully updated patron extended attribute + schema: + $ref: ../definitions.yaml#/patron_extended_attribute + "400": + description: Bad parameter + schema: + $ref: ../definitions.yaml#/error + "401": + description: Authentication required + schema: + $ref: ../definitions.yaml#/error + "403": + description: Access forbidden + schema: + $ref: ../definitions.yaml#/error + "404": + description: Object not found + schema: + $ref: ../definitions.yaml#/error + "409": + description: Conflict in updating resource + schema: + $ref: ../definitions.yaml#/error + "500": + description: Internal server error + schema: + $ref: ../definitions.yaml#/error + "503": + description: Under maintenance + schema: + $ref: ../definitions.yaml#/error + x-koha-authorization: + permissions: + borrowers: edit_borrowers + delete: + x-mojo-to: Patrons::Attributes#delete + operationId: deletePatronAttribute + tags: + - patrons + summary: Delete extended attribute + parameters: + - $ref: ../parameters.yaml#/patron_id_pp + - name: extended_attribute_id + in: path + description: Internal patron extended attribute identifier + type: integer + required: true + produces: + - application/json + responses: + "204": + description: Extended patron attribute deleted + "401": + description: Authentication required + schema: + $ref: ../definitions.yaml#/error + "403": + description: Access forbidden + schema: + $ref: ../definitions.yaml#/error + "404": + description: Patron not found + schema: + $ref: ../definitions.yaml#/error + "500": + description: Internal server error + schema: + $ref: ../definitions.yaml#/error + "503": + description: Under maintenance + schema: + $ref: ../definitions.yaml#/error + x-koha-authorization: + permissions: + borrowers: edit_borrowers --- a/api/v1/swagger/paths/patrons_holds.json +++ a/api/v1/swagger/paths/patrons_holds.json @@ -1,87 +0,0 @@ -{ - "/patrons/{patron_id}/holds": { - "get": { - "x-mojo-to": "Patrons::Holds#list", - "operationId": "getPatronHolds", - "tags": [ - "holds" - ], - "summary": "List holds for a patron", - "parameters": [ - { - "$ref": "../parameters.json#/patron_id_pp" - }, - { - "$ref": "../parameters.json#/match" - }, - { - "$ref": "../parameters.json#/order_by" - }, - { - "$ref": "../parameters.json#/page" - }, - { - "$ref": "../parameters.json#/per_page" - }, - { - "$ref": "../parameters.json#/q_param" - }, - { - "$ref": "../parameters.json#/q_body" - }, - { - "$ref": "../parameters.json#/q_header" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "description": "The patron holds", - "schema": { - "type": "array", - "items": { - "$ref": "../definitions.json#/hold" - } - } - }, - "401": { - "description": "Authentication required", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "403": { - "description": "Access forbidden", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "404": { - "description": "Patron not found", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "500": { - "description": "Internal server error", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "503": { - "description": "Under maintenance", - "schema": { - "$ref": "../definitions.json#/error" - } - } - }, - "x-koha-authorization": { - "permissions": { - "borrowers": "edit_borrowers" - } - } - } - } -} --- a/api/v1/swagger/paths/patrons_holds.yaml +++ a/api/v1/swagger/paths/patrons_holds.yaml @@ -0,0 +1,49 @@ +--- +"/patrons/{patron_id}/holds": + get: + x-mojo-to: Patrons::Holds#list + operationId: getPatronHolds + tags: + - holds + summary: List holds for a patron + parameters: + - $ref: ../parameters.yaml#/patron_id_pp + - $ref: ../parameters.yaml#/match + - $ref: ../parameters.yaml#/order_by + - $ref: ../parameters.yaml#/page + - $ref: ../parameters.yaml#/per_page + - $ref: ../parameters.yaml#/q_param + - $ref: ../parameters.yaml#/q_body + - $ref: ../parameters.yaml#/q_header + produces: + - application/json + responses: + "200": + description: The patron holds + schema: + type: array + items: + $ref: ../definitions.yaml#/hold + "401": + description: Authentication required + schema: + $ref: ../definitions.yaml#/error + "403": + description: Access forbidden + schema: + $ref: ../definitions.yaml#/error + "404": + description: Patron not found + schema: + $ref: ../definitions.yaml#/error + "500": + description: Internal server error + schema: + $ref: ../definitions.yaml#/error + "503": + description: Under maintenance + schema: + $ref: ../definitions.yaml#/error + x-koha-authorization: + permissions: + borrowers: edit_borrowers --- a/api/v1/swagger/paths/patrons_password.json +++ a/api/v1/swagger/paths/patrons_password.json @@ -1,86 +0,0 @@ -{ - "/patrons/{patron_id}/password": { - "post": { - "x-mojo-to": "Patrons::Password#set", - "operationId": "setPatronPassword", - "tags": [ - "patrons" - ], - "summary": "Set password for a patron", - "parameters": [ - { - "$ref": "../parameters.json#/patron_id_pp" - }, - { - "name": "body", - "in": "body", - "description": "A JSON object containing password information", - "schema": { - "type": "object", - "properties": { - "password": { - "description": "New password (plain text)", - "type": "string" - }, - "password_2": { - "description": "Repeated new password (plain text)", - "type": "string" - } - }, - "required": ["password", "password_2"], - "additionalProperties": false - } - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "description": "Password changed" - }, - "400": { - "description": "Bad request", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "401": { - "description": "Authentication required", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "403": { - "description": "Access forbidden", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "404": { - "description": "Patron not found", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "500": { - "description": "Internal server error", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "503": { - "description": "Under maintenance", - "schema": { - "$ref": "../definitions.json#/error" - } - } - }, - "x-koha-authorization": { - "permissions": { - "borrowers": "1" - } - } - } - } -} --- a/api/v1/swagger/paths/patrons_password.yaml +++ a/api/v1/swagger/paths/patrons_password.yaml @@ -0,0 +1,58 @@ +--- +"/patrons/{patron_id}/password": + post: + x-mojo-to: Patrons::Password#set + operationId: setPatronPassword + tags: + - patrons + summary: Set password for a patron + parameters: + - $ref: ../parameters.yaml#/patron_id_pp + - name: body + in: body + description: A JSON object containing password information + schema: + type: object + properties: + password: + description: New password (plain text) + type: string + password_2: + description: Repeated new password (plain text) + type: string + required: + - password + - password_2 + additionalProperties: false + produces: + - application/json + responses: + "200": + description: Password changed + "400": + description: Bad request + schema: + $ref: ../definitions.yaml#/error + "401": + description: Authentication required + schema: + $ref: ../definitions.yaml#/error + "403": + description: Access forbidden + schema: + $ref: ../definitions.yaml#/error + "404": + description: Patron not found + schema: + $ref: ../definitions.yaml#/error + "500": + description: Internal server error + schema: + $ref: ../definitions.yaml#/error + "503": + description: Under maintenance + schema: + $ref: ../definitions.yaml#/error + x-koha-authorization: + permissions: + borrowers: "1" --- a/api/v1/swagger/paths/public_patrons.json +++ a/api/v1/swagger/paths/public_patrons.json @@ -1,246 +0,0 @@ -{ - "/public/patrons/{patron_id}/password": { - "post": { - "x-mojo-to": "Patrons::Password#set_public", - "operationId": "setPatronPasswordPublic", - "tags": [ - "patrons" - ], - "summary": "Set password for a patron (public)", - "parameters": [ - { - "$ref": "../parameters.json#/patron_id_pp" - }, - { - "name": "body", - "in": "body", - "description": "A JSON object containing password information", - "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" - ], - "responses": { - "200": { - "description": "Password changed" - }, - "400": { - "description": "Bad request", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "401": { - "description": "Authentication required", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "403": { - "description": "Access forbidden", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "404": { - "description": "Patron not found", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "500": { - "description": "Internal server error", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "503": { - "description": "Under maintenance", - "schema": { - "$ref": "../definitions.json#/error" - } - } - }, - "x-koha-authorization": { - "allow-owner": true - } - } - }, - "/public/patrons/{patron_id}/guarantors/can_see_charges": { - "put": { - "x-mojo-to": "Patrons#guarantors_can_see_charges", - "operationId": "setPatronGuarantorsCanSeeCharges", - "tags": [ - "patrons" - ], - "summary": "Set if guarantors can see charges (public)", - "parameters": [ - { - "$ref": "../parameters.json#/patron_id_pp" - }, - { - "name": "body", - "in": "body", - "description": "A boolean representing if guarantors should be able to see the patron's charges", - "required": true, - "schema": { - "type": "object", - "properties": { - "allowed": { - "type": "boolean" - } - }, - "additionalProperties": false - } - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "description": "Charges view policy for guarantors changed" - }, - "400": { - "description": "Bad request", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "401": { - "description": "Authentication required", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "403": { - "description": "Access forbidden", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "404": { - "description": "Patron not found", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "500": { - "description": "Internal server error", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "503": { - "description": "Under maintenance", - "schema": { - "$ref": "../definitions.json#/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", - "tags": [ - "patrons" - ], - "summary": "Set if guarantors can see checkouts", - "parameters": [ - { - "$ref": "../parameters.json#/patron_id_pp" - }, - { - "name": "body", - "in": "body", - "description": "A boolean representing if guarantors should be able to see the patron's checkouts", - "required": true, - "schema": { - "type": "object", - "properties": { - "allowed": { - "type": "boolean" - } - }, - "additionalProperties": false - } - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "description": "Check-out view policy for guarantors changed" - }, - "400": { - "description": "Bad request", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "401": { - "description": "Authentication required", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "403": { - "description": "Access forbidden", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "404": { - "description": "Patron not found", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "500": { - "description": "Internal server error", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "503": { - "description": "Under maintenance", - "schema": { - "$ref": "../definitions.json#/error" - } - } - }, - "x-koha-authorization": { - "allow-owner": true - } - } - } -} --- a/api/v1/swagger/paths/public_patrons.yaml +++ a/api/v1/swagger/paths/public_patrons.yaml @@ -0,0 +1,163 @@ +--- +"/public/patrons/{patron_id}/password": + post: + x-mojo-to: Patrons::Password#set_public + operationId: setPatronPasswordPublic + tags: + - patrons + summary: Set password for a patron (public) + parameters: + - $ref: ../parameters.yaml#/patron_id_pp + - name: body + in: body + description: A JSON object containing password information + 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 + responses: + "200": + description: Password changed + "400": + description: Bad request + schema: + $ref: ../definitions.yaml#/error + "401": + description: Authentication required + schema: + $ref: ../definitions.yaml#/error + "403": + description: Access forbidden + schema: + $ref: ../definitions.yaml#/error + "404": + description: Patron not found + schema: + $ref: ../definitions.yaml#/error + "500": + description: Internal server error + schema: + $ref: ../definitions.yaml#/error + "503": + description: Under maintenance + schema: + $ref: ../definitions.yaml#/error + x-koha-authorization: + allow-owner: true +"/public/patrons/{patron_id}/guarantors/can_see_charges": + put: + x-mojo-to: Patrons#guarantors_can_see_charges + operationId: setPatronGuarantorsCanSeeCharges + tags: + - patrons + summary: Set if guarantors can see charges (public) + parameters: + - $ref: ../parameters.yaml#/patron_id_pp + - name: body + in: body + description: A boolean representing if guarantors should be able to see the + patron's charges + required: true + schema: + type: object + properties: + allowed: + type: boolean + additionalProperties: false + produces: + - application/json + responses: + "200": + description: Charges view policy for guarantors changed + "400": + description: Bad request + schema: + $ref: ../definitions.yaml#/error + "401": + description: Authentication required + schema: + $ref: ../definitions.yaml#/error + "403": + description: Access forbidden + schema: + $ref: ../definitions.yaml#/error + "404": + description: Patron not found + schema: + $ref: ../definitions.yaml#/error + "500": + description: Internal server error + schema: + $ref: ../definitions.yaml#/error + "503": + description: Under maintenance + schema: + $ref: ../definitions.yaml#/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 + tags: + - patrons + summary: Set if guarantors can see checkouts + parameters: + - $ref: ../parameters.yaml#/patron_id_pp + - name: body + in: body + description: A boolean representing if guarantors should be able to see the + patron's checkouts + required: true + schema: + type: object + properties: + allowed: + type: boolean + additionalProperties: false + produces: + - application/json + responses: + "200": + description: Check-out view policy for guarantors changed + "400": + description: Bad request + schema: + $ref: ../definitions.yaml#/error + "401": + description: Authentication required + schema: + $ref: ../definitions.yaml#/error + "403": + description: Access forbidden + schema: + $ref: ../definitions.yaml#/error + "404": + description: Patron not found + schema: + $ref: ../definitions.yaml#/error + "500": + description: Internal server error + schema: + $ref: ../definitions.yaml#/error + "503": + description: Under maintenance + schema: + $ref: ../definitions.yaml#/error + x-koha-authorization: + allow-owner: true --- a/api/v1/swagger/paths/quotes.json +++ a/api/v1/swagger/paths/quotes.json @@ -1,332 +0,0 @@ -{ - "/quotes": { - "get": { - "x-mojo-to": "Quotes#list", - "operationId": "listQuotes", - "tags": [ - "quotes" - ], - "summary": "List quotes", - "produces": [ - "application/json" - ], - "parameters": [ - { - "name": "quote_id", - "in": "query", - "description": "Case insensitive search on quote id", - "required": false, - "type": "string" - }, - { - "name": "source", - "in": "query", - "description": "Case insensitive search on source", - "required": false, - "type": "string" - }, - { - "name": "text", - "in": "query", - "description": "Case insensitive search on text", - "required": false, - "type": "string" - }, - { - "name": "displayed_on", - "in": "query", - "description": "Case Insensative search on last displayed date", - "required": false, - "type": "string" - }, - { - "$ref": "../parameters.json#/match" - }, - { - "$ref": "../parameters.json#/order_by" - }, - { - "$ref": "../parameters.json#/page" - }, - { - "$ref": "../parameters.json#/per_page" - }, - { - "$ref": "../parameters.json#/q_param" - }, - { - "$ref": "../parameters.json#/q_body" - }, - { - "$ref": "../parameters.json#/q_header" - } - ], - "responses": { - "200": { - "description": "A list of quotes", - "schema": { - "type": "array", - "items": { - "$ref": "../definitions.json#/quote" - } - } - }, - "403": { - "description": "Access forbidden", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "500": { - "description": "Internal error", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "503": { - "description": "Under maintenance", - "schema": { - "$ref": "../definitions.json#/error" - } - } - }, - "x-koha-authorization": { - "permissions": { - "catalogue": "1" - } - } - }, - "post": { - "x-mojo-to": "Quotes#add", - "operationId": "addQuote", - "tags": [ - "quotes" - ], - "summary": "Add quote", - "parameters": [ - { - "name": "body", - "in": "body", - "description": "A JSON object containing informations about the new quote", - "required": true, - "schema": { - "$ref": "../definitions.json#/quote" - } - } - ], - "produces": [ - "application/json" - ], - "responses": { - "201": { - "description": "Quote added", - "schema": { - "$ref": "../definitions.json#/quote" - } - }, - "401": { - "description": "Authentication required", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "403": { - "description": "Access forbidden", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "500": { - "description": "Internal error", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "503": { - "description": "Under maintenance", - "schema": { - "$ref": "../definitions.json#/error" - } - } - }, - "x-koha-authorization": { - "permissions": { - "tools": "edit_quotes" - } - } - } - }, - "/quotes/{quote_id}": { - "get": { - "x-mojo-to": "Quotes#get", - "operationId": "getQuote", - "tags": [ - "quotes" - ], - "summary": "Get quote", - "parameters": [ - { - "$ref": "../parameters.json#/quote_id_pp" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "description": "A Quote", - "schema": { - "$ref": "../definitions.json#/quote" - } - }, - "404": { - "description": "Quote not found", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "500": { - "description": "Internal error", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "503": { - "description": "Under maintenance", - "schema": { - "$ref": "../definitions.json#/error" - } - } - }, - "x-koha-authorization": { - "permissions": { - "catalogue": "1" - } - } - }, - "put": { - "x-mojo-to": "Quotes#update", - "operationId": "updateQuote", - "tags": [ - "quotes" - ], - "summary": "Update quote", - "parameters": [ - { - "$ref": "../parameters.json#/quote_id_pp" - }, - { - "name": "body", - "in": "body", - "description": "a quote object", - "required": true, - "schema": { - "$ref": "../definitions.json#/quote" - } - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "description": "A quote", - "schema": { - "$ref": "../definitions.json#/quote" - } - }, - "401": { - "description": "Authentication required", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "403": { - "description": "Access forbidden", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "404": { - "description": "Quote not found", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "500": { - "description": "Internal error", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "503": { - "description": "Under maintenance", - "schema": { - "$ref": "../definitions.json#/error" - } - } - }, - "x-koha-authorization": { - "permissions": { - "tools": "edit_quotes" - } - } - }, - "delete": { - "x-mojo-to": "Quotes#delete", - "operationId": "deleteQuote", - "tags": [ - "quotes" - ], - "summary": "Delete quote", - "parameters": [ - { - "$ref": "../parameters.json#/quote_id_pp" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "204": { - "description": "Quote deleted" - }, - "401": { - "description": "Authentication required", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "403": { - "description": "Access forbidden", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "404": { - "description": "Quote not found", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "500": { - "description": "Internal error", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "503": { - "description": "Under maintenance", - "schema": { - "$ref": "../definitions.json#/error" - } - } - }, - "x-koha-authorization": { - "permissions": { - "tools": "edit_quotes" - } - } - } - } -} --- a/api/v1/swagger/paths/quotes.yaml +++ a/api/v1/swagger/paths/quotes.yaml @@ -0,0 +1,210 @@ +--- +/quotes: + get: + x-mojo-to: Quotes#list + operationId: listQuotes + tags: + - quotes + summary: List quotes + produces: + - application/json + parameters: + - name: quote_id + in: query + description: Case insensitive search on quote id + required: false + type: string + - name: source + in: query + description: Case insensitive search on source + required: false + type: string + - name: text + in: query + description: Case insensitive search on text + required: false + type: string + - name: displayed_on + in: query + description: Case Insensative search on last displayed date + required: false + type: string + - $ref: ../parameters.yaml#/match + - $ref: ../parameters.yaml#/order_by + - $ref: ../parameters.yaml#/page + - $ref: ../parameters.yaml#/per_page + - $ref: ../parameters.yaml#/q_param + - $ref: ../parameters.yaml#/q_body + - $ref: ../parameters.yaml#/q_header + responses: + "200": + description: A list of quotes + schema: + type: array + items: + $ref: ../definitions.yaml#/quote + "403": + description: Access forbidden + schema: + $ref: ../definitions.yaml#/error + "500": + description: Internal error + schema: + $ref: ../definitions.yaml#/error + "503": + description: Under maintenance + schema: + $ref: ../definitions.yaml#/error + x-koha-authorization: + permissions: + catalogue: "1" + post: + x-mojo-to: Quotes#add + operationId: addQuote + tags: + - quotes + summary: Add quote + parameters: + - name: body + in: body + description: A JSON object containing informations about the new quote + required: true + schema: + $ref: ../definitions.yaml#/quote + produces: + - application/json + responses: + "201": + description: Quote added + schema: + $ref: ../definitions.yaml#/quote + "401": + description: Authentication required + schema: + $ref: ../definitions.yaml#/error + "403": + description: Access forbidden + schema: + $ref: ../definitions.yaml#/error + "500": + description: Internal error + schema: + $ref: ../definitions.yaml#/error + "503": + description: Under maintenance + schema: + $ref: ../definitions.yaml#/error + x-koha-authorization: + permissions: + tools: edit_quotes +"/quotes/{quote_id}": + get: + x-mojo-to: Quotes#get + operationId: getQuote + tags: + - quotes + summary: Get quote + parameters: + - $ref: ../parameters.yaml#/quote_id_pp + produces: + - application/json + responses: + "200": + description: A Quote + schema: + $ref: ../definitions.yaml#/quote + "404": + description: Quote not found + schema: + $ref: ../definitions.yaml#/error + "500": + description: Internal error + schema: + $ref: ../definitions.yaml#/error + "503": + description: Under maintenance + schema: + $ref: ../definitions.yaml#/error + x-koha-authorization: + permissions: + catalogue: "1" + put: + x-mojo-to: Quotes#update + operationId: updateQuote + tags: + - quotes + summary: Update quote + parameters: + - $ref: ../parameters.yaml#/quote_id_pp + - name: body + in: body + description: a quote object + required: true + schema: + $ref: ../definitions.yaml#/quote + produces: + - application/json + responses: + "200": + description: A quote + schema: + $ref: ../definitions.yaml#/quote + "401": + description: Authentication required + schema: + $ref: ../definitions.yaml#/error + "403": + description: Access forbidden + schema: + $ref: ../definitions.yaml#/error + "404": + description: Quote not found + schema: + $ref: ../definitions.yaml#/error + "500": + description: Internal error + schema: + $ref: ../definitions.yaml#/error + "503": + description: Under maintenance + schema: + $ref: ../definitions.yaml#/error + x-koha-authorization: + permissions: + tools: edit_quotes + delete: + x-mojo-to: Quotes#delete + operationId: deleteQuote + tags: + - quotes + summary: Delete quote + parameters: + - $ref: ../parameters.yaml#/quote_id_pp + produces: + - application/json + responses: + "204": + description: Quote deleted + "401": + description: Authentication required + schema: + $ref: ../definitions.yaml#/error + "403": + description: Access forbidden + schema: + $ref: ../definitions.yaml#/error + "404": + description: Quote not found + schema: + $ref: ../definitions.yaml#/error + "500": + description: Internal error + schema: + $ref: ../definitions.yaml#/error + "503": + description: Under maintenance + schema: + $ref: ../definitions.yaml#/error + x-koha-authorization: + permissions: + tools: edit_quotes --- a/api/v1/swagger/paths/return_claims.json +++ a/api/v1/swagger/paths/return_claims.json @@ -1,353 +0,0 @@ -{ - "/return_claims": { - "post": { - "x-mojo-to": "ReturnClaims#claim_returned", - "operationId": "claimReturned", - "summary": "Add a return claim", - "tags": [ - "return_claims" - ], - "parameters": [ - { - "name": "body", - "in": "body", - "description": "A JSON object containing fields to modify", - "required": true, - "schema": { - "type": "object", - "properties": { - "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" - ], - "responses": { - "201": { - "description": "Created claim", - "schema": { - "$ref": "../definitions.json#/return_claim" - } - }, - "400": { - "description": "Bad request", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "401": { - "description": "Authentication required", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "403": { - "description": "Access forbidden", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "404": { - "description": "Checkout not found", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "409": { - "description": "Conflict creating the resource", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "500": { - "description": "Internal server error", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "503": { - "description": "Under maintenance", - "schema": { - "$ref": "../definitions.json#/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", - "tags": [ - "return_claims" - ], - "parameters": [ - { - "name": "claim_id", - "in": "path", - "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", - "schema": { - "$ref": "../definitions.json#/return_claim" - } - }, - "400": { - "description": "Bad request", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "401": { - "description": "Authentication required", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "403": { - "description": "Access forbidden", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "404": { - "description": "Claim not found", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "500": { - "description": "Internal server error", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "503": { - "description": "Under maintenance", - "schema": { - "$ref": "../definitions.json#/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", - "tags": [ "return_claims" ], - "parameters": [ - { - "name": "claim_id", - "in": "path", - "required": true, - "description": "Unique identifier for the claim to be deleted", - "type": "integer" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "204": { - "description": "Claim deleted", - "schema": { - "$ref": "../definitions.json#/return_claim" - } - }, - "400": { - "description": "Bad request", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "401": { - "description": "Authentication required", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "403": { - "description": "Access forbidden", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "404": { - "description": "Claim not found", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "500": { - "description": "Internal server error", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "503": { - "description": "Under maintenance", - "schema": { - "$ref": "../definitions.json#/error" - } - } - }, - "x-koha-authorization": { - "permissions": { - "circulate": "circulate_remaining_permissions" - } - } - } - }, - "/return_claims/{claim_id}/resolve": { - "put": { - "x-mojo-to": "ReturnClaims#resolve_claim", - "operationId": "updateClaimResolve", - "summary": "Resolve claim", - "tags": [ "return_claims" ], - "parameters": [ - { - "name": "claim_id", - "in": "path", - "required": true, - "description": "Unique identifier for the claim to be resolved", - "type": "integer" - }, - { - "name": "body", - "in": "body", - "description": "A JSON object containing fields to modify", - "required": true, - "schema": { - "type": "object", - "properties": { - "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" - ], - "responses": { - "200": { - "description": "Claim resolved", - "schema": { - "$ref": "../definitions.json#/return_claim" - } - }, - "400": { - "description": "Bad request", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "401": { - "description": "Authentication required", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "403": { - "description": "Access forbidden", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "404": { - "description": "Claim not found", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "500": { - "description": "Internal server error", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "503": { - "description": "Under maintenance", - "schema": { - "$ref": "../definitions.json#/error" - } - } - }, - "x-koha-authorization": { - "permissions": { - "circulate": "circulate_remaining_permissions" - } - } - } - } -} --- a/api/v1/swagger/paths/return_claims.yaml +++ a/api/v1/swagger/paths/return_claims.yaml @@ -0,0 +1,240 @@ +--- +/return_claims: + post: + x-mojo-to: ReturnClaims#claim_returned + operationId: claimReturned + summary: Add a return claim + tags: + - return_claims + parameters: + - name: body + in: body + description: A JSON object containing fields to modify + required: true + schema: + type: object + properties: + 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 + responses: + "201": + description: Created claim + schema: + $ref: ../definitions.yaml#/return_claim + "400": + description: Bad request + schema: + $ref: ../definitions.yaml#/error + "401": + description: Authentication required + schema: + $ref: ../definitions.yaml#/error + "403": + description: Access forbidden + schema: + $ref: ../definitions.yaml#/error + "404": + description: Checkout not found + schema: + $ref: ../definitions.yaml#/error + "409": + description: Conflict creating the resource + schema: + $ref: ../definitions.yaml#/error + "500": + description: Internal server error + schema: + $ref: ../definitions.yaml#/error + "503": + description: Under maintenance + schema: + $ref: ../definitions.yaml#/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 + tags: + - return_claims + parameters: + - name: claim_id + in: path + 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 + schema: + $ref: ../definitions.yaml#/return_claim + "400": + description: Bad request + schema: + $ref: ../definitions.yaml#/error + "401": + description: Authentication required + schema: + $ref: ../definitions.yaml#/error + "403": + description: Access forbidden + schema: + $ref: ../definitions.yaml#/error + "404": + description: Claim not found + schema: + $ref: ../definitions.yaml#/error + "500": + description: Internal server error + schema: + $ref: ../definitions.yaml#/error + "503": + description: Under maintenance + schema: + $ref: ../definitions.yaml#/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 + tags: + - return_claims + parameters: + - name: claim_id + in: path + required: true + description: Unique identifier for the claim to be deleted + type: integer + produces: + - application/json + responses: + "204": + description: Claim deleted + schema: + $ref: ../definitions.yaml#/return_claim + "400": + description: Bad request + schema: + $ref: ../definitions.yaml#/error + "401": + description: Authentication required + schema: + $ref: ../definitions.yaml#/error + "403": + description: Access forbidden + schema: + $ref: ../definitions.yaml#/error + "404": + description: Claim not found + schema: + $ref: ../definitions.yaml#/error + "500": + description: Internal server error + schema: + $ref: ../definitions.yaml#/error + "503": + description: Under maintenance + schema: + $ref: ../definitions.yaml#/error + x-koha-authorization: + permissions: + circulate: circulate_remaining_permissions +"/return_claims/{claim_id}/resolve": + put: + x-mojo-to: ReturnClaims#resolve_claim + operationId: updateClaimResolve + summary: Resolve claim + tags: + - return_claims + parameters: + - name: claim_id + in: path + required: true + description: Unique identifier for the claim to be resolved + type: integer + - name: body + in: body + description: A JSON object containing fields to modify + required: true + schema: + type: object + properties: + 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 + responses: + "200": + description: Claim resolved + schema: + $ref: ../definitions.yaml#/return_claim + "400": + description: Bad request + schema: + $ref: ../definitions.yaml#/error + "401": + description: Authentication required + schema: + $ref: ../definitions.yaml#/error + "403": + description: Access forbidden + schema: + $ref: ../definitions.yaml#/error + "404": + description: Claim not found + schema: + $ref: ../definitions.yaml#/error + "500": + description: Internal server error + schema: + $ref: ../definitions.yaml#/error + "503": + description: Under maintenance + schema: + $ref: ../definitions.yaml#/error + x-koha-authorization: + permissions: + circulate: circulate_remaining_permissions --- a/api/v1/swagger/paths/rotas.json +++ a/api/v1/swagger/paths/rotas.json @@ -1,80 +0,0 @@ -{ - "/rotas/{rota_id}/stages/{stage_id}/position": { - "put": { - "x-mojo-to": "Stage#move", - "operationId": "moveStage", - "summary": "Update stage", - "tags": ["rotas"], - "parameters": [{ - "name": "rota_id", - "in": "path", - "required": true, - "description": "A rotas ID", - "type": "integer" - }, { - "name": "stage_id", - "in": "path", - "required": true, - "description": "A stages ID", - "type": "integer" - }, { - "name": "position", - "in": "body", - "required": true, - "description": "A stages position in the rota", - "schema": { - "type": "integer" - } - }], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "description": "OK" - }, - "400": { - "description": "Bad request", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "401": { - "description": "Authentication required", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "403": { - "description": "Access forbidden", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "404": { - "description": "Position not found", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "500": { - "description": "Internal server error", - "schema": { - "$ref": "../definitions.json#/error" - } - }, - "503": { - "description": "Under maintenance", - "schema": { - "$ref": "../definitions.json#/error" - } - } - }, - "x-koha-authorization": { - "permissions": { - "stockrotation": "1" - } - } - } - } -} --- a/api/v1/swagger/paths/rotas.yaml +++ a/api/v1/swagger/paths/rotas.yaml @@ -0,0 +1,57 @@ +--- +"/rotas/{rota_id}/stages/{stage_id}/position": + put: + x-mojo-to: Stage#move + operationId: moveStage + summary: Update stage + tags: + - rotas + parameters: + - name: rota_id + in: path + required: true + description: A rotas ID + type: integer + - name: stage_id + in: path + required: true + description: A stages ID + type: integer + - name: position + in: body + required: true + description: A stages position in the rota + schema: + type: integer + produces: + - application/json + responses: + "200": + description: OK + "400": + description: Bad request + schema: + $ref: ../definitions.yaml#/error + "401": + description: Authentication required + schema: + $ref: ../definitions.yaml#/error + "403": + description: Access forbidden + schema: + $ref: ../definitions.yaml#/error + "404": + description: Position not found + schema: + $ref: ../definitions.yaml#/error + "500": + description: Internal server error + schema: + $ref: ../definitions.yaml#/error + "503": + description: Under maintenance + schema: + $ref: ../definitions.yaml#/error + x-koha-authorization: + permissions: + stockrotation: "1" --- a/api/v1/swagger/paths/suggestions.yaml +++ a/api/v1/swagger/paths/suggestions.yaml @@ -8,13 +8,13 @@ tags: - suggestions parameters: - - $ref: ../parameters.json#/match - - $ref: ../parameters.json#/order_by - - $ref: ../parameters.json#/page - - $ref: ../parameters.json#/per_page - - $ref: ../parameters.json#/q_param - - $ref: ../parameters.json#/q_body - - $ref: ../parameters.json#/q_header + - $ref: ../parameters.yaml#/match + - $ref: ../parameters.yaml#/order_by + - $ref: ../parameters.yaml#/page + - $ref: ../parameters.yaml#/per_page + - $ref: ../parameters.yaml#/q_param + - $ref: ../parameters.yaml#/q_body + - $ref: ../parameters.yaml#/q_header produces: - application/json responses: @@ -23,19 +23,19 @@ schema: type: array items: - $ref: ../definitions.json#/suggestion + $ref: ../definitions.yaml#/suggestion "403": description: Access forbidden schema: - $ref: ../definitions.json#/error + $ref: ../definitions.yaml#/error "500": description: Internal error schema: - $ref: ../definitions.json#/error + $ref: ../definitions.yaml#/error "503": description: Under maintenance schema: - $ref: ../definitions.json#/error + $ref: ../definitions.yaml#/error x-koha-authorization: permissions: suggestions: suggestions_manage @@ -52,30 +52,30 @@ description: A JSON object containing informations about the new suggestion required: true schema: - $ref: ../definitions.json#/suggestion + $ref: ../definitions.yaml#/suggestion produces: - application/json responses: "201": description: Suggestion added schema: - $ref: ../definitions.json#/suggestion + $ref: ../definitions.yaml#/suggestion "400": description: Bad request schema: - $ref: ../definitions.json#/error + $ref: ../definitions.yaml#/error "403": description: Access forbidden schema: - $ref: ../definitions.json#/error + $ref: ../definitions.yaml#/error "500": description: Internal error schema: - $ref: ../definitions.json#/error + $ref: ../definitions.yaml#/error "503": description: Under maintenance schema: - $ref: ../definitions.json#/error + $ref: ../definitions.yaml#/error x-koha-authorization: permissions: suggestions: suggestions_manage @@ -88,30 +88,30 @@ tags: - suggestions parameters: - - $ref: ../parameters.json#/suggestion_id_pp + - $ref: ../parameters.yaml#/suggestion_id_pp produces: - application/json responses: "200": description: A suggestion schema: - $ref: ../definitions.json#/suggestion + $ref: ../definitions.yaml#/suggestion "403": description: Access forbidden schema: - $ref: ../definitions.json#/error + $ref: ../definitions.yaml#/error "404": description: Suggestion not found schema: - $ref: ../definitions.json#/error + $ref: ../definitions.yaml#/error "500": description: Internal error schema: - $ref: ../definitions.json#/error + $ref: ../definitions.yaml#/error "503": description: Under maintenance schema: - $ref: ../definitions.json#/error + $ref: ../definitions.yaml#/error x-koha-authorization: permissions: suggestions: suggestions_manage @@ -123,40 +123,40 @@ tags: - suggestions parameters: - - $ref: ../parameters.json#/suggestion_id_pp + - $ref: ../parameters.yaml#/suggestion_id_pp - name: body in: body description: A JSON object containing informations about the new hold required: true schema: - $ref: ../definitions.json#/suggestion + $ref: ../definitions.yaml#/suggestion produces: - application/json responses: "200": description: A suggestion schema: - $ref: ../definitions.json#/suggestion + $ref: ../definitions.yaml#/suggestion "400": description: Bad request schema: - $ref: ../definitions.json#/error + $ref: ../definitions.yaml#/error "403": description: Access forbidden schema: - $ref: ../definitions.json#/error + $ref: ../definitions.yaml#/error "404": description: Suggestion not found schema: - $ref: ../definitions.json#/error + $ref: ../definitions.yaml#/error "500": description: Internal error schema: - $ref: ../definitions.json#/error + $ref: ../definitions.yaml#/error "503": description: Under maintenance schema: - $ref: ../definitions.json#/error + $ref: ../definitions.yaml#/error x-koha-authorization: permissions: suggestions: suggestions_manage @@ -168,7 +168,7 @@ tags: - suggestions parameters: - - $ref: ../parameters.json#/suggestion_id_pp + - $ref: ../parameters.yaml#/suggestion_id_pp produces: - application/json responses: @@ -179,23 +179,23 @@ "401": description: Authentication required schema: - $ref: ../definitions.json#/error + $ref: ../definitions.yaml#/error "403": description: Access forbidden schema: - $ref: ../definitions.json#/error + $ref: ../definitions.yaml#/error "404": description: Suggestion not found schema: - $ref: ../definitions.json#/error + $ref: ../definitions.yaml#/error "500": description: Internal error schema: - $ref: ../definitions.json#/error + $ref: ../definitions.yaml#/error "503": description: Under maintenance schema: - $ref: ../definitions.json#/error + $ref: ../definitions.yaml#/error x-koha-authorization: permissions: suggestions: suggestions_manage --- a/api/v1/swagger/paths/transfer_limits.yaml +++ a/api/v1/swagger/paths/transfer_limits.yaml @@ -1,105 +1,105 @@ ---- -"/transfer_limits": +/transfer_limits: get: x-mojo-to: TransferLimits#list operationId: listTransferLimits - description: "This resource returns a list of existing transfer limits." + description: This resource returns a list of existing transfer limits. summary: List transfer limits tags: - - transfer + - transfer parameters: - - name: to_library_id - in: query - description: Search on to_library_id - required: false - type: string - - name: from_library_id - in: query - description: Search on from_library_id - required: false - type: string - - name: item_type - in: query - description: Search on item_type - required: false - type: string - - name: collection_code - in: query - description: Search on collection_code - required: false - type: string - - "$ref": "../parameters.json#/match" - - "$ref": "../parameters.json#/order_by" - - "$ref": "../parameters.json#/page" - - "$ref": "../parameters.json#/per_page" - - "$ref": "../parameters.json#/q_param" - - "$ref": "../parameters.json#/q_body" - - "$ref": "../parameters.json#/q_header" + - name: to_library_id + in: query + description: Search on to_library_id + required: false + type: string + - name: from_library_id + in: query + description: Search on from_library_id + required: false + type: string + - name: item_type + in: query + description: Search on item_type + required: false + type: string + - name: collection_code + in: query + description: Search on collection_code + required: false + type: string + - $ref: ../parameters.yaml#/match + - $ref: ../parameters.yaml#/order_by + - $ref: ../parameters.yaml#/page + - $ref: ../parameters.yaml#/per_page + - $ref: ../parameters.yaml#/q_param + - $ref: ../parameters.yaml#/q_body + - $ref: ../parameters.yaml#/q_header produces: - - application/json + - application/json responses: - '200': + "200": description: A list of transfer limits schema: type: array items: - "$ref": "../definitions.json#/transfer_limit" - '500': + $ref: ../definitions.yaml#/transfer_limit + "500": description: Internal error schema: - "$ref": "../definitions.json#/error" - '503': + $ref: ../definitions.yaml#/error + "503": description: Under maintenance schema: - "$ref": "../definitions.json#/error" + $ref: ../definitions.yaml#/error x-koha-authorization: permissions: parameters: manage_transfers 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." + description: This resource accepts a new transfer limit and creates it if it does not + already exist. tags: - - transfer + - transfer summary: Add a transfer limit parameters: - - name: body - in: body - description: A JSON object containing information about a new transfer limit - required: true - schema: - "$ref": "../definitions.json#/transfer_limit" + - name: body + in: body + description: A JSON object containing information about a new transfer limit + required: true + schema: + $ref: ../definitions.yaml#/transfer_limit produces: - - application/json + - application/json responses: - '201': + "201": description: Transfer limit added schema: - "$ref": "../definitions.json#/transfer_limit" - '400': + $ref: ../definitions.yaml#/transfer_limit + "400": description: Bad request schema: - "$ref": "../definitions.json#/error" - '401': + $ref: ../definitions.yaml#/error + "401": description: Authentication required schema: - "$ref": "../definitions.json#/error" - '403': + $ref: ../definitions.yaml#/error + "403": description: Access forbidden schema: - "$ref": "../definitions.json#/error" - '409': + $ref: ../definitions.yaml#/error + "409": description: Conflict in creating resource schema: - "$ref": "../definitions.json#/error" - '500': + $ref: ../definitions.yaml#/error + "500": description: Internal error schema: - "$ref": "../definitions.json#/error" - '503': + $ref: ../definitions.yaml#/error + "503": description: Under maintenance schema: - "$ref": "../definitions.json#/error" + $ref: ../definitions.yaml#/error x-koha-authorization: permissions: parameters: manage_transfers @@ -107,191 +107,194 @@ delete: x-mojo-to: TransferLimits#delete operationId: deleteTransferLimit - description: "This resource deletes a transfer limit for the given limit id" + description: This resource deletes a transfer limit for the given limit id tags: - - transfer + - transfer summary: Delete transfer limit parameters: - - "$ref": "../parameters.json#/transfer_limit_id_pp" + - $ref: ../parameters.yaml#/transfer_limit_id_pp produces: - - application/json + - application/json responses: - '204': + "204": description: Transfer limit deleted schema: type: string - '401': + "401": description: Authentication required schema: - "$ref": "../definitions.json#/error" - '403': + $ref: ../definitions.yaml#/error + "403": description: Access forbidden schema: - "$ref": "../definitions.json#/error" - '404': + $ref: ../definitions.yaml#/error + "404": description: Library not found schema: - "$ref": "../definitions.json#/error" - '500': + $ref: ../definitions.yaml#/error + "500": description: Internal error schema: - "$ref": "../definitions.json#/error" - '503': + $ref: ../definitions.yaml#/error + "503": description: Under maintenance schema: - "$ref": "../definitions.json#/error" + $ref: ../definitions.yaml#/error x-koha-authorization: permissions: parameters: manage_transfers -"/transfer_limits/batch": +/transfer_limits/batch: post: x-mojo-to: TransferLimits#batch_add operationId: batchAddTransferLimits - description: "This resource batch creates new transfer limits based on the given data. + 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' - 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: + The body of the query would look like - * 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', + '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' + } - 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 + - transfer summary: Batch add 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 + - 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 produces: - - application/json + - application/json responses: - '201': + "201": description: A list of transfer limits schema: type: array items: - "$ref": "../definitions.json#/transfer_limit" - '500': + $ref: ../definitions.yaml#/transfer_limit + "500": description: Internal error schema: - "$ref": "../definitions.json#/error" - '503': + $ref: ../definitions.yaml#/error + "503": description: Under maintenance schema: - "$ref": "../definitions.json#/error" + $ref: ../definitions.yaml#/error x-koha-authorization: permissions: parameters: manage_transfers 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.' + description: This endpoint works just like [the POST + version](#op-post-transfer_limits-batch), except it deletes transfer in + batch rather than creating them. tags: - - transfer + - 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 + - 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 produces: - - application/json + - application/json responses: - '204': + "204": description: Transfer limits deleted schema: type: string - '401': + "401": description: Authentication required schema: - "$ref": "../definitions.json#/error" - '403': + $ref: ../definitions.yaml#/error + "403": description: Access forbidden schema: - "$ref": "../definitions.json#/error" - '404': + $ref: ../definitions.yaml#/error + "404": description: Library not found schema: - "$ref": "../definitions.json#/error" - '500': + $ref: ../definitions.yaml#/error + "500": description: Internal error schema: - "$ref": "../definitions.json#/error" - '503': + $ref: ../definitions.yaml#/error + "503": description: Under maintenance schema: - "$ref": "../definitions.json#/error" + $ref: ../definitions.yaml#/error x-koha-authorization: permissions: parameters: manage_transfers --- a/api/v1/swagger/swagger.yaml +++ a/api/v1/swagger/swagger.yaml @@ -2,13 +2,13 @@ swagger: "2.0" basePath: /api/v1 paths: - $ref: paths.json + $ref: paths.yaml definitions: - $ref: definitions.json + $ref: definitions.yaml parameters: - $ref: parameters.json + $ref: parameters.yaml x-primitives: - $ref: x-primitives.json + $ref: x-primitives.yaml info: title: Koha REST API version: "1" --- a/api/v1/swagger/x-primitives.json +++ a/api/v1/swagger/x-primitives.json @@ -1,65 +0,0 @@ -{ - "biblio_id": { - "type": "integer", - "description": "Internal biblio identifier" - }, - "advancededitormacro_id": { - "type": "integer", - "description": "Internal advanced editor macro identifier", - "readOnly": true - }, - "patron_id": { - "type": "integer", - "description": "Internal patron identifier" - }, - "library_id": { - "type": "string", - "description": "internally assigned library identifier", - "maxLength": 10, - "minLength": 1 - }, - "limit_id": { - "type": "integer", - "description": "Internal transfer limit identifier" - }, - "cardnumber": { - "type": ["string", "null"], - "description": "library assigned user identifier" - }, - "city_id": { - "type": "integer", - "description": "internally assigned city identifier", - "readOnly": true - }, - "email": { - "type": ["string", "null"], - "description": "primary email address for patron's primary address" - }, - "firstname": { - "type": ["string", "null"], - "description": "patron's first name" - }, - "phone": { - "type": ["string", "null"], - "description": "primary phone number for patron's primary address" - }, - "surname": { - "type": ["string", "null"], - "description": "patron's last name" - }, - "vendor_id": { - "type": "integer", - "description": "internally assigned vendor identifier", - "readOnly": true - }, - "fund_id": { - "type": "integer", - "description": "internally assigned fund identifier", - "readOnly": true - }, - "quote_id": { - "type": "integer", - "description": "internally assigned quote identifier", - "readOnly": true - } -} --- a/api/v1/swagger/x-primitives.yaml +++ a/api/v1/swagger/x-primitives.yaml @@ -0,0 +1,60 @@ +--- +biblio_id: + type: integer + description: Internal biblio identifier +advancededitormacro_id: + type: integer + description: Internal advanced editor macro identifier + readOnly: true +patron_id: + type: integer + description: Internal patron identifier +library_id: + type: string + description: internally assigned library identifier + maxLength: 10 + minLength: 1 +limit_id: + type: integer + description: Internal transfer limit identifier +cardnumber: + type: + - string + - "null" + description: library assigned user identifier +city_id: + type: integer + description: internally assigned city identifier + readOnly: true +email: + type: + - string + - "null" + description: primary email address for patron's primary address +firstname: + type: + - string + - "null" + description: patron's first name +phone: + type: + - string + - "null" + description: primary phone number for patron's primary address +surname: + type: + - string + - "null" + description: patron's last name +vendor_id: + type: integer + description: internally assigned vendor identifier + readOnly: true +fund_id: + type: integer + description: internally assigned fund identifier + readOnly: true +quote_id: + type: integer + description: internally assigned quote identifier + readOnly: true --