Add Contract
for generating separate serialize/deserialize schemas (#335)
This commit is contained in:
parent
497333e91b
commit
05325d2b7c
36 changed files with 1224 additions and 225 deletions
27
docs/_includes/examples/serialize_contract.schema.json
Normal file
27
docs/_includes/examples/serialize_contract.schema.json
Normal file
|
@ -0,0 +1,27 @@
|
|||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"title": "MyStruct",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"definitely_string": {
|
||||
"type": "string"
|
||||
},
|
||||
"maybe_string": {
|
||||
"type": "string"
|
||||
},
|
||||
"my_int": {
|
||||
"type": "integer",
|
||||
"format": "int32"
|
||||
},
|
||||
"my_read_only_bool": {
|
||||
"type": "boolean",
|
||||
"default": false,
|
||||
"readOnly": true
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"my_int",
|
||||
"my_read_only_bool",
|
||||
"definitely_string"
|
||||
]
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue