-
-
Notifications
You must be signed in to change notification settings - Fork 225
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
Add sections of annotation and annotation (keyword) in the glossary #668
Closed
bhavukkalra
wants to merge
1
commit into
json-schema-org:main
from
bhavukkalra:feature/add-annotation-definition-glossary
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change | ||
---|---|---|---|---|
|
@@ -149,6 +149,23 @@ The JSON Schema specification includes a number of vocabularies which cover each | |||
|
||||
In some [dialects](#dialect) of JSON Schema, the `$vocabulary` keyword can be used to include the keywords defined by a vocabulary into the dialect, as well as to indicate whether implementations must specifically recognize the vocabulary in order to be able to process schemas written in the dialect or not. | ||||
|
||||
### Annotation | ||||
|
||||
Annotation is a piece of metadata attached to a piece of code, used to convey additional information about the code like its workings, the algorithm that it internally uses, etc. | ||||
|
||||
|
||||
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.
Suggested change
|
||||
Annotations provide supplementary information for developers to express intended usage, constraints, configurations or manage complexity, especially when the JSON Schema's definition gets enormous. | ||||
|
||||
Different [keywords](#annotation-(keywords)) are defined within JSON Schema to convey various aspects of the schema, making it self-reliant and self-documenting. | ||||
|
||||
### Annotation (Keywords) | ||||
|
||||
Specific "Keys" acting as self-serving documentation for the defined schema by explaining the intended usage or constraints. | ||||
|
||||
Annotation keywords can be used in any schema or sub-schemas as they don't affect any logical operations for the schema, such as validation, As they are only for the schema's "self-documenting" purposes. | ||||
|
||||
Using these keywords is optional but recommended, as this makes your schema self-reliant. [Specific annotation keywords](../understanding-json-schema/reference/annotations) might depend on which draft version of the JSON schema you are employing. | ||||
|
||||
#### See also | ||||
|
||||
* [`json-schema-vocabularies`](https://github.com/json-schema-org/json-schema-vocabularies), a repository which collects known third-party JSON Schema vocabularies |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
This is a good general definition of an annotation, but let's come up with something a little more focused on JSON Schema. What does an annotation do for instance data?