openapi2proto
openapi2proto copied to clipboard
Maximum and Minimum are omitted if set to zero
Given a definition of the type:
FinanceConfiguration:
commission:
type: number
format: double
maximum: 100
minimum: 0
The value of minimum is lost because it has been set to zero.
I believe the issue comes from: https://github.com/nytimes/openapi2proto/blob/master/openapi/interface.go#L161 where maximum and minimum are omitted if "empty".
EDIT: My bad. I am using a third party that relies on this code to generate JSON schemas. This issue will not affect the creation of proto files. I won't close the ticket yet though as I believe it remains a valid comment.