How to use the json-schema-traverse.skipKeywords function in json-schema-traverse

To help you get started, we’ve selected a few json-schema-traverse examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github epoberezkin / json-schema-usage-problems / test-schemas / analyse.js View on Github external
const util = require('./util');
const traverse = require('json-schema-traverse');
const path = require('path');
traverse.skipKeywords.discriminator = true;

const folders = util.getFolders();
const stats = [];
const USAGE = {
  boolSchema: 'boolean schema',
  patternPropsAndProps: 'patternProperties and properties',
  additionalPropsSchema: 'additionalProperties is schema',
  additionalPropsSchemaAndProps: 'additionalProperties schema and properties',
  itemsArray: 'items is array of schemas'
};

setUsageStats();

for (const folder of folders) {
  const folderName = path.basename(folder);
  if (folderName.indexOf('.template') === 0) continue;

json-schema-traverse

Traverse JSON Schema passing each schema object to callback

MIT
Latest version published 4 years ago

Package Health Score

67 / 100
Full package analysis

Popular json-schema-traverse functions