Open jorgerod opened 2 weeks ago
Hi @jorgerod,
The generator is based on the OpenAPI specification (OAS), and your proposed solution is not listed in the defined formats. As the generator is just following the standard I don't think this should be added.
Maybe you can suggest your proposed solution in the OAS repository, I think many people could benefit from it. As long as it's not part of the standard I think the current type mapping solution is the correct one.
Hi @AndreasHae, thank you for your response.
True, it is not defined.
But as the documentation says, additional formats such as BigDecimal, email, password, uuid, etc. are being defined.
As defined by the JSON Schema Validation vocabulary, data types can have an optional modifier property: format. OAS defines additional formats to provide fine detail for primitive data types.
Hi @jorgerod, I dug a bit further and it seems that the OpenAPI generator assumes that all integers are unbounded unless specified otherwise. This would mean that generating a "type": "integer"
without a specified "format"
should always lead to a BigInteger.
Hi
Currently to support the BigInteger type you have to do it by defining your own typeMapping.
Is there any reason why BigInteger is not supported without doing that? For example, Bigdecimal is supported.
Maybe it could be defined like this:
Thank you