-
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 to avoid oneOf at the top level
- Loading branch information
Showing
9 changed files
with
80 additions
and
78 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