Commit Graph

3783 Commits

Author SHA1 Message Date
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
kyle
6c5a370ef7 create InfoUrl and InfoBasePath (#4330)
* create `InfoUrl` component
* create `InfoBasePath` component
* linter fixes
2018-03-14 16:06:29 -07:00
Scott O'Hara
fb7f12551f improve: show possible reasons when url fetch fails (#4295)
* improve: show possible reasons when url fetch fails
* Only check for fail reasons if no HTTP status code
* Check for mixed content errors first
* Harmonise error messages
* Set error source to 'fetch'
* improve: hide loading validator image (#4287)
* hide missing validator image
* Render nothing if validator badge has not loaded/received errors
* Revert style changes
* Allow images with data scheme (#4305)
* Add UnitTest for image
allows image elements with https scheme
* Test images with data scheme
* Add allowedSchemesByTag
* Fix error  Strings must use doublequote  quotes
* Add empty div (#4236)
if there are properties show an empty div
* v3.12.1 (#4311)
* v3.12.1
* Rebuild dist for v3.12.1
* Use window wrapper instead of direct reference
* Add trailing period to error messages
* improve readability
2018-03-12 16:57:51 -07:00
kyle
49e0466641 v3.12.1 (#4311)
* v3.12.1

* Rebuild dist for v3.12.1
2018-03-09 20:54:22 -08:00
Helder Sepulveda
ad57f5a549 Add empty div (#4236)
if there are properties show an empty div
2018-03-08 17:46:21 -08:00
Helder Sepulveda
ebf94dfccf Allow images with data scheme (#4305)
* Add UnitTest for images

allows image elements with https scheme

* Test images with data scheme

* Add allowedSchemesByTag

* Fix error  Strings must use doublequote  quotes
2018-03-08 17:17:30 -08:00
Helder Sepulveda
6ba93ad43f improve: hide loading validator image (#4287)
* hide missing validator image

* Render nothing if validator badge has not loaded/received errors

* Revert style changes
2018-03-06 21:43:06 -08:00
kyle
54153dd929 remove docker login email param (#4283) 2018-03-02 22:22:39 -08:00
kyle
83232dc2d8 v3.12.0 (#4282)
* Use `parameterWithMeta` to get parameter data in <ParameterRow>

* Prefer specPath when fetching resolved subtrees in OperationContainer

* Add test for OAS3 callback rendering

* Remove debugger statement

* Pass base resolution URL directly to Swagger-Client subtree resolver

* Remove accidental comment

* Migrate additional options

* Don't default to empty Map when getting subtree

* fix(validateParam): check for ImList type before using count method

* Use `replaceState` to update `urls.primaryName`

This gives us the stateful URL we want, without:
(a) refreshing the page on update
(b) creating a long, useless history for the user
(c) implying that browser history is two-way bound
    to Swagger-UI (it isn't, we don't have a router)

* Add `fn.opsFilter` docs and internal API versioning note

* restrict `x-example` functionality to Swagger 2.0

* polish Authorize + Close buttons

* add tachyons; use it for padding the new Reset button

* v3.12.0

* rebuild dist
2018-03-02 21:13:00 -08:00
russell
ad43965d16 improve: add button to reset example when user modifies request body (#4185)
* Add a button to reset example when user modifys request body

* lint fixes

* Revert "lint fixes"

This reverts commit 5395005ea775832045aee9bab4aaa538cd2f73ab.

* reapply lint fixes
2018-03-02 18:46:47 -08:00
Charles Capps
861cc65cff improve: add "Close" button to OAuth dialog, rename "Done" button elsewhere (#4212)
* Rename "Done" button to "Close", and add "Close" button OAuth dialog
* move Close button to the right
2018-03-02 18:40:54 -08:00
Davide Zipeto
4900b11079 feature: read the x-example field and use them as values (#3538)
* Read the x-example field and use them as values
Allow to show the value defined in the "x-example" field when pressing try-out. The "default" value will have the precedence over the x-example

* Use `parameterWithMeta` to get parameter data in <ParameterRow>
* Prefer specPath when fetching resolved subtrees in OperationContainer
* Add test for OAS3 callback rendering
* Remove debugger statement
* Pass base resolution URL directly to Swagger-Client subtree resolver
* Remove accidental comment
* Migrate additional options
* Don't default to empty Map when getting subtree
* make "default" and "x-example" mutually exclusive
"x-example" wins when both are present
* limit "x-example" to non-body parameters
2018-03-02 18:31:08 -08:00
Pavel Stefanov
b13b05e416 improve: support for oneOf and anyOf in array sample (#4136)
* Fixed oneOf and anyOf in array example

* Added tests for sampleFromSchema for array type

* Removed return example for array item
2018-03-02 16:42:51 -08:00
kyle
feef20dd67 fix: deeplinked operation resolution (#4281)
* Use `parameterWithMeta` to get parameter data in <ParameterRow>

* Prefer specPath when fetching resolved subtrees in OperationContainer

* Add test for OAS3 callback rendering

* Remove debugger statement

* Pass base resolution URL directly to Swagger-Client subtree resolver

* Remove accidental comment

* Migrate additional options

* Don't default to empty Map when getting subtree
2018-03-02 16:26:37 -08:00
kyle
4fd7f1d099 fix: remote ref resolution regression (#4273)
* Use `parameterWithMeta` to get parameter data in <ParameterRow>

* Prefer specPath when fetching resolved subtrees in OperationContainer

* Add test for OAS3 callback rendering

* Remove debugger statement

* Pass base resolution URL directly to Swagger-Client subtree resolver

* Remove accidental comment

* Migrate additional options
2018-03-01 10:12:47 -08:00
kyle
8777d8b9ff fix: use specPath prop to resolve operations in OperationContainer (#4272)
* Use `parameterWithMeta` to get parameter data in <ParameterRow>

* Prefer specPath when fetching resolved subtrees in OperationContainer

* Add test for OAS3 callback rendering

* Remove debugger statement
2018-02-28 17:50:08 -08:00
kyle
22036b1fbf fix: OAS3 parameter value input bug (#4271) 2018-02-28 16:30:20 -08:00
kyle
043e491f94 dependencies: zenscroll@4.0.0 -> zenscroll@4.0.1 (#4270) 2018-02-28 13:15:30 -08:00
kyle
1fb56c6f96 fix: Try-It-Out Consumes value regression (#4265)
* Migrate behavior of `operationConsumes` selector

* Improve accuracy of resolved subtree merger

* Check for Immutable Map _before_ using `get` method
2018-02-27 18:55:59 -08:00
David Vujic
e6722d87aa improve: filter as a plugin (#4255) 2018-02-27 15:44:30 -08:00
kovyfive
6f7a4c3097 fix: blob download in internet explorer (#4256) 2018-02-27 14:13:14 -08:00
Grégoire Charvet 黑瓜
71d7c1a5ab Fix deeplinking for topbar plugin (#4181)
* Fix deeplinking for topbar plugin

* Lint & added tests for search parsing/serialization
2018-02-26 21:46:18 -08:00
kyle
e41067b4c1 v3.11.0 (#4254)
* v3.11.0

* Rebuild dist
2018-02-23 23:44:37 -08:00
Helder Sepulveda
558d054986 fix: package.json to reduce vulnerabilities (#4224)
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
2018-02-23 22:34:29 -08:00
Helder Sepulveda
d1779dc47b fix: allow any guid (#4252)
* Allow any guid

* Add a few more GUID tests
2018-02-23 22:31:08 -08:00
kyle
ba1603a7e2 improve: lazy resolver (#4253)
* default to empty `ImmutableMap` when grabbing op metadata
* pass `errors` into JsonSchema components
* Account for Immutable data structure in JavaScriptonSchema...
...and create empty Lists instead of Maps by default.
* Pass ImmutableList through to JsonSchema child components
* Add lazy resolving spec state extensions
* TEMPORARY: disable conventional resolved spec
* WIP
* Use resolveSubtree in Operation display
* Freebie: short-circuit Markdown component if it is given plaintext
* NEW DEFAULT BEHAVIOR: `defaultModelsExpandDepth: 1` does not expand individual models
* Render faked Model expander to trigger resolution
* Baseline support for Editor lifecycles
* Display operation summaries before the operation is resolved
* Test migrations
* WIP
* Swagger2 TIO Body params
* a bit of cleanup
* Debounce string param inputs
* Reach into unresolved operation for deprecated flag, if available
* Fire subtree request outside of render
* Remove debugging flags
* Fix logical errors in spec statePlugins
* TODOs become TODONEs!
* Migrate deeplinking feature to non-resolved spec action
* ESLint fixes
* Reduce action dispatch volume; run resolver on next tick
* Batch resolver requests; use batch progressive results in later iterations
* Add loading states to Model and Operation views
* Preserve object order; remove dupl. import; add warning for action
* LINTER!
* Use require to load SVG
       Works around Webpack weirdness
2018-02-23 22:25:28 -08:00
kyle
ecf688171f feat: lazy resolver (#4249)
* default to empty `ImmutableMap` when grabbing op metadata
* pass `errors` into JsonSchema components
* Account for Immutable data structure in JavaScriptonSchema...
    ...and create empty Lists instead of Maps by default.
* Pass ImmutableList through to JsonSchema child components
* Add lazy resolving spec state extensions
* TEMPORARY: disable conventional resolved spec
* WIP
* Use resolveSubtree in Operation display
* Freebie: short-circuit Markdown component if it is given plaintext
* NEW DEFAULT BEHAVIOR: `defaultModelsExpandDepth: 1` does not expand individual models
* Render faked Model expander to trigger resolution
* Baseline support for Editor lifecycles
* Display operation summaries before the operation is resolved
* Test migrations
* WIP
* Swagger2 TIO Body params
* a bit of cleanup
* Debounce string param inputs
* Reach into unresolved operation for deprecated flag, if available
* Fire subtree request outside of render
* Remove debugging flags
* Fix logical errors in spec statePlugins
* TODOs become TODONEs!
* Migrate deeplinking feature to non-resolved spec action
* ESLint fixes
2018-02-23 01:12:53 -08:00
Ron
54ed39d69f Merge pull request #4219 from SwaroopH/patch-1
Fix Summary links
2018-02-19 21:32:40 -07:00
Ron
48a65983c1 Merge branch 'master' into patch-1 2018-02-19 21:28:52 -07:00
wayglem
1f565b4847 show oauth error callback message when auth fails (#4058)
This change aims to display the oauth error to the user when the autnetication process fails.

Close #4048
2018-02-13 15:42:37 -08:00
Swaroop Hegde
ba59db2449 Fix Summary links 2018-02-13 18:08:11 +05:30
kyle
1013d16d9e v3.10.0 (#4210)
* v3.10.0

* Fix Execute styling issue

* Rebuild dist
2018-02-09 20:47:44 -08:00
gilbode
f0c5f1fe33 fix: use mutated request for request URL in live-response (#4117) 2018-02-09 19:49:18 -08:00
Scott O'Hara
f589cb99af feature: supportedSubmitMethods config parameter (#4186) 2018-02-09 19:39:43 -08:00
maryscar
3d7a00c0d0 improve: visibility & accessibility (#4202)
* Increase font weight for property-format

* Increase font weight for model property examples.
2018-02-09 19:34:38 -08:00
kyle
1f44231df9 improve: remove CPU-taxing Execute button animation (#4204) 2018-02-07 21:07:10 -08:00
Helder Sepulveda
f2a8ed07e0 improve(sanitizer): add more allowed attributes (#4194)
* Add a couple of items to the sanitizeOptions

*  Strings must use doublequote  quotes
2018-02-07 19:51:15 -08:00
kyle
7fd229fe72 improve(docs): use computed key to demonstrate statePlugin namespacing (#4193) 2018-02-05 15:22:12 -08:00
Fabian Picone
d9c60d7d25 fix(docs): typo (#4183) 2018-02-02 20:56:02 -08:00
kyle
9653258bc1 v3.9.3 (#4170)
* default to empty `ImmutableMap` when grabbing op metadata

* pass `errors` into JsonSchema components

* Account for Immutable data structure in JavaScriptonSchema...

...and create empty Lists instead of Maps by default.

* Pass ImmutableList through to JsonSchema child components

* v3.9.3
2018-01-26 19:38:41 -08:00
kyle
1e1b7f6063 fix(try-it-out): pass Parameter validation messages around in props for OAS3 (#4162)
* default to empty `ImmutableMap` when grabbing op metadata

* pass `errors` into JsonSchema components

* Account for Immutable data structure in JavaScriptonSchema...

...and create empty Lists instead of Maps by default.

* Pass ImmutableList through to JsonSchema child components
2018-01-25 20:14:35 -08:00
maryscar
2f236982f8 improve(a11y): visibility accessibility via aria-label (#4127)
* Added aria-label for visual readers.

* Increased font weight for Models section span to meet contrast ratio visibility requirements.
2018-01-25 12:41:26 -08:00
Helder Sepulveda
4599033b5a fix(rendering): operation expand/collapse button title (#4130) 2018-01-24 16:48:04 -08:00
Rafael Lüder
6110a7da12 fix(docs): typos! (#4148) 2018-01-24 16:44:46 -08:00
kyle
10ee5c46c0 improve(pr-template) (#4156) 2018-01-24 16:40:39 -08:00
Helder Sepulveda
2ab6fcc49b fix(render-tags): always preserve small element (#4129) 2018-01-23 16:58:20 -08:00
Helen Kosova
179699277d fix(parameter-rendering): improve punctuation and spacing (#4145) 2018-01-23 16:33:27 -08:00
Mike Fidel
3f647875fd bug(docs) correct typo in installation.md (#4144) 2018-01-23 16:26:36 -08:00
kyle
22ccdfff10 release: v3.9.2 (#4141)
* v3.9.2

* rebuild dist for v3.9.2
2018-01-20 02:05:59 -06:00