Skip to content

Commit 0b37977

Browse files
committed
conditional null
1 parent 25dcd29 commit 0b37977

File tree

1 file changed

+32
-1
lines changed

1 file changed

+32
-1
lines changed

rest-api-spec/src/main/resources/schema.json

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,37 @@
4343
"$ref": "#/definitions/Body"
4444
}
4545
},
46+
"if": {
47+
"properties": {
48+
"stability": {
49+
"const": "stable"
50+
}
51+
}
52+
},
53+
"then": {
54+
"properties": {
55+
"documentation": {
56+
"$ref": "#/definitions/Documentation",
57+
"properties": {
58+
"url" : {
59+
"type": ["string"]
60+
}
61+
}
62+
}
63+
}
64+
},
65+
"else": {
66+
"properties": {
67+
"documentation": {
68+
"$ref": "#/definitions/Documentation",
69+
"properties": {
70+
"url" : {
71+
"type": ["string", "null"]
72+
}
73+
}
74+
}
75+
}
76+
},
4677
"required": [
4778
"documentation",
4879
"stability",
@@ -130,7 +161,7 @@
130161
"additionalProperties": false,
131162
"properties": {
132163
"url": {
133-
"type": ["string", "null"],
164+
"type": ["string"],
134165
"format": "uri"
135166
},
136167
"description": {

0 commit comments

Comments
 (0)