How to use the jsonref.rebase function in jsonref

To help you get started, we’ve selected a few jsonref 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 vivocha / arrest / src / api.ts View on Github external
registerSchema(name: string, schema: OpenAPIV3.SchemaObject) {
    this.originalSchemas[name] = _.cloneDeep(schema);
    if (!this.document.components) {
      this.document.components = {};
    }
    if (!this.document.components.schemas) {
      this.document.components.schemas = {};
    }
    this.document.components.schemas[name] = removeSchemaDeclaration(refs.rebase(name, _.cloneDeep(schema), refsRebaser));
  }
  registerDynamicSchema(name: string, schema: SchemaObject) {

jsonref

Javascript References ($ref) and Pointers library

MIT
Latest version published 4 months ago

Package Health Score

59 / 100
Full package analysis