aws-amplify / amplify-codegen

Amplify Codegen is a JavaScript toolkit library for frontend and mobile developers building Amplify applications.
Apache License 2.0
59 stars 57 forks source link

fix: use standalone ajv validation for model introspection schema #807

Closed AaronZyLee closed 2 months ago

AaronZyLee commented 2 months ago

Description of changes

The direct Ajv dependency uses a a browser-unsafe eval which will cause a CSP(Content Security Policy) error during runtime. To resolve the issue, the following changes are made:

Codegen Paramaters Changed or Added

Issue #, if available

Description of how you validated changes

Unit & E2E tests

Checklist

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.