Skip to content

Commit 72c3215

Browse files
committed
make license identifier and url mutually exclusive
on render
1 parent 7e93b44 commit 72c3215

File tree

1 file changed

+44
-4
lines changed

1 file changed

+44
-4
lines changed

properties_pane/model_level/modelLevelConfig.json

Lines changed: 44 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -269,9 +269,32 @@ making sure that you maintain a proper JSON format.
269269
"markdown": false,
270270
"propertyTooltip": "An SPDX license expression for the API. The identifier field is mutually exclusive of the url field",
271271
"dependency" : {
272-
"level": "model",
273-
"key": "dbVersion",
274-
"value": "3.1.0"
272+
"type": "and",
273+
"values": [
274+
{
275+
"level": "model",
276+
"key": "dbVersion",
277+
"value": "3.1.0"
278+
},
279+
{
280+
"type": "or",
281+
"values": [
282+
{
283+
"key": "licenseURL",
284+
"pattern": "^\\s*$"
285+
},
286+
{
287+
"type": "not",
288+
"values": [
289+
{
290+
"key": "licenseURL",
291+
"exist": true
292+
}
293+
]
294+
}
295+
]
296+
}
297+
]
275298
}
276299
},
277300
{
@@ -280,7 +303,24 @@ making sure that you maintain a proper JSON format.
280303
"shouldValidate": true,
281304
"propertyType": "text",
282305
"propertyFormat": "uri",
283-
"propertyTooltip": "A URL to the license used for the API. This MUST be in the form of a URL. The url field is mutually exclusive of the identifier field (OpenAPI 3.1.x)."
306+
"propertyTooltip": "A URL to the license used for the API. This MUST be in the form of a URL. The url field is mutually exclusive of the identifier field (OpenAPI 3.1.x).",
307+
"dependency" : {
308+
"type": "or",
309+
"values": [
310+
{
311+
312+
},
313+
{
314+
"type": "not",
315+
"values": [
316+
{
317+
"key": "licenseIdentifier",
318+
"exist": true
319+
}
320+
]
321+
}
322+
]
323+
}
284324
},
285325
{
286326
"propertyName": "extensions",

0 commit comments

Comments
 (0)