Response validation fails due to missing optional elements #50
Unanswered
DerManoMann
asked this question in
Q&A
Replies: 3 comments
-
... means required. You can use None or other strings. |
Beta Was this translation helpful? Give feedback.
0 replies
-
I was under the impression the So, is there no way to have optional properties in the schema? I am sure I've seen that using other languages... |
Beta Was this translation helpful? Give feedback.
0 replies
-
I guess you need official documents: https://pydantic-docs.helpmanual.io/usage/models/#required-optional-fields |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I do have a data type using
Optional
like in the example below. What is wrong here?Tests are failing with this, though:
Beta Was this translation helpful? Give feedback.
All reactions