mirror of https://github.com/eyhc1/rendercv.git
update schema.json
This commit is contained in:
parent
24c29c7cbd
commit
7a9432bc69
|
@ -147,6 +147,7 @@ class EntryBase(RenderCVBaseModel):
|
||||||
"The start date of the event in YYYY-MM-DD, YYYY-MM, or YYYY format."
|
"The start date of the event in YYYY-MM-DD, YYYY-MM, or YYYY format."
|
||||||
),
|
),
|
||||||
examples=["2020-09-24"],
|
examples=["2020-09-24"],
|
||||||
|
json_schema_extra={"default": "2000-01-01"},
|
||||||
)
|
)
|
||||||
end_date: Optional[Literal["present"] | int | RenderCVDate] = pydantic.Field(
|
end_date: Optional[Literal["present"] | int | RenderCVDate] = pydantic.Field(
|
||||||
default=None,
|
default=None,
|
||||||
|
@ -157,6 +158,7 @@ class EntryBase(RenderCVBaseModel):
|
||||||
" date."
|
" date."
|
||||||
),
|
),
|
||||||
examples=["2020-09-24", "present"],
|
examples=["2020-09-24", "present"],
|
||||||
|
json_schema_extra={"default": "2020-01-01"},
|
||||||
)
|
)
|
||||||
date: Optional[RenderCVDate | int | str] = pydantic.Field(
|
date: Optional[RenderCVDate | int | str] = pydantic.Field(
|
||||||
default=None,
|
default=None,
|
||||||
|
@ -168,6 +170,7 @@ class EntryBase(RenderCVBaseModel):
|
||||||
" the same time."
|
" the same time."
|
||||||
),
|
),
|
||||||
examples=["2020-09-24", "My Custom Date"],
|
examples=["2020-09-24", "My Custom Date"],
|
||||||
|
json_schema_extra={"default": "Custom Date or 2020-01-01"},
|
||||||
)
|
)
|
||||||
highlights: Optional[list[str]] = pydantic.Field(
|
highlights: Optional[list[str]] = pydantic.Field(
|
||||||
default=None,
|
default=None,
|
||||||
|
@ -179,10 +182,8 @@ class EntryBase(RenderCVBaseModel):
|
||||||
default=None,
|
default=None,
|
||||||
title="Location",
|
title="Location",
|
||||||
description="The location of the event.",
|
description="The location of the event.",
|
||||||
examples=["Istanbul, Turkey"],
|
examples=["Istanbul, Türkiye"],
|
||||||
)
|
)
|
||||||
url: Optional[pydantic.HttpUrl] = None
|
|
||||||
url_text_input: Optional[str] = pydantic.Field(default=None, alias="url_text")
|
|
||||||
|
|
||||||
@pydantic.model_validator(
|
@pydantic.model_validator(
|
||||||
mode="after",
|
mode="after",
|
||||||
|
@ -421,30 +422,6 @@ class EntryBase(RenderCVBaseModel):
|
||||||
|
|
||||||
return time_span_string
|
return time_span_string
|
||||||
|
|
||||||
@functools.cached_property
|
|
||||||
def url_text(self) -> Optional[str]:
|
|
||||||
"""
|
|
||||||
Return a URL text based on the `url_text_input` and `url` fields.
|
|
||||||
"""
|
|
||||||
url_text = None
|
|
||||||
if self.url_text_input is not None:
|
|
||||||
# If the user provides a custom URL text, then use it.
|
|
||||||
url_text = self.url_text_input
|
|
||||||
elif self.url is not None:
|
|
||||||
url_text_dictionary = {
|
|
||||||
"github": "view on GitHub",
|
|
||||||
"linkedin": "view on LinkedIn",
|
|
||||||
"instagram": "view on Instagram",
|
|
||||||
"youtube": "view on YouTube",
|
|
||||||
}
|
|
||||||
url_text = "view on my website"
|
|
||||||
for key in url_text_dictionary:
|
|
||||||
if key in str(self.url):
|
|
||||||
url_text = url_text_dictionary[key]
|
|
||||||
break
|
|
||||||
|
|
||||||
return url_text
|
|
||||||
|
|
||||||
|
|
||||||
class OneLineEntry(RenderCVBaseModel):
|
class OneLineEntry(RenderCVBaseModel):
|
||||||
"""This class is the data model of `OneLineEntry`."""
|
"""This class is the data model of `OneLineEntry`."""
|
||||||
|
@ -487,7 +464,6 @@ class EducationEntry(EntryBase):
|
||||||
institution: str = pydantic.Field(
|
institution: str = pydantic.Field(
|
||||||
title="Institution",
|
title="Institution",
|
||||||
description="The institution name. It will be shown as bold text.",
|
description="The institution name. It will be shown as bold text.",
|
||||||
examples=["Bogazici University"],
|
|
||||||
)
|
)
|
||||||
area: str = pydantic.Field(
|
area: str = pydantic.Field(
|
||||||
title="Area",
|
title="Area",
|
||||||
|
@ -498,6 +474,7 @@ class EducationEntry(EntryBase):
|
||||||
title="Degree",
|
title="Degree",
|
||||||
description="The type of the degree.",
|
description="The type of the degree.",
|
||||||
examples=["BS", "BA", "PhD", "MS"],
|
examples=["BS", "BA", "PhD", "MS"],
|
||||||
|
json_schema_extra={"default": "PhD"},
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@ -523,6 +500,7 @@ class PublicationEntry(RenderCVBaseModel):
|
||||||
"The date of the publication in YYYY-MM-DD, YYYY-MM, or YYYY format."
|
"The date of the publication in YYYY-MM-DD, YYYY-MM, or YYYY format."
|
||||||
),
|
),
|
||||||
examples=["2021-10-31", "2010"],
|
examples=["2021-10-31", "2010"],
|
||||||
|
json_schema_extra={"default": "2020-01-01"},
|
||||||
)
|
)
|
||||||
journal: Optional[str] = pydantic.Field(
|
journal: Optional[str] = pydantic.Field(
|
||||||
default=None,
|
default=None,
|
||||||
|
@ -896,16 +874,22 @@ class CurriculumVitae(RenderCVBaseModel):
|
||||||
email: Optional[pydantic.EmailStr] = pydantic.Field(
|
email: Optional[pydantic.EmailStr] = pydantic.Field(
|
||||||
default=None,
|
default=None,
|
||||||
title="Email",
|
title="Email",
|
||||||
description="The email of the person. It will be rendered in the heading.",
|
description="The email of the person.",
|
||||||
|
)
|
||||||
|
phone: Optional[pydantic_phone_numbers.PhoneNumber] = pydantic.Field(
|
||||||
|
default=None,
|
||||||
|
title="Phone",
|
||||||
|
description="The phone number of the person.",
|
||||||
|
)
|
||||||
|
website: Optional[pydantic.HttpUrl] = pydantic.Field(
|
||||||
|
default=None,
|
||||||
|
title="Website",
|
||||||
|
description="The website of the person.",
|
||||||
)
|
)
|
||||||
phone: Optional[pydantic_phone_numbers.PhoneNumber] = None
|
|
||||||
website: Optional[pydantic.HttpUrl] = None
|
|
||||||
social_networks: Optional[list[SocialNetwork]] = pydantic.Field(
|
social_networks: Optional[list[SocialNetwork]] = pydantic.Field(
|
||||||
default=None,
|
default=None,
|
||||||
title="Social Networks",
|
title="Social Networks",
|
||||||
description=(
|
description="The social networks of the person.",
|
||||||
"The social networks of the person. They will be rendered in the heading."
|
|
||||||
),
|
|
||||||
)
|
)
|
||||||
sections_input: dict[str, SectionInput] = pydantic.Field(
|
sections_input: dict[str, SectionInput] = pydantic.Field(
|
||||||
default=None,
|
default=None,
|
||||||
|
|
111
schema.json
111
schema.json
|
@ -146,6 +146,7 @@
|
||||||
"additionalProperties": false
|
"additionalProperties": false
|
||||||
},
|
},
|
||||||
"ClassicThemeOptions": {
|
"ClassicThemeOptions": {
|
||||||
|
"additionalProperties": false,
|
||||||
"description": "",
|
"description": "",
|
||||||
"properties": {
|
"properties": {
|
||||||
"theme": {
|
"theme": {
|
||||||
|
@ -275,8 +276,7 @@
|
||||||
"theme"
|
"theme"
|
||||||
],
|
],
|
||||||
"title": "ClassicThemeOptions",
|
"title": "ClassicThemeOptions",
|
||||||
"type": "object",
|
"type": "object"
|
||||||
"additionalProperties": false
|
|
||||||
},
|
},
|
||||||
"ClassicThemePageMargins": {
|
"ClassicThemePageMargins": {
|
||||||
"properties": {
|
"properties": {
|
||||||
|
@ -365,7 +365,7 @@
|
||||||
},
|
},
|
||||||
"email": {
|
"email": {
|
||||||
"default": null,
|
"default": null,
|
||||||
"description": "The email of the person. It will be rendered in the heading.",
|
"description": "The email of the person.",
|
||||||
"title": "Email",
|
"title": "Email",
|
||||||
"allOf": [
|
"allOf": [
|
||||||
{
|
{
|
||||||
|
@ -376,6 +376,7 @@
|
||||||
},
|
},
|
||||||
"phone": {
|
"phone": {
|
||||||
"default": null,
|
"default": null,
|
||||||
|
"description": "The phone number of the person.",
|
||||||
"title": "Phone",
|
"title": "Phone",
|
||||||
"allOf": [
|
"allOf": [
|
||||||
{
|
{
|
||||||
|
@ -388,6 +389,7 @@
|
||||||
},
|
},
|
||||||
"website": {
|
"website": {
|
||||||
"default": null,
|
"default": null,
|
||||||
|
"description": "The website of the person.",
|
||||||
"title": "Website",
|
"title": "Website",
|
||||||
"allOf": [
|
"allOf": [
|
||||||
{
|
{
|
||||||
|
@ -400,7 +402,7 @@
|
||||||
},
|
},
|
||||||
"social_networks": {
|
"social_networks": {
|
||||||
"default": null,
|
"default": null,
|
||||||
"description": "The social networks of the person. They will be rendered in the heading.",
|
"description": "The social networks of the person.",
|
||||||
"title": "Social Networks",
|
"title": "Social Networks",
|
||||||
"allOf": [
|
"allOf": [
|
||||||
{
|
{
|
||||||
|
@ -491,7 +493,7 @@
|
||||||
"description": "This class is the data model of `EducationEntry`.",
|
"description": "This class is the data model of `EducationEntry`.",
|
||||||
"properties": {
|
"properties": {
|
||||||
"start_date": {
|
"start_date": {
|
||||||
"default": null,
|
"default": "2000-01-01",
|
||||||
"description": "The start date of the event in YYYY-MM-DD, YYYY-MM, or YYYY format.",
|
"description": "The start date of the event in YYYY-MM-DD, YYYY-MM, or YYYY format.",
|
||||||
"examples": [
|
"examples": [
|
||||||
"2020-09-24"
|
"2020-09-24"
|
||||||
|
@ -511,7 +513,7 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"end_date": {
|
"end_date": {
|
||||||
"default": null,
|
"default": "2020-01-01",
|
||||||
"description": "The end date of the event in YYYY-MM-DD, YYYY-MM, or YYYY format. If the event is still ongoing, then type \"present\" or provide only the start date.",
|
"description": "The end date of the event in YYYY-MM-DD, YYYY-MM, or YYYY format. If the event is still ongoing, then type \"present\" or provide only the start date.",
|
||||||
"examples": [
|
"examples": [
|
||||||
"2020-09-24",
|
"2020-09-24",
|
||||||
|
@ -535,7 +537,7 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"date": {
|
"date": {
|
||||||
"default": null,
|
"default": "Custom Date or 2020-01-01",
|
||||||
"description": "If the event is a one-day event, then this field should be filled in YYYY-MM-DD format. If the event is a multi-day event, then the start date and end date should be provided instead. All of them can't be provided at the same time.",
|
"description": "If the event is a one-day event, then this field should be filled in YYYY-MM-DD format. If the event is a multi-day event, then the start date and end date should be provided instead. All of them can't be provided at the same time.",
|
||||||
"examples": [
|
"examples": [
|
||||||
"2020-09-24",
|
"2020-09-24",
|
||||||
|
@ -575,7 +577,7 @@
|
||||||
"default": null,
|
"default": null,
|
||||||
"description": "The location of the event.",
|
"description": "The location of the event.",
|
||||||
"examples": [
|
"examples": [
|
||||||
"Istanbul, Turkey"
|
"Istanbul, T\u00fcrkiye"
|
||||||
],
|
],
|
||||||
"title": "Location",
|
"title": "Location",
|
||||||
"allOf": [
|
"allOf": [
|
||||||
|
@ -584,32 +586,8 @@
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"url": {
|
|
||||||
"default": null,
|
|
||||||
"title": "Url",
|
|
||||||
"allOf": [
|
|
||||||
{
|
|
||||||
"format": "uri",
|
|
||||||
"maxLength": 2083,
|
|
||||||
"minLength": 1,
|
|
||||||
"type": "string"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"url_text": {
|
|
||||||
"default": null,
|
|
||||||
"title": "Url Text",
|
|
||||||
"allOf": [
|
|
||||||
{
|
|
||||||
"type": "string"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"institution": {
|
"institution": {
|
||||||
"description": "The institution name. It will be shown as bold text.",
|
"description": "The institution name. It will be shown as bold text.",
|
||||||
"examples": [
|
|
||||||
"Bogazici University"
|
|
||||||
],
|
|
||||||
"title": "Institution",
|
"title": "Institution",
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
|
@ -619,7 +597,7 @@
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
"degree": {
|
"degree": {
|
||||||
"default": null,
|
"default": "PhD",
|
||||||
"description": "The type of the degree.",
|
"description": "The type of the degree.",
|
||||||
"examples": [
|
"examples": [
|
||||||
"BS",
|
"BS",
|
||||||
|
@ -647,7 +625,7 @@
|
||||||
"description": "This class is the data model of `ExperienceEntry`.",
|
"description": "This class is the data model of `ExperienceEntry`.",
|
||||||
"properties": {
|
"properties": {
|
||||||
"start_date": {
|
"start_date": {
|
||||||
"default": null,
|
"default": "2000-01-01",
|
||||||
"description": "The start date of the event in YYYY-MM-DD, YYYY-MM, or YYYY format.",
|
"description": "The start date of the event in YYYY-MM-DD, YYYY-MM, or YYYY format.",
|
||||||
"examples": [
|
"examples": [
|
||||||
"2020-09-24"
|
"2020-09-24"
|
||||||
|
@ -667,7 +645,7 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"end_date": {
|
"end_date": {
|
||||||
"default": null,
|
"default": "2020-01-01",
|
||||||
"description": "The end date of the event in YYYY-MM-DD, YYYY-MM, or YYYY format. If the event is still ongoing, then type \"present\" or provide only the start date.",
|
"description": "The end date of the event in YYYY-MM-DD, YYYY-MM, or YYYY format. If the event is still ongoing, then type \"present\" or provide only the start date.",
|
||||||
"examples": [
|
"examples": [
|
||||||
"2020-09-24",
|
"2020-09-24",
|
||||||
|
@ -691,7 +669,7 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"date": {
|
"date": {
|
||||||
"default": null,
|
"default": "Custom Date or 2020-01-01",
|
||||||
"description": "If the event is a one-day event, then this field should be filled in YYYY-MM-DD format. If the event is a multi-day event, then the start date and end date should be provided instead. All of them can't be provided at the same time.",
|
"description": "If the event is a one-day event, then this field should be filled in YYYY-MM-DD format. If the event is a multi-day event, then the start date and end date should be provided instead. All of them can't be provided at the same time.",
|
||||||
"examples": [
|
"examples": [
|
||||||
"2020-09-24",
|
"2020-09-24",
|
||||||
|
@ -731,7 +709,7 @@
|
||||||
"default": null,
|
"default": null,
|
||||||
"description": "The location of the event.",
|
"description": "The location of the event.",
|
||||||
"examples": [
|
"examples": [
|
||||||
"Istanbul, Turkey"
|
"Istanbul, T\u00fcrkiye"
|
||||||
],
|
],
|
||||||
"title": "Location",
|
"title": "Location",
|
||||||
"allOf": [
|
"allOf": [
|
||||||
|
@ -740,27 +718,6 @@
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"url": {
|
|
||||||
"default": null,
|
|
||||||
"title": "Url",
|
|
||||||
"allOf": [
|
|
||||||
{
|
|
||||||
"format": "uri",
|
|
||||||
"maxLength": 2083,
|
|
||||||
"minLength": 1,
|
|
||||||
"type": "string"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"url_text": {
|
|
||||||
"default": null,
|
|
||||||
"title": "Url Text",
|
|
||||||
"allOf": [
|
|
||||||
{
|
|
||||||
"type": "string"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"company": {
|
"company": {
|
||||||
"description": "The company name. It will be shown as bold text.",
|
"description": "The company name. It will be shown as bold text.",
|
||||||
"title": "Company",
|
"title": "Company",
|
||||||
|
@ -780,6 +737,7 @@
|
||||||
"type": "object"
|
"type": "object"
|
||||||
},
|
},
|
||||||
"McdowellThemeOptions": {
|
"McdowellThemeOptions": {
|
||||||
|
"additionalProperties": false,
|
||||||
"description": "",
|
"description": "",
|
||||||
"properties": {
|
"properties": {
|
||||||
"theme": {
|
"theme": {
|
||||||
|
@ -791,10 +749,10 @@
|
||||||
"theme"
|
"theme"
|
||||||
],
|
],
|
||||||
"title": "McdowellThemeOptions",
|
"title": "McdowellThemeOptions",
|
||||||
"type": "object",
|
"type": "object"
|
||||||
"additionalProperties": false
|
|
||||||
},
|
},
|
||||||
"ModerncvThemeOptions": {
|
"ModerncvThemeOptions": {
|
||||||
|
"additionalProperties": false,
|
||||||
"description": "",
|
"description": "",
|
||||||
"properties": {
|
"properties": {
|
||||||
"theme": {
|
"theme": {
|
||||||
|
@ -931,15 +889,14 @@
|
||||||
"theme"
|
"theme"
|
||||||
],
|
],
|
||||||
"title": "ModerncvThemeOptions",
|
"title": "ModerncvThemeOptions",
|
||||||
"type": "object",
|
"type": "object"
|
||||||
"additionalProperties": false
|
|
||||||
},
|
},
|
||||||
"NormalEntry": {
|
"NormalEntry": {
|
||||||
"additionalProperties": false,
|
"additionalProperties": false,
|
||||||
"description": "This class is the data model of `NormalEntry`.",
|
"description": "This class is the data model of `NormalEntry`.",
|
||||||
"properties": {
|
"properties": {
|
||||||
"start_date": {
|
"start_date": {
|
||||||
"default": null,
|
"default": "2000-01-01",
|
||||||
"description": "The start date of the event in YYYY-MM-DD, YYYY-MM, or YYYY format.",
|
"description": "The start date of the event in YYYY-MM-DD, YYYY-MM, or YYYY format.",
|
||||||
"examples": [
|
"examples": [
|
||||||
"2020-09-24"
|
"2020-09-24"
|
||||||
|
@ -959,7 +916,7 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"end_date": {
|
"end_date": {
|
||||||
"default": null,
|
"default": "2020-01-01",
|
||||||
"description": "The end date of the event in YYYY-MM-DD, YYYY-MM, or YYYY format. If the event is still ongoing, then type \"present\" or provide only the start date.",
|
"description": "The end date of the event in YYYY-MM-DD, YYYY-MM, or YYYY format. If the event is still ongoing, then type \"present\" or provide only the start date.",
|
||||||
"examples": [
|
"examples": [
|
||||||
"2020-09-24",
|
"2020-09-24",
|
||||||
|
@ -983,7 +940,7 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"date": {
|
"date": {
|
||||||
"default": null,
|
"default": "Custom Date or 2020-01-01",
|
||||||
"description": "If the event is a one-day event, then this field should be filled in YYYY-MM-DD format. If the event is a multi-day event, then the start date and end date should be provided instead. All of them can't be provided at the same time.",
|
"description": "If the event is a one-day event, then this field should be filled in YYYY-MM-DD format. If the event is a multi-day event, then the start date and end date should be provided instead. All of them can't be provided at the same time.",
|
||||||
"examples": [
|
"examples": [
|
||||||
"2020-09-24",
|
"2020-09-24",
|
||||||
|
@ -1023,7 +980,7 @@
|
||||||
"default": null,
|
"default": null,
|
||||||
"description": "The location of the event.",
|
"description": "The location of the event.",
|
||||||
"examples": [
|
"examples": [
|
||||||
"Istanbul, Turkey"
|
"Istanbul, T\u00fcrkiye"
|
||||||
],
|
],
|
||||||
"title": "Location",
|
"title": "Location",
|
||||||
"allOf": [
|
"allOf": [
|
||||||
|
@ -1032,27 +989,6 @@
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"url": {
|
|
||||||
"default": null,
|
|
||||||
"title": "Url",
|
|
||||||
"allOf": [
|
|
||||||
{
|
|
||||||
"format": "uri",
|
|
||||||
"maxLength": 2083,
|
|
||||||
"minLength": 1,
|
|
||||||
"type": "string"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"url_text": {
|
|
||||||
"default": null,
|
|
||||||
"title": "Url Text",
|
|
||||||
"allOf": [
|
|
||||||
{
|
|
||||||
"type": "string"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"name": {
|
"name": {
|
||||||
"description": "The name of the entry. It will be shown as bold text.",
|
"description": "The name of the entry. It will be shown as bold text.",
|
||||||
"title": "Name",
|
"title": "Name",
|
||||||
|
@ -1113,6 +1049,7 @@
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
"date": {
|
"date": {
|
||||||
|
"default": "2020-01-01",
|
||||||
"description": "The date of the publication in YYYY-MM-DD, YYYY-MM, or YYYY format.",
|
"description": "The date of the publication in YYYY-MM-DD, YYYY-MM, or YYYY format.",
|
||||||
"examples": [
|
"examples": [
|
||||||
"2021-10-31",
|
"2021-10-31",
|
||||||
|
|
Loading…
Reference in New Issue