Skip to content

Commit

Permalink
Add dump for float objects
Browse files Browse the repository at this point in the history
  • Loading branch information
torwald-sergesson authored Oct 17, 2016
1 parent c6c94e2 commit 51411d6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pyswagger/spec/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -410,6 +410,8 @@ def _dump_(obj):
return obj.dump()
elif isinstance(obj, (six.string_types, six.integer_types)):
return obj
elif isinstance(obj, float):
return '{:f}'.format(obj)
else:
raise ValueError('Unknown object to dump: {0}'.format(obj.__class__.__name__))

Expand Down

0 comments on commit 51411d6

Please sign in to comment.