diff --git a/lib/components/JsonSchema/json-schema.js b/lib/components/JsonSchema/json-schema.js index 6e5687df..d40a34f9 100644 --- a/lib/components/JsonSchema/json-schema.js +++ b/lib/components/JsonSchema/json-schema.js @@ -105,14 +105,14 @@ export default class JsonSchema extends BaseComponent { } return propertySchema; }); - if (this.skipReadOnly) { - props = props.filter(prop => !prop.readOnly); - } // Move discriminator field to the end of properties list if (discriminatorFieldIdx > -1) { let discrProp = props.splice(discriminatorFieldIdx, 1); props.push(discrProp[0]); } + if (this.skipReadOnly) { + props = props.filter(prop => !prop.readOnly); + } schema.properties = props; } diff --git a/package.json b/package.json index 91fade42..c891e863 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "redoc", "description": "Swagger-generated API Reference Documentation", - "version": "0.7.13", + "version": "0.7.14", "repository": { "type": "git", "url": "git://github.com/Rebilly/ReDoc"