Skip to content

Option to give custom types #418

Answered by koxudaxi
gk12277 asked this question in Q&A
Apr 28, 2021 · 3 comments · 20 replies
Discussion options

You must be logged in to vote

@gk12277
I have released a new version 0.11.6
Input

"type": "object",
"properties": {
"firstName": {
"type": "string",
"description": "The person's first name.",
"customTypePath": "custom.TitleString"

Output

class Person(BaseModel):
class Config:
arbitrary_types_allowed = True
firstName: Optional[TitleString] = Field(
None, description="The person's first name."
)

I must add a document for c…

Replies: 3 comments 20 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
16 replies
@koxudaxi
Comment options

@gk12277
Comment options

@koxudaxi
Comment options

@gk12277
Comment options

@koxudaxi
Comment options

Comment options

You must be logged in to vote
4 replies
@gk12277
Comment options

@m-a-choquette
Comment options

@koxudaxi
Comment options

@gk12277
Comment options

Answer selected by gk12277
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants