Commit Graph

1943 Commits

Author SHA1 Message Date
Tim Lai
d2ef8f31b9 fix(examples): properly update memoized value in non-schema case (#6641) 2020-11-19 13:55:32 -08:00
Tim Lai
24225e47bf fix(xml): example generation if an array has an example (#6634)
ref: #6627
2020-11-18 15:19:52 -08:00
geraldglynn
1f10240a97 fix: duplicate labels in Servers UI (#6568) 2020-11-03 12:40:11 -08:00
dalbrx-forcam
6db4def00a fix: externalDocs url for tags when using swagger v2.0 (#6579)
* added operation tag test
2020-11-03 11:18:08 -08:00
Mahtis Michel
288c89bdbb fix(schema example): xml gen should follow json gen behavior (#6555)
* ref: #6470 
* fixes: #6540
* fixes: #4943 

* add example override option to json
* add example override option to xml
* added basic oneOf and anyOf support
* fix anyof|oneof
* only lift xml to items


Co-authored-by: Tim Lai <timothy.lai@gmail.com>
2020-11-03 10:58:59 -08:00
Shelby Sanders
6a4e52aadb feat: support for showExtensions on Response objects (#6535) 2020-10-21 18:49:39 -07:00
Aleksandr Zhuravlev
50e5f653cc fix: duplicate downloading of remote config (#6544) 2020-10-21 17:57:31 -07:00
Tim Lai
0a807d6237 fix(auth): support for oauth2 relative url (#6546)
* Handle relative urls for oauth authorization

The full URL is computed based on the current selected server
if a relative URL is used as authorizationUrl
or tokenUrl


Co-authored-by: Eliot Berriot <contact@eliotberriot.com>
2020-10-21 15:46:31 -07:00
Andrew Korshunov
5a87c8a932 fix(auth): Allow PKCE for legacy AccessCode OAuth2 Grant Type (#6011)
fixes #6010

Co-authored-by: Andrew Korshunov <andrew.korshunov@vizsc.com>
2020-10-20 13:48:44 -07:00
Adam Stachowicz
8e3e059aa1 fix: add additional autoFocus for http-auth component (#6527)
* Addendum to commit 65ea764b, in PR #6483
2020-10-16 14:19:52 -07:00
Mahtis Michel
87ab4e9ac9 fix: response examples should respect media-type (#6456)
* response sample generation should take content type into consideration for stringify
2020-10-16 13:52:21 -07:00
Lucia Sarni
5065613130 fix(requestBody): hide read only properties (#6490) 2020-10-15 11:25:06 -07:00
Lucia Sarni
99fda81ae0 fix: missing commas in response header values #6183 (#6515) 2020-10-14 19:37:12 -07:00
Adam Stachowicz
65ea764b61 fix: add autofocus to auth fields (#6483) 2020-10-14 19:23:19 -07:00
Francesco Franchina
4b2fddd8ed fix(style): preventing long strings from overflowing (#5934) (#6507) 2020-10-14 18:49:33 -07:00
Matthew Chan
1af8678ae1 fix(jest): unknown prop initialValue on input tag (#6506) 2020-10-14 17:24:36 -07:00
Tim Lai
3905fadfbe fix(oas3): switching media types should update schema properties (#6518)
* When the media-type is changed, there is a new `onChangeMediaType` method to handle actions.
* If target schema properties key/value pairs does NOT equals current schema properties, clear the requestBodyValue, try-it-out request/response and validation params.
* If target schema properties key/value pairs DOES equals current schema properties, do not change or re-render schema properties
* oas3Selector `validateShallowRequired` now also validates required keys against target media-type

Fixes #6201, #6250, #6476
2020-10-14 16:24:07 -07:00
Lucia Sarni
6c5e91dece fix: deprecate from "new Buffer" to "Buffer.from" (#6489) 2020-10-08 14:40:46 -07:00
Lucia Sarni
aa53ec24b8 fix(filter): avoid filtering by the strings "true/false" when enabled (#6477) 2020-10-08 13:52:56 -07:00
Lucia Sarni
1b11d5cfaa fix(style): inconsistent background colors in code sections (#6472) 2020-10-08 12:30:14 -07:00
tobiasnitsche
d9de60b878 refactor(style): add !default to Base colors in scss (#6215) 2020-10-07 17:18:48 -07:00
Mahtis Michel
f4bdf2f953 fix: multipart array sample generation for items (#6461)
* json schema array component should use schema to generate example in case of array items.
* empty value checkbox should be disabled if not empty => not empty list || not empty string
* curl should also check for not empty list
2020-10-07 16:59:29 -07:00
Adrien Becchis
b5e8081115 fix(syntax-highlighter): configuration for Examples (#6455)
* Complement #5259, getConfigs was not correctly forwarded to Examples. As a result, syntax highlight could not be disabled be disabled or configured in that elements
2020-10-02 14:44:46 -07:00
Mahtis Michel
a920357c22 object model should also show example of schema in info below closing bracket (#6453) 2020-10-02 14:15:55 -07:00
Tim Lai
797929f1cf fix(parameter-row): rendering of default/example values of 0 (#6454)
Co-authored-by: @danxmoran
2020-10-01 16:28:55 -07:00
Tim Lai
f5c709f97f fix(try-it-out): required boolean default value set to empty string (#6449)
ref: #6429

* fix(try-it-out): required boolean default value set to empty string
* test(try-it-out): required enum and boolean fields
2020-09-30 15:27:41 -07:00
Mahtis Michel
ad630cc3e0 fix: sample schema should stringify string values for content-type: text/json (#6431)
* reverts #6412 which stringified string value if content-type: text/plain 
* enable stringify string values matching `/json/` and allowList of `shouldStringifyTypes` ("string")
2020-09-29 13:40:47 -07:00
Adam David
cbe99c8c1a feat(curl): configuration setting to pass additional options to curl command for "Try it out" (#6288)
Allows `requestInterceptor` to add options to the curl command.
For example:

```js
requestInterceptor: function (request) {
  if (request.method === 'GET') {
    request.curlOptions = ['-g']
    request.url = request.url
      .replace('%5B', '[')
      .replace('%5D', ']')
      .replace('%2C', ',');
  }
  return request;
}
```
2020-09-22 11:14:51 -07:00
dalbrx-forcam
95fd3e71ab fix(auth): both array and Im.List scopes can be added to redirectURL (#6416) 2020-09-22 10:47:37 -07:00
Mahtis Michel
821ba887a6 fix: string samples should also be json stringified. (#6412)
fixes #6120
2020-09-21 12:16:26 -07:00
Amir Bitaraf Haghighi
96aecc8860 feat: Preserve authorization on browser refresh and close/reopen (#5939)
* Add default configuration `preserveAuthorization`

* Add localStorage to auth plugin

* Add persistAuthorization unit tests

* Refactor persistAuthorization to use wrapped actions

* Upgrade unit tests to be compatible with jest

* Add persistAuthorization documentation


Co-authored-by: Tim Lai <timothy.lai@gmail.com>
2020-09-11 14:05:37 -07:00
ben-smartbear
6ad418d0ab fix: Updating select to pass in a better prop; updating test to do a better check (#6385)
fixes #6372
2020-09-10 11:06:46 -07:00
Scott O'Hara
26a0fd8e64 fix(styles) restore wrapping of long text in pre blocks (#6377) 2020-09-10 10:51:36 -07:00
mbehboodian
7a63ba30c3 fix(style): servers environment select (#6367) 2020-09-10 10:37:15 -07:00
Alec Theriault
89d57fc078 fix(curlify): replace all occurrences of $ (#6354)
* replace all occurrences instead of only first occurrence
2020-09-10 10:11:11 -07:00
geraldglynn
0199b4785f fix: Add entrySeq() to bodyProperties.map() (#6267)
* Added immutable guard to  bodyProperties
2020-09-09 18:46:24 -07:00
Tim Lai
d4eea4da1b fix: models view when object key contains deprecated:true (#6371)
fixes #6369
2020-09-09 16:43:01 -07:00
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