From 5bd0ac2d11d01c91fb75c8b98418b35c29e65f22 Mon Sep 17 00:00:00 2001 From: Roman Hotsiy Date: Tue, 29 Nov 2016 21:54:09 +0200 Subject: [PATCH] Fix read-only fields appear in request samples (fixes #142) --- lib/components/SchemaSample/schema-sample.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/components/SchemaSample/schema-sample.ts b/lib/components/SchemaSample/schema-sample.ts index 70de0887..40cedfff 100644 --- a/lib/components/SchemaSample/schema-sample.ts +++ b/lib/components/SchemaSample/schema-sample.ts @@ -98,7 +98,7 @@ export class SchemaSample extends BaseComponent implements OnInit { if (this.skipReadOnly && this.componentSchema['x-redoc-ro-sample']) { this.sample = this.componentSchema['x-redoc-ro-sample']; return true; - } else if (this.componentSchema['x-redoc-rw-sample']) { + } else if (!this.skipReadOnly && this.componentSchema['x-redoc-rw-sample']) { this.sample = this.componentSchema['x-redoc-rw-sample']; return true; }