"--use-default" unexpected behavior: default values are missing. Bug or feature? #533
Answered
by
koxudaxi
simon-liebehenschel
asked this question in
Q&A
-
Input: {
"foo": 123456,
"bar": "spameggs",
} Current output (flags used: class Model(BaseModel):
foo: int
bar: str Expected output: class Model(BaseModel):
foo: int = 123456
bar: str = "spameggs" Real use case: the field Related issue: pydantic/pydantic#1927, the problem is solved with the |
Beta Was this translation helpful? Give feedback.
Answered by
koxudaxi
Jan 18, 2023
Replies: 1 comment 2 replies
-
I'm sorry for my too-late reply. |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
koxudaxi
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm sorry for my too-late reply.
I guess you give the cli JSON Data.
The CLI will ignore the default value in JSON Data