|
|
@ -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")
|
|
|
|