thema
thema copied to clipboard
Move schemas to the root of the json
I guess it's better to illustrate what this PR does with an example:
before this PR schema is defined under $.components.schemas
{
"openapi": "3.0.0",
"info": {
"title": "team",
"version": "0.0"
},
"paths": {},
"components": {
"schemas": {
"team": {
"type": "object",
"required": [
"name"
],
"properties": {
"name": {
"description": "Name of the team.",
"type": "string"
}
},
"$schema": "http://json-schema.org/draft-04/schema#"
}
}
}
}
This change moves the schema definition to the root of the JSON:
[
{
"team": {
"type": "object",
"required": [
"name"
],
"properties": {
"name": {
"description": "Name of the team.",
"type": "string"
}
},
"$schema": "http://json-schema.org/draft-04/schema#"
}
}
]