Skip to content

Commit

Permalink
format defined in metadata should also be pulled in
Browse files Browse the repository at this point in the history
  • Loading branch information
s0undt3ch committed Nov 24, 2017
1 parent 593c752 commit 18ab94d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions marshmallow_jsonschema/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,9 @@ def _from_python_type(self, obj, field, pytype):
if metadata.get('title'):
json_schema['title'] = metadata.get('title')

if metadata.get('format'):
json_schema['format'] = metadata.get('format')

if isinstance(field, fields.List):
json_schema['items'] = self._get_schema_for_field(
obj, field.container
Expand Down

0 comments on commit 18ab94d

Please sign in to comment.