diff --git a/mod-orders/examples/holdingDetailCollection.sample b/mod-orders/examples/holdingDetailCollection.sample new file mode 100644 index 00000000..8c72bd74 --- /dev/null +++ b/mod-orders/examples/holdingDetailCollection.sample @@ -0,0 +1,6 @@ +{ + "holdingIds": [ + "e54b1f4d-7d05-4b1a-9368-3c36b75d8ac1", + "f65c2g5e-8e16-5c2b-a479-4d47c86e9bd2" + ] +} diff --git a/mod-orders/examples/holdingDetailResults.sample b/mod-orders/examples/holdingDetailResults.sample new file mode 100644 index 00000000..340a62a2 --- /dev/null +++ b/mod-orders/examples/holdingDetailResults.sample @@ -0,0 +1,53 @@ +{ + "e54b1f4d-7d05-4b1a-9368-3c36b75d8ac1": { + "pieces_detail_collection": { + "pieces_detail": [ + { + "id": "8d0e7e3e-8e4f-4f3c-9c9e-1a2b3c4d5e6f", + "itemId": "7a1b2c3d-4e5f-6a7b-8c9d-0e1f2a3b4c5d", + "tenantId": "consortium" + }, + { + "id": "9e1f2a3b-4c5d-6e7f-8a9b-0c1d2e3f4a5b", + "itemId": "8b2c3d4e-5f6a-7b8c-9d0e-1f2a3b4c5d6e", + "tenantId": "consortium" + } + ], + "totalRecords": 2 + }, + "items_detail_collection": { + "items_detail": [ + { + "id": "7a1b2c3d-4e5f-6a7b-8c9d-0e1f2a3b4c5d", + "tenantId": "university" + }, + { + "id": "8b2c3d4e-5f6a-7b8c-9d0e-1f2a3b4c5d6e", + "tenantId": "university" + } + ], + "totalRecords": 2 + } + }, + "f65c2g5e-8e16-5c2b-a479-4d47c86e9bd2": { + "pieces_detail_collection": { + "pieces_detail": [ + { + "id": "a1b2c3d4-e5f6-7a8b-9c0d-1e2f3a4b5c6d", + "itemId": "b2c3d4e5-f6a7-8b9c-0d1e-2f3a4b5c6d7e", + "tenantId": "consortium" + } + ], + "totalRecords": 1 + }, + "items_detail_collection": { + "items_detail": [ + { + "id": "b2c3d4e5-f6a7-8b9c-0d1e-2f3a4b5c6d7e", + "tenantId": "consortium" + } + ], + "totalRecords": 1 + } + } +} diff --git a/mod-orders/schemas/holdingDetail.json b/mod-orders/schemas/holdingDetail.json new file mode 100644 index 00000000..843f4125 --- /dev/null +++ b/mod-orders/schemas/holdingDetail.json @@ -0,0 +1,66 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "type": "object", + "description": "The contents of the dynamic map holding details", + "properties": { + "pieces_detail_collection": { + "description": "Collection of piece details for the holding", + "type": "object", + "properties": { + "pieces_detail": { + "description": "Array of piece details", + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "description": "UUID of the piece record", + "$ref": "../../../raml-util/schemas/uuid.schema" + }, + "itemId": { + "description": "UUID of the associated item record", + "$ref": "../../../raml-util/schemas/uuid.schema" + }, + "tenantId": { + "description": "Associated tenant in ECS-enabled environments", + "type": "string" + } + } + } + }, + "totalRecords": { + "description": "Total number of records in the array", + "type": "integer" + } + } + }, + "items_detail_collection": { + "description": "Collection of item details for the holding", + "type": "object", + "properties": { + "items_detail": { + "description": "Array of item details", + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "description": "UUID of the item record", + "$ref": "../../../raml-util/schemas/uuid.schema" + }, + "tenantId": { + "description": "Associated tenant in ECS-enabled environments", + "type": "string" + } + } + } + }, + "totalRecords": { + "description": "Total number of records in the array", + "type": "integer" + } + } + } + }, + "additionalProperties": false +} diff --git a/mod-orders/schemas/holdingDetailCollection.json b/mod-orders/schemas/holdingDetailCollection.json new file mode 100644 index 00000000..41d8eb1b --- /dev/null +++ b/mod-orders/schemas/holdingDetailCollection.json @@ -0,0 +1,20 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "description": "A collection of holding ids to retrieved the holding details", + "type": "object", + "properties": { + "holdingIds": { + "description": "An array of holding ids", + "id": "holdingIds", + "type": "array", + "items": { + "type": "object", + "$ref": "../../../raml-util/schemas/uuid.schema" + } + } + }, + "additionalProperties": false, + "required": [ + "holdingIds" + ] +} diff --git a/mod-orders/schemas/holdingDetailResults.json b/mod-orders/schemas/holdingDetailResults.json new file mode 100644 index 00000000..8ae97403 --- /dev/null +++ b/mod-orders/schemas/holdingDetailResults.json @@ -0,0 +1,8 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "description": "A dynamic map of holding details", + "type": "object", + "additionalProperties": { + "$ref": "holdingDetail.json" + } +}