Pydantic issues

main
Estelle Poulin 3 months ago
parent 9003b31db2
commit 997c8269a7

@ -1 +1 @@
__version__ = "0.0.4" __version__ = "0.0.5"

@ -1,6 +1,6 @@
from typing import Annotated, Literal, Optional, Union from typing import Annotated, Literal, Optional, Union
from pydantic import BaseModel, Field, conint from pydantic import BaseModel, Field, RootModel, conint
RenderFormat = Literal["png", "jpg", "pdf"] RenderFormat = Literal["png", "jpg", "pdf"]
RenderQuality = Annotated[int, conint(gt=0, le=100)] RenderQuality = Annotated[int, conint(gt=0, le=100)]
@ -26,8 +26,8 @@ class CreateLaTeXDocumentErrorResponse(BaseModel):
description: str description: str
class CreateLaTeXDocumentResponse(BaseModel): class CreateLaTeXDocumentResponse(RootModel):
__root__: Union[ root: Union[
CreateLaTeXDocumentSuccessResponse, CreateLaTeXDocumentSuccessResponse,
CreateLaTeXDocumentErrorResponse, CreateLaTeXDocumentErrorResponse,
] = Field(discriminator="status") ] = Field(discriminator="status")

Loading…
Cancel
Save