Skip to content

Conversation

@nohponex
Copy link
Member

From draft v4

5.1.2.  maximum and exclusiveMaximum

5.1.2.1.  Valid values

   The value of "maximum" MUST be a JSON number.  The value of
   "exclusiveMaximum" MUST be a boolean.

   If "exclusiveMaximum" is present, "maximum" MUST also be present.

5.1.2.2.  Conditions for successful validation

   Successful validation depends on the presence and value of
   "exclusiveMaximum":

      if "exclusiveMaximum" is not present, or has boolean value false,
      then the instance is valid if it is lower than, or equal to, the
      value of "maximum";

      if "exclusiveMaximum" has boolean value true, the instance is
      valid if it is strictly lower than the value of "maximum".

5.1.2.3.  Default value

   "exclusiveMaximum", if absent, may be considered as being present
   with boolean value false.

Though in draft v7 exclusiveMaximum is defined as number instead of boolean
See https://json-schema.org/understanding-json-schema/reference/numeric.html#range

Maybe we should support both?

@nohponex nohponex requested review from akalineskou and alkallio May 10, 2019 07:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants