zilla icon indicating copy to clipboard operation
zilla copied to clipboard

Add custom error messages in the json schema.

Open vordimous opened this issue 7 months ago • 0 comments

Is your feature request related to a problem? Please describe. I'm always frustrated when I get an error like this below when the problem is the bootstrap server port is missing.

Exactly one of the following sets of problems must be resolved.
1) [116,16][/bindings/south_kafka_client/kind] The value must be constant string "cache_client".
   [119,8][/bindings/south_kafka_client/options/servers] The object must not have a property whose name is "servers".
2) [116,16][/bindings/south_kafka_client/kind] The value must be constant string "cache_server".
   [119,8][/bindings/south_kafka_client/options/servers] The object must not have a property whose name is "servers".
3) At least one of the following sets of problems must be resolved.
   1) [119,30][/bindings/south_kafka_client/options/servers/0] The string value must match the pattern "([^\:]+):(\d+)".
   2) [119,30][/bindings/south_kafka_client/options/servers/0] The string value must match the pattern "\$\{\{[\h\f\n\r\u000b?\u2028\u2029\ufeff]*([^[\h\f\n\r\u000b?\u2028\u2029\ufeff]\}]*)\.([^[\h\f\n\r\u000b?\u2028\u2029\ufeff]\}]*)[\h\f\n\r\u000b?\u2028\u2029\ufeff]*\}\}".

Describe the solution you'd like Add custom error messages for pattern-matched validation. json schema docs.

Additional context It would be even better if any unique validations (not basic type checking) errors had custom messages that would help identify what the issue is.

vordimous avatar Jul 01 '24 14:07 vordimous