Skip to content

Commit

Permalink
EDGPATRON-160 - Updated raml pieces (#139)
Browse files Browse the repository at this point in the history
* [EDGPATRON-160] - Add put API for /patron/{externalSystemId}

* [EDGPATRON-160] - Add put API for /patron/{externalSystemId}

* [EDGPATRON-160] - Add put API for /patron/{externalSystemId}

* [EDGPATRON-160] - Add put API for /patron/{externalSystemId}

* [EDGPATRON-160] - Add put API for /patron/{externalSystemId}

* [EDGPATRON-160] - Add put API for /patron/{externalSystemId}

* [EDGPATRON-160] - Add put API for /patron/{externalSystemId}

* [EDGPATRON-160] - Add put API for /patron/{externalSystemId}

* [EDGPATRON-160] - Add put API for /patron/{externalSystemId}

* [EDGPATRON-160] - Add put API for /patron/{externalSystemId}

* [EDGPATRON-160] - Add put API for /patron/{externalSystemId}

* [EDGPATRON-160] - Add put API for /patron/{externalSystemId}

* [EDGPATRON-160] - Add put API for /patron/{externalSystemId}

* [EDGPATRON-160] - Add put API for /patron/{externalSystemId}

* [EDGPATRON-160] - Add put API for /patron/{externalSystemId}

* [EDGPATRON-160] - Add put API for /patron/{externalSystemId}
  • Loading branch information
gurleenkaurbp authored Dec 20, 2024
1 parent 1299b03 commit 9f934cb
Show file tree
Hide file tree
Showing 6 changed files with 41 additions and 12 deletions.
2 changes: 1 addition & 1 deletion descriptors/ModuleDescriptor-template.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"requires": [
{
"id": "patron",
"version": "6.0"
"version": "6.3"
},
{
"id": "circulation",
Expand Down
16 changes: 5 additions & 11 deletions ramls/edge-patron.raml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand All @@ -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:
Expand Down Expand Up @@ -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:
Expand Down
1 change: 1 addition & 0 deletions ramls/examples/staging_user.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"isEmailVerified": true,
"status": "TIER-1",
"externalSystemId": "9eb67301-6f6e-468f-9b1a-6134dc39a684",
"generalInfo": {
"firstName": "John",
"preferredFirstName": "John",
Expand Down
4 changes: 4 additions & 0 deletions ramls/examples/staging_user_error.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"code": "STAGING_USER_NOT_FOUND",
"errorMessage": "Staging user does not exist"
}
26 changes: 26 additions & 0 deletions ramls/schemas/staging_user_error_404.schema
Original file line number Diff line number Diff line change
@@ -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"
]
}
4 changes: 4 additions & 0 deletions ramls/staging_user.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 9f934cb

Please sign in to comment.