You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Reordered imports in `registry.py` for consistency.
- Updated string formatting to use double quotes for consistency.
- Enhanced `_init_builtin_types` function by organizing field imports and registration.
- Improved readability of test cases by formatting data dictionaries and assertions.
- Added comprehensive tests for JSON Schema export functionality.
- Ensured backward compatibility in tests for form construction and validation.
- Cleaned up unnecessary whitespace and comments across various test files.
HTML export can also generate a `<script>` block for basic client-side validation.
174
175
176
+
### JSON Schema Export
177
+
178
+
Generate a standard [JSON Schema (draft-07)](http://json-schema.org/draft-07/schema#) from any form. The resulting schema is compatible with tools like [React JSON Schema Form](https://github.com/rjsf-team/react-jsonschema-form), [Angular Formly](https://formly.dev/), and any JSON Schema validator.
Field annotations like `label`, `help_text`, `default_value`, and `readonly` map to the JSON Schema keywords `title`, `description`, `default`, and `readOnly` respectively.
276
+
277
+
Fields inside `FieldGroup` and `FormStep` containers are flattened into the top-level `properties` automatically.
278
+
175
279
## Internationalization (i18n)
176
280
177
281
All validation and export messages are locale-aware. **English** (`en`) and **Spanish** (`es`) are included out of the box, and you can register any additional language at runtime via `register_locale()`.
0 commit comments