mirror of
https://github.com/Redocly/redoc.git
synced 2025-08-08 14:14:56 +03:00
rename samplerOption to samplerOptions
This commit is contained in:
parent
84f3a2505f
commit
57e0d10960
|
@ -41,7 +41,7 @@ export class MediaTypeModel {
|
||||||
}
|
}
|
||||||
|
|
||||||
generateExample(parser: OpenAPIParser, info: OpenAPIMediaType) {
|
generateExample(parser: OpenAPIParser, info: OpenAPIMediaType) {
|
||||||
const samplerOption = {
|
const samplerOptions = {
|
||||||
skipReadOnly: this.isRequestType,
|
skipReadOnly: this.isRequestType,
|
||||||
skipNonRequired: this.isRequestType && this.onlyRequiredInSamples,
|
skipNonRequired: this.isRequestType && this.onlyRequiredInSamples,
|
||||||
skipWriteOnly: !this.isRequestType,
|
skipWriteOnly: !this.isRequestType,
|
||||||
|
@ -51,7 +51,7 @@ export class MediaTypeModel {
|
||||||
for (const subSchema of this.schema.oneOf) {
|
for (const subSchema of this.schema.oneOf) {
|
||||||
const sample = Sampler.sample(
|
const sample = Sampler.sample(
|
||||||
subSchema.rawSchema,
|
subSchema.rawSchema,
|
||||||
samplerOption,
|
samplerOptions,
|
||||||
parser.spec,
|
parser.spec,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -68,7 +68,7 @@ export class MediaTypeModel {
|
||||||
default: new ExampleModel(parser, {
|
default: new ExampleModel(parser, {
|
||||||
value: Sampler.sample(
|
value: Sampler.sample(
|
||||||
info.schema,
|
info.schema,
|
||||||
samplerOption,
|
samplerOptions,
|
||||||
parser.spec,
|
parser.spec,
|
||||||
),
|
),
|
||||||
}),
|
}),
|
||||||
|
|
Loading…
Reference in New Issue
Block a user