From d4bc6054b90bcdeb5ac282d094a48285bd5b8866 Mon Sep 17 00:00:00 2001 From: Sina Atalay Date: Wed, 14 Feb 2024 19:49:05 +0100 Subject: [PATCH] update schema.json --- schema.json | 283 ++++------------------------------------------------ 1 file changed, 21 insertions(+), 262 deletions(-) diff --git a/schema.json b/schema.json index 0edfa94..1787a19 100644 --- a/schema.json +++ b/schema.json @@ -415,66 +415,29 @@ }, "sections": { "additionalProperties": { - "anyOf": [ - { - "discriminator": { - "mapping": { - "EducationEntry": "#/$defs/SectionWithEducationEntries", - "ExperienceEntry": "#/$defs/SectionWithExperienceEntries", - "NormalEntry": "#/$defs/SectionWithNormalEntries", - "OneLineEntry": "#/$defs/SectionWithOneLineEntries", - "PublicationEntry": "#/$defs/SectionWithPublicationEntries", - "TextEntry": "#/$defs/SectionWithTextEntries" - }, - "propertyName": "entry_type" + "items": { + "anyOf": [ + { + "$ref": "#/$defs/EducationEntry" }, - "oneOf": [ - { - "$ref": "#/$defs/SectionWithEducationEntries" - }, - { - "$ref": "#/$defs/SectionWithExperienceEntries" - }, - { - "$ref": "#/$defs/SectionWithNormalEntries" - }, - { - "$ref": "#/$defs/SectionWithOneLineEntries" - }, - { - "$ref": "#/$defs/SectionWithPublicationEntries" - }, - { - "$ref": "#/$defs/SectionWithTextEntries" - } - ] - }, - { - "items": { - "anyOf": [ - { - "$ref": "#/$defs/EducationEntry" - }, - { - "$ref": "#/$defs/ExperienceEntry" - }, - { - "$ref": "#/$defs/PublicationEntry" - }, - { - "$ref": "#/$defs/NormalEntry" - }, - { - "$ref": "#/$defs/OneLineEntry" - }, - { - "type": "string" - } - ] + { + "$ref": "#/$defs/ExperienceEntry" }, - "type": "array" - } - ] + { + "$ref": "#/$defs/PublicationEntry" + }, + { + "$ref": "#/$defs/NormalEntry" + }, + { + "$ref": "#/$defs/OneLineEntry" + }, + { + "type": "string" + } + ] + }, + "type": "array" }, "default": null, "description": "The sections of the CV.", @@ -1083,210 +1046,6 @@ "title": "PublicationEntry", "type": "object" }, - "SectionWithEducationEntries": { - "additionalProperties": false, - "description": "This class is the data model of the section with `EducationEntry`s.", - "properties": { - "title": { - "default": null, - "title": "Title", - "allOf": [ - { - "type": "string" - } - ] - }, - "entry_type": { - "const": "EducationEntry", - "description": "The type of the entries in the section.", - "title": "Entry Type" - }, - "entries": { - "description": "The entries of the section. The format depends on the entry type.", - "items": { - "$ref": "#/$defs/EducationEntry" - }, - "title": "Entries", - "type": "array" - } - }, - "required": [ - "entry_type", - "entries" - ], - "title": "SectionWithEducationEntries", - "type": "object" - }, - "SectionWithExperienceEntries": { - "additionalProperties": false, - "description": "This class is the data model of the section with `ExperienceEntry`s.", - "properties": { - "title": { - "default": null, - "title": "Title", - "allOf": [ - { - "type": "string" - } - ] - }, - "entry_type": { - "const": "ExperienceEntry", - "description": "The type of the entries in the section.", - "title": "Entry Type" - }, - "entries": { - "description": "The entries of the section. The format depends on the entry type.", - "items": { - "$ref": "#/$defs/ExperienceEntry" - }, - "title": "Entries", - "type": "array" - } - }, - "required": [ - "entry_type", - "entries" - ], - "title": "SectionWithExperienceEntries", - "type": "object" - }, - "SectionWithNormalEntries": { - "additionalProperties": false, - "description": "This class is the data model of the section with `NormalEntry`s.", - "properties": { - "title": { - "default": null, - "title": "Title", - "allOf": [ - { - "type": "string" - } - ] - }, - "entry_type": { - "const": "NormalEntry", - "description": "The type of the entries in the section.", - "title": "Entry Type" - }, - "entries": { - "description": "The entries of the section. The format depends on the entry type.", - "items": { - "$ref": "#/$defs/NormalEntry" - }, - "title": "Entries", - "type": "array" - } - }, - "required": [ - "entry_type", - "entries" - ], - "title": "SectionWithNormalEntries", - "type": "object" - }, - "SectionWithOneLineEntries": { - "additionalProperties": false, - "description": "This class is the data model of the section with `OneLineEntry`s.", - "properties": { - "title": { - "default": null, - "title": "Title", - "allOf": [ - { - "type": "string" - } - ] - }, - "entry_type": { - "const": "OneLineEntry", - "description": "The type of the entries in the section.", - "title": "Entry Type" - }, - "entries": { - "description": "The entries of the section. The format depends on the entry type.", - "items": { - "$ref": "#/$defs/OneLineEntry" - }, - "title": "Entries", - "type": "array" - } - }, - "required": [ - "entry_type", - "entries" - ], - "title": "SectionWithOneLineEntries", - "type": "object" - }, - "SectionWithPublicationEntries": { - "additionalProperties": false, - "description": "This class is the data model of the section with `PublicationEntry`s.", - "properties": { - "title": { - "default": null, - "title": "Title", - "allOf": [ - { - "type": "string" - } - ] - }, - "entry_type": { - "const": "PublicationEntry", - "description": "The type of the entries in the section.", - "title": "Entry Type" - }, - "entries": { - "description": "The entries of the section. The format depends on the entry type.", - "items": { - "$ref": "#/$defs/PublicationEntry" - }, - "title": "Entries", - "type": "array" - } - }, - "required": [ - "entry_type", - "entries" - ], - "title": "SectionWithPublicationEntries", - "type": "object" - }, - "SectionWithTextEntries": { - "additionalProperties": false, - "description": "This class is the data model of the section with `TextEntry`s.", - "properties": { - "title": { - "default": null, - "title": "Title", - "allOf": [ - { - "type": "string" - } - ] - }, - "entry_type": { - "const": "TextEntry", - "description": "The type of the entries in the section.", - "title": "Entry Type" - }, - "entries": { - "description": "The entries of the section. The format depends on the entry type.", - "items": { - "type": "string" - }, - "title": "Entries", - "type": "array" - } - }, - "required": [ - "entry_type", - "entries" - ], - "title": "SectionWithTextEntries", - "type": "object" - }, "SocialNetwork": { "additionalProperties": false, "description": "This class is the data model of a social network.",