schema icon indicating copy to clipboard operation
schema copied to clipboard

Handle decimal

Open rollue opened this issue 4 years ago • 1 comments

I'm using schema to test response schema in django rest framework-base apis. We use decimal field to handle arithmetics, but when I test the response with schema we get

Decimal('37.0') should be instance of 'float'

Would it be possible to add decimals as a type, or at least gracefully handle them to match as a float?

rollue avatar Feb 08 '21 02:02 rollue

Can you post the relevant part of your schema? It looks to me that you aren't converting them to decimals.

skorokithakis avatar Feb 08 '21 08:02 skorokithakis