mirror of
https://github.com/Redocly/redoc.git
synced 2025-08-04 12:20:19 +03:00
fix: nested patternProperties
This commit is contained in:
parent
f8c30e5e57
commit
10eeb5ceac
|
@ -418,7 +418,7 @@ function buildFields(
|
||||||
options: RedocNormalizedOptions,
|
options: RedocNormalizedOptions,
|
||||||
): FieldModel[] {
|
): FieldModel[] {
|
||||||
const props = schema.properties || schema.prefixItems || schema.items || {};
|
const props = schema.properties || schema.prefixItems || schema.items || {};
|
||||||
const patternProps = schema.patternProperties || {};
|
let patternProps = schema.patternProperties || {};
|
||||||
const additionalProps = schema.additionalProperties || schema.unevaluatedProperties;
|
const additionalProps = schema.additionalProperties || schema.unevaluatedProperties;
|
||||||
const itemsProps = schema.prefixItems ? schema.items : schema.additionalItems;
|
const itemsProps = schema.prefixItems ? schema.items : schema.additionalItems;
|
||||||
const defaults = schema.default;
|
const defaults = schema.default;
|
||||||
|
@ -432,6 +432,10 @@ function buildFields(
|
||||||
field = {};
|
field = {};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (field.patternProperties) {
|
||||||
|
patternProps = { ...patternProps, ...field.patternProperties };
|
||||||
|
}
|
||||||
|
|
||||||
const required =
|
const required =
|
||||||
schema.required === undefined ? false : schema.required.indexOf(fieldName) > -1;
|
schema.required === undefined ? false : schema.required.indexOf(fieldName) > -1;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user