-
-
Notifications
You must be signed in to change notification settings - Fork 309
keywords only exhibit the behaviors they're defined with #1577
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
de8ed30
2058d3e
a695c40
1a7a34a
50e9aca
b48cf71
78ca35d
20fe3e1
784ad8b
030f022
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -62,6 +62,21 @@ information. The {{format}} keyword is intended primarily as an annotation, but | |
can optionally be used as an assertion. The {{content}} keywords are annotations | ||
for working with documents embedded as JSON strings. | ||
|
||
## Keyword Behaviors | ||
|
||
The keywords defined by this document exhibit one or more behaviors as defined by | ||
the [JSON Schema Core Specification](./jsonschema-core.md#keyword-behaviors). | ||
|
||
Keywords which are not defined to exhibit a particular behavior MUST NOT affect | ||
that aspect of the evaluation outcome. In particular, the keywords defined in | ||
{{annotations}} produce no assertion result and therefore are not considered | ||
during validation. | ||
|
||
For the purposes of this document, an instance "validating against a keyword" | ||
means that the keyword produces an assertion result of `true` if the instance | ||
satisfies the given constraint; otherwise an assertion result of `false` is | ||
produced. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This references Core Spec Keyword Behaviors but then also repeats, or is redundant with, a significant amount of that section. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The validation spec uses the phrase "an instance validates against this keyword if...", or some variant of it, quite a lot. I just wanted to define what that means. The phrasing is different than "this keyword exhibits assertion behavior by...", which feels more clunky to me (and I'd have to change a lot of places). |
||
|
||
## Interoperability Considerations | ||
|
||
### Validation of String Instances | ||
|
@@ -642,7 +657,7 @@ structures: first the header, and then the payload. Since the JWT media type | |
ensures that the JWT can be represented in a JSON string, there is no need for | ||
further encoding or decoding. | ||
|
||
## Keywords for Basic Meta-Data Annotations | ||
## Keywords for Basic Meta-Data Annotations {#annotations} | ||
|
||
These general-purpose annotation keywords provide commonly used information for | ||
documentation and user interface display purposes. They are not intended to form | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure what this is aiming to prevent.
Behaviors outside the three above? I'm not sure what that would be. That also seems more the concern of the definition of an extension keyword rather than an implementation.
Or behaviors within the three, but that aren't in a specification? If so, that seems just the nature of a specification, that an implementation of it sticks to its specified behaviors.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See, this thread.