You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
A clear and concise description of what the bug is.
Versions (please complete the following information):
Python version: 3.11
Django version: 5.0.4
Django-Ninja version: 1.1.0
Pydantic version: 2.7.1
The issue:
Using the class ModelSchema does not mark the model field as required if it has a default value. When removing the default value from the model the field is marked correctly as required. Below are sample of the Django Model and ModelScema used. The generated schema in redoc shows it as not required.
The text was updated successfully, but these errors were encountered:
Describe the bug
A clear and concise description of what the bug is.
Versions (please complete the following information):
The issue:
Using the class ModelSchema does not mark the model field as required if it has a default value. When removing the default value from the model the field is marked correctly as required. Below are sample of the Django Model and ModelScema used. The generated schema in redoc shows it as not required.
The text was updated successfully, but these errors were encountered: