Skip to content

Commit 97b8123

Browse files
committed
Merge branch 'master' into bug/3100-sub-objects-as-required
# Conflicts: # src/core/components/model.jsx
2 parents 4ddb3cd + aab1403 commit 97b8123

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+1016
-478
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@ node_modules
55
npm-debug.log*
66
.eslintcache
77
package-lock.json
8+
*.iml

README.md

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ The OpenAPI Specification has undergone 4 revisions since initial creation in 20
2222

2323
Swagger UI Version | Release Date | OpenAPI Spec compatibility | Notes | Status
2424
------------------ | ------------ | -------------------------- | ----- | ------
25-
3.0.17 | 2017-06-23 | 2.0 | [tag v3.0.17](https://github.com/swagger-api/swagger-ui/tree/v3.0.17) |
25+
3.0.19 | 2017-07-14 | 2.0 | [tag v3.0.19](https://github.com/swagger-api/swagger-ui/tree/v3.0.19) |
2626
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) |
2727
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) |
2828
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) |
@@ -67,7 +67,6 @@ To help with the migration, here are the currently known issues with 3.X. This l
6767

6868
- Only part of the [parameters](#parameters) previously supported are available.
6969
- The JSON Form Editor is not implemented.
70-
- Shebang URL support for operations is missing.
7170
- Support for `collectionFormat` is partial.
7271
- l10n (translations) is not implemented.
7372
- Relative path support for external files is not implemented.
@@ -82,17 +81,17 @@ To use swagger-ui's bundles, you should take a look at the [source of swagger-ui
8281

8382
```javascript
8483
const ui = SwaggerUIBundle({
85-
url: "http://petstore.swagger.io/v2/swagger.json",
86-
dom_id: '#swagger-ui',
87-
presets: [
88-
SwaggerUIBundle.presets.apis,
89-
SwaggerUIStandalonePreset
90-
],
91-
plugins: [
92-
SwaggerUIBundle.plugins.DownloadUrl
93-
],
94-
layout: "StandaloneLayout"
95-
})
84+
url: "http://petstore.swagger.io/v2/swagger.json",
85+
dom_id: '#swagger-ui',
86+
presets: [
87+
SwaggerUIBundle.presets.apis,
88+
SwaggerUIStandalonePreset
89+
],
90+
plugins: [
91+
SwaggerUIBundle.plugins.DownloadUrl
92+
],
93+
layout: "StandaloneLayout"
94+
})
9695
```
9796

9897
#### OAuth2 configuration
@@ -137,13 +136,16 @@ spec | A JSON object describing the OpenAPI Specification. When used, the `url`
137136
validatorUrl | By default, Swagger-UI attempts to validate specs against swagger.io's online validator. You can use this parameter to set a different validator URL, for example for locally deployed validators ([Validator Badge](https://github.com/swagger-api/validator-badge)). Setting it to `null` will disable validation.
138137
dom_id | The id of a dom element inside which SwaggerUi will put the user interface for swagger.
139138
oauth2RedirectUrl | OAuth redirect URL
139+
tagsSorter | Apply a sort to the tag list of each API. It can be 'alpha' (sort by paths alphanumerically) or a function (see [Array.prototype.sort()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort) to learn how to write a sort function). Two tag name strings are passed to the sorter for each pass. Default is the order determined by Swagger-UI.
140140
operationsSorter | Apply a sort to the operation list of each API. It can be 'alpha' (sort by paths alphanumerically), 'method' (sort by HTTP method) or a function (see Array.prototype.sort() to know how sort function works). Default is the order returned by the server unchanged.
141141
configUrl | Configs URL
142142
parameterMacro | MUST be a function. Function to set default value to parameters. Accepts two arguments parameterMacro(operation, parameter). Operation and parameter are objects passed for context, both remain immutable
143143
modelPropertyMacro | MUST be a function. Function to set default values to each property in model. Accepts one argument modelPropertyMacro(property), property is immutable
144144
docExpansion | Controls the default expansion setting for the operations and tags. It can be 'list' (expands only the tags), 'full' (expands the tags and operations) or 'none' (expands nothing). The default is 'list'.
145145
displayOperationId | Controls the display of operationId in operations list. The default is `false`.
146-
displayRequestDuration | Controls the display of the request duration (in milliseconds) for `Try it out` requests. The default is `false`.
146+
displayRequestDuration | Controls the display of the request duration (in milliseconds) for `Try it out` requests. The default is `false`.
147+
maxDisplayedTags | If set, limits the number of tagged operations displayed to at most this many. The default is to show all operations.
148+
filter | If set, enables filtering. The top bar will show an edit box that you can use to filter the tagged operations that are shown. Can be true/false to enable or disable, or an explicit filter string in which case filtering will be enabled using that string as the filter expression. Filtering is case sensitive matching the filter expression anywhere inside the tag.
147149

148150
### Plugins
149151

dev-helpers/index.html

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,15 @@
1111
<style>
1212
html
1313
{
14-
box-sizing: border-box;
15-
overflow: -moz-scrollbars-vertical;
16-
overflow-y: scroll;
14+
box-sizing: border-box;
15+
overflow: -moz-scrollbars-vertical;
16+
overflow-y: scroll;
1717
}
1818
*,
1919
*:before,
2020
*:after
2121
{
22-
box-sizing: inherit;
22+
box-sizing: inherit;
2323
}
2424

2525
body {
@@ -34,7 +34,7 @@
3434
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" style="position:absolute;width:0;height:0">
3535
<defs>
3636
<symbol viewBox="0 0 20 20" id="unlocked">
37-
<path d="M15.8 8H14V5.6C14 2.703 12.665 1 10 1 7.334 1 6 2.703 6 5.6V6h2v-.801C8 3.754 8.797 3 10 3c1.203 0 2 .754 2 2.199V8H4c-.553 0-1 .646-1 1.199V17c0 .549.428 1.139.951 1.307l1.197.387C5.672 18.861 6.55 19 7.1 19h5.8c.549 0 1.428-.139 1.951-.307l1.196-.387c.524-.167.953-.757.953-1.306V9.199C17 8.646 16.352 8 15.8 8z"></path>
37+
<path d="M15.8 8H14V5.6C14 2.703 12.665 1 10 1 7.334 1 6 2.703 6 5.6V6h2v-.801C8 3.754 8.797 3 10 3c1.203 0 2 .754 2 2.199V8H4c-.553 0-1 .646-1 1.199V17c0 .549.428 1.139.951 1.307l1.197.387C5.672 18.861 6.55 19 7.1 19h5.8c.549 0 1.428-.139 1.951-.307l1.196-.387c.524-.167.953-.757.953-1.306V9.199C17 8.646 16.352 8 15.8 8z"></path>
3838
</symbol>
3939

4040
<symbol viewBox="0 0 20 20" id="locked">
@@ -70,34 +70,34 @@
7070
<script src="./swagger-ui-bundle.js"> </script>
7171
<script src="./swagger-ui-standalone-preset.js"> </script>
7272
<script>
73-
window.onload = function() {
74-
window["SwaggerUIBundle"] = window["swagger-ui-bundle"]
75-
window["SwaggerUIStandalonePreset"] = window["swagger-ui-standalone-preset"]
76-
// Build a system
77-
const ui = SwaggerUIBundle({
78-
url: "http://petstore.swagger.io/v2/swagger.json",
79-
dom_id: '#swagger-ui',
80-
presets: [
81-
SwaggerUIBundle.presets.apis,
82-
SwaggerUIStandalonePreset
83-
],
84-
plugins: [
85-
SwaggerUIBundle.plugins.DownloadUrl
86-
],
87-
layout: "StandaloneLayout"
88-
})
89-
90-
window.ui = ui
91-
92-
ui.initOAuth({
93-
clientId: "your-client-id",
94-
clientSecret: "your-client-secret-if-required",
95-
realm: "your-realms",
96-
appName: "your-app-name",
97-
scopeSeparator: " ",
98-
additionalQueryStringParams: {}
99-
})
100-
}
73+
window.onload = function() {
74+
window["SwaggerUIBundle"] = window["swagger-ui-bundle"]
75+
window["SwaggerUIStandalonePreset"] = window["swagger-ui-standalone-preset"]
76+
// Build a system
77+
const ui = SwaggerUIBundle({
78+
url: "http://petstore.swagger.io/v2/swagger.json",
79+
dom_id: '#swagger-ui',
80+
presets: [
81+
SwaggerUIBundle.presets.apis,
82+
SwaggerUIStandalonePreset
83+
],
84+
plugins: [
85+
SwaggerUIBundle.plugins.DownloadUrl
86+
],
87+
layout: "StandaloneLayout"
88+
})
89+
90+
window.ui = ui
91+
92+
ui.initOAuth({
93+
clientId: "your-client-id",
94+
clientSecret: "your-client-secret-if-required",
95+
realm: "your-realms",
96+
appName: "your-app-name",
97+
scopeSeparator: " ",
98+
additionalQueryStringParams: {}
99+
})
100+
}
101101
</script>
102102
</body>
103103

dist/swagger-ui-bundle.js

Lines changed: 8 additions & 8 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: 3 additions & 3 deletions
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.css

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: 2 additions & 2 deletions
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.

0 commit comments

Comments
 (0)