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

fix: #3239 by providing an ErrorSchemaBuilder class in @rjsf/utils #3307

Merged
merged 1 commit into from Dec 22, 2022

Commits on Dec 22, 2022

  1. fix: rjsf-team#3239 by providing an ErrorSchemaBuilder class in @rjsf…

    …/utils
    
    fix: rjsf-team#3239 by providing a new `ErrorSchemaBuilder` class in `@rjsf/utils`
    - In `@rjsf/utils` added `ErrorSchemaBuilder` to facilitate building `ErrorSchema` objects without the need for fancy casting
      - Exported the new class as part of the main `index.js`
      - Added 100% unit tests
    - In `@rjsf/validator-ajv6` and `@rjsf/validator-ajv8` updated the `toErrorSchema()` function to use the `ErrorSchemaBuilder` to simplify the implementation
      - Also updated the tests to use the `ErrorSchemaBuilder` to replace the expected values that required doing `as ErrorSchema` casting
    - Updated the `utility-functions.md` file to document `ErrorSchemaBuilder`
    - Updated the `CHANGELOG.md` accordingly for this fix as well as PR rjsf-team#3297
    heath-freenome committed Dec 22, 2022
    Copy the full SHA
    cd34993 View commit details
    Browse the repository at this point in the history