Skip to content

Add exclusive numeric boundaries #33

Description

@crmne

Goal

Add support for JSON Schema numeric exclusive boundaries:

  • exclusiveMinimum
  • exclusiveMaximum

These mean "greater than" and "less than". They are different from minimum and maximum, which mean "greater than or equal" and "less than or equal".

Example JSON Schema:

{
  "type": "number",
  "exclusiveMinimum": 0,
  "exclusiveMaximum": 100
}

This accepts 1 and 99, but rejects 0 and 100.

Proposed DSL

number :score, greater_than: 0, less_than: 100
integer :age, greater_than: 17

This would emit:

{
  "exclusiveMinimum": 0,
  "exclusiveMaximum": 100
}

Acceptance criteria

  • Supports number and integer schemas.
  • Behavior tests reject the exact boundary value.
  • Existing minimum: and maximum: behavior remains unchanged.
  • Generated schemas validate against Draft 2020-12.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions