summaryrefslogtreecommitdiff
path: root/vendor/schemars/examples/serialize_contract.schema.json
blob: f5e78f632c70eb35161dd6661e19ab0eff0bfc0d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
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"
  ]
}