Skip to content

Commit

Permalink
Fix #1787 (#1791)
Browse files Browse the repository at this point in the history
  • Loading branch information
shadchin authored Feb 1, 2024
1 parent 480779e commit 1320fcb
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions datamodel_code_generator/parser/jsonschema.py
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,8 @@ class Config:
def __init__(self, **data: Any) -> None:
super().__init__(**data)
self.extras = {k: v for k, v in data.items() if k not in EXCLUDE_FIELD_KEYS}
if 'const' in data.get(self.__extra_key__, {}):
self.extras['const'] = data[self.__extra_key__]['const']

@cached_property
def is_object(self) -> bool:
Expand Down

0 comments on commit 1320fcb

Please sign in to comment.