We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
It would be nice if the schema validation supported options to allow passing in a list of json paths to include and/or exclude.
For example:
const jsonData = { links: { first: 'http://example.com/events/12345', }, data: { type: 'event', id: '01e84900-8c10-4234-9576-787fb8897399', attributes: { name: 'My Event', }, relationships: { createdByUser: { data: { id: '123245', type: 'User' }, }, }, }, jsonapi: { version: '1.0', }, }; // Exclude jsonapi and data.relationships when comparing the schema context.assert(jsonData).schema(fileName, true, { exclude: ['jsonapi', 'data.relationships'] }); // Only include links and the data objects when comparing the schema context.assert(jsonData).schema(fileName, true, { include: ['links', 'data'] });
The text was updated successfully, but these errors were encountered:
I think it's a nice idea. The only problem with it is that AJV does not have this feature as far as I can tell. Trying to maintain compatibility.
Sorry, something went wrong.
No branches or pull requests
It would be nice if the schema validation supported options to allow passing in a list of json paths to include and/or exclude.
For example:
The text was updated successfully, but these errors were encountered: