github rjsf-team/react-jsonschema-form v6.6.0
6.6.0

latest releases: 6.6.1, v6.6.1, 6.6.0...
one hour ago

New feature

Added the validator-ata package to give users an alternative validation system

@rjsf/core

  • Updated Form to stop using removeOptionalEmptyObjects() and deprecating removeEmptyOptionalObjects prop

@rjsf/utils

  • Adopted the svelte-jsonschema-form algorithm for omitExtraData(), adding in support for the code from removeOptionalEmptyObjects(), exporting the isValueEmpty() function from the library
  • Deprecated the removeOptionalEmptyObject() and toPathSchema() functions, toPathSchema() on SchemaUtilsType and the PathSchema type
  • Added relaxOptionsForScoring() utility that normalizes a oneOf/anyOf option list for scoring with optional $refs resolution
    Converts boolean schemas to object equivalents and widens additionalProperties: false → true so that getClosestMatchingOption does not produce false negatives when form data contains keys not declared in properties
  • Fixed resolveAnyOrOneOfSchemas (called by schemaParser with expandAllBranches=true) to use getFirstMatchingOption on the options returned from relaxOptionsForScoring() so that they are captured for precompiled validators
  • Extracted the shallowAllOfMerge() function from retrieveSchema.ts into its own file for additional use in omitExtraData.ts

@rjsf/validator-ajv8

  • Added integration tests verifying that getFirstMatchingOption, getClosestMatchingOption, and omitExtraData work correctly when given an AJV8PrecompiledValidator compiled from a oneOf schema whose branches carry additionalProperties: false (both direct options and options defined via $ref)

@rjsf/validator-ata

  • Added @rjsf/validator-ata, an ata-validator backed alternative to @rjsf/validator-ajv8. The public surface mirrors the AJV package (customizeValidator(), ValidatorType<T, S, F>, custom formats, transformErrors, customValidate, suppressDuplicateFiltering), so swapping the import is enough for existing forms to keep working. AJV-only options (AjvClass, ajvFormatOptions, ajvOptionsOverrides) are replaced by ataOptionsOverrides, and the ata-validator format set is always installed. Depends on ata-validator ^0.17.4, which carries stable ATA#### error codes and rich error metadata (expected, received, schemaSource, dataFrame, suggestion, docUrl) that transformErrors can consume. See the validator-ata API reference for the full list of differences (#5063)
  • Wired through precompiled validators. compileSchemaValidators compiles a schema to a standalone module via ata-validator's bundleStandalone, and createPrecompiledValidator loads it as a ValidatorType, mirroring @rjsf/validator-ajv8. Error output matches the non-precompiled validator, including per-field errors for schema-valued additionalProperties (ata-validator >= 0.17.4); an invalid anyOf reports a single error on the field, the same as the runtime path. Custom formats in a precompiled bundle must be a RegExp or string pattern, since a function checker cannot be serialized into the standalone bundle (#5078)

Dev / docs / playground

  • Added a validator-ata API reference page under api-reference describing the package and its differences from validator-ajv8 (#5063)
  • Documented the compileSchemaValidators and createPrecompiledValidator APIs on the validator-ata API reference page (#5078)
  • Added ATA and ATA (coerceTypes) choices to the playground validator picker (#5063)
  • Removed the ataValidatorBrowserCompat workaround from the playground Vite config. The bump to ata-validator ^0.18.2 makes the patch unnecessary, since the validator no longer touches the filesystem at module init. See ata-core/ata-validator#25
  • Updated the form-props.md and utility-functions.md to document the deprecations and uiSchema.md to cleanup the enumNames docs slightly
  • Switched out eslint/prettier for OxLint/Oxfmt and jest/babel for vitest

Don't miss a new react-jsonschema-form release

NewReleases is sending notifications on new releases.