travisjungroth / formlessness

A Python library for making web forms on the back end
MIT License
5 stars 2 forks source link

Add a snake_case validator to the object_paths in basic_schema.json #142

Closed travisjungroth closed 2 years ago

travisjungroth commented 2 years ago

JSON Schema Faker creates really weird JSON Pointers. Add a regex validator to the object_path keys in schemas/basic_form.json so it's just repetitions of (/ + 1 or more alphanum). Put that inside an anyOf so it can also be empty.

travisjungroth commented 2 years ago

^(\/[A-z]+[A-z_\d]*)+$ https://json-schema.org/understanding-json-schema/reference/regular_expressions.html