R1tschY / openapi-json-schema-generator

Generate JSON schema from an OpenAPI v3.0 schema

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Wrong limits for double

bodograumann opened this issue · comments

The generated schema for double numbers contains the following restrictions:

"total" : {
  "description" : "Sum of all fees.",
  "type" : [ "number" ],
  "format" : "double",
  "minimum" : 1.7976931348623157E+308,
  "maximum" : -1.7976931348623157E+308
},

Here mimimum and maximum need to be exchanged.
Not sure if relevant, but this is with --json-schema-version=7.

Btw. if you could add some instructions to the readme on how to install the tool as a local binary, that would be fantastic. Currently I am using gradle run --args='…'.

Thanks for your bug report.

You can build the binary with ./gradlew build distZip. In the build/distributions directory you will than find a zip file with a bin directory with the executable.

Thank you so much for the fix.
Works very nicely now and is a lot faster than going via typescript and ts-json-schema-generator.