From f916e2768b60fb3f77e429c3f398e5e84dc7d265 Mon Sep 17 00:00:00 2001 From: Vignesh-Kalyanasundaram Date: Thu, 14 Mar 2024 13:47:18 +0530 Subject: [PATCH] MODRS-194 Updating dependencies for Quesnelia --- .../swagger.api/schemas/instance.json | 100 +----------------- .../schemas/instanceContributors.json | 32 ++++++ .../schemas/instanceIdentifiers.json | 20 ++++ .../schemas/instancePublication.json | 23 ++++ .../resources/swagger.api/schemas/item.json | 8 +- .../schemas/itemContributorNames.json | 11 ++ 6 files changed, 92 insertions(+), 102 deletions(-) create mode 100644 src/main/resources/swagger.api/schemas/instanceContributors.json create mode 100644 src/main/resources/swagger.api/schemas/instanceIdentifiers.json create mode 100644 src/main/resources/swagger.api/schemas/instancePublication.json create mode 100644 src/main/resources/swagger.api/schemas/itemContributorNames.json diff --git a/src/main/resources/swagger.api/schemas/instance.json b/src/main/resources/swagger.api/schemas/instance.json index 8359eefe..68f0f962 100644 --- a/src/main/resources/swagger.api/schemas/instance.json +++ b/src/main/resources/swagger.api/schemas/instance.json @@ -132,22 +132,7 @@ "description": "An extensible set of name-value pairs of identifiers associated with the resource", "minItems": 0, "items": { - "type": "object", - "properties": { - "value": { - "type": "string", - "description": "Resource identifier value" - }, - "identifierTypeId": { - "type": "string", - "description": "Resource identifier type (e.g. ISBN, ISSN, LCCN, CODEN, Locally defined identifiers)" - } - }, - "additionalProperties": false, - "required": [ - "value", - "identifierTypeId" - ] + "$ref": "instanceIdentifiers.json" } }, "contributors": { @@ -155,34 +140,7 @@ "description": "List of contributors", "minItems": 0, "items": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Personal name, corporate name, meeting name" - }, - "contributorTypeId": { - "type": "string", - "description": "ID for the contributor type term defined as a referencetable in settings" - }, - "contributorTypeText": { - "type": "string", - "description": "Free text element for adding contributor type terms other that defined by the MARC code list for relators" - }, - "contributorNameTypeId": { - "type": "string", - "description": "Contributor type terms defined by the MARC code list for relators" - }, - "primary": { - "type": "boolean", - "description": "Whether this is the primary contributor" - } - }, - "additionalProperties": false, - "required": [ - "name", - "contributorNameTypeId" - ] + "$ref": "instanceContributors.json" } }, "subjects": { @@ -230,25 +188,7 @@ "type": "array", "description": "List of publication items", "items": { - "type": "object", - "properties": { - "publisher": { - "type": "string", - "description": "Name of publisher, distributor, etc." - }, - "place": { - "type": "string", - "description": "Place of publication, distribution, etc." - }, - "dateOfPublication": { - "type": "string", - "description": "Date (year YYYY) of publication, distribution, etc." - }, - "role": { - "type": "string", - "description": "The role of the publisher, distributor, etc." - } - } + "$ref": "instancePublication.json" } }, "publicationFrequency": { @@ -456,22 +396,7 @@ "description": "An extensible set of name-value pairs of identifiers associated with the resource", "minItems": 0, "items": { - "type": "object", - "properties": { - "value": { - "type": "string", - "description": "Resource identifier value" - }, - "identifierTypeId": { - "type": "string", - "description": "Resource identifier type (e.g. ISBN, ISSN, LCCN, CODEN, Locally defined identifiers)" - } - }, - "additionalProperties": false, - "required": [ - "value", - "identifierTypeId" - ] + "$ref": "instanceIdentifiers.json" } } }, @@ -507,22 +432,7 @@ "description": "An extensible set of name-value pairs of identifiers associated with the resource", "minItems": 0, "items": { - "type": "object", - "properties": { - "value": { - "type": "string", - "description": "Resource identifier value" - }, - "identifierTypeId": { - "type": "string", - "description": "Resource identifier type (e.g. ISBN, ISSN, LCCN, CODEN, Locally defined identifiers)" - } - }, - "additionalProperties": false, - "required": [ - "value", - "identifierTypeId" - ] + "$ref": "instanceIdentifiers.json" } } }, diff --git a/src/main/resources/swagger.api/schemas/instanceContributors.json b/src/main/resources/swagger.api/schemas/instanceContributors.json new file mode 100644 index 00000000..d970073c --- /dev/null +++ b/src/main/resources/swagger.api/schemas/instanceContributors.json @@ -0,0 +1,32 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "description": "Contributors", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Personal name, corporate name, meeting name" + }, + "contributorTypeId": { + "type": "string", + "description": "ID for the contributor type term defined as a referencetable in settings" + }, + "contributorTypeText": { + "type": "string", + "description": "Free text element for adding contributor type terms other that defined by the MARC code list for relators" + }, + "contributorNameTypeId": { + "type": "string", + "description": "Contributor type terms defined by the MARC code list for relators" + }, + "primary": { + "type": "boolean", + "description": "Whether this is the primary contributor" + } + }, + "additionalProperties": false, + "required": [ + "name", + "contributorNameTypeId" + ] +} diff --git a/src/main/resources/swagger.api/schemas/instanceIdentifiers.json b/src/main/resources/swagger.api/schemas/instanceIdentifiers.json new file mode 100644 index 00000000..8cd9a4fd --- /dev/null +++ b/src/main/resources/swagger.api/schemas/instanceIdentifiers.json @@ -0,0 +1,20 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "description": "An extensible name-value pairs associated with the resource", + "type": "object", + "properties": { + "value": { + "type": "string", + "description": "Resource identifier value" + }, + "identifierTypeId": { + "type": "string", + "description": "Resource identifier type (e.g. ISBN, ISSN, LCCN, CODEN, Locally defined identifiers)" + } + }, + "additionalProperties": false, + "required": [ + "value", + "identifierTypeId" + ] +} diff --git a/src/main/resources/swagger.api/schemas/instancePublication.json b/src/main/resources/swagger.api/schemas/instancePublication.json new file mode 100644 index 00000000..51b16eb6 --- /dev/null +++ b/src/main/resources/swagger.api/schemas/instancePublication.json @@ -0,0 +1,23 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "description": "Publication items", + "type": "object", + "properties": { + "publisher": { + "type": "string", + "description": "Name of publisher, distributor, etc." + }, + "place": { + "type": "string", + "description": "Place of publication, distribution, etc." + }, + "dateOfPublication": { + "type": "string", + "description": "Date (year YYYY) of publication, distribution, etc." + }, + "role": { + "type": "string", + "description": "The role of the publisher, distributor, etc." + } + } +} diff --git a/src/main/resources/swagger.api/schemas/item.json b/src/main/resources/swagger.api/schemas/item.json index f46245f0..d2a7f2cf 100644 --- a/src/main/resources/swagger.api/schemas/item.json +++ b/src/main/resources/swagger.api/schemas/item.json @@ -44,13 +44,7 @@ "description": "A list of contributor names", "type": "array", "items": { - "type": "object", - "properties": { - "name": { - "description": "The contributor name", - "type": "string" - } - } + "$ref": "itemContributorNames.json" } }, "callNumber": { diff --git a/src/main/resources/swagger.api/schemas/itemContributorNames.json b/src/main/resources/swagger.api/schemas/itemContributorNames.json new file mode 100644 index 00000000..95e05109 --- /dev/null +++ b/src/main/resources/swagger.api/schemas/itemContributorNames.json @@ -0,0 +1,11 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "description": "Contributor names", + "type": "object", + "properties": { + "name": { + "description": "The contributor name", + "type": "string" + } + } +}