diff --git a/README.md b/README.md index 41066d1e..e3384151 100644 --- a/README.md +++ b/README.md @@ -20,14 +20,15 @@ For the older version of swagger-ui, refer to the [*2.x branch*](https://github. ## Compatibility The OpenAPI Specification has undergone 4 revisions since initial creation in 2010. Compatibility between swagger-ui and the OpenAPI Specification is as follows: -Swagger UI Version | Release Date | OpenAPI Spec compatibility | Notes | Status ------------------- | ------------ | -------------------------- | ----- | ------ -3.1.1 | 2017-07-29 | 2.0 | [tag v3.1.1](https://github.com/swagger-api/swagger-ui/tree/v3.1.1) | -2.2.10 | 2017-01-04 | 1.1, 1.2, 2.0 | [tag v2.2.10](https://github.com/swagger-api/swagger-ui/tree/v2.2.10) | -2.1.5 | 2016-07-20 | 1.1, 1.2, 2.0 | [tag v2.1.5](https://github.com/swagger-api/swagger-ui/tree/v2.1.5) | -2.0.24 | 2014-09-12 | 1.1, 1.2 | [tag v2.0.24](https://github.com/swagger-api/swagger-ui/tree/v2.0.24) | -1.0.13 | 2013-03-08 | 1.1, 1.2 | [tag v1.0.13](https://github.com/swagger-api/swagger-ui/tree/v1.0.13) | -1.0.1 | 2011-10-11 | 1.0, 1.1 | [tag v1.0.1](https://github.com/swagger-api/swagger-ui/tree/v1.0.1) | +Swagger UI Version | Release Date | OpenAPI Spec compatibility | Notes +------------------ | ------------ | -------------------------- | ----- +3.1.2 | 2017-07-31 | 2.0, 3.0 | [tag v3.1.2](https://github.com/swagger-api/swagger-ui/tree/v3.1.2) +3.0.21 | 2017-07-26 | 2.0 | [tag v3.0.21](https://github.com/swagger-api/swagger-ui/tree/v3.0.21) +2.2.10 | 2017-01-04 | 1.1, 1.2, 2.0 | [tag v2.2.10](https://github.com/swagger-api/swagger-ui/tree/v2.2.10) +2.1.5 | 2016-07-20 | 1.1, 1.2, 2.0 | [tag v2.1.5](https://github.com/swagger-api/swagger-ui/tree/v2.1.5) +2.0.24 | 2014-09-12 | 1.1, 1.2 | [tag v2.0.24](https://github.com/swagger-api/swagger-ui/tree/v2.0.24) +1.0.13 | 2013-03-08 | 1.1, 1.2 | [tag v1.0.13](https://github.com/swagger-api/swagger-ui/tree/v1.0.13) +1.0.1 | 2011-10-11 | 1.0, 1.1 | [tag v1.0.1](https://github.com/swagger-api/swagger-ui/tree/v1.0.1) ### How to run diff --git a/package.json b/package.json index a6ebfb33..6b67942c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "swagger-ui", - "version": "3.1.1", + "version": "3.1.2", "main": "dist/swagger-ui.js", "repository": "git@github.com:swagger-api/swagger-ui.git", "contributors": [ diff --git a/src/core/components/response.jsx b/src/core/components/response.jsx index dd14a228..95602c64 100644 --- a/src/core/components/response.jsx +++ b/src/core/components/response.jsx @@ -86,8 +86,8 @@ export default class Response extends React.Component { sampleResponse = oas3SchemaForContentType ? getSampleSchema(oas3SchemaForContentType.toJS(), this.state.responseContentType, { includeReadOnly: true }) : null schema = oas3SchemaForContentType ? inferSchema(oas3SchemaForContentType.toJS()) : null } else { - sampleResponse = schema ? getSampleSchema(schema, contentType, { includeReadOnly: true }) : null schema = inferSchema(response.toJS()) + sampleResponse = schema ? getSampleSchema(schema, contentType, { includeReadOnly: true }) : null } let example = getExampleComponent( sampleResponse, examples, HighlightCode )