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: Partially fix #3189 #3200

Merged
merged 2 commits into from
Oct 18, 2022

Commits on Oct 17, 2022

  1. fix: Partially fix rjsf-team#3189

    - Updated `@rjsf/utils` to make the `schema` and `rootSchema` props use a new generic type `S`
      - Added the new `StrictRJSFSchema` type as the alias to `JSON7Schema` changing `RJSFSchema` to be `StrictRJSFSchema & GenericObjectType`
      - Deleted the `RJSFSchemaDefinition` type in favor of accessing it indirectly via the `S["<prop-with-definition>"]` syntax
      - Added the new generic `S extends StrictRJSFSchema = RJSFSchema` to all types that directly or indirectly used `RJSFSchema` after the `T = any` type
      - Updated `SchemaUtilsType` to add the `F = any` generic to the whole interface, removing it from the definition of the two functions that need it
      - Updated all functions that used `RJSFSchema` to take the new generic, replacing `RJSFSchema` with `S`
      - Added missing generics where needed
    - Updated `@rjsf/core` to insert the `S extends StrictRJSFSchema = RJSFSchema` to every component that needed it, after the `T = any` generic
      - Updated the `index.ts` for the `ButtonTemplates`, `field`, `templates` and `widgets` to make them functions that take the `T`, `S` and `F` generics
      - Updated `getDefaultRegistry()` and `templates()` to call the appropriate functions
      - Replaced all uses of `RJSFSchema` and `RJSFSchemaDefinition` with `S` and `S["<prop-with-definition>"]`
      - Added missing generics where needed
      - Fixed a few type casts due the to the change in the `RJSFSchema` type
    - Updated `@rjsf/validator-ajv6` to fix a few type casts due to the change in the `RJSFSchema` type
    - Updated `@rjsf/validator-ajv8` to add the `S extends StrictRJSFSchema = RJSFSchema` generic to the `customizeValidator()` function and the `AJV8Validator` class
      - Replaced all uses of `RJSFSchema` and `RJSFSchemaDefinition` with `S` and `S["<prop-with-definition>"]`
      - Changed `RJSFSchema` to `S` where applicable
      - Fixed a few type casts due the to the change in the `RJSFSchema` type
    heath-freenome committed Oct 17, 2022
    Configuration menu
    Copy the full SHA
    d767eeb View commit details
    Browse the repository at this point in the history

Commits on Oct 18, 2022

  1. Update packages/validator-ajv8/src/validator.ts

    Fix comment
    
    Co-authored-by: Nick Grosenbacher <nickgrosenbacher@gmail.com>
    heath-freenome and nickgros committed Oct 18, 2022
    Configuration menu
    Copy the full SHA
    c833bae View commit details
    Browse the repository at this point in the history