|
1 | 1 | {
|
2 |
| - "description": "An Address following the convention of http://microformats.org/wiki/hcard", |
3 |
| - "type": "object", |
4 |
| - "properties": { |
5 |
| - "post-office-box": { "type": "string" }, |
6 |
| - "extended-address": { "type": "string" }, |
7 |
| - "street-address": { "type": "string" }, |
8 |
| - "locality":{ "type": "string" }, |
9 |
| - "region": { "type": "string" }, |
10 |
| - "postal-code": { "type": "string" }, |
11 |
| - "country-name": { "type": "string"} |
| 2 | + "description": "An Address following the convention of http://microformats.org/wiki/hcard", |
| 3 | + "type": "object", |
| 4 | + "properties": { |
| 5 | + "post-office-box": { "type": "string" }, |
| 6 | + "extended-address": { "type": "string" }, |
| 7 | + "street-address": { "type": "string" }, |
| 8 | + "locality":{ "type": "string" }, |
| 9 | + "region": { "type": "string" }, |
| 10 | + "postal-code": { "type": "string" }, |
| 11 | + "country-name": { "type": "string"} |
| 12 | + }, |
| 13 | + "required": ["locality", "region", "country-name"], |
| 14 | + "allOf": [ |
| 15 | + { |
| 16 | + "oneOf": [ |
| 17 | + {"not": {"required": ["post-office-box"]}}, |
| 18 | + {"required": ["post-office-box", "street-address"]} |
| 19 | + ] |
12 | 20 | },
|
13 |
| - "required": ["locality", "region", "country-name"], |
14 |
| - "x-json-schema-dependencies": { |
15 |
| - "post-office-box": ["street-address"], |
16 |
| - "extended-address": ["street-address"] |
| 21 | + { |
| 22 | + "oneOf": [ |
| 23 | + {"not": {"required": ["extended-address"]}}, |
| 24 | + {"required": ["extended-address", "street-address"]} |
| 25 | + ] |
17 | 26 | }
|
| 27 | + ] |
18 | 28 | }
|
0 commit comments