-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[MODORDERS-1006] Create Routing Lists API (#879)
* [MODORDSTOR-381] Create Routing Lists API * [MODORDSTOR-381] Add unit tests and fix validation logic * [MODORDSTOR-381] Add validator tests * [MODORDSTOR-381] Add unit tests for service * [MODORDSTOR-381] Remove unused logger * [MODORDSTOR-381] Merge with master and refactor code * [MODORDSTOR-381] Fix failing unit tests * [MODORDSTOR-381] Fix failing unit tests * [MODORDSTOR-381] Fix failing unit tests * [MODORDERS-1006] Change to meet coding convention rules * [MODORDERS-1006] Add permissions and create private constructor for util class * [MODORDERS-1006] Adjust perms * [MODORDERS-1006] Remove unnecessary lines
- Loading branch information
1 parent
354903f
commit b25126d
Showing
17 changed files
with
902 additions
and
158 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,47 +1,89 @@ | ||
#%RAML 1.0 | ||
title: "RoutingList" | ||
title: Routing Lists | ||
baseUri: https://github.com/folio-org/mod-orders | ||
version: v1.0 | ||
|
||
documentation: | ||
- title: Routing lists | ||
content: <b>CRUD API to manage routing lists.</b> | ||
- title: Routing Lists API | ||
content: <b>API for routing lists</b> | ||
|
||
types: | ||
routing_list: !include acq-models/mod-orders-storage/schemas/routing_list.json | ||
routing_list_collection: !include acq-models/mod-orders-storage/schemas/routing_list_collection.json | ||
UUID: | ||
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}$ | ||
routing-list: !include acq-models/mod-orders-storage/schemas/routing_list.json | ||
routing-list-collection: !include acq-models/mod-orders-storage/schemas/routing_list_collection.json | ||
error: !include raml-util/schemas/error.schema | ||
errors: !include raml-util/schemas/errors.schema | ||
UUID: | ||
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}$ | ||
|
||
traits: | ||
pageable: !include raml-util/traits/pageable.raml | ||
searchable: !include raml-util/traits/searchable.raml | ||
pageable: !include raml-util/traits/pageable.raml | ||
searchable: !include raml-util/traits/searchable.raml | ||
validate: !include raml-util/traits/validation.raml | ||
|
||
resourceTypes: | ||
collection: !include rtypes/collection-with-json-response.raml | ||
collection-item: !include rtypes/item-collection-with-json-response.raml | ||
|
||
/orders/routing-lists: | ||
displayName: Routing Lists | ||
type: | ||
collection: | ||
exampleCollection: !include acq-models/mod-orders-storage/examples/routing_list_collection.sample | ||
exampleItem: !include acq-models/mod-orders-storage/examples/routing_list_get.sample | ||
schemaCollection: routing_list_collection | ||
schemaItem: routing_list | ||
schemaCollection: routing-list-collection | ||
schemaItem: routing-list | ||
get: | ||
description: Get routing lists | ||
description: Get a collection of routing lists | ||
is: [ | ||
searchable: {description: "with valid searchable fields: for example routing list", example: "[\"routing_list\", \"ROUTING_LIST\", \"=\"]"}, | ||
searchable: { description: "CQL query", example: "name=MyRoutingList" }, | ||
pageable | ||
] | ||
post: | ||
description: Create routing lists | ||
|
||
description: Create a new routing list record | ||
is: [validate] | ||
body: | ||
application/json: | ||
type: routing-list | ||
example: | ||
strict: false | ||
value: !include acq-models/mod-orders-storage/examples/routing_list_get.sample | ||
responses: | ||
201: | ||
description: "Returns a newly created item, with server-controlled fields like 'id' populated" | ||
body: | ||
application/json: | ||
example: !include acq-models/mod-orders-storage/examples/routing_list_get.sample | ||
400: | ||
description: "Bad request, e.g. malformed request body or query parameter. Details of the error (e.g. name of the parameter or line/character number with malformed data) provided in the response." | ||
body: | ||
application/json: | ||
type: error | ||
401: | ||
description: "Not authorized to perform requested action" | ||
body: | ||
application/json: | ||
type: error | ||
500: | ||
description: "Internal server error, e.g. due to misconfiguration" | ||
body: | ||
application/json: | ||
type: error | ||
/{id}: | ||
uriParameters: | ||
id: | ||
description: The UUID of a Routing List | ||
type: UUID | ||
description: Get, Delete or Update a specific routing list | ||
type: | ||
collection-item: | ||
exampleItem: !include acq-models/mod-orders-storage/examples/routing_list_get.sample | ||
schema: routing-list | ||
/{id}/template: | ||
uriParameters: | ||
id: | ||
description: The UUID of a Title | ||
type: UUID | ||
get: | ||
description: Execute mod-template-engine to process templates with replaced token placeholders [update] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.