Skip to content

Commit

Permalink
0.0.8
Browse files Browse the repository at this point in the history
  • Loading branch information
hinthornw committed Jan 29, 2025
1 parent c29853e commit d35508d
Show file tree
Hide file tree
Showing 3 changed files with 589 additions and 541 deletions.
7 changes: 3 additions & 4 deletions dydantic/_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -390,10 +390,9 @@ def _json_schema_to_pydantic_field(
description = json_schema.get("description")
examples = json_schema.get("examples")
is_required = name in required

field_kwargs = {
"description": description,
}
field_kwargs = {}
if description:
field_kwargs["description"] = description
if examples:
field_kwargs["examples"] = examples
if not is_required:
Expand Down
Loading

0 comments on commit d35508d

Please sign in to comment.