Files
pydantic/docs/examples/schema1.json
T
Samuel Colvin 37364a05b9 implement JSON serialisation (#210)
* implement JSON serialisation, fix #133

* documenting JSON serialisation

* fix coverage
2018-06-28 18:21:45 +01:00

43 lines
858 B
JSON

{
"type": "object",
"title": "Main",
"description": "This is the description of the main model",
"properties": {
"foo_bar": {
"type": "object",
"title": "FooBar",
"properties": {
"count": {
"type": "int",
"title": "Count",
"required": true
},
"size": {
"type": "float",
"title": "Size",
"required": false
}
},
"required": true
},
"Gender": {
"type": "int",
"title": "Gender",
"required": false,
"choices": [
[1, "Male"],
[2, "Female"],
[3, "Other"],
[4, "I'd rather not say"]
]
},
"snap": {
"type": "int",
"title": "The Snap",
"required": false,
"default": 42,
"description": "this is the value of snap"
}
}
}