mirror of https://github.com/eyhc1/rendercv.git
don't allow extra inputs in theme settings
This commit is contained in:
parent
7887a23501
commit
a7a4a943f2
|
@ -128,6 +128,8 @@ class ClassicThemeMargins(pydantic.BaseModel):
|
||||||
class ClassicThemeOptions(pydantic.BaseModel):
|
class ClassicThemeOptions(pydantic.BaseModel):
|
||||||
""" """
|
""" """
|
||||||
|
|
||||||
|
model_config = pydantic.ConfigDict(extra="forbid")
|
||||||
|
|
||||||
theme: Literal["classic"]
|
theme: Literal["classic"]
|
||||||
font: Literal["SourceSans3", "Roboto", "EBGaramond"] = pydantic.Field(
|
font: Literal["SourceSans3", "Roboto", "EBGaramond"] = pydantic.Field(
|
||||||
default="SourceSans3",
|
default="SourceSans3",
|
||||||
|
|
|
@ -13,4 +13,6 @@ LaTeXDimension = Annotated[
|
||||||
class McdowellThemeOptions(pydantic.BaseModel):
|
class McdowellThemeOptions(pydantic.BaseModel):
|
||||||
""" """
|
""" """
|
||||||
|
|
||||||
|
model_config = pydantic.ConfigDict(extra="forbid")
|
||||||
|
|
||||||
theme: Literal["mcdowell"]
|
theme: Literal["mcdowell"]
|
||||||
|
|
|
@ -14,6 +14,8 @@ LaTeXDimension = Annotated[
|
||||||
class ModerncvThemeOptions(pydantic.BaseModel):
|
class ModerncvThemeOptions(pydantic.BaseModel):
|
||||||
""" """
|
""" """
|
||||||
|
|
||||||
|
model_config = pydantic.ConfigDict(extra="forbid")
|
||||||
|
|
||||||
theme: Literal["moderncv"]
|
theme: Literal["moderncv"]
|
||||||
font_size: Literal["10pt", "11pt", "12pt"] = pydantic.Field(
|
font_size: Literal["10pt", "11pt", "12pt"] = pydantic.Field(
|
||||||
default="10pt",
|
default="10pt",
|
||||||
|
|
Loading…
Reference in New Issue