Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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) {