-
-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Description
Json schema has examples annotation, which comes handy, when I would like to run a mock server for my api.
Unfortunately the spec states, that the value of examples
keyword MUST be an array:
{
"title" : "Match anything",
"description" : "This is a schema that matches anything.",
"default" : "Default value",
"examples" : [
"Anything",
4035
]
}
I suggest to enable objects as well, so each example could be referenced by name:
{
"title" : "Match anything",
"description" : "This is a schema that matches anything.",
"default" : "Default value",
"examples" : {
"stringValue": "Anything",
"integerValue": 4035
}
}
This change could make the construction of complex examples ( like a list ) much simpler.
karenetheridge
Metadata
Metadata
Assignees
Labels
No labels