I would like to validate the following json:
{
"endpoints": [
{
"ip_name": "plantuml_ip",
"ip": "172.18.0.2",
"ports": [
{
"name": "plantuml_port",
"port": 8080,
"proto": "HTTPS_TERM"
}
]
}
],
"subdomains": [
{
"name": "plantuml_port",
"value": "plantuml"
}
]
}
If proto
contains value HTTPS_TERM
, then subdomains
with the same name
should exists (plantuml_port
). Here is an another valid example:
Valid:
{
"endpoints": [{
"ip_name": "plantuml_ip",
"ip": "172.18.0.2",
"ports": [{
"name": "plantuml_port",
"port": 8080,
"proto": "HTTPS_TERM"
}, {
"name": "random_port",
"port": 8181,
"proto": "HTTPS_TERM"
}, {
"name": "no_subdomain",
"port": 999,
"proto": "NO_SUBDOMAIN"
}]
}],
"subdomains": [{
"name": "plantuml_port",
"value": "plantuml"
}, {
"name": "random_port",
"value": "random"
}]
}
It is something like this possible? Thanks in advance!