Skip to content

NumberSchema shows "minimum", "maximum" as integer rather than number #2698

@pawbhard

Description

@pawbhard

What's broken?

The JSON schema is wrong (incorrect type, constraint, or field)

Where in the spec or docs?

What should happen?

NumberSchema 'maximum'/ 'minimum' should be number type in JSON schema

What actually happens?

NumberSchema 'maximum'/ 'minimum' is of type integer JSON schema

Anything else?

JSON Schema:

TS Schema:

It might be happening as we are using the script to generate JSON schema and converting all numbers to integer.

`npx typescript-json-schema --defaultNumberType integer --required --skipLibCheck "${schemaTs}" "*"`

On similar line, Why we have integer in JSON schema as there is no integer type in JSON ? (Shouldn't everything be number)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions