Commit Graph

147 Commits

Author SHA1 Message Date
Oliwia Rogala
333e5e38d6 fix(config): remove system config source (#9875)
Refs #5148
2024-04-25 16:02:15 +02:00
Daniel Kaneider
46c849b0b3 docs(configuration): fix wrong syntaxHighlight option name (#9776) 2024-04-10 10:46:18 +02:00
shandongbinzhou
c0e3eb63d0 docs: remove repetitive word in docs (#9764)
Signed-off-by: shandongbinzhou <shandongbinzhou@outlook.com>
2024-03-29 08:37:11 +01:00
Vladimír Gorej
7addbd0eb5 test: consolidate unit tests (#9588)
All mocha tests have been migrated to Jest tests.

Closes #9564
2024-02-14 11:39:40 +01:00
Anton Gilgur
b081848230 docs(installation): update unpkg usage instructions (#9489) 2024-02-08 10:47:14 +01:00
Vladimir Gorej
71dc5475e9 docs(installation): remove leftover docker run command 2024-01-29 11:06:53 +01:00
Vladimír Gorej
0b34548380 docs(installation): add docs about EMBEDDED env var (#9526) 2024-01-29 11:01:10 +01:00
Yanqi Zong
bb04915809 docs(customl-layout): append swagger-ui css class (#9329)
To display style properly, we need to add className="swagger-ui"
to the layout.
2023-11-10 14:03:32 +01:00
Vladimír Gorej
aea093dbf8 build: use Node.js =20.3.0 for local dev env (#9204) 2023-09-13 10:54:06 +02:00
Vladimír Gorej
edd1153723 feat: expose plugins and presets on SwaggerUI global symbol (#9189)
Part of this commit is also:
- complete plugins consolidation
- complete presets consolidation
- build system consolidation

Refs #9188
2023-09-05 09:56:51 +02:00
Filip Seman
1b6391c943 feat(syntax-highlighter): add light variant called "idea" (#8938) 2023-08-17 11:46:07 +02:00
Adam Davis
62abd787aa docs(setting-up): fix dev-helper-initializer.js file name (#9024) 2023-07-24 10:06:30 +02:00
Vladimír Gorej
1f7bb89217 refactor(docker): use templating to handle env variables (#8878)
Refs #8877
2023-06-02 16:05:08 +02:00
Vladimír Gorej
11957fb868 chore: regenerate package-lock.json (#8411)
package-lock.json was regenerated using Node@16.13.2
and npm@8.1.2. Along with that, these Node.js and npm
versions were set to .nvmrc file.

Given that the dependency tree now changed,
webpack config resolve aliases needed to be
amended to reflect the current dependency tree.
2023-02-23 16:34:17 +01:00
Andreas Born
7b0ac1ae28 fix: show client secret input for PKCE auth code flow (#8268)
* fix: show client secret input for PKCE auth code flow

PKCE and Client Secrets are allowed to coexist and neither is designed
as a replacement for the other. [1] It is wrong to assume that a client
secret must not or cannot be used in combination with PKCE. Quite the
opposite, when possible both PKCE and client secret should be used. [2]
So the premises of #6290 and #8146 are not correct.

Admittedly, for users of the PKCE mechanism WITHOUT a client secret it
might be a minor nuisance to see the client secret input in the Swagger
UI. But they can just leave it empty. On the other hand, for users of
the PKCE mechanism WITH a client secret it is more than just a nuisance
if the client secret input is not shown. The Swagger UI becomes unusable
for them (unless they've set a default value for the client secret,
which will be used hiddenly without being shown to the user).

Therefore the right course of action for now would be to revert #7438 to
show the client secret input always regardless of PKCE. In the future a
new flag could be introduced to hide the client secret input regardless
of the PKCE flag.

[1] https://oauth.net/2/pkce/
[2] https://www.oauth.com/oauth2-servers/pkce/

* docs: explain why client secret input is shown despite PKCE
2022-11-04 15:46:38 -07:00
An Tran
82e3290de4 docs(samples-webpack): updated config and dependencies (#8184) 2022-09-21 16:06:52 -07:00
Vladimir Gorej
7dd167b626 docs(setting-up): reword how SwaggerUI reflects Node.js releases (#8142)
Refs b89e88579c
2022-08-17 10:58:06 +02:00
Andreas Deininger
9891d97201 docs: fix typos and update https references (#8154)
Co-authored-by: Tim Lai <timothy.lai@smartbear.com>
2022-08-12 10:14:27 -07:00
Blueswen
5ec44d58bc docs: fix typos (#8133)
Co-authored-by: Tim Lai <timothy.lai@smartbear.com>
2022-08-01 14:18:37 -07:00
Mahtis Michel
878e848b9b feat: provide Topbar Logo as a wrappable component (#7521)
* docs(logo): added logo replace docs

Co-authored-by: Tim Lai <timothy.lai@gmail.com>
2022-07-18 13:55:26 -07:00
Max Horstmann
1bb70a2996 docs(usage): add installation section for SWAGGER_JSON_URL (#8036)
Co-authored-by: Tim Lai <timothy.lai@gmail.com>
2022-05-27 11:56:28 -07:00
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