Bug 26355: Update the API specs
Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org> Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
parent
a9fda16f38
commit
6ef6788406
|
|
@ -408,6 +408,10 @@ properties:
|
|||
- "null"
|
||||
description: patron's primary contact method
|
||||
maxLength: 45
|
||||
self_renewal_available:
|
||||
type:
|
||||
- boolean
|
||||
description: set to 1 if the patron is eligible to self renew and is within the renewal criteria
|
||||
_strings:
|
||||
type:
|
||||
- object
|
||||
|
|
|
|||
|
|
@ -46,11 +46,6 @@ properties:
|
|||
- boolean
|
||||
- "null"
|
||||
description: Are overdue notices sent to this patron category (1 for yes, 0 for no)
|
||||
reserve_fee:
|
||||
type:
|
||||
- number
|
||||
- "null"
|
||||
description: Cost to place holds
|
||||
hide_lost_items:
|
||||
type: boolean
|
||||
description: Are lost items shown to this category (1 for yes, 0 for no)
|
||||
|
|
@ -129,6 +124,35 @@ properties:
|
|||
type:
|
||||
- boolean
|
||||
description: Set threshold of debt allowed before issues are blocked
|
||||
self_renewal_enabled:
|
||||
type:
|
||||
- boolean
|
||||
description: Determine whether self-renewal is allowed for this category
|
||||
self_renewal_availability_start:
|
||||
type:
|
||||
- number
|
||||
- "null"
|
||||
description: How many days in advance of expiry self-renewal should become available
|
||||
self_renewal_if_expired:
|
||||
type:
|
||||
- number
|
||||
- "null"
|
||||
description: How many days after expiry self-renewal should still be available
|
||||
self_renewal_fines_block:
|
||||
type:
|
||||
- number
|
||||
- "null"
|
||||
description: How much can be accrued in fines before self-renewal is blocked
|
||||
self_renewal_failure_message:
|
||||
type:
|
||||
- string
|
||||
- "null"
|
||||
description: The error message to display if self-renewal fails
|
||||
self_renewal_information_message:
|
||||
type:
|
||||
- string
|
||||
- "null"
|
||||
description: The information to display to the user before starting the renewal process
|
||||
additionalProperties: false
|
||||
required:
|
||||
- patron_category_id
|
||||
|
|
|
|||
|
|
@ -0,0 +1,23 @@
|
|||
---
|
||||
type: "object"
|
||||
properties:
|
||||
self_renewal_settings:
|
||||
type:
|
||||
- object
|
||||
- "null"
|
||||
description: The object representing the self-renewal settings for the patron's category
|
||||
expiry_date:
|
||||
type:
|
||||
- string
|
||||
- "null"
|
||||
description: The new expiry date on successful self-renewal
|
||||
confirmation_sent:
|
||||
type:
|
||||
- array
|
||||
- "null"
|
||||
description: The method(s) through which confirmation of renewal has been sent
|
||||
patron:
|
||||
type:
|
||||
- object
|
||||
description: The object representing the patron fields from the OPAC form
|
||||
additionalProperties: false
|
||||
|
|
@ -52,3 +52,49 @@
|
|||
x-koha-authorization:
|
||||
permissions:
|
||||
parameters: manage_patron_categories
|
||||
post:
|
||||
x-mojo-to: Patrons::Categories#add
|
||||
operationId: addCategory
|
||||
tags:
|
||||
- categories
|
||||
summary: Add category
|
||||
parameters:
|
||||
- name: body
|
||||
in: body
|
||||
description: A JSON object containing information about the category
|
||||
required: true
|
||||
schema:
|
||||
$ref: "../swagger.yaml#/definitions/patron_category"
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"201":
|
||||
description: Category added
|
||||
schema:
|
||||
$ref: "../swagger.yaml#/definitions/patron_category"
|
||||
"400":
|
||||
description: Bad request
|
||||
schema:
|
||||
$ref: "../swagger.yaml#/definitions/error"
|
||||
"401":
|
||||
description: Authentication required
|
||||
schema:
|
||||
$ref: "../swagger.yaml#/definitions/error"
|
||||
"403":
|
||||
description: Access forbidden
|
||||
schema:
|
||||
$ref: "../swagger.yaml#/definitions/error"
|
||||
"500":
|
||||
description: |
|
||||
Internal server error. Possible `error_code` attribute values:
|
||||
|
||||
* `internal_server_error`
|
||||
schema:
|
||||
$ref: "../swagger.yaml#/definitions/error"
|
||||
"503":
|
||||
description: Under maintenance
|
||||
schema:
|
||||
$ref: "../swagger.yaml#/definitions/error"
|
||||
x-koha-authorization:
|
||||
permissions:
|
||||
parameters: manage_patron_categories
|
||||
|
|
|
|||
|
|
@ -344,3 +344,112 @@
|
|||
description: Under maintenance
|
||||
schema:
|
||||
$ref: "../swagger.yaml#/definitions/error"
|
||||
/public/patrons/{patron_id}/self_renewal:
|
||||
get:
|
||||
x-mojo-to: Patrons::SelfRenewal#start
|
||||
operationId: startSelfRenewal
|
||||
tags:
|
||||
- patrons
|
||||
summary: List patrons
|
||||
produces:
|
||||
- application/json
|
||||
parameters:
|
||||
- $ref: "../swagger.yaml#/parameters/patron_id_pp"
|
||||
- $ref: "../swagger.yaml#/parameters/match"
|
||||
- $ref: "../swagger.yaml#/parameters/order_by"
|
||||
- $ref: "../swagger.yaml#/parameters/page"
|
||||
- $ref: "../swagger.yaml#/parameters/per_page"
|
||||
- $ref: "../swagger.yaml#/parameters/q_param"
|
||||
- $ref: "../swagger.yaml#/parameters/q_body"
|
||||
- $ref: "../swagger.yaml#/parameters/request_id_header"
|
||||
responses:
|
||||
"200":
|
||||
description: The metadata required to start patron self-renewal
|
||||
schema:
|
||||
type: object
|
||||
$ref: "../swagger.yaml#/definitions/patron_self_renewal"
|
||||
additionalProperties: false
|
||||
"400":
|
||||
description: |
|
||||
Bad request. Possible `error_code` attribute values:
|
||||
|
||||
* `invalid_query`
|
||||
schema:
|
||||
$ref: "../swagger.yaml#/definitions/error"
|
||||
"401":
|
||||
description: Authentication required
|
||||
schema:
|
||||
$ref: "../swagger.yaml#/definitions/error"
|
||||
"403":
|
||||
description: Access forbidden
|
||||
schema:
|
||||
$ref: "../swagger.yaml#/definitions/error"
|
||||
"500":
|
||||
description: |
|
||||
Internal server error. Possible `error_code` attribute values:
|
||||
|
||||
* `internal_server_error`
|
||||
schema:
|
||||
$ref: "../swagger.yaml#/definitions/error"
|
||||
"503":
|
||||
description: Under maintenance
|
||||
schema:
|
||||
$ref: "../swagger.yaml#/definitions/error"
|
||||
post:
|
||||
x-mojo-to: Patrons::SelfRenewal#submit
|
||||
operationId: submitSelfRenewal
|
||||
tags:
|
||||
- patrons
|
||||
summary: Submit self-renewal form
|
||||
consumes:
|
||||
- application/json
|
||||
produces:
|
||||
- application/json
|
||||
parameters:
|
||||
- $ref: "../swagger.yaml#/parameters/patron_id_pp"
|
||||
- description: A JSON object containing information about the self-renewal
|
||||
in: body
|
||||
name: body
|
||||
required: true
|
||||
schema:
|
||||
$ref: "../swagger.yaml#/definitions/patron_self_renewal"
|
||||
responses:
|
||||
201:
|
||||
description: A successfully completed renewal
|
||||
schema:
|
||||
items:
|
||||
$ref: "../swagger.yaml#/definitions/patron_self_renewal"
|
||||
400:
|
||||
description: Bad request
|
||||
schema:
|
||||
$ref: "../swagger.yaml#/definitions/error"
|
||||
401:
|
||||
description: Authentication required
|
||||
schema:
|
||||
$ref: "../swagger.yaml#/definitions/error"
|
||||
403:
|
||||
description: Access forbidden
|
||||
schema:
|
||||
$ref: "../swagger.yaml#/definitions/error"
|
||||
404:
|
||||
description: Ressource not found
|
||||
schema:
|
||||
$ref: "../swagger.yaml#/definitions/error"
|
||||
409:
|
||||
description: Conflict in creating resource
|
||||
schema:
|
||||
$ref: "../swagger.yaml#/definitions/error"
|
||||
413:
|
||||
description: Payload too large
|
||||
schema:
|
||||
$ref: "../swagger.yaml#/definitions/error"
|
||||
500:
|
||||
description: |-
|
||||
Internal server error. Possible `error_code` attribute values:
|
||||
* `internal_server_error`
|
||||
schema:
|
||||
$ref: "../swagger.yaml#/definitions/error"
|
||||
503:
|
||||
description: Under maintenance
|
||||
schema:
|
||||
$ref: "../swagger.yaml#/definitions/error"
|
||||
|
|
|
|||
|
|
@ -156,6 +156,8 @@ definitions:
|
|||
$ref: ./definitions/patron_balance.yaml
|
||||
patron_category:
|
||||
$ref: ./definitions/patron_category.yaml
|
||||
patron_self_renewal:
|
||||
$ref: ./definitions/patron_self_renewal.yaml
|
||||
patron_extended_attribute:
|
||||
$ref: ./definitions/patron_extended_attribute.yaml
|
||||
preservation_config:
|
||||
|
|
@ -597,6 +599,8 @@ paths:
|
|||
$ref: "./paths/public_patrons.yaml#/~1public~1patrons~1{patron_id}~1ill~1requests"
|
||||
"/public/patrons/{patron_id}/password":
|
||||
$ref: "./paths/public_patrons.yaml#/~1public~1patrons~1{patron_id}~1password"
|
||||
"/public/patrons/{patron_id}/self_renewal":
|
||||
$ref: "./paths/public_patrons.yaml#/~1public~1patrons~1{patron_id}~1self_renewal"
|
||||
"/public/tickets":
|
||||
$ref: "./paths/tickets.yaml#/~1public~1tickets"
|
||||
/quotes:
|
||||
|
|
@ -1250,6 +1254,9 @@ tags:
|
|||
- description: "Manage cash register cashups\n"
|
||||
name: cashups
|
||||
x-displayName: Cashups
|
||||
- description: "Manage categories\n"
|
||||
name: categories
|
||||
x-displayName: Categories
|
||||
- description: "Manage checkouts\n"
|
||||
name: checkouts
|
||||
x-displayName: Checkouts
|
||||
|
|
|
|||
Loading…
Reference in New Issue