Commit Graph

2006 Commits

Author SHA1 Message Date
ben-smartbear
5123b47ef4 fix: Allowing servers dropdown to change when oas3Actions.setSelectedServer is called (#6358)
ref: #6351
2020-09-08 15:37:48 -07:00
Tim Lai
0c60696d26 fix(curlify): for -d, handle Im vs non-Im cases (#6349) 2020-08-28 17:03:15 -07:00
Tim Lai
0d63e70c8e chore: remove unused deprecated polyfill.js file (#6345)
* config(dev): remove unused polyfills in webpack-dev
2020-08-27 12:19:57 -07:00
Tim Lai
580e906450 fix(operationTag): verify selectedServer exists before invoking (#6335) 2020-08-24 16:19:44 -07:00
Tim Lai
6742cbd38b fix: remove unused non-compliant system method inside 'err' reducer (#6330) 2020-08-20 15:51:30 -07:00
Tim Lai
168d0ae7ac fix(Models): onLoad should check this.props.layoutSelectors method (#6307)
ref #6305
2020-08-17 13:38:16 -07:00
Tim Lai
2eaa6c10e4 feat(build): es2015 bundle artifact (#6291)
* es2015 bundle with dependencies via npm script build:es:bundle
* es2015 bundle without dependencies via npm script build:es:bundle
* jest dependency for test:artifact
* migrate babel.config.json to babel.config.js and maintain env support for commonjs and es2015
* remove polyfill
* fix es syntax: replace module.exports with export
* fix es syntax: remove .jsx extension inside import
2020-08-13 17:21:55 -07:00
geraldglynn
d9f5691f65 fix(OAS3): relative urls (#5341)
* Added tooling for appending OAS3 relative URLs to selected Server

Info
* Terms of service URL
* Contact URL
* License URL
* External Docs URL

Tag
* Tag External Docs URL

Operation
* Operation External Docs
** Operation Tag


Co-authored-by: Tim Lai <timothy.lai@gmail.com>
2020-08-04 13:21:19 -07:00
Alec Theriault
225a915cf8 fix: escape $ in curl request bodies and headers (#6245)
This address a bug where a `$` character in a request body or header
would not be properly escaped in a string in the generated curl command.

Fixes #5390
2020-08-03 09:07:06 -07:00
geraldglynn
084b236f76 fix(Models): use specPath for isShownKey to toggle models (#6200)
Co-authored-by: Tim Lai <timothy.lai@gmail.com>
2020-07-31 18:40:47 -07:00
Tim Lai
22668ee8d3 fix(OAS3): servers component update on definition change (#6280)
* fix(OAS3): servers component should use nextProps

* test(OAS3): cypress tests for selecting multiple servers

* test(OAS3): multiple server test with definition change
2020-07-31 16:22:17 -07:00
Tim Lai
abcc3837e9 fix(requestInterceptor): use async/await to support return new Promise (#6279)
ref: #4778
2020-07-31 10:07:52 -07:00
Helen Kosova
fd5a59a3fd feat: Display minProperties an maxProperties for object schemas (#6272) 2020-07-29 14:06:24 -07:00
David Goss
cfede146ff fix(style): make paths try to stay on single line in opblock (#6243) 2020-07-29 13:30:20 -07:00
Helen Kosova
4cbae095fc fix(try-it-out): Better tooltips for min/max validations (#6266) 2020-07-28 17:10:40 -07:00
Helen Kosova
bd9117da8e fix: Replace an inline styleswith propClass (#6265) 2020-07-28 16:58:57 -07:00
Tim Lai
14278e83dc fix: use es2015 modules for react-syntax-highlighter (#6246) 2020-07-28 16:35:53 -07:00
Tim Lai
a73783b73d feat: syntax highlighting of code section (#6236)
Co-authored-by: AdrieanKhisbe <adriean.khisbe@live.fr>
2020-07-17 15:29:15 -07:00
Tim Lai
2fd1e4037c feat(RequestBody): validation support for required fields (#6223)
fixes #5181

* application/json
* application/xml
* application/x-www-form-urlencoded

* Set requestBodyValue values to be an immutable Map, as "value". Previously stored as a normal String.
* This enables adding "errors" to the Map, for validation use

* note: getOAS3RequiredRequestBodyContentType requires state.spec,
* which is not available to state.oas3
2020-07-16 17:53:28 -07:00
Tim Lai
b68942c043 feat(RequestBody): set default true for 'send empty value' (#6228) 2020-07-16 17:01:18 -07:00
Tim Lai
eacc7b92d1 Revert "revert: feat: Allow to skip submitting empty values in form data (#5830)" (#6227)
This reverts commit 1b6cb7d1bf.
2020-07-15 16:07:32 -07:00
Vladimir Gorej
1b6cb7d1bf revert: feat: Allow to skip submitting empty values in form data (#5830)
This reverts commit b9b32c9c93.

Refs #6203 #5830
2020-07-07 16:17:36 +02:00
Vladimir Gorej
e3b3bf03d4 build(bundle): use ES6 to import swagger-client symbols (#6208)
swagger-client in versions =3.10.9 exports it's build artifacts in multiple ways.
One artifact is exposed as ES5 compatible code with ES6 imports.
We use this fact to utilize webpack tree shaking algorithm.
This commit also updates swagger-client to v3.10.0
and decreases bundle size for around 10%.
2020-07-06 14:19:09 +02:00
Vladimir Gorej
95c3da19cc refactor(swagger-client): fix import of helpers (#6190)
Import of helpers from swagger-client worked because of the fact
that commonjs exports are basically an objects that can be destructured.
Whenever swagger-client switches to ES6 imports as primary mechanism
of webpack consuptions imports like that will fail. This change makes
sure that import mechanism is both compatible with ES6 and commonjs
import systems.

Along with that rename default import of swagger-client
to more appropriate SwaggerClient.
2020-07-04 13:50:36 +02:00
Vladimir
41e595beda feat: Display nullable for object model itself (#5660) (#5868) 2020-06-22 18:01:33 -07:00
geraldglynn
e1e4d5bf83 fix: render Common Extensions propertly in React 16 (#5930)
Avoid mapping Immutable.Map as React children.

Co-authored-by: Vladimir Gorej <vladimir.gorej@gmail.com>

Ref https://github.com/immutable-js/immutable-js/issues/667
2020-06-22 18:08:03 +02:00
geraldglynn
93020e2803 fix: avoid mapping Immutable.Map as React children (#6165)
Ref https://github.com/immutable-js/immutable-js/issues/667
2020-06-22 17:57:00 +02:00
Tim Lai
b86e8e96dd fix: curlify agnostic to order of header values (#6152)
Refs #6082

* use curlify flag isMultipartFormDataRequest
* curlify test updated


Co-authored-by: Vladimir Gorej <vladimir.gorej@gmail.com>
2020-06-18 12:34:52 -07:00
Tim Lai
eeb0b7387f fix: remove clipboard inline svg from a file with SASS (#6148)
* directly load data:image/svg+xml
* current webpack config only allows inline file via jsx
2020-06-15 17:55:40 -07:00
Alex Mayants
71d4e59505 improvement: Call DomPurify.addHook only if it exists (#5428)
On server-side execution `dompurify` exports factory function instead of
a purifier instance. Because of this, server-side code that imports
SwaggerUI (e.g. via `swagger-ui-react`) fails, since `DomPurify.addHook`
does not exist.

This affects universal rendering apps which share code
between client-side and server-side.
2020-06-15 15:37:52 -07:00
David DE CARVALHO
ca1b19a31b feat: Display example value in Swagger ReadOnly documentation (#4422) 2020-06-15 15:23:28 -07:00
Aldrin Abastillas
973e1f7a9b feat: Copy response to clipboard #4300 (#5278)
* Move next to download button and match styling

Co-authored-by: Aldrin Abastillas <AAbastillas@rcanalytics.com>
Co-authored-by: Tim Lai <timothy.lai@gmail.com>
2020-06-15 15:08:10 -07:00
blacktemplar
f8dd4e68ec feat(model view): hide applicable readOnly and writeOnly properties (#5832) 2020-06-15 13:47:26 -07:00
geraldglynn
59bbe4ff2f Added onLoad()s and tweaker onToggle() to support ScrollTo functionality for Models (#5237) 2020-06-15 13:04:14 -07:00
Vladimir Gorej
a616cb471d fix(Markdown): render markdown in more secure way
This commit changes markdown sanitization behaviour in following way:

class, style and data-* attributes are removed by default. These attributes
open possible vulnerability vectors to attackers.

The original behavior of sanitizer (before this commit) can be enabled by *useUnsafeMarkdown* configuration option.
Use this configuration option with caution and only in cases when you know
what you're doing.
2020-06-11 21:51:15 +02:00
Gary Gale
48a0b46942 improvement: Make background SVGs consistent (#5478)
* Replace Base64 encoded SVGs with unencoded version. Replace partially URL encoded SVGs with unencoded version, removing extraneous LF character
2020-06-10 17:34:53 -07:00
tomdegoede
fc3ed30f3d improvement: Move inline styles to SCSS instead (#5578)
* fix: convert propStyle to propClass
2020-06-10 16:39:48 -07:00
Wesley Schwengle
67627d7587 Remove max-width for textarea media < 768px (#6014)
Co-authored-by: Tim Lai <timothy.lai@gmail.com>
2020-06-10 16:20:35 -07:00
Wesley Schwengle
117dcc9b16 Disable the validation badge for those who do not want it (#5994)
* disabled on string values: "127.0.0.1", "localhost", "none"
2020-06-10 15:31:35 -07:00
John
21f51494a2 fix: support variables in auth urls (#5913) 2020-06-10 14:45:02 -07:00
Matthew Morrissette
275c8f2ccf improvement: oauth "scopes" improvements (#6037)
* improvement: oauth "scopes" init parameter

* improvement: add "select all" and "select none" to oauth scopes popup
2020-06-10 11:27:54 -07:00
Tim Lai
7a1b627d0b housekeeping: remarkable (#6073)
Refs: #6050
2020-06-03 15:04:00 -07:00
Justin Rigon
edb932b511 fix upload file when array items are type=string format=binary (#6040) 2020-06-01 17:43:26 -07:00
Ashura
1874c7b401 Fix generated curl for PUT and PATCH requests (#5960) 2020-06-01 17:26:04 -07:00
Tim Lai
a371ba1ca9 fix: bugs/4641 flaky test (#6047)
* fix: flaky bugs/4641 test

* fix: apply isFunc check for security.getIn
2020-06-01 14:23:51 -07:00
abcang
b9b32c9c93 feat: Allow to skip submitting empty values in form data (#5830) 2020-05-29 15:46:08 -07:00
mircohaug
eaca2f6fd8 Add empty data param to cURL if no POST request body was given (#6017)
* Add empty data param to cURL if no request body was given

Some middleware applications do not allow POST requests without a content-length header. By adding a empty data parameter to the curl command, the content-length header will be set by curl. Besides this it is more obvious to the user that no request body is sent.

* use double quotes like the rest of the curl command
2020-05-29 15:10:22 -07:00
Tim Lai
68185dd71a fix: remove special handling of non-FormData entries (#6036)
Ref: #6033

* 'createObjWithHashedKeys' validation consistency with isFunction
* 'createObjWithHashedKeys' additional jsdoc example
2020-05-28 09:16:21 -07:00
Tim Lai
3a65070bf5 fix: entries as property name (#6025) 2020-05-20 11:54:57 -07:00
Tim Lai
65597d15c7 fix: jsonSchemaComponent file/files (#5997) (#6000)
oas3 - files
oas2 - file
2020-05-13 17:12:18 -07:00