mirror of
https://github.com/Redocly/redoc.git
synced 2024-11-26 18:43:43 +03:00
fix build
This commit is contained in:
parent
efcb811151
commit
e00dd87921
|
@ -114,6 +114,7 @@ const injectors = {
|
|||
injectTo._displayTypeHint = 'This field may contain data of any type';
|
||||
injectTo.isTrivial = true;
|
||||
injectTo._widgetType = 'trivial';
|
||||
injectTo._pointer = undefined;
|
||||
}
|
||||
},
|
||||
simpleType: {
|
||||
|
|
|
@ -27,11 +27,8 @@ export class SchemaNormalizer {
|
|||
let hasPtr = !!schema.$ref;
|
||||
if (opts.resolved && !hasPtr) this._dereferencer.visit(ptr);
|
||||
|
||||
if (schema['x-redoc-normalized']) {
|
||||
if (!schema['x-redoc-normalized']._pointer) schema['x-redoc-normalized']._pointer = ptr;
|
||||
return schema['x-redoc-normalized'];
|
||||
}
|
||||
let res = SchemaWalker.walk(Object.assign({}, schema), ptr, (subSchema, ptr) => {
|
||||
if (schema['x-redoc-normalized']) return schema;
|
||||
let res = SchemaWalker.walk(schema, ptr, (subSchema, ptr) => {
|
||||
let resolved = this._dereferencer.dereference(subSchema, ptr);
|
||||
if (resolved.allOf) {
|
||||
resolved._pointer = resolved._pointer || ptr;
|
||||
|
@ -41,7 +38,7 @@ export class SchemaNormalizer {
|
|||
return resolved;
|
||||
});
|
||||
if (opts.resolved && !hasPtr) this._dereferencer.exit(ptr);
|
||||
schema['x-redoc-normalized'] = res;
|
||||
res['x-redoc-normalized'] = true;
|
||||
return res;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user