diff --git a/descriptors/ModuleDescriptor-template.json b/descriptors/ModuleDescriptor-template.json index 0cdb237..3cbe691 100644 --- a/descriptors/ModuleDescriptor-template.json +++ b/descriptors/ModuleDescriptor-template.json @@ -5,7 +5,7 @@ "requires": [ { "id": "patron", - "version": "6.0" + "version": "6.3" }, { "id": "circulation", diff --git a/ramls/edge-patron.raml b/ramls/edge-patron.raml index f0302ed..4dcc99d 100644 --- a/ramls/edge-patron.raml +++ b/ramls/edge-patron.raml @@ -25,6 +25,7 @@ types: hold-cancellation: !include hold-cancellation.json errors: !include raml-util/schemas/errors.schema external_patron_error_404: !include schemas/external_patron_error_404.schema + staging_user_error_404: !include schemas/staging_user_error_404.schema external_patron_error_get_422: !include schemas/external_patron_error_get_422.schema external_patron_error_post_422: !include schemas/external_patron_error_post_422.schema external_patron_error_put_422: !include schemas/external_patron_error_put_422.schema @@ -91,7 +92,7 @@ types: /{externalSystemId}: uriParameters: externalSystemId: - description: The UUID of a FOLIO user + description: The UUID of a staging user type: string pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$ put: @@ -113,13 +114,6 @@ types: application/json: type: staging_user example: !include examples/staging_user.json - 201: - description: | - staging user created successfully - body: - application/json: - type: staging_user - example: !include examples/staging_user.json 400: description: Bad request body: @@ -147,11 +141,11 @@ types: text/plain: example: internal server error, contact administrator 404: - description: Item with a given ID not found + description: Staging user with a given external system Id not found body: application/json: - type: external_patron_error_404 - example: !include examples/external_patron_error.json + type: staging_user_error_404 + example: !include examples/staging_user_error.json /account: diff --git a/ramls/examples/staging_user.json b/ramls/examples/staging_user.json index 771b0e5..ee53a21 100644 --- a/ramls/examples/staging_user.json +++ b/ramls/examples/staging_user.json @@ -1,6 +1,7 @@ { "isEmailVerified": true, "status": "TIER-1", + "externalSystemId": "9eb67301-6f6e-468f-9b1a-6134dc39a684", "generalInfo": { "firstName": "John", "preferredFirstName": "John", diff --git a/ramls/examples/staging_user_error.json b/ramls/examples/staging_user_error.json new file mode 100644 index 0000000..2460b8f --- /dev/null +++ b/ramls/examples/staging_user_error.json @@ -0,0 +1,4 @@ +{ + "code": "STAGING_USER_NOT_FOUND", + "errorMessage": "Staging user does not exist" +} diff --git a/ramls/schemas/staging_user_error_404.schema b/ramls/schemas/staging_user_error_404.schema new file mode 100644 index 0000000..58bbc14 --- /dev/null +++ b/ramls/schemas/staging_user_error_404.schema @@ -0,0 +1,26 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "external_patron_error.schema", + "description": "An external_patron user error", + "type": "object", + "properties": { + "code": { + "type": "string", + "description": "Error code" + }, + "errorMessage": { + "type": "string", + "description": "Error message text", + "examples": [ + { + "code": "STAGING_USER_NOT_FOUND", + "errorMessage": "Staging user does not exist" + } + ] + } + }, + "required": [ + "code", + "errorMessage" + ] +} diff --git a/ramls/staging_user.json b/ramls/staging_user.json index 330f13d..1dcfc17 100644 --- a/ramls/staging_user.json +++ b/ramls/staging_user.json @@ -13,6 +13,10 @@ "type": "string", "enum": ["TIER-1", "TIER-2"] }, + "externalSystemId": { + "description": "A unique ID (UUID) that corresponds to an external authority", + "type": "string" + }, "generalInfo": { "type": "object", "description": "General info of external patron",