Skip to content

default annotation #120

@codalogic

Description

@codalogic

(Even lower priority?)

Similar to the situation with the minExclusive and maxExclusive issue (#119), JSON Schema (+ XSD, but not in the base of Relax NG) has a default property.

If this were thought useful for JCR, it could be another annotation. For example:

"required" : @{default false} boolean ?,
"country" : @{default "USA"} string ?,
"state" : @{default $closed} ( "open" | $closed ) ?
$closed = "closed"

I hope limiting the feature to primitive types would be sufficient, especially as braces can't go in annotations. If object default were thought to be necessary, we could do something like:

"address" : @{default $downing-street} $address ?,
$downing-street = { "number" : 10, "street" : "Downing Street", "town" : "London" }

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