Skip to content

Commit 9840abe

Browse files
authored
Merge branch 'master' into master
2 parents 509037c + 4eae9b6 commit 9840abe

File tree

11 files changed

+98
-71
lines changed

11 files changed

+98
-71
lines changed

.github/pull_request_template.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
<!--- Provide a general summary of your changes in the Title above -->
2+
3+
### Description
4+
<!--- Describe your changes in detail -->
5+
6+
7+
8+
### Motivation and Context
9+
<!--- Why is this change required? What problem does it solve? -->
10+
<!--- If it fixes an open issue, please link to the issue here. -->
11+
<!--- Use the magic "Fixes #1234" format, so the issues are -->
12+
<!--- automatically closed when this PR is merged. -->
13+
14+
15+
16+
### How Has This Been Tested?
17+
<!--- Please describe in detail how you manually tested your changes. -->
18+
<!--- Include details of your testing environment, and the tests you ran to -->
19+
<!--- see how your change affects other areas of the code, etc. -->
20+
21+
22+
23+
### Screenshots (if appropriate):
24+
25+
26+
27+
### Types of changes
28+
<!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->
29+
- [ ] No code changes (changes to documentation, CI, metadata, etc)
30+
- [ ] Dependency changes (any modification to dependencies in `package.json`)
31+
- [ ] Bug fix (non-breaking change which fixes an issue)
32+
- [ ] New feature (non-breaking change which adds functionality)
33+
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
34+
35+
### Checklist:
36+
<!--- Go over all the following points, and put an `x` in all the boxes that apply. -->
37+
<!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->
38+
- [ ] My code follows the code style of this project.
39+
- [ ] My change requires a change to the documentation.
40+
- [ ] I have updated the documentation accordingly.
41+
- [ ] I have added tests to cover my changes.
42+
- [ ] All new and existing tests passed.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ The OpenAPI Specification has undergone 5 revisions since initial creation in 20
2222

2323
Swagger UI Version | Release Date | OpenAPI Spec compatibility | Notes
2424
------------------ | ------------ | -------------------------- | -----
25-
3.4.0 | 2017-10-20 | 2.0, 3.0 | [tag v3.4.0](https://github.com/swagger-api/swagger-ui/tree/v3.4.0)
25+
3.4.1 | 2017-10-20 | 2.0, 3.0 | [tag v3.4.1](https://github.com/swagger-api/swagger-ui/tree/v3.4.1)
2626
3.0.21 | 2017-07-26 | 2.0 | [tag v3.0.21](https://github.com/swagger-api/swagger-ui/tree/v3.0.21)
2727
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)
2828
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)

dist/swagger-ui-bundle.js

Lines changed: 33 additions & 59 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/swagger-ui-bundle.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/swagger-ui-standalone-preset.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/swagger-ui-standalone-preset.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/swagger-ui.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/swagger-ui.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "swagger-ui",
3-
"version": "3.4.0",
3+
"version": "3.4.1",
44
"main": "dist/swagger-ui.js",
55
"repository": "[email protected]:swagger-api/swagger-ui.git",
66
"contributors": [
@@ -78,7 +78,7 @@
7878
"scroll-to-element": "^2.0.0",
7979
"serialize-error": "2.0.0",
8080
"shallowequal": "0.2.2",
81-
"swagger-client": "^3.3.0",
81+
"swagger-client": "^3.3.1",
8282
"url-parse": "^1.1.8",
8383
"whatwg-fetch": "0.11.1",
8484
"worker-loader": "^0.7.1",

src/core/components/parameter-row.jsx

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import React, { Component } from "react"
2+
import { Map } from "immutable"
23
import PropTypes from "prop-types"
34
import win from "core/window"
45

@@ -29,11 +30,21 @@ export default class ParameterRow extends Component {
2930

3031
componentWillReceiveProps(props) {
3132
let { specSelectors, pathMethod, param } = props
33+
let { isOAS3 } = specSelectors
34+
3235
let example = param.get("example")
3336
let defaultValue = param.get("default")
3437
let parameter = specSelectors.getParameter(pathMethod, param.get("name"), param.get("in"))
38+
let enumValue
39+
40+
if(isOAS3()) {
41+
let schema = param.get("schema") || Map()
42+
enumValue = schema.get("enum")
43+
} else {
44+
enumValue = parameter ? parameter.get("enum") : undefined
45+
}
3546
let paramValue = parameter ? parameter.get("value") : undefined
36-
let enumValue = parameter ? parameter.get("enum") : undefined
47+
3748
let value
3849

3950
if ( paramValue !== undefined ) {

0 commit comments

Comments
 (0)