Skip to content

number with 0 fraction are valid integers as per JSON schema spec #319

Description

@cboitel

When validating integers for query strings (might also affect other area), current behaviour is to reject 1.0 as a valid integer value.

Given the following parameter definition:
- name: myint
in: query
schema:
type: integer
format: int32
minimum: 0
default: 0

I would expect a request ?myint=1.0 to be accepted as per https://json-schema.org/draft/2020-12/draft-bhutton-json-schema-validation-00#rfc.section.6.1.1

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions