-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MODLD-602: Updated TitleFieldRequest & TitleFieldResponse to avoid on…
…eOf at the top level (#57) * MODLD-602: Updated TitleFieldResponse to avoid oneOf at the top level * MODLD-602: Updated TitleFieldRequest to avoid oneOf at the top level
- Loading branch information
Showing
13 changed files
with
140 additions
and
133 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
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
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
86 changes: 51 additions & 35 deletions
86
src/main/resources/swagger.api/schema/resource/request/title/TitleFieldRequest.json
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,38 +1,54 @@ | ||
{ | ||
"description": "A title of a resource.", | ||
"oneOf": [ | ||
{ | ||
"type": "object", | ||
"title": "PrimaryTitleField", | ||
"properties": { | ||
"PrimaryTitle": { | ||
"type": "object", | ||
"$ref": "schema/resource/common/title/PrimaryTitle.json", | ||
"x-json-property": "http://bibfra.me/vocab/marc/Title" | ||
} | ||
} | ||
}, | ||
{ | ||
"type": "object", | ||
"title": "VariantTitleField", | ||
"properties": { | ||
"VariantTitle": { | ||
"type": "object", | ||
"$ref": "schema/resource/common/title/VariantTitle.json", | ||
"x-json-property": "http://bibfra.me/vocab/marc/VariantTitle" | ||
} | ||
} | ||
}, | ||
{ | ||
"type": "object", | ||
"title": "ParallelTitleField", | ||
"properties": { | ||
"ParallelTitle": { | ||
"type": "object", | ||
"$ref": "schema/resource/common/title/ParallelTitle.json", | ||
"x-json-property": "http://bibfra.me/vocab/marc/ParallelTitle" | ||
} | ||
} | ||
"$schema": "http://json-schema.org/draft-04/schema#", | ||
"description": "Title of the Work or Instance resource", | ||
"properties": { | ||
"title": { | ||
"type": "array", | ||
"description": "The title of the work or instance", | ||
"items": { | ||
"type": "object", | ||
"oneOf": [ | ||
{ | ||
"type": "object", | ||
"title": "PrimaryTitleField", | ||
"properties": { | ||
"PrimaryTitle": { | ||
"type": "object", | ||
"$ref": "../../common/title/PrimaryTitle.json", | ||
"x-json-property": "http://bibfra.me/vocab/marc/Title", | ||
"description": "The primary title of the work or instance" | ||
} | ||
} | ||
}, | ||
{ | ||
"type": "object", | ||
"title": "VariantTitleField", | ||
"properties": { | ||
"VariantTitle": { | ||
"type": "object", | ||
"$ref": "../../common/title/VariantTitle.json", | ||
"x-json-property": "http://bibfra.me/vocab/marc/VariantTitle", | ||
"description": "The variant title of the work or instance" | ||
} | ||
} | ||
}, | ||
{ | ||
"type": "object", | ||
"title": "ParallelTitleField", | ||
"properties": { | ||
"ParallelTitle": { | ||
"type": "object", | ||
"$ref": "../../common/title/ParallelTitle.json", | ||
"x-json-property": "http://bibfra.me/vocab/marc/ParallelTitle", | ||
"description": "The parallel title of the work or instance" | ||
} | ||
} | ||
} | ||
] | ||
}, | ||
"x-json-property": "http://bibfra.me/vocab/marc/title", | ||
"x-field-extra-annotation": "@org.folio.linked.data.validation.PrimaryTitleConstraint" | ||
} | ||
] | ||
}, | ||
"required": ["title"] | ||
} |
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
82 changes: 48 additions & 34 deletions
82
src/main/resources/swagger.api/schema/resource/response/title/TitleFieldResponse.json
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,38 +1,52 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-04/schema#", | ||
"description": "Title of the Work or Instance resource", | ||
"oneOf": [ | ||
{ | ||
"type": "object", | ||
"title": "PrimaryTitleFieldResponse", | ||
"properties": { | ||
"PrimaryTitle": { | ||
"type": "object", | ||
"$ref": "schema/resource/response/title/PrimaryTitleResponse.json", | ||
"x-json-property": "http://bibfra.me/vocab/marc/Title" | ||
} | ||
} | ||
}, | ||
{ | ||
"type": "object", | ||
"title": "VariantTitleFieldResponse", | ||
"properties": { | ||
"VariantTitle": { | ||
"type": "object", | ||
"$ref": "schema/resource/response/title/VariantTitleResponse.json", | ||
"x-json-property": "http://bibfra.me/vocab/marc/VariantTitle" | ||
} | ||
} | ||
}, | ||
{ | ||
"type": "object", | ||
"title": "ParallelTitleFieldResponse", | ||
"properties": { | ||
"ParallelTitle": { | ||
"type": "object", | ||
"$ref": "schema/resource/response/title/ParallelTitleResponse.json", | ||
"x-json-property": "http://bibfra.me/vocab/marc/ParallelTitle" | ||
} | ||
} | ||
"properties": { | ||
"title": { | ||
"type": "array", | ||
"description": "The title of the work or instance", | ||
"items": { | ||
"type": "object", | ||
"oneOf": [ | ||
{ | ||
"type": "object", | ||
"title": "PrimaryTitleFieldResponse", | ||
"properties": { | ||
"PrimaryTitle": { | ||
"type": "object", | ||
"$ref": "PrimaryTitleResponse.json", | ||
"x-json-property": "http://bibfra.me/vocab/marc/Title", | ||
"description": "The primary title of the work or instance" | ||
} | ||
} | ||
}, | ||
{ | ||
"type": "object", | ||
"title": "VariantTitleFieldResponse", | ||
"properties": { | ||
"VariantTitle": { | ||
"type": "object", | ||
"$ref": "VariantTitleResponse.json", | ||
"x-json-property": "http://bibfra.me/vocab/marc/VariantTitle", | ||
"description": "The variant title of the work or instance" | ||
} | ||
} | ||
}, | ||
{ | ||
"type": "object", | ||
"title": "ParallelTitleFieldResponse", | ||
"properties": { | ||
"ParallelTitle": { | ||
"type": "object", | ||
"$ref": "ParallelTitleResponse.json", | ||
"x-json-property": "http://bibfra.me/vocab/marc/ParallelTitle", | ||
"description": "The parallel title of the work or instance" | ||
} | ||
} | ||
} | ||
] | ||
}, | ||
"x-json-property": "http://bibfra.me/vocab/marc/title" | ||
} | ||
] | ||
} | ||
} |
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.