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

Remove additional properties #53

Open
dodas opened this issue Jan 31, 2024 · 1 comment
Open

Remove additional properties #53

dodas opened this issue Jan 31, 2024 · 1 comment
Labels

Comments

@dodas
Copy link

dodas commented Jan 31, 2024

Is there a way to remove additional properties from objects, similar to ajv's removeAdditional?

@sagold
Copy link
Owner

sagold commented Feb 25, 2024

Hi Jozef,

there is an option to remove invalid data in getTemplate https://github.com/sagold/json-schema-library/blob/main/lib/getTemplate.ts#L19. So you can pass in your current data run getTemplate with it, resulting in data that conforms to the json-schema. Would this help your case?

Cheers,
Sascha

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

No branches or pull requests

2 participants