Commit Graph

2085 Commits

Author SHA1 Message Date
Vladimir Gorej
b299be764f fix: introduce Error Boundaries to handle unexpected failures (#7671)
Two new components have been updated via plugin system: ErrorBoundary and Fallback.
These components can be overridden by user plugins.

Refs #7647
2021-11-25 13:47:22 +01:00
Vladimir Gorej
7cc2657699 fix(highlight-code): fix regression code highlight behavior
Refs #7603
2021-11-05 11:54:14 +01:00
Vladimir Gorej
fb7e98a431 fix(servers): prevent UI crash when chaning Server with variables
Closes #7525
2021-11-04 16:27:27 +01:00
Vladimir Gorej
e3640739a4 fix(root-inject): handle errors in functional components properly 2021-11-03 09:49:50 +01:00
Vladimir Gorej
46b4e5cf3f fix(highlight-code): handle mousewheel events properly
SyntaxHighlighter component doesn't support ref. We had
to use different approach to finds it's DOM Node using
ref of the root Node of the render tree for HighlightCode
component.

Refs #7497
2021-11-03 09:49:50 +01:00
Vladimir Gorej
c31cb3079a feat: allow using functional components with hooks 2021-11-03 09:49:50 +01:00
Mahtis Michel
5a5a27e9d5 fix(param-body): fix loosing focus in Try It when typing (#7548)
Originally reported as SWOS-418

Closes #7477
2021-11-03 09:49:50 +01:00
Vladimir Gorej
8553943875 refactor(highlight-code): add UNSAFE prefix for lifecycle methods
Refs #7497
2021-11-03 09:49:50 +01:00
Vladimir Gorej
1283f523e7 fix(servers): compensate when server list contains a null value
Refs https://github.com/swagger-api/swagger-editor/issues/2761
Refs https://github.com/swagger-api/swagger-editor/issues/2710
Refs #7341
2021-11-03 09:49:50 +01:00
Vladimir Gorej
8c79e2a375 refactor: prefix lifecycle methods with UNSAFE_
Refs #7341
2021-11-03 09:49:50 +01:00
Vladimir Gorej
cf9a3657cc chore(deps): replace @kyleshockey/* deps with originals
@kyleshockey/object-assign-deep - replaced by lodash/merge. If behavior
not be compatible well use lodash/mergeWith.

@kyleshockey/xml - by installing stream library directly, we can use origin
xml library without the fork.

Refs #7341
2021-11-03 09:49:50 +01:00
Vladimir Gorej
ef0255f742 chore(deps): replace react-motion library for obj. literal
Refs #7341
2021-11-03 09:49:50 +01:00
Vladimir Gorej
6441ef78a2 chore(deps): update react-inspector to v5.1.1
Refs #7341
2021-11-03 09:49:50 +01:00
Vladimir Gorej
5bfd2d8df1 test(e2e-cypress): fix all failing tests for this script
Problem was with an obsolete and no longer supported
Perf tool for React. Reference to it have been removed.

Refs #7341
2021-11-03 09:49:50 +01:00
GhBogdan97
f5b0446992 fix(ui): eliminate copy button icon misaligned in Firefox (#7542)
Closes #7481
2021-10-19 20:54:43 +03:00
Vladimir Gorej
0fc429fd75 fix(highlight-code): handle mousewheel events properly (#7554)
SyntaxHighlighter component doesn't support ref. We had
to use different approach to finds it's DOM Node using
ref of the root Node of the render tree for HighlightCode
component.

Refs #7497
2021-10-12 20:50:40 +03:00
Sviataslau Hankovich
a740f3d32e fix: remove redundant whitespaces in API key auth popup (#7538) 2021-10-08 16:52:32 +03:00
Mahtis Michel
90c8a73177 fix: rename request snippets configuration props (#7535)
Closes #7534
2021-10-08 16:19:00 +03:00
Vladimir Gorej
491d64157d refactor(highlight-code): declare properties explicitly
Refs #7497
2021-10-05 11:01:38 +03:00
kristina-kovacikova
24aaa53712 fix: fix issue with highlight code scrolling causing console error (#7497) (#7519)
Co-authored-by: Mahtis Michel <mathis.michel@outlook.de>

Refs #7497
2021-10-05 10:27:57 +03:00
twjasa
fc7cdb8bad fix(UI): correct width of HTTP request method names (#7527)
Closes #7479
2021-09-30 20:43:43 +03:00
Mingwei Samuel
f88334a47d fix(paths): break long paths with <wbr> (#7516)
- use <wbr> instead of ZERO-WIDTH SPACE (U+200B) to break segments 
- remove no-longer-needed onCopyCapture listener which previously  stripped ZWSPs
- update's deep-link.jsx's `text` prop type to accept `PropType.node`  to allow the above.

Closes #7513
Co-authored-by: Vladimir Gorej <vladimir.gorej@gmail.com>
2021-09-30 15:52:33 +03:00
silverwind
9952849aa5 refactor: remove IE7 CSS hack (#7526)
Remove IE specific start hack: https://stackoverflow.com/a/14927670/808699 that was targeting IE 5.5 to 7.
2021-09-30 11:48:52 +03:00
Dominik Henneke
ff5deb3613 fix(ux): update the buttons of the example tabs to be displayed as links (#7517)
Fixes small visual regression introduced in #7464.

Refs #7464
2021-09-21 15:09:46 +03: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
Helen Kosova
f1aab53dd6 fix(sample-gen): generate the correct number of properties (#7432)
This commit fixes correct number of additionalProperties when minProperties is used.
2021-09-15 15:54:26 +03:00
Helen Kosova
cc700f034b fix(try-it-out): fix the width of image responses (#7495)
Refs #5578
2021-09-15 13:25:51 +03:00
Vladimir Gorej
fdef4ead7a fix(build-security): do not expose hostname to build framents (#7491)
Refs #7446
2021-09-10 13:29:42 +03:00
Vladimir Gorej
3248428e96 feat(js-yaml): update our main YAML parser to v4.1.0
Closes #6804
2021-08-09 16:30:40 +02:00
Tim Lai
de3d063ca3 fix(sample-gen): parameter array missing items fallback (#7376)
* fixes #7375
2021-06-24 16:25:54 -07:00
Andreas Grub
13c110a6fe feat(oas3): Show file upload for schema binary format (#7325)
* fix(ux): display actual content type instead of hard-coded application/octet-stream

* feat(ux): show file upload when schema has "format: binary", fixes #5636

* feat(ux): show file upload when schema has "format: base64"

According to
https://github.com/swagger-api/swagger-ui/pull/7325#issuecomment-861684260
the uploaded file should be converted to base64 automatically.

* feat(ux): add cypress tests for displaying an upload button
2021-06-22 15:33:57 -07:00
Tim Lai
14be45db3c fix(try-it-out): button and inner text spacing (#7357) 2021-06-21 10:34:46 -07:00
Tim Lai
87ded996fa fix(sample-gen): oas3 form-data object should generate example (#7355) 2021-06-18 16:49:50 -07:00
Vasilev Pyotr
3a0f72f59a fix(ui): parameter placeholder should only display name (#7123)
* remove `description` from parameter placeholder
2021-06-09 11:46:25 -07:00
Vladimir Gorej
96cdf00adb fix(system): allow wrapping selectors in chain (#7304)
Refs #7157
2021-05-26 11:54:58 -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
iron
9f62154d06 fix: download button width (#7230) 2021-05-12 10:22:11 -07:00
Giles Wells
72811bd827 feat: Accessibility improvements (#7224)
* feat: adds a11y for ContentType & Responses region

* feat: adds a11y to expandable/collapsible elements

* fix: add aria label to select element for content types

* fix: add aria label prop to contentType component

* Change optag to h3 for better tag hierarchy


Co-authored-by: ediiotero <eddie.otero@oddball.io>
Co-authored-by: Mike Lumetta <mike.lumetta@adhocteam.us>
Co-authored-by: Alexander Valencia <alex.valencia@adhocteam.us>
2021-05-12 09:40:31 -07:00
Tim Lai
38c6e127bf chore(deps): bump serialize-error from 2.1.0 to 8.1.0 (#7223)
* apply named imports, per v5.x breaking changes
2021-04-29 13:49:36 -07:00
Mahtis Michel
53829f18a6 fix: required properties (#7206)
* fix: required properties

schema required properties should not be treated like required: true.
this lead to objects that requires properties being treated as required itself

* test: try-it-out-schema-required-override-allowed

Co-authored-by: Tim Lai <timothy.lai@gmail.com>
2021-04-29 12:31:22 -07:00
Michael Zangl
5906dfae02 fix(authorization): include oauth endpoint description (#7195) 2021-04-20 16:39:11 -07:00
Tim Lai
92f1507408 fix(syntaxHighlighter): request and response examples for json cases (#7199)
* OAS 2 request and response examples for json cases
* OAS 3 request and response examples for json cases
* OAS2 and OAS3 tests
* jsonParse utils for syntax highlighting
2021-04-20 11:39:05 -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
ben-smartbear
7fc2780bac fix: update snippet generator map to support React 16 (#7154) 2021-04-14 09:52:52 -07:00
Tim Lai
f5b84e59ce feat: markdown sanitization of form tag (#7146) 2021-03-31 11:03:57 -07:00
Giles Wells
4abbc62b87 fix: add aria label to select element for content types (#7133)
Co-authored-by: ediiotero <eddie.otero@oddball.io>
Co-authored-by: Mike Lumetta <mike.lumetta@adhocteam.us>
2021-03-31 08:25:24 -07:00
Mahtis Michel
032bd71e0a feat(sample-gen): infer implicit type and validation constraint types (#7117)
* this closes some dead ends of sample generation where no sample can be generated
2021-03-30 14:28:51 -07:00
axel584
75865f31ec feat: download of text/csv now uses .csv extension (#7141) 2021-03-30 13:06:00 -07:00
Mahtis Michel
4103e0f919 fix: array constraint validation only if value was provided (#7112) 2021-03-30 12:33:56 -07:00
Mahtis Michel
9a2b646d23 fix: response examples fallback (#7065) 2021-03-18 14:37:02 -07:00