From 5d7845477846d9159f88e53395da60a390d1f807 Mon Sep 17 00:00:00 2001 From: Kyle Shockey Date: Mon, 31 Jul 2017 15:29:06 -0700 Subject: [PATCH 1/4] Fix Swagger2 Response Example value rendering --- src/core/components/response.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/components/response.jsx b/src/core/components/response.jsx index dd14a228816..95602c64d21 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 ) From ec24a688ae9d514dc561b1cf47235d0991effe3e Mon Sep 17 00:00:00 2001 From: Kyle Shockey Date: Mon, 31 Jul 2017 15:30:26 -0700 Subject: [PATCH 2/4] Version bump --- README.md | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 41066d1e04a..00f8ef56cac 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ The OpenAPI Specification has undergone 4 revisions since initial creation in 20 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) | +3.1.2 | 2017-07-31 | 2.0 | [tag v3.1.2](https://github.com/swagger-api/swagger-ui/tree/v3.1.2) | 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) | diff --git a/package.json b/package.json index a6ebfb33dbb..6b67942c734 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": [ From 6297fcc349abcae143264efc2cb4f544d29c501b Mon Sep 17 00:00:00 2001 From: shockey Date: Mon, 31 Jul 2017 15:41:28 -0700 Subject: [PATCH 3/4] Update README.md --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 00f8ef56cac..86d10899017 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,8 @@ The OpenAPI Specification has undergone 4 revisions since initial creation in 20 Swagger UI Version | Release Date | OpenAPI Spec compatibility | Notes | Status ------------------ | ------------ | -------------------------- | ----- | ------ -3.1.2 | 2017-07-31 | 2.0 | [tag v3.1.2](https://github.com/swagger-api/swagger-ui/tree/v3.1.2) | +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) | From afc1f92ea3d183cda249c5a564a25e833a043e6d Mon Sep 17 00:00:00 2001 From: shockey Date: Mon, 31 Jul 2017 15:46:20 -0700 Subject: [PATCH 4/4] Update README.md --- README.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 86d10899017..e33841517b9 100644 --- a/README.md +++ b/README.md @@ -20,15 +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.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) | +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