diff --git a/src/components/Schema/ObjectSchema.tsx b/src/components/Schema/ObjectSchema.tsx index ac0300f3..e115eb85 100644 --- a/src/components/Schema/ObjectSchema.tsx +++ b/src/components/Schema/ObjectSchema.tsx @@ -26,7 +26,7 @@ export const ObjectSchema = observer( skipReadOnly, skipWriteOnly, }: ObjectSchemaProps) => { - const { expandSingleSchemaField, showObjectExample } = React.useContext(OptionsContext); + const { expandSingleSchemaField, showObjectSchemaExamples } = React.useContext(OptionsContext); const filteredFields = React.useMemo( () => @@ -66,7 +66,7 @@ export const ObjectSchema = observer( : undefined } className={field.expanded ? 'expanded' : undefined} - showExamples={showObjectExample} + showExamples={showObjectSchemaExamples} skipReadOnly={skipReadOnly} skipWriteOnly={skipWriteOnly} showTitle={showTitle} diff --git a/src/services/RedocNormalizedOptions.ts b/src/services/RedocNormalizedOptions.ts index 62877cc7..66a0cf61 100644 --- a/src/services/RedocNormalizedOptions.ts +++ b/src/services/RedocNormalizedOptions.ts @@ -35,7 +35,7 @@ export interface RedocRawOptions { simpleOneOfTypeLabel?: boolean | string; payloadSampleIdx?: number; expandSingleSchemaField?: boolean | string; - showObjectExample?: boolean | string; + showObjectSchemaExamples?: boolean | string; unstable_ignoreMimeParameters?: boolean; @@ -221,7 +221,7 @@ export class RedocNormalizedOptions { simpleOneOfTypeLabel: boolean; payloadSampleIdx: number; expandSingleSchemaField: boolean; - showObjectExample: boolean; + showObjectSchemaExamples: boolean; /* tslint:disable-next-line */ unstable_ignoreMimeParameters: boolean; @@ -283,7 +283,7 @@ export class RedocNormalizedOptions { this.simpleOneOfTypeLabel = argValueToBoolean(raw.simpleOneOfTypeLabel); this.payloadSampleIdx = RedocNormalizedOptions.normalizePayloadSampleIdx(raw.payloadSampleIdx); this.expandSingleSchemaField = argValueToBoolean(raw.expandSingleSchemaField); - this.showObjectExample = argValueToBoolean(raw.showObjectExample); + this.showObjectSchemaExamples = argValueToBoolean(raw.showObjectSchemaExamples); this.unstable_ignoreMimeParameters = argValueToBoolean(raw.unstable_ignoreMimeParameters);