Rush StackShopBlogEvents
Skip to main content

Home > @rushstack/node-core-library > IJsonSchemaLoadOptions > rejectVendorExtensionKeywords

IJsonSchemaLoadOptions.rejectVendorExtensionKeywords property

This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

If true, the AJV validator will reject JSON Schema vendor extension keywords matching the pattern x-<vendor>-<keyword> as unknown keywords.

Signature:

rejectVendorExtensionKeywords?: boolean;

Remarks

The JSON Schema specification allows vendor-specific extensions using the x- prefix. For example, x-tsdoc-release-tag is used by @rushstack/heft-json-schema-typings-plugin. Other tools may define their own extensions such as x-myvendor-html-description.

By default, the schema tree is scanned for any keys matching the x-<vendor>-<keyword> pattern, and those keys are registered as custom AJV keywords so that strict mode validation succeeds. Set this option to true to disable this behavior and treat vendor extension keywords as unknown (which causes AJV strict mode to reject them).