Skip to content

Commit

Permalink
fix: writeOnly not respected in response samples
Browse files Browse the repository at this point in the history
  • Loading branch information
RomanHotsiy committed Mar 5, 2018
1 parent 0f1b6a6 commit 87abdf7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/services/models/MediaType.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export class MediaTypeModel {
this.examples[subSchema.title] = {
value: Sampler.sample(
subSchema.rawSchema,
{ skipReadOnly: this.isRequestType, skipReadWrite: !this.isRequestType },
{ skipReadOnly: this.isRequestType, skipWriteOnly: !this.isRequestType },
parser.spec,
),
};
Expand All @@ -55,7 +55,7 @@ export class MediaTypeModel {
default: new ExampleModel(parser, {
value: Sampler.sample(
info.schema,
{ skipReadOnly: this.isRequestType, skipReadWrite: !this.isRequestType },
{ skipReadOnly: this.isRequestType, skipWriteOnly: !this.isRequestType },
parser.spec,
),
}),
Expand Down

0 comments on commit 87abdf7

Please sign in to comment.