Commit Graph

67 Commits

Author SHA1 Message Date
Vladimír Gorej
80d56c9518 feat: apply cumulative update to address various issues (#10324) 2025-02-27 11:12:42 +01:00
Vladimír Gorej
fb55b9cfe4 feat(analytics): use Scarf.js to provide anonymized installation analytics (#10194) 2024-11-05 14:30:13 +01:00
Oliwia Rogala
df03a8f99c fix(swagger-ui-react): re-render on spec prop change (#9966)
Refs #9965
2024-05-27 13:06:07 +02:00
Oliwia Rogala
6ae2c1fb15 fix(swagger-ui-react): display definition defined as YAML or JSON string (#9918)
Refs #9915
2024-05-07 10:02:31 +02:00
Vladimír Gorej
3f67b08b18 fix(swagger-ui-react): call onComplete hook with system instance (#9895)
Refs #9876
2024-04-30 12:02:53 +02:00
Oliwia Rogala
8c90d5d9d0 fix: distribute proper source maps in npm distribution packages (#9877)
Refs #9101
2024-04-30 11:11:31 +02:00
Oliwia Rogala
333e5e38d6 fix(config): remove system config source (#9875)
Refs #5148
2024-04-25 16:02:15 +02:00
Vladimír Gorej
17d50a6ab5 feat(config): expose config and make it overridable (#9862) 2024-04-22 14:37:04 +02:00
Vladimír Gorej
351191bc57 feat(swagger-ui-react): rewrite into SSR compatible function component (#9855)
Refs #9243
2024-04-22 13:49:20 +02:00
Vladimír Gorej
3a671c61d3 fix(swagger-ui-react): avoid triggering implicit system rendering (#9847)
Refs #9846
2024-04-19 08:28:30 +02:00
Oliwia Rogala
bcd7388a2d fix(config): sync SwaggerUI default options with swagger-ui-react (#9843)
Refs #9838
2024-04-18 16:09:39 +02:00
Oliwia Rogala
7378821669 fix(config): cast configuration values into proper types (#9829)
Refs #9808
2024-04-18 11:04:05 +02:00
Vladimír Gorej
532f8de2e2 fix(swagger-ui-react): align React versions with swagger-ui (#9465) 2024-01-08 10:51:55 +01:00
Vladimír Gorej
955c0ddbac build(babel): use browserslist explicitly (#9207) 2023-09-13 15:08:15 +02:00
Vladimír Gorej
70b01404a7 fix(swagger-ui-react): fix build scripts and allow releasing (#9191)
Refs https://github.com/swagger-api/swagger-ui/releases/tag/v5.6.0
2023-09-05 15:17:06 +02:00
Vladimír Gorej
113996f627 feat(json-schema): expose API that generates examples from JSON Schema (#9190)
This allows to use the samples API in a static way
without fully instantiating SwaggerUI.

Refs #9188
2023-09-05 14:13:53 +02:00
Vladimír Gorej
d9c5e4985b docs(README): remove mention about Next.js workaround (#9157)
Refs https://github.com/swagger-api/swagger-ui/wiki/Seamless-Integration-with-Bundlers-&-Test-Tools
2023-08-22 17:04:32 +02:00
Vladimír Gorej
6aa1b445b9 fix(swagger-ui-react): fix corrupted exports field from package.json (#9144)
Refs #9143
2023-08-17 20:23:04 +02:00
Vladimír Gorej
73a726d1b3 docs(swagger-ui-react): drop claim about no custom plugins support (#9058) 2023-07-25 11:25:23 +02:00
Vladimír Gorej
21a2ef5b70 fix(swagger-ui-react): re-enable SSR support (#9035)
SSR support was re-enabled by passing the oauth2RedirectUrl
prop only when defined.

Refs #8976
2023-07-18 09:43:39 +02:00
Vladimír Gorej
990ff7d3f2 fix(swagger-ui-react): fix default value for spec prop (#9025)
Default value must be set to  (empty string) and
not to {} (empty object).

Refs #8976
2023-07-17 10:24:36 +02:00
Oleksandr Redko
a62d340120 docs(swagger-ui-react): fix a typo in README (#9016) 2023-07-14 13:44:42 +02:00
Vladimír Gorej
f287339280 fix(swagger-ui-react): use correct default prop values (#8976) 2023-06-30 16:14:32 +02:00
Martin Eigenmann
51385fe14f docs(swagger-ui-react): hint on usage with Next.js (#8696)
Co-authored-by: Vladimír Gorej <vladimir.gorej@gmail.com>

Refs #7970
Refs #8245
2023-05-24 12:26:41 +02:00
afrkorsakow
6b56e3828e feat(swagger-ui-react): add showCommonExtensions option (#8436) 2023-03-07 15:25:08 +01:00
Lars Nymand Jensen
03a981ae4f feat(swagger-ui-react): Add oauth2RedirectUrl prop (#8028) 2022-05-25 09:46:11 -07:00
Simon Podlipsky
31717dbb38 feat(swagger-ui-react): Add withCredentials prop (#7980)
Co-authored-by: Tim Lai <timothy.lai@gmail.com>
2022-05-02 14:25:36 -07:00
Tim Lai
51bd1c290d fix(lint): additional directories to lint with fixes (#7947) 2022-03-25 11:07:51 -07:00
Vladimir Gorej
3296e2e429 feat(swagger-ui-react): export presets and plugins as static props (#7927)
Closes #7923
2022-03-22 13:20:51 +01:00
Vladimir Gorej
5874d2be4f fix(swagger-ui-react): amend prop validation for plugins (#7900)
plugins prop can be defined as list of function as well.
2022-03-10 12:15:21 +01:00
Airam
544d16da35 fix(swagger-ui-react): fix prop type for plugins (#7877)
Co-authored-by: Tim Lai <timothy.lai@gmail.com>
2022-03-02 11:15:44 -08:00
Tim Lai
07d346b516 feat(build): webpack@5 and webpack-dev-server@4 (#7826)
SwaggerUI is now built using `webpack@5`, with dev support for `webpack-dev-server@4`
- ES Module output bundle path now points to `swagger-ui-es-bundle-core`, which does not include dependencies
- No change to CommonJS output bundle or path
- Now uses Asset Modules, which replaces `file-loader`, `raw-loader`, and `url-loader`
- Removed unused rules/loaders for `.woff | .woff2 | .ttf | .eot` fonts and html
- Node polyfills are no longer bundled with `webpack@5`, and must be loaded separately and/or use `resolve.fallback`. 
As an example, SwaggerUI loads `process`, `buffer`, and `stream-browserify` as `devDependencies` in order to build development and production bundles.

SwaggerUI-React
- Now imports `swagger-ui-es-bundle-core`, and similarly outputs `swagger-ui-es-bundle-core` to its `dist` directory

Dev notes:
- Order of execution matters for the production npm build scripts. `build-stylesheets` needs to get built first, 
then cleanup of any empty artifacts, before building the various production bundles
- `Dev-helpers` now relies on `HTMLWebpackPlugin` to inject css and bundle files
2022-03-01 12:08:50 -08:00
kyori19
67dd4f6a8d feat(swagger-ui-react): add support for persistAuthorization prop (#7842)
Closes #7389
2022-03-01 10:54:03 +01:00
Vladimir Gorej
a81341d25f fix(swagger-ui-react): load spec on initial render (#7856)
Refs #7578
2022-02-21 20:12:36 +01:00
Vladimir Gorej
6b1070814c fix(swagger-ui-react): fix prop type for defaultModelRendering
Refs #7783
2022-01-24 16:33:45 +01:00
Tim Lai
b1e94733b5 chore(deps-dev): @babel plugins needed to build swagger-ui-react (#7779)
* chore(deps-dev): @babel plugins needed to build swagger-ui-react

* chore(swagger-ui-react): remove unused require `fs`
2022-01-19 09:46:15 -08:00
Mahtis Michel
85597b9a94 feat(swagger-ui-react): Enable displayRequestDuration prop (#7522)
* feat(react): allow displayRequestDuration via react

* docs(react): added displayRequestDuration prop

* Update flavors/swagger-ui-react/README.md

Co-authored-by: Vladimir Gorej <vladimir.gorej@gmail.com>
Co-authored-by: Tim Lai <timothy.lai@gmail.com>
2022-01-18 10:24:34 -08:00
Alex Rejto
6273fd1dd8 feat: add support of defaultModelRendering prop to swagger-ui-react
Co-authored-by: Tim Lai <timothy.lai@gmail.com>
2022-01-12 14:31:55 -08:00
Xavier Fournet
e6ea523e7c Add source map of js files to swagger-ui-react (#7717)
Co-authored-by: Tim Lai <timothy.lai@gmail.com>
2022-01-12 13:59:50 -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
Andriy Semenyuk
b71446caa0 feat(swagger-ui-react): add support of filter prop (#7547)
Co-authored-by: Mahtis Michel <mathis.michel@outlook.de>
Co-authored-by: Vladimir Gorej <vladimir.gorej@gmail.com>

Closes #7546
2021-11-08 13:08:15 +01:00
Mahtis Michel
3fea224a7d feat(swagger-ui-react): add request snippets configuration (#7536)
Closes #7523
2021-11-08 12:13:32 +01:00
Vladimir Gorej
4a78313ebf fix(swagger-ui-react): add showExtension propType
Refs #5892
2021-11-08 10:07:21 +01:00
glebbash
d7ec726886 feat(swagger-ui-react): add showExtensions option (#7563)
Closes #5892
2021-11-08 09:37:28 +01:00
Florian Dreier
83021df9b0 fix: add source map of css file to swagger-ui-react (#7601)
Fixes source map of css file missing in swagger-ui-react.
The source map is referenced in ./dist/swagger-ui.css,
but as it does not exist in the final package creates errors in our tooling.
2021-11-05 16:11:56 +01:00
Vladimir Gorej
d018e8a25a build(swagger-ui-react): align version of React with SwaggerUI
Refs #7341
2021-11-03 09:49:50 +01:00
Vladimir Gorej
bd75178241 docs(LICENSE): apply Apache 2.0 License correctly (#7574)
Closes #6635
2021-11-02 23:44:28 +01:00
Tim Lai
e538e26314 fix(swagger-ui-react): src filename extension to transpile (#6876) 2021-01-28 11:23:51 -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
Vladimir Gorej
a6673d7c60 feat(swagger-ui-react): add support for layout prop (#6639)
layout prop represents the name of a component available
via the plugin system to use as the top-level
layout for Swagger UI.
2020-11-19 14:12:32 -08:00