Commit Graph

126 Commits

Author SHA1 Message Date
Kaiser
eca052d0a5 (docs): fix small typo in version-detection (#8032) 2022-05-25 09:54:49 -07:00
Vlad I
381017b485 docs: fix IU -> UI typo (#8001)
Co-authored-by: Tim Lai <timothy.lai@gmail.com>
2022-05-02 14:50:52 -07:00
ericlingit
db2e854ab1 docs: update standalone installation instruction (#7991)
Co-authored-by: Tim Lai <timothy.lai@gmail.com>
2022-05-02 14:36:20 -07:00
Tim Lai
177240c26e docs(dev): update dev-helpers installation (#7948) 2022-03-25 12:09:04 -07:00
Christopher Giroir
c81d7f0f30 feat(docker): add OAUTH_USE_BASIC_AUTH env (#7474)
Makes the last `initOAuth` variable configurable via environment
variables in the swagger-ui docker image.

Co-authored-by: Christopher Giroir <chrisgiroir@improbable.io>
Co-authored-by: Tim Lai <timothy.lai@gmail.com>
2022-03-21 13:53:07 -07:00
Marc Würth
09a403f382 docs: move summary to README (#7816)
* Move documentation summary to docs README

* Delete SUMMARY.md

Co-authored-by: Tim Lai <timothy.lai@gmail.com>
2022-03-02 11:55:02 -08:00
Vladimir Gorej
8158d7e394 docs(installation): provide full example of unpkg usage (#7832)
Refs #7709
2022-02-09 11:07:33 +01:00
Vladimir Gorej
8b1c4a7c1a feat(error-handling): introduce unified and configurable error handling (#7761)
Refs #7778
2022-01-24 16:12:13 +01:00
Mahtis Michel
87226bc47d docs(request-snippet): document request snippets plug points (#7524)
Co-authored-by: Tim Lai <timothy.lai@gmail.com>
2022-01-12 14:39:00 -08:00
Vladimir Gorej
01a3e55960 fix(security): disable reading config params from URL search params (#7697)
Reading configuration parameters from URL search params 
is by default no longer enabled. To re-enable it, set queryConfigEnabled
configuration parameter to true.

Functionally, this is a breaking change, but given we're just providing
a security vulnerability patch we're considering this a PATCH version bump
only.

Refs #4872
Refs https://github.com/swagger-api/swagger-ui/security/advisories/GHSA-qrmm-w75w-3wpx
2021-12-09 17:28:17 +01:00
Vladimir Gorej
c7b215b6bb docs(configuration): document requestSnippetsEnabled config option
Along with that fix formatting of request snippet
value.
2021-11-08 11:50:00 +01:00
Vladimir Gorej
5cc7ff937d docs(configuration): fix wrong property name
languagesMask property is not recognized by SwaggerUI.
languages property is recognized propertly.

Refs #7505
2021-09-16 16:54:16 +03:00
Vladimir Gorej
8daf4e43b3 fix(deps): bump swagger-client to v3.14.1 (#7440)
This sets minimum Node.js version to >=12.4 and
fixes problem with swagger-ui.js build fragment.

Refs #7436
2021-07-30 11:36:20 +02:00
Tim Lai
1032d927a5 chore: prep repo for node.js v10 EOL (#7359) 2021-06-22 14:07:37 -07:00
Damien
516e666f1c feat(wrapComponents): new chain configuration option (#7236)
This commit provides a backward compatible mechanism to chain wrap 
an individual component multiple times

`Chain` mode: allow chaining of plugins on a given component
`Legacy` mode: last plugin to wrap a given component will supercede others

* chore: Add unit test for wrapComponent wrapping

* doc: Add documentation about the new pluginsOptions configuration

* doc: Add a sidenote on plugin-api page

Co-authored-by: Tim Lai <timothy.lai@gmail.com>
2021-05-20 15:41:11 -07:00
Костя Третяк
f239965cbc feat(docs): make webpack-getting-started more universal (#7191) 2021-04-20 14:16:53 -07:00
Tim Lai
2373a83fe2 feat: remove node_native option from request snippets plugin (#7181)
* snippet generator support intended for different shell options only
* will not maintain snippet generator for various languages
2021-04-14 10:55:31 -07:00
Mahtis Michel
8405fa0101 feat: request snippets plugin (#6910) 2021-03-10 11:02:34 -08:00
Mahtis Michel
ba74c02951 feat(docs): sample datepicker plugin with json schema components (#6939)
* Document JSON schema components, its mappings and give example how to create a date picker for type: string format: date and format: date-time.
2021-02-16 16:39:26 -08:00
Kyle Hoskins
265bdc07b7 feat: add tryItOutEnabled configuration (#6865)
* feat: add tryItOutEnabled configuration

allow users to set tryItOutEnabled: true to display
the "Try it out" section by default

tryItOutEnabled to take === "true" for the
query string value or === true if someone
implements query string type parsing in the query
2021-01-26 09:00:38 -08:00
Amir Bitaraf Haghighi
a7ba55ad03 feat(docker): add docker support for persist authorization variable (#6832) 2021-01-13 13:23:44 -08:00
Eneko Alonso
5b70866f7c Improve documentation for Standalone plain HTML installation (#6605)
* Plain old HTML instructions

* Add sites for Standalone HTML installation
2020-11-18 19:18:39 -08:00
Shelby Sanders
6a4e52aadb feat: support for showExtensions on Response objects (#6535) 2020-10-21 18:49:39 -07:00
Adam Stachowicz
5fc43faef1 docs: update setting-up.md (#6492)
* Remove `npm install` from steps
2020-10-14 19:51:48 -07:00
Mahtis Michel
deeff4b42c docs(docker): add docker-compose env file configuration example (#6465) 2020-10-07 16:33:55 -07:00
Adam David
cbe99c8c1a feat(curl): configuration setting to pass additional options to curl command for "Try it out" (#6288)
Allows `requestInterceptor` to add options to the curl command.
For example:

```js
requestInterceptor: function (request) {
  if (request.method === 'GET') {
    request.curlOptions = ['-g']
    request.url = request.url
      .replace('%5B', '[')
      .replace('%5D', ']')
      .replace('%2C', ',');
  }
  return request;
}
```
2020-09-22 11:14:51 -07:00
Amir Bitaraf Haghighi
96aecc8860 feat: Preserve authorization on browser refresh and close/reopen (#5939)
* Add default configuration `preserveAuthorization`

* Add localStorage to auth plugin

* Add persistAuthorization unit tests

* Refactor persistAuthorization to use wrapped actions

* Upgrade unit tests to be compatible with jest

* Add persistAuthorization documentation


Co-authored-by: Tim Lai <timothy.lai@gmail.com>
2020-09-11 14:05:37 -07:00
Tim Lai
f79e45be71 chore: update .gitignore with dev-helpers/examples (#6373)
* docs: update setting-up.md with local dev
2020-09-09 17:30:14 -07:00
Tim Lai
1a27c0a8bd feat: migrate unit tests to Jest (#6353)
* config(jest): updated setup
* config(jest): update testMatch to include jsx files
* config(jest): add transformIgnorePatterns
* config(jest): update ignore files that do not work in jest yet
* config: add test:unit-jest to test script

* fix(jest): lint with eslint-plugin-jest

* refactor(jest): move unit test directory
* refactor(mocha): restore mocha tests that fail in jest

* docs(jest): update helpful scripts with test:unit-jest
2020-09-01 10:41:01 -07:00
PoojaChandak
959b48ad3d docs: various minor grammatical changes (#6284)
* Update README.md
* Update setting-up.md
* Update plug-points.md
* Update plugin-api.md
* Update configuration.md
* Update deep-linking.md
* Update installation.md


Co-authored-by: Tim Lai <timothy.lai@gmail.com>
2020-08-24 16:54:48 -07:00
Tim Lai
e1573527de docs(scripts): update building and testing scripts (#6298) 2020-08-13 19:53:16 -07:00
Irena Shaigorodsky
d7d166d0a4 fix: specify charset utf-8 in html script declaration (#6278)
ref: #5311
2020-07-31 16:51:17 -07:00
Helen Kosova
887563ab79 docs: Improve descriptions of syntaxHighlight parameters (#6242) 2020-07-28 16:46:25 -07:00
Tim Lai
a73783b73d feat: syntax highlighting of code section (#6236)
Co-authored-by: AdrieanKhisbe <adriean.khisbe@live.fr>
2020-07-17 15:29:15 -07:00
Tim Lai
b3fc05b3fe fix: prevent CI trigger from docs/samples/webpack-getting-started (#6145)
* README updated
* renamed package.json to _sample_package.json
* removed package-lock.json
2020-06-15 12:54:43 -07:00
Shaun Luttin
75a2b9a5cc Demonstrate a simple Webpack setup (#5185) 2020-06-15 11:20:08 -07:00
Vladimir Gorej
a616cb471d fix(Markdown): render markdown in more secure way
This commit changes markdown sanitization behaviour in following way:

class, style and data-* attributes are removed by default. These attributes
open possible vulnerability vectors to attackers.

The original behavior of sanitizer (before this commit) can be enabled by *useUnsafeMarkdown* configuration option.
Use this configuration option with caution and only in cases when you know
what you're doing.
2020-06-11 21:51:15 +02:00
Wesley Schwengle
117dcc9b16 Disable the validation badge for those who do not want it (#5994)
* disabled on string values: "127.0.0.1", "localhost", "none"
2020-06-10 15:31:35 -07:00
Matthew Morrissette
275c8f2ccf improvement: oauth "scopes" improvements (#6037)
* improvement: oauth "scopes" init parameter

* improvement: add "select all" and "select none" to oauth scopes popup
2020-06-10 11:27:54 -07:00
Tim Lai
ba953aaa91 docs: update plugin api component for failSilently (#5953) 2020-04-12 22:36:11 -04:00
Dina Berry
a2b37ec157 housekeeping: add static distribution file documentation (#5095)
Co-authored-by: kyle shockey <kyle.shockey1@gmail.com>
2020-03-08 21:40:04 -04:00
Tim Lai
67f9f8e1ba docs: update prerequisites for development (#5902) 2020-03-05 14:26:54 -08:00
Roman Soldatow
2dc499cddc housekeeping(docs): https path for unpkg link (#5769)
Co-authored-by: kyle shockey <kyleshockey@gmail.com>
2020-01-04 19:26:21 -05:00
poveilleux
139592e353 feat: add PKCE support for OAuth2 Authorization Code flows (#5361)
* Add PKCE support.

* Fix tests

* Update oauth2.md

* Rename usePkce

* Fix the BrokenComponent error

* Update oauth2.md

* Remove isCode variable. Remove uuid4 dependency.

* Remove utils functions

* Import crypto

* Fix tests

* Fix the tests

* Cleanup

* Fix code_challenge generation

* Move code challenge and verifier to utils for mocks. Update tests.

* Mock the PKCE methods in the utils file properly.

* Add missing expect

* use target-method spies

* Add comments to explain test values.

* Get rid of jsrsasign.
2019-10-07 17:24:43 -07:00
kyle
8cabcffddf housekeeping: document Docker OAUTH2_REDIRECT_URL option (#5641) 2019-10-02 20:23:05 -07:00
Fergus McDowall
81cc06f4f8 housekeeping: change git clone URL (#5612)
When `git clone` -ing from github, `https` URLs are (as far as I know) functionally equivalent yet less error prone.
2019-09-26 19:47:29 -07:00
kyle
94c86d3d50 improvement: online.swagger.io -> validator.swagger.io (#5599) 2019-09-09 21:33:23 -07:00
Helen Kosova
43db164a91 docs: clarify that preauthorizeApiKey works for OAS3 Bearer auth too (via #5566) 2019-08-26 16:09:05 -07:00
Ryan Stephen
1b0efbeb16 Grammar syntax correction (#5512)
Tense correction and clarity on line 44.
2019-08-06 16:50:45 -06:00
Helen Kosova
8822a7229a Change Swagger-UI -> Swagger UI in docs (#5479)
* Change Swagger-UI -> Swagger UI in docs

* Changed back to SwaggerUI in places that refer to JS construct
2019-07-19 09:22:45 -06:00