rename samplerOption to samplerOptions

This commit is contained in:
Roman Hotsiy 2018-10-05 16:08:04 +03:00 committed by GitHub
parent 84f3a2505f
commit 57e0d10960
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -41,7 +41,7 @@ export class MediaTypeModel {
}
generateExample(parser: OpenAPIParser, info: OpenAPIMediaType) {
const samplerOption = {
const samplerOptions = {
skipReadOnly: this.isRequestType,
skipNonRequired: this.isRequestType && this.onlyRequiredInSamples,
skipWriteOnly: !this.isRequestType,
@ -51,7 +51,7 @@ export class MediaTypeModel {
for (const subSchema of this.schema.oneOf) {
const sample = Sampler.sample(
subSchema.rawSchema,
samplerOption,
samplerOptions,
parser.spec,
);
@ -68,7 +68,7 @@ export class MediaTypeModel {
default: new ExampleModel(parser, {
value: Sampler.sample(
info.schema,
samplerOption,
samplerOptions,
parser.spec,
),
}),