Test definitions schema

Json code posted by Johannes Echterhoff
created at 01 Dec 12:24

Edit | Back
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
{
  "$schema": "http://json-schema.org/draft/2019-09/schema",
  "$id": "http://example.org/some-definitions-schema.json",
  "$defs": {
    "Class1": {
      "type": "object",
      "properties": {
        "prop1": {"type": "string"}
      },
      "required": ["prop1"]
    },
    "Class2": {
      "type": "object",
      "properties": {
        "prop2": {"type": "number"}
      },
      "required": ["prop2"]
    }
  }
}
442 Bytes in 4 ms with coderay