-
Notifications
You must be signed in to change notification settings - Fork 9
Closed
Description
It would be useful to be able to set an optional title or optional description for each example in a schema.
The title could be set using meta:title
and the description using meta:description
e.g.
{
"$id": "http://example.com/schemas/name.json",
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Name",
"description": "A name.",
"type": "object",
"properties": {
"firstNames": {
"$ref": "#/definitions/firstNames"
},
"lastName": {
"$ref": "#/definitions/lastName"
}
},
"additionalProperties": false,
"required": ["lastName"],
"definitions": {
"firstNames": {
"description": "One or more first names separated by a space character.",
"type": "string",
"minLength": 1,
"maxLength": 100,
"pattern": "[A-Za-z ]{1,100}"
},
"lastName": {
"description": "A single last name.",
"type": "string",
"minLength": 1,
"maxLength": 100,
"pattern": "[A-Za-z]{1,100}"
}
},
"examples": [
{
"meta:title": "First example",
"meta:description": "First description.",
"firstNames": "Andrew Barry",
"lastName": "Cunningham"
}
]
}
Metadata
Metadata
Assignees
Labels
No labels