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

Added language setting option to skip runtime schema compilation #980

Closed
wants to merge 1 commit into from

Conversation

aderende
Copy link

@aderende aderende commented Jul 4, 2024

Duplicate of #967, fixed CI build

What does this PR do?

It adds skipSchemaValidation settings to enable/disable JSON schema validation.

By default, skipSchemaValidation is false, but if the integrator always calls configure with skipSchemaValidation = true, then the code schema07Validator = ajv.compile(jsonSchema07) will never get called. This allows the browser to avoid adding the unsafe-eval policy directive.

What issues does this PR fix or reference?

The ajv.compile(...) function requires the unsafe-eval policy directive for the script-src policy. eclipsesource/jsonforms#1498

The skipSchemaValidation setting allows the application to avoid compiling the schema validator and prevents the need to use the unsafe-eval policy.

Is it tested? How?

A test case with skipSchemaValidation enabled has been added.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant