Skip to content

[REQ][python-nextgen] make float parsing more lenient #14499

@tnielens

Description

@tnielens

If a response json field is an int (1), although the target field type is float (1.0) , the response parsing fails with an error like

ValidationError: 1 validation error for <ClassName>
<fieldName>
  value is not a valid float (type=type_error.float)

Describe the solution you'd like

Can the parsing be more lenient? Former python generators parsed this more leniently.

Describe alternatives you've considered

None

Additional context

I'm trying to use the latest python client code generator. Btw, great job on the source compatibility 👍 .

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions