Skip to content

minExclusive and maxExclusive #119

@codalogic

Description

@codalogic

(Low priority)

Looking at JSON Schema, one thing I noticed JCR doesn't support is exclusive ranges. E.g.:

    "price": {
        "type": "number",
        "exclusiveMinimum": 0
    },

While a low priority feature I think we should support it.

CDDL takes the Ruby route for this of using .. for inclusive range and ... for exclusive range. I think this is confusing, especially for something that is unlikely to be used that often.

The easiest thing would be to define some suitable annotations. For example:

"range" : @{exclude-min} @{exclude-max} 0.0..100.0

(I've tried to come up with some short, meaningful names, even though they are not 100% formal computing jargon. Other names could be used.)

Other options might be:

"range" : !0.0..!100.0

Or:

"range" : 0.0<..<100.0

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