Advanced
JSON Schema Validation of Empty Strings
Design patterns for validating empty strings in JSON schemas.
📝 Prompt Content
Construct a complex JSON Schema that validates an object containing a string field which must be non-empty under certain conditions but allows empty strings under others. Discuss the interaction between the 'minLength', 'pattern', and 'enum' keywords when the value is an empty string, and explain how to write a schema that strictly rejects an empty string ('') while accepting whitespace-only strings.