JSON Schema support
JSON schema is supported by Bump.sh
readOnly and writeOnly properties
JSON Schema provides the possibility to declare a property as read or write only, with boolean fields writeOnly
and readOnly
(cf JSON Schema documentation).
Thus, it becomes easy to use the same Schema Object
in different contexts, for example as seen below:
"schema": {
"properties": {
"password": {
"type": "string",
"format": "password",
"writeOnly": true
},
"created_at": {
"type": "string",
"format": "date-time",
"readOnly": true
}
}
}
danger
writeOnly
properties are hidden when they belong to asubscribe
operation in AsyncAPI or aresponse
in OpenAPI.readOnly
properties are hidden when they belong to apublish
operation in AsyncAPI or arequest
in OpenAPI.
info
Not displaying writeOnly
properties in subscribe operations and readOnly
properties in publish operations allows the use of the same Schema Object
everywhere it is needed, without generating confusing informations in the documentation.