1{
2  "$schema": "http:\/\/json-schema.org\/draft-04\/schema#",
3  "$ref": "#\/definitions\/TestUser",
4  "definitions": {
5    "GrandfatherType": {
6      "required": [
7        "family_name"
8      ],
9      "properties": {
10        "family_name": {
11          "type": "string"
12        }
13      },
14      "additionalProperties": false,
15      "type": "object"
16    },
17    "TestUser": {
18      "required": [
19        "some_base_property",
20        "some_base_property_yaml",
21        "grand",
22        "SomeUntaggedBaseProperty",
23        "PublicNonExported",
24        "id",
25        "name",
26        "TestFlag",
27        "age",
28        "email",
29        "Baz",
30        "color"
31      ],
32      "properties": {
33        "some_base_property": {
34          "type": "integer"
35        },
36        "some_base_property_yaml": {
37          "type": "integer"
38        },
39        "grand": {
40          "$schema": "http:\/\/json-schema.org\/draft-04\/schema#",
41          "$ref": "#\/definitions\/GrandfatherType"
42        },
43        "SomeUntaggedBaseProperty": {
44          "type": "boolean"
45        },
46        "PublicNonExported": {
47          "type": "integer"
48        },
49        "id": {
50          "type": "integer"
51        },
52        "name": {
53          "maxLength": 20,
54          "minLength": 1,
55          "pattern": ".*",
56          "type": "string",
57          "title": "the name",
58          "description": "this is a property",
59          "default": "alex",
60          "examples": [
61            "joe",
62            "lucy"
63          ]
64        },
65        "friends": {
66          "items": {
67            "type": "integer"
68          },
69          "type": "array",
70          "description": "list of IDs, omitted when empty"
71        },
72        "tags": {
73          "patternProperties": {
74            ".*": {
75              "additionalProperties": true
76            }
77          },
78          "type": "object"
79        },
80        "TestFlag": {
81          "type": "boolean"
82        },
83        "birth_date": {
84          "type": "string",
85          "format": "date-time"
86        },
87        "website": {
88          "type": "string",
89          "format": "uri"
90        },
91        "network_address": {
92          "type": "string",
93          "format": "ipv4"
94        },
95        "photo": {
96          "type": "string",
97          "media": {
98            "binaryEncoding": "base64"
99          }
100        },
101        "feeling": {
102          "oneOf": [
103            {
104              "type": "string"
105            },
106            {
107              "type": "integer"
108            }
109          ]
110        },
111        "age": {
112          "maximum": 120,
113          "exclusiveMaximum": true,
114          "minimum": 18,
115          "exclusiveMinimum": true,
116          "type": "integer"
117        },
118        "email": {
119          "type": "string",
120          "format": "email"
121        },
122        "Baz": {
123          "type": "string",
124          "foo": [
125            "bar",
126            "bar1"
127          ],
128          "hello": "world"
129        },
130        "color": {
131          "enum": [
132            "red",
133            "green",
134            "blue"
135          ],
136          "type": "string"
137        },
138        "rank": {
139          "enum": [
140            1,
141            2,
142            3
143          ],
144          "type": "integer"
145        },
146        "mult": {
147          "enum": [
148            1,
149            1.5,
150            2
151          ],
152          "type": "number"
153        }
154      },
155      "additionalProperties": false,
156      "type": "object"
157    }
158  }
159}