Fix read-only fields appear in request samples (fixes #142)

This commit is contained in:
Roman Hotsiy 2016-11-29 21:54:09 +02:00
parent 878d3191f9
commit 5bd0ac2d11
No known key found for this signature in database
GPG Key ID: 5CB7B3ACABA57CB0

View File

@ -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;
}