Open XiaosongWen opened 1 year ago
You could look into generalizing the resource
target_discovery: list(include('resourceProvider'))
resourceProvider:
resourceProviderType: enum("ping", "http")
...
Or you could create a custom constraint that replaces equals
which outputs your desired error message.
@nbaju1 Thanks for your advice. Since different Provider have very different schema, first approach probably wont work. I will try your second suggestion
My use case I have two type type of target_discovery (
http
andping
), each of them have different schema, my code is:Basically, it is checking the value of each
resourceProvider
field. However, if I input "xxxx", it gave me blow error messages, it contains other redundant infos.Is there a way that it only return something like
XXXX does not equal ping or http
?