Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions dist/swagger-ui-bundle.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/swagger-ui-bundle.js.map

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions dist/swagger-ui-standalone-preset.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/swagger-ui-standalone-preset.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/swagger-ui.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/swagger-ui.js.map

Large diffs are not rendered by default.

9,895 changes: 5,528 additions & 4,367 deletions package-lock.json

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "swagger-ui",
"version": "3.22.1",
"version": "3.22.2",
"main": "dist/swagger-ui.js",
"repository": "[email protected]:swagger-api/swagger-ui.git",
"contributors": [
Expand Down Expand Up @@ -96,7 +96,7 @@
"babel-preset-stage-0": "^6.22.0",
"babel-runtime": "^6.23.0",
"body-parser": "^1.18.3",
"bundlesize": "^0.17.0",
"bundlesize": "^0.17.2",
"chromedriver": "^2.38.3",
"copy-webpack-plugin": "^4.0.1",
"cors": "^2.8.4",
Expand Down Expand Up @@ -124,7 +124,7 @@
"license-checker": "^19.0.0",
"mocha": "^5.1.1",
"nightwatch": "^0.9.16",
"node-sass": "^4.5.0",
"node-sass": "^4.12.0",
"npm-run-all": "^4.1.2",
"null-loader": "0.1.1",
"nyc": "^11.3.0",
Expand All @@ -143,10 +143,10 @@
"tachyons-sass": "^4.9.2",
"uglifyjs-webpack-plugin": "^1.2.5",
"url-loader": "^1.0.1",
"webpack": "^3.1.0",
"webpack": "^3.12.0",
"webpack-bundle-size-analyzer": "^2.5.0",
"webpack-cli": "^2.0.4",
"webpack-dev-server": "^2.11.1",
"webpack-dev-server": "^2.11.5",
"worker-loader": "^1.1.1"
},
"config": {
Expand Down
2 changes: 1 addition & 1 deletion src/core/components/model.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export default class Model extends ImmutablePureComponent {
return ref.replace(/^.*#\/definitions\//, "")
}
if ( ref.indexOf("#/components/schemas/") !== -1 ) {
return ref.replace("#/components/schemas/", "")
return ref.replace(/^.*#\/components\/schemas\//, "")
}
}

Expand Down
7 changes: 4 additions & 3 deletions src/core/components/models.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,11 @@ export default class Models extends Component {

const schema = Map.isMap(schemaValue) ? schemaValue : Im.Map()
const rawSchema = Map.isMap(rawSchemaValue) ? rawSchemaValue : Im.Map()

const displayName = schema.get("title") || rawSchema.get("title") || name
const isShown = layoutSelectors.isShown( ["models", name], false )

if(layoutSelectors.isShown(["models", name], false) && (schema.size === 0 && rawSchema.size > 0)) {
if( isShown && (schema.size === 0 && rawSchema.size > 0) ) {
// Firing an action in a container render is not great,
// but it works for now.
this.props.specActions.requestResolvedSubtree([...this.getSchemaBasePath(), name])
Expand Down Expand Up @@ -100,7 +101,7 @@ export default class Models extends Component {
displayName={displayName}
modelName={name}
hideSelfOnExpand={true}
expanded={defaultModelsExpandDepth > 1}
expanded={ defaultModelsExpandDepth > 0 && isShown }
>{content}</ModelCollapse>
</div>
}).toArray()
Expand Down
4 changes: 2 additions & 2 deletions src/core/components/object-model.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ export default class ObjectModel extends Component {
{
<table className="model"><tbody>
{
!description ? null : <tr style={{ color: "#666", fontStyle: "italic" }}>
<td>description:</td>
!description ? null : <tr style={{ color: "#666", fontWeight: "normal" }}>
<td style={{ fontWeight: "bold" }}>description:</td>
<td>
<Markdown source={ description } />
</td>
Expand Down