142 Commits

Author SHA1 Message Date
kyy
f464ba2d31 Update swagger-ui
Some checks failed
Node.js CI / build (push) Failing after 2s
Node.js CI / e2e-tests (+(a11y|security|bugs)/**/*cy.js) (push) Failing after 2s
Node.js CI / e2e-tests (features/**/!(o|d|m)*.cy.js) (push) Failing after 2s
Node.js CI / e2e-tests (features/**/+(o|d)*.cy.js) (push) Failing after 2s
Node.js CI / e2e-tests (features/**/m*.cy.js) (push) Failing after 2s
CodeQL / Analyze (javascript) (push) Failing after 2m49s
Security scan for docker image / build (push) Failing after 54s
2025-06-24 13:40:26 +09:00
Oliwia Rogala
26967308e9 feat(oas31): display file upload input when contentMediaType or contentEncoding is present (#10412)
Refs #9278
2025-04-11 15:38:35 +02:00
Oliwia Rogala
c29e7126c9 fix: align OpenAPI 3.x.y file uploads with specification (#10409)
Refs #9278
2025-04-11 13:43:44 +02:00
Oliwia Rogala
d2fff7c746 fix(json-schema-2020-12): avoid accessing properties of null schemas (#10397) 2025-04-02 08:16:08 +02:00
Vladimír Gorej
80d56c9518 feat: apply cumulative update to address various issues (#10324) 2025-02-27 11:12:42 +01:00
Oliwia Rogala
b5c84f44c7 fix(oas31): fix re-rendering of the Webhooks component (#9938)
Refs #9937
2024-05-15 13:52:41 +02:00
Oliwia Rogala
9037acf508 fix(components): add support for oneOf/anyOf JSON Schema keywords in parameter-row rendering (#9934)
Refs #7912
2024-05-14 11:54:44 +02:00
Oliwia Rogala
94f2d8298a fix(components): fix rendering for empty examples in responses (#9926)
Refs #9499
2024-05-10 13:42:33 +02:00
Oliwia Rogala
3bea389715 fix(oas3): compensate for JSON Schemas left unresolved by swagger-client (#9794)
Refs #9790
2024-04-10 08:41:49 +02:00
Vladimír Gorej
111e420c98 fix(oas31): allow override names of top level schemas (#9787)
Refs #9713

Co-authored-by: Oliwia Rogala <oliwia.rogala@smartbear.com>
2024-04-08 13:43:38 +02:00
Oliwia Rogala
ed983eb260 fix(oas3): add support for oneOf/anyOf JSON Schema keywords in request-body rendering (#9767)
Refs #9763
2024-03-29 14:08:48 +01:00
Oliwia Rogala
8086d97e76 fix(oas3): fix getting initial values for request body in OpenAPI 3.x (#9762)
Refs #9745
2024-03-29 13:36:16 +01:00
Oliwia Rogala
32e7ce43d6 fix: avoid rendering empty response schemas (#9667)
Refs #9666
Co-authored-by: Pierre Paysant-Le Roux <ppaysant@gmail.com>
2024-03-06 15:10:29 +01:00
Vladimír Gorej
e2be707d7c fix(oas31): render responses with empty content field (#9664)
Refs #9199
2024-03-06 14:20:45 +01:00
Oliwia Rogala
6154396e06 fix: fix regression in definition resolution (#9658)
Refs https://github.com/swagger-api/swagger-js/issues/3385
Refs #9645
2024-03-01 13:50:04 +01:00
Oliwia Rogala
7300e6c04e fix(oas3): attempt to render schemas not resolved by swagger-client (#9629)
Refs #9513
2024-02-23 11:30:28 +01:00
Oliwia Rogala
0aed3bc831 fix(json-schema-2020-12): expand deeply all Schema Objects and complex keywords (#9581)
Refs #9508
Supersedes #9510

Co-authored-by: Julien Bourges <julien.bourges@actility.com>
2024-02-14 10:16:34 +01:00
Oliwia Rogala
a88bed5130 fix(spec): render response body for non-200 responses (#9555)
Refs #9556
2024-02-07 16:05:00 +01:00
Artur
9a7c4c0593 fix(auth): allow password managers to pre-fill input fields (#9390)
HTML disallows having multiple IDs with the same value.

In reality this is for 1Password's feature where you can create
custom fields named like input IDs and 1Password fill pre-fill that.
2023-11-22 09:48:09 +01:00
Vladimír Gorej
0144dad03d fix(callbacks): display all defined callbacks (#9223)
Refs #9222
2023-09-18 09:26:12 +02:00
Patryk Rosiak
89cdd7b022 feat: add mutualTLS auth option (#9193)
Refs #8020 

Co-authored-by: Vladimír Gorej <vladimir.gorej@smartbear.com>
2023-09-13 15:32:35 +02:00
Vladimír Gorej
d89726a24b feat(deps): integrate swagger-client@3.22.0 (#9202) 2023-09-13 10:43:27 +02:00
Jelle Aret
2c04153614 feat(a11y): provide additional context for authorization and logout button (#8999)
Refs #8998

Co-authored-by: Vladimír Gorej <vladimir.gorej@gmail.com>
2023-09-07 10:00:03 +02:00
Krzysztof Kowalczyk
4b48e36c09 feat(info): indicate OpenAPI 2.0 definition version (#9167) 2023-08-31 13:09:48 +02:00
Vladimír Gorej
377b54a998 fix(ui): change copy to clipboard button location (#9111)
Refs #8465
Refs #8153
Refs #8131
2023-08-16 16:43:31 +02:00
Vladimír Gorej
3e81a4f897 chore(deps-dev): update cypress to v12 (#8889)
This update required changing the configuration
and test directory structure. Some tests needed
to be amended as well to compensate for new
Cypress APIs.
2023-06-07 10:25:32 +02:00
Vladimír Gorej
872e382c5f fix(oas31): fix deep linking for Webhooks and Callbacks (#8680)
Refs #8679
2023-05-16 14:57:00 +02:00
Vladimír Gorej
16224263d1 feat(oas31): add support for OpenAPI 3.1.0 badge (#8502)
Refs #8501
2023-03-23 10:13:20 +01:00
Vladimír Gorej
8b274414ab refactor(oas31): concentrate OpenAPI 3.1.0 code to separate plugin (#8475)
Refs #8474
2023-03-16 12:05:19 +01:00
Vladimir Gorej
187b0e743d Merge branch 'master' into next 2023-03-08 10:31:48 +01:00
Vladimír Gorej
21cfda392f test(cypress): fix tests flakiness by stubbing httpbin.org requests (#8410)
Closes #8409
2023-02-23 16:15:44 +01:00
Tim Lai
4557b2497b feat: OpenAPI 3.1 support (#8367)
- New top-level field - `webhooks`. This allows describing out-of-band webhooks that are available as part of the API.

- New top-level field - `jsonSchemaDialect`. This allows defining of a default `$schema` value for Schema Objects

- The Info Object has a new `summary` field.

- The License Object now has a new `identifier` field for SPDX licenses. This `identifier` field is mutually exclusive with the `url` field. Either can be used in OpenAPI 3.1 definitions.

- Components Object now has a new entry `pathItems`, to allow for reusable Path Item Objects to be defined within a valid OpenAPI document.

- `License` and `Contact` components are now exported and available via `getComponent`

- New version predicates and selectors for `isOpenAPI30` and `isOpenAPI31`. This avoids needing to change the usage of `isOAS3` selector.

- New OAS3 components: `Webhooks`

- New OAS3 wrapped components: `Info`, `License`
2023-02-03 14:06:56 -08:00
Mathias Spanhove
ffe24d5a83 fix(try-it-out): reset of oas3 requestBody should use default values (#8265)
Co-authored-by: Mathias Spanhove <mathias.spanhove@katoennatie.com>
2022-11-08 15:23:19 -08: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
Dan Wallis
130a1be133 feat(try-it-out): display validation error messages (#8212) 2022-10-14 09:36:13 -07:00
Tim Lai
4b5d4bda96 fix(xml): render example with oneOf/anyOf (#8206)
* test(e2e): render xml example with oneOf/anyOf
2022-09-28 14:33:58 -07:00
twjasa
6c03465257 fix: expand model if depth <= defaultModelExpandDepth (#8186) 2022-09-21 15:57:37 -07:00
Chad Knight
94c70e21cd fix(plugin): allow Topbar plugin to read url param on load (#8168)
* fix(plugin): allow Topbar plugin to read url param on load

* fix(plugin): add cypress tests for topbar w/o query config
2022-09-21 13:24:00 -07:00
Fabian Schneider
6ae2693d47 feat: Render external docs links and descriptions (#7559)
Co-authored-by: Tim Lai <timothy.lai@smartbear.com>
2022-08-17 10:42:36 -07: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
Tim Lai
41f84aad05 fix: set yaml parser load option to JSON_SCHEMA (#8023) 2022-05-12 15:51:38 -07:00
Maciej Matyjas
abeb168696 fix(ui): avoid empty div when there are no externalDocs (#7997)
* fix(ui): avoid empty div when there are no externalDocs

* test(ui): existence of externalDocs div when present/absent from spec
2022-05-12 15:45:14 -07:00
Tim Lai
7b06ac1b7c test(oath): for authorization bearer (#7936) 2022-03-23 14:29:02 -07:00
Anne Stellingwerf
a89c90ec77 fix(oauth2): generate default oauth2RedirectUrl based on page location and path (#7476)
Co-authored-by: Tim Lai <timothy.lai@gmail.com>
2022-02-01 16:25:52 -08:00
Tim Lai
a0e9923dd5 fix(serverVariables): refresh state on definition change (#7821)
* fix(serverVariables): refresh state on definition change

* test(serverVariables): urls with server variables assertions
2022-02-01 15:57:33 -08:00
Christian Egli
c6d8d779d0 feat: do not ask for client secret when using auth code with PKCE (#7438)
Co-authored-by: Ignacio Lozano <nacholozano@gmail.com>
Co-authored-by: Vladimir Gorej <vladimir.gorej@gmail.com>

Refs #6290
2022-01-26 10:56:09 +01:00
Vladimir Gorej
302c483f0a revert: add wait time for bugs/5043 to resolve spec (#7769) (#7775)
Refs affd4b9
2022-01-19 13:51:52 +01:00
Tim Lai
affd4b9e7e test(cypress): add wait time for bugs/5043 to resolve spec (#7769) 2022-01-18 15:34:12 -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
Calvin Gonzalez
8ffb1aef97 fix(a11n): provide proper a11n for response example tabs (#7464)
- Update tabs to use <button> elements instead of <a>
- Add aria roles for tablist, tabs, and tabpanel
- Add aria attributes for additional a11y compliance and screen reader accessibility
- Replace ids with data-name attribute for tabpanels
- Add cypress test 7463 and update swos-63
- Move tabs test file to tests/a11y directory
- Rename test file to be more descriptive of what is being tested.
- Add id attributes to both tabs and tabpanels to leverage aria-controls and aria-labelledby attributes

Co-authored-by: Calvin Gonzalez <calvin.gonzalez@oddball.io>
Co-authored-by: Vladimir Gorej <vladimir.gorej@gmail.com>

Closes #7463
Refs #7350
2021-09-17 09:19:55 +03:00