The Description type is mainly used when you want to render descriptive contextual information before and/or after the autogenerated component of a schema model.
When a model that contains a Description is rendered in documentation, the
contents of the Description.before
property are rendered, followed by the
contents of the model, and then the contents of the Description.after
property.
Properties | Type | Description |
---|---|---|
_meta | Meta |
See
Meta
for more information.
|
_type |
|
|
after | Text |
This text appears after the content of the parent model.
See
Text
for more information.
|
before | Text |
This text appears before the content of the parent model.
See
Text
for more information.
|
|
||
|
{
"_type": "Description",
"before": [
"Multiline Text that appears before the content of the model that contains this Description.",
"This is a $(Text) object, so can use any formatting permitted in a Text object."
],
"after": "Text that appears after the parent model's content"
}
{
"_type": "Description",
"before": null,
"after": [
"Text for a context that only has `after` content ",
"which appears after the parent model's content"
]
}
{
"info": [
[
"The $(Description) type is mainly used when you want to render descriptive contextual information before ",
"and/or after the autogenerated component of a schema model."
],
[
"When a model that contains a $(Description) is rendered in documentation, the ",
"contents of the $(Description).`before` property are rendered, followed by the ",
"contents of the model, and then the contents of the $(Description).`after` property."
]
],
"title": "Description",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"_meta": {
"$ref": "Meta.json"
},
"_type": {
"enum": [
"Description"
]
},
"after": {
"$ref": "Text.json",
"info": [
"This text appears after the content of the parent model."
]
},
"before": {
"$ref": "Text.json",
"info": [
"This text appears before the content of the parent model."
]
}
},
"additionalProperties": false,
"examples": [
{
"_type": "Description",
"before": [
"Multiline Text that appears before the content of the model that contains this Description.",
"This is a $(Text) object, so can use any formatting permitted in a Text object."
],
"after": "Text that appears after the parent model's content"
},
{
"_type": "Description",
"before": null,
"after": [
"Text for a context that only has `after` content ",
"which appears after the parent model's content"
]
}
]
}