Skip to content

Commit 0d2c457

Browse files
authored
Merge branch 'master' into include-apis-preset-by-default
2 parents 0dccd48 + a72fc24 commit 0d2c457

29 files changed

+342
-76
lines changed

README.md

Lines changed: 1 addition & 2 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.18 | 2017-07-07 | 2.0 | [tag v3.0.18](https://github.com/swagger-api/swagger-ui/tree/v3.0.18) |
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.

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.

docs/deep-linking.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# Deep linking
2+
3+
Swagger-UI allows you to deeply link into tags and operations within a spec. When Swagger-UI is provided a URL fragment at runtime, it will automatically expand and scroll to a specified tag or operation.
4+
5+
## Usage
6+
7+
👉🏼 Add `deepLinking: true` to your Swagger-UI configuration to enable this functionality.
8+
9+
When you expand a tag or operation, Swagger-UI will automatically update its URL fragment with a deep link to the item.
10+
Conversely, when you collapse a tag or operation, Swagger-UI will clear the URL fragment.
11+
12+
You can also right-click a tag name or operation path in order to copy a link to that tag or operation.
13+
14+
#### Fragment format
15+
16+
The fragment is formatted in one of two ways:
17+
18+
- `#/{tagName}`, to trigger the focus of a specific tag
19+
- `#/{tagName}/{operationId}`, to trigger the focus of a specific operation within a tag
20+
21+
`operationId` is the explicit operationId provided in the spec, if one exists.
22+
Otherwise, Swagger-UI generates an implicit operationId by combining the operation's path and method, and escaping non-alphanumeric characters.
23+
24+
## FAQ
25+
26+
> I'm using Swagger-UI in an application that needs control of the URL fragment. How do I disable deep-linking?
27+
28+
This functionality is disabled by default, but you can pass `deepLinking: false` into Swagger-UI as a configuration item to be sure.
29+
30+
> Can I link to multiple tags or operations?
31+
32+
No, this is not supported.
33+
34+
> Can I collapse everything except the operation or tag I'm linking to?
35+
36+
Sure - use `docExpansion: none` to collapse all tags and operations. Your deep link will take precedence over the setting, so only the tag or operation you've specified will be expanded.

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "swagger-ui",
3-
"version": "3.0.18",
3+
"version": "3.0.19",
44
"main": "dist/swagger-ui.js",
55
"repository": "[email protected]:swagger-api/swagger-ui.git",
66
"contributors": [
@@ -68,9 +68,10 @@
6868
"redux-logger": "*",
6969
"reselect": "2.5.3",
7070
"sanitize-html": "^1.14.1",
71+
"scroll-to-element": "^2.0.0",
7172
"serialize-error": "2.0.0",
7273
"shallowequal": "0.2.2",
73-
"swagger-client": "3.0.17",
74+
"swagger-client": "3.0.18",
7475
"url-parse": "^1.1.8",
7576
"whatwg-fetch": "0.11.1",
7677
"worker-loader": "^0.7.1",

0 commit comments

Comments
 (0)