push addional code
[sdc.git] / openecomp-be / lib / openecomp-core-lib / openecomp-utilities-lib / src / test / resources / jsonUtil / json_schema / schemaWithRefsAndDefaults.json
1 {
2   "$schema": "http://json-schema.org/draft-04/schema#",
3   "definitions": {
4     "city": {
5       "type": "string",
6       "enum": [
7         "Tel Aviv",
8         "New York",
9         "London"
10       ],
11       "default": "Tel Aviv"
12     },
13     "zipCode" : {
14       "type" : "integer"
15     }
16   },
17   "type": "object",
18   "properties": {
19     "address": {
20       "type": "object",
21       "properties": {
22         "streetAddress": {
23           "type": "string"
24         },
25         "city": {
26           "$ref": "#/definitions/city"
27         },
28         "cityZipCode" : {"$ref" : "#/definitions/zipCode"}
29       },
30       "required": [
31         "streetAddress",
32         "city"
33       ]
34     },
35     "phoneNumber": {
36       "type": "array",
37       "items": {
38         "type": "object",
39         "properties": {
40           "location": {
41             "type": "string"
42           },
43           "locationZipCode" : {"$ref" : "#/definitions/zipCode"},
44           "code": {
45             "type": "integer",
46             "default": 777
47           }
48         },
49         "required": [
50           "location",
51           "code"
52         ]
53       },
54       "default": [
55         {
56           "location": "Home",
57           "code": 1
58         },
59         {
60           "location": "Office",
61           "code": 2
62         }
63       ]
64     },
65     "cityOfBirth" : { "$ref"  : "#/definitions/city"}
66   },
67   "required": [
68     "address",
69     "phoneNumber"
70   ]
71 }