Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better error messages when given a non-supported JSON Schema #29

Open
sandrina-p opened this issue Jul 11, 2023 · 0 comments
Open

Better error messages when given a non-supported JSON Schema #29

sandrina-p opened this issue Jul 11, 2023 · 0 comments
Labels
new feature New feature or request

Comments

@sandrina-p
Copy link
Collaborator

Problem

Currently, given a JSON Schema not supported by json-schema-form, the error message is hard to understand and trace back to where the problem originates from.

Solution

Evaluate a JSON Schema structure before trying to parse it, to spot and warn about invalid types.

For example, in this #21 , the error should be:

- JSON Schema invalid TypeError: innerFields.forEach is not a function
+ JSON Schema invalid: data/properties/hobbies/items/type must be object

Investigate the possibility of using TypeScript, Zod, or any other typing tool for this type check.

@sandrina-p sandrina-p changed the title dx: Better error messages for invalid JSON Schemas Better error messages for invalid JSON Schemas Jul 11, 2023
@sandrina-p sandrina-p changed the title Better error messages for invalid JSON Schemas Better error messages when given a non-supported JSON Schema Jul 11, 2023
@sandrina-p sandrina-p added the new feature New feature or request label Sep 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new feature New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant