Commit Graph

603 Commits

Author SHA1 Message Date
Vladimír Gorej
75a8f34452 chore(deps): bump @babel/runtime-corejs3 from 7.21.5 to 7.22.5 (#8918)
Closes #8904
2023-06-12 15:39:21 +02:00
Vladimír Gorej
7bf0dd921b feat(samples): add support for proper schema merging (#8910)
This change is specific to JSON Schema 2020-12
and OpenAPI 3.1.0.

Refs #8577
2023-06-11 15:35:05 +02:00
Vladimír Gorej
4b0b28518e feat(examples): add support for examples keyword (#8908)
This change is specific to JSON Schema 2020-12
and OpenAPI 3.1.0.

Refs #8577
2023-06-10 17:08:24 +02:00
Vladimír Gorej
6c622a87e7 feat(samples): add support for contentSchema keyword (#8907)
This change is specific to JSON Schema 2020-12
and OpenAPI 3.1.0.

Refs #8577
2023-06-09 21:35:44 +02:00
Vladimír Gorej
1925622113 feat(samples): add support for contentMediaType keyword (#8903)
This change is specific to JSON Schema 2020-12
and OpenAPI 3.1.0.

Refs #8577
2023-06-09 11:37:11 +02:00
Vladimír Gorej
04839642fb feat(samples): add support for contentEncoding keyword (#8899)
This change is specific to JSON Schema 2020-12
and OpenAPI 3.1.0.

Refs #8577
2023-06-08 18:35:03 +02:00
Vladimír Gorej
6549eff278 feat(samples): add support for contains, minContains, maxContains keywords (#8896)
This change is specific to JSON Schema 2020-12
and OpenAPI 3.1.0.

Refs #8577
2023-06-08 14:06:22 +02:00
Vladimír Gorej
1114965782 feat(samples): add support for uniqueItems keyword (#8893)
This change is specific to JSON Schema 2020-12
and OpenAPI 3.1.0.

Refs #8577
2023-06-07 14:21:04 +02:00
Vladimír Gorej
8a914926b3 feat(samples): add support for regex string format (#8891)
This change is specific to JSON Schema 2020-12
and OpenAPI 3.1.0.

Refs #8577
2023-06-07 12:39:04 +02:00
Vladimír Gorej
68cfe46490 feat(samples): support multipleOf keyword (#8890)
This change is specific ti JSON Schema 2020-12
and OpenAPI 3.1.0.

Refs #8577
2023-06-07 11:48:10 +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
836659d8ac feat(samples): support new semantics of exclusive number ranges (#8885)
This change is specific to JSON Schema 2020-12
and OpenAPI 3.1.0.

Refs #8577
2023-06-06 13:49:02 +02:00
Vladimír Gorej
bdad2fe83d feat(samples): add support for const keyword (#8884)
This change is specific to JSON Schema 2020-12
and OpenAPI 3.1.0.

Refs #8577
2023-06-06 11:09:10 +02:00
Vladimír Gorej
3587696d73 feat(samples): add support for type keyword defined as list of types (#8883)
This change is specific to JSON Schema 2020-12
and OpenAPI 3.1.0.

Refs #8577
2023-06-06 10:54:08 +02:00
Vladimír Gorej
28b12338f8 feat(samples): add support for new values of format keyword (#8882)
This change is specific to JSON Schema 2020-12
and OpenAPI 3.1.0.

Refs #8577
2023-06-05 15:12:50 +02:00
Vladimir Gorej
2ce9d08af7 test: align tests with sample plugin changes
Refs #8577
2023-06-01 14:09:02 +02:00
Vladimír Gorej
027f53c302 refactor(samples): move example generation code to samples plugin (#8727)
Refs #8577
2023-06-01 14:09:02 +02:00
Vladimir Gorej
b9c6c6f9d3 Merge branch 'master' into next 2023-05-24 15:51:42 +02:00
Vladimír Gorej
7ac9a8f070 feat(auth): persist cookie based apiKey in document.cookie (#8689)
Refs #8683
2023-05-22 14:46:30 +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
Vladimir Gorej
b4e9544f5f Merge branch 'master' into next 2023-04-26 14:01:09 +02:00
Krzysztof Kowalczyk
cdfc4de43e fix(response-body): remove download button when content is empty (#8579)
Co-authored-by: Vladimír Gorej <vladimir.gorej@gmail.com>
2023-04-26 13:42:49 +02:00
Vladimír Gorej
4db964378b test(core): align test with dependency update (#8512) 2023-03-24 09:40:27 +01: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
Vladimir Gorej
10a2397e81 Merge branch 'master' into next 2023-03-21 14:19:43 +01:00
Vladimír Gorej
4810801f77 feat(oas31): add support for OpenAPI 3.1.0 in VersionPragmaFilter (#8495)
Refs #8492
2023-03-21 11:52:07 +01:00
Vladimír Gorej
47e12f1de3 refactor(oas31): simplify Webhooks component by utilizing selectors (#8481)
Refs #8474
2023-03-17 18:14:23 +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
Enzzo
44e2700c74 fix: decode model schema name on model component (#8400)
Refs #5626
2023-03-13 11:59:44 +01:00
Vladimír Gorej
cab47a36c8 test(core): fix unit test assertion (#8456)
Refs #8403
2023-03-08 13:55:39 +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
Guillaume Tassery
b010b558f1 fix(ui): handle missing schema reference case for discriminant definitions (#8257)
Co-authored-by: Tim Lai <timothy.lai@gmail.com>
2022-10-26 12:14:28 -07:00
ishuen
2a967e9b25 fix(parameters): allowedValues for enum and boolean types (#8231)
* Change parameter with empty map

* Change allowValues data type

Co-authored-by: Tim Lai <timothy.lai@smartbear.com>
2022-10-25 11:01:07 -07:00
kai-morich
94575666c3 fix(oauth2): only display scopes relevant for current endpoint (#8229)
* 'available authorization' popup: only show oauth2 scopes relevant for current endpoint (issue #8219)

* unit tests for oauth2 scope filter

Co-authored-by: Kai Morich <kai.morich@sap.com>
Co-authored-by: Tim Lai <timothy.lai@smartbear.com>
2022-10-24 13:37:49 -07:00
Ahmed Yarub Hani Al Nuaimi
f5bb456ffa feat(example): set discriminated properties to mapped value (#8213) 2022-10-17 16:22:43 -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
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
Tim Lai
b89e88579c fix(jsdom): cumulative Jest updates with support for TextEncoder/TextDecoder (#8111) 2022-07-20 13:15:06 -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
9250e209d4 fix(request-snippets): prevent scrolling errors from missing function (#7941)
* fix(request-snippets): prevent scrolling errors from missing function

* refactor(request-snippets): migrate to functional component

* fix(curl): remove undefined prop and function

* test(live-response): fix import of RequestSnippets
2022-03-24 11:23:42 -07:00