Commit Graph

3831 Commits

Author SHA1 Message Date
kyle
9155eb946e fix: always display locally-available title property as a model's name (#4542)
* fix: always display locally-available `title` property as a model's name
* fix failing unit test
* add e2e test case
2018-05-10 22:15:36 -07:00
maryscar
66e9bd735a fix: model property color contrast (#4540) 2018-05-10 16:19:59 -07:00
kyle
ae849c31ea fix: remove outdated Safari check for Blob downloads (#4541) 2018-05-10 16:07:29 -07:00
Helder Sepulveda
1a95b9e9c9 New fixes for 1 vulnerable dependency (deep-extend) (#4507)
* fix: package.json to reduce vulnerabilities

The following vulnerabilities are fixed with an upgrade:
- https://snyk.io/vuln/npm:lodash:20180130

Latest report for heldersepu/swagger-ui:
https://snyk.io/test/github/heldersepu/swagger-ui

* fix: package.json to reduce vulnerabilities

The following vulnerabilities are fixed with an upgrade:
- https://snyk.io/vuln/npm:deep-extend:20180409

Latest report for heldersepu/swagger-ui:
https://snyk.io/test/github/heldersepu/swagger-ui
2018-05-07 23:00:00 -07:00
Brett Randall
073b1df730 Updated 'urls' (An array of API definition objects) description. (#4525)
* Updated 'urls' (An array of API definition objects) description.

Updated 'urls' (An array of API definition objects) description to show an actual object array containing two (2) urls, clarifying this configuration-option.

* urls is an array, not a string
2018-05-07 21:56:08 -07:00
kyle
11c586309f v3.14.1 (#4521)
* v3.14.1

* transform `const` & `let` to `var` in node_modules, for IE11

* rebuild dist
2018-05-04 19:25:20 -07:00
kyle
a37d637061 meta: multiple issue templates (#4519)
* MOAR issue templates

* ...LESS issue templates
2018-05-04 12:58:08 -07:00
kyle
75747424cf improvement: sanitization via DOMPurify (#4513)
* swap `sanitize-html` for `dompurify`

* set up node enzyme tests with jsdom

dompurify, as the name suggests, needs a DOM or it won't work!

* reconcile tests and sanitizer settings

* remove obsolete sanitizeOptions

* add `jsdom` dependency
2018-05-04 10:06:44 -07:00
Helder Sepulveda
8055129dd2 Improve downloadable HighlightCode filename (#4508)
* Update highlight-code.jsx
* improve filename no more response.txt
* use new `fileName` prop for file names
* use template strings for `fileName` prop values
* fall back to old "response.txt" file name if none is provided
2018-05-03 17:33:21 -07:00
kyle
7049de6201 v3.14.0 (#4492)
* v3.14.0

* fix: simplify config fetch interceptor implementation

* add `loadRemoteConfig` flag to requests

* v3.14.0
2018-04-27 23:20:13 -07:00
kyle
8cef3adfe6 fix: path-item $ref operation metadata storage (#4489) 2018-04-27 10:29:33 -07:00
Helder Sepulveda
cbff0251ae feat: option to show common query parameters (#4245)
* extend getExtensions

Add optional param to getExtensions that can retrieve more stuff

* Add getCommonExtensions

* Trim trailing spaces

* Remove unused parameter

* Move the format inline with the param type

* correction to UnitTest
2018-04-26 21:18:45 -07:00
kyle
62354568a9 feat: request/response interceptors for remote config fetch (#4484) 2018-04-26 21:04:55 -07:00
kyle
d981f0f26e v3.13.6 (#4472) 2018-04-24 00:18:38 -07:00
kyle
44c3f09abe v3.13.5 (#4464)
* v3.13.5

* rebuild dist
2018-04-20 20:34:43 -07:00
kyle
0c50c7e99f enhancement: don't block scrolling if HighlightCode is not scrollable (#4463) 2018-04-20 16:34:22 -07:00
Helder Sepulveda
62ed4db110 fix: http auth component state retention issue (#4394)
* Set the value if set is available

* tests: add failing e2e test case

* use Object.assign to always ensure setState receives a new value object
2018-04-20 16:08:39 -07:00
r-ising
553acee07d fix: redundant Markdown required className prop warning (#4457) 2018-04-19 14:39:19 -07:00
kyle
932cc9838c fix: Callback component $$ref handling (#4454) 2018-04-18 18:05:15 -07:00
Helder Sepulveda
d3c9ceceef Change the 5# to 4# (#4447)
The 5# do not show well on the wiki but 4# do and they were not used
2018-04-18 16:29:53 -07:00
kyle
5f855e56bb v3.13.4 (#4438)
* v3.13.4

* rebuild dist
2018-04-13 18:38:21 -07:00
Ville Skyttä
3f6e21e3b1 improve: HTTP auth display logic and messaging (#4430)
* http-auth: Include unsupported scheme name in error message

* http-auth: Treat authentication scheme case insensitively

The spec refers to RFC 7235 for scheme names, and the RFC says names
are matched case insensitively.

* linter fixes
2018-04-13 17:02:36 -07:00
Aleksey Ganzha
26d0ad7684 fix(regression): model rendering for Swagger 2.0 body parameters (#4424)
* Fix model rendering for parameters

* tests(e2e): add test confirming that Pet model is shown in operation
2018-04-13 16:57:32 -07:00
kyle
9a121ea445 fix: attempt to display Blob response bodies as text (#4437)
* fix: attempt to display Blob response bodies as text

... if nothing else works.

* correctly pass `prevProps.content` to updateParsedContent

* remove debugger statement

* caniuse `Blob` && `FileReader`? yes.

Blob: https://caniuse.com/#search=Blob
FileReader: https://caniuse.com/#search=filereader
2018-04-13 16:16:54 -07:00
kyle
c55f22575a fix: make Schemes <select> a fully state-controlled input (#4436) 2018-04-13 13:52:01 -07:00
Giancarlo Klemm Camilo
2795518340 enhance: scrollable + downloadable HighlightCode (#4397)
* Auto hidding content that is longer than 600 characters long.

* Added basic downloading

Slightly broken

* Better downloading

now downloads file on button click

* Fix the angry linter

* Fix dist

* Removed collapsing, added scrolling.

* Code clean up.

* CSS fix.

* prevent HighlightCode from scrolling entire document

* center "Download" text in button

* `this.downloadJSON` -> `this.downloadText`

we're always saving as `.txt`, so JSON is a misnomer

* hide Download button behind option `downloadable` prop

* `file-saver` -> `js-file-download`
2018-04-12 18:18:49 -07:00
Chris Ormerod
2bf2167a18 docs: fix typo (#4431)
Operations is lowercase, without this fix the example doesn't work as a Copy/Paste
2018-04-12 16:53:10 -07:00
kyle
dc7d7054bf fix: provide svg assets through React app instead of relying on HTML (#4429)
* fix: provide svg assets through React app instead of relying on HTML

* fix stylistic inconsistencies in HTML assets
2018-04-10 16:05:17 -07:00
Ville Skyttä
14473dd51d fix: misc. spelling errors (#4421) 2018-04-09 15:58:52 -07:00
kyle
a0b659a96e V/3.13.3 (#4420)
* v3.13.3

* rebuild dist
2018-04-06 22:55:24 -07:00
kyle
3efdf1223e fix: add additionalQueryStringParams to auth requests (#4419)
* tests: add failing unit tests

* fix: add additionalQueryStringParams to auth requests
2018-04-06 20:00:10 -07:00
kyle
911a140e38 docs: add async interceptor documentation (#4418)
* docs: add async interceptor documentation

* Update configuration.md
2018-04-06 15:19:44 -07:00
Luka Žitnik
e2d8a4e396 Fix(auth): improper resolution of relative token urls (#4180)
* fix(auth): improper resolution of relative token urls

* revert cc58ba7 for OAS2

In OAS2, relative token URLs are resolved against the host that serves the specs.
2018-04-05 19:20:20 -07:00
David DE CARVALHO
39d34523b9 Improve enum values for Enum Type in Swagger ReadOnly documentation (#4191)
* Adding enum values for Enum Type in Swagger ReadOnly documentation

* Adding enum values for Enum Type in Swagger ReadOnly documentation (optimisation) and also adding default/example value

* Add new display enums, defaults, and examples when not in TIO mode (another way to have enums values in swagger.json)

* Fix npm test result

* review corrections

* fix: don't render parameter description if field is empty

* use cross-version schema variable to access properties

* pass className through Markdown component usage

* add per-field classNames to Markdown for easier styling + testing

* remove parameter Example field (out-of-scope for this PR)

* get default value from schema instead of top-level parameter

* tests: add e2e cases for swagger2 and oas3

* remove `swagger-petstore-enum.json`

the purpose of this file lives on in the e2e test specs folder

* add missing proptypes validation

* use `classnames` to more effectively union class names
2018-04-05 18:48:19 -07:00
kyle
d90353228a pass meta error information to JsonSchemaForm correctly (#4416)
* tests: add failing e2e tests

* fix: pass meta error information to JsonSchemaForm correctly
2018-04-05 15:30:31 -07:00
kyle
4480db0390 Use non-normalized operationId for layout management, if it is available (#4410)
* test(e2e): modify e2e hot server to peacefully coexist with dev server

* tests: add failing e2e test case

* fix: use originalOperationId for layout targeting, if available
2018-04-04 18:55:10 -07:00
kyle
2c4327bfd8 v3.13.2 (#4393)
* v3.13.2

* rebuild dist
2018-03-30 21:55:58 -07:00
kyle
fd8274b353 Filter $$ref from examples (#4392)
* fix(dev-server): don't open localhost in a browser
* tests: refactor model-example enzyme tests to be more isolated
* tests: add failing sampleFromSchema tests for $$ref keys
* tests: add additional test for user-created $$ref values
* fix: create deeplyStripKey; use it to filter $$refs out of examples
* tests: add cases for deeplyStripKey
2018-03-30 18:02:32 -07:00
Helder Sepulveda
762a32b59b fix: header access for Edge browser (#4383) 2018-03-29 16:24:46 -07:00
kyle
8189fd2473 fix: path item $ref rendering (#4381)
* WIP: trigger resolution of Path Item $ref on spec load

* fix(dev-server): don't open localhost in a browser

* preserve key order when merging specJson with specResolvedSubtrees

* remove stray `debugger`
2018-03-27 17:04:31 -07:00
Jake Reed
71d39af443 fix(docker): MAINTAINER deprecated. Use LABEL. (#4370) 2018-03-27 12:02:22 -07:00
kyle
9c8955edd4 v3.13.1 (#4367)
* fix: don't assign example if an example does not exist

fixes #4319

* v3.13.1

* rebuild dist
2018-03-24 14:20:35 -07:00
kyle
003a2e7584 fix: don't assign example if an example does not exist (#4365)
fixes #4319
2018-03-24 02:04:01 -07:00
kyle
1f9fb0e68d fix: request resolution via OperationContainer on mount (#4358) 2018-03-21 21:06:18 -07:00
kyle
14ef0cc379 v3.13.0 (#4342)
* v3.13.0

* Rebuild dist
2018-03-17 00:27:24 -07:00
kyle
08cfc77fde fix: default to empty ImmutableMap when schema is missing (#4341) 2018-03-16 22:59:46 -07:00
kyle
b8cf080e6c docs: fix broken method table (#4340) 2018-03-16 22:34:54 -07:00
kyle
245428e7cd feat: preauthorization (#4339)
* feat: swagger 2.0 preauthorization methods
* tests: add cases for oas3 preauthorization
* docs: add new preauth docs; touch up existing auth docs
* tests: add `rootInject` tests
* docs: remove unfinished sentence
2018-03-16 22:25:04 -07:00
kyle
624a81201f feat: onComplete config option (#4322)
* feat: `onComplete` config option

* tests(e2e): add case for onComplete option
2018-03-16 00:08:39 -07:00
kyle
b0be261ef8 fix: remove $$ref key from example if it exists (#4333)
* fix: remove $$ref key from example if it exists

* guard $$ref property access
2018-03-15 16:40:04 -07:00