Commit Graph

473 Commits

Author SHA1 Message Date
kyle
08cfc77fde fix: default to empty ImmutableMap when schema is missing (#4341) 2018-03-16 22:59:46 -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
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
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
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
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
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
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
gilbode
f0c5f1fe33 fix: use mutated request for request URL in live-response (#4117) 2018-02-09 19:49:18 -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
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
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
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
kyle
efc1194e4a improve(response-rendering): give Content-Disposition priority (#4140)
* Remove produces/consumes setter from OperationContainer

* Store consumes/produces information in `meta` key

* Migrate produces value state usage to `meta` key

* use meta consumes data for isXml check

* Fix failing tests

* normalize action name casing

* restore correct produces fallback value logic

* default to first server if current server is invalid

* improve(response-rendering): give Content-Disposition render priority
2018-01-19 23:08:19 -06:00
kyle
7af7121e64 fix: streamline management of user-selected produces and consumes values (#4137)
* Remove produces/consumes setter from OperationContainer

* Store consumes/produces information in `meta` key

* Migrate produces value state usage to `meta` key

* use meta consumes data for isXml check

* Fix failing tests

* normalize action name casing

* restore correct produces fallback value logic
2018-01-18 20:37:44 -06:00
Lukasr29
64f99356a5 improve(tio): extract file name from Content-Disposition (#4035)
* Added extraction of quoted file name from content disposition header

* Added extraction of quoted file name from content disposition header - PR Fixes

* Added extraction of quoted file name from content disposition header - PR Fixes

* Added extraction of quoted file name from content disposition header - PR Fixes
2018-01-11 19:39:42 -06:00
kyle
63d5f164c6 fix(core-components): make onToggle a non-required prop in ModelCollapse (#4100) 2018-01-11 16:56:36 -06:00
David DE CARVALHO
a47da98b54 feat(render/parameters): display enums, defaults, and examples when not in TIO mode 2018-01-05 22:09:32 -06:00
narutowyh
12a9fbc0ca fix: ignore prototype's keys in a handful of for...in loops 2018-01-05 21:57:17 -06:00
Kyle Shockey
9bad35ed85 Refactor specPath to Im data structures to avoid waste renders 2017-12-28 18:04:12 -06:00
kyle
15dbc20efd Merge branch 'master' into master 2017-12-15 18:22:07 -08:00
kyle
2b3a590e29 Merge branch 'master' into patch-1 2017-12-15 17:26:53 -08:00
Kyle Shockey
49333dfadc Merge branch 'master' of github.com:swagger-api/swagger-ui into feature/small-tweaks 2017-12-15 17:22:03 -08:00
kyle
48fd8f7689 Merge branch 'master' into ft/deeplinking-link-component 2017-12-15 17:05:22 -08:00
Greg Thompson
a41cdfd650 Merge branch 'master' into ft/deeplinking-link-component 2017-12-13 08:32:57 -06:00
Gonen Dukas
4320118f17 Merge branch 'master' into master 2017-12-13 14:51:43 +02:00
Helder Sepulveda
6ba6039eb7 Merge branch 'master' into master 2017-12-12 17:48:40 -05:00
Helder Sepulveda
f3cb0d7195 Merge branch 'master' into patch-1 2017-12-12 17:44:50 -05:00
Kyle Shockey
dfa96e66a4 Improve a handful of error surfacing messages
`Spec` => `API definition`, notably.
2017-12-12 13:34:25 -08:00
Kyle Shockey
3db4f6c93a Wrap BaseLayout loading messages in swagger-ui+loading-container 2017-12-12 13:24:42 -08:00
kyle
faa9ada6b8 class => className 2017-12-12 12:31:55 -08:00
Greg Thompson
0e883d4a7a Merge remote-tracking branch 'upstream/master' into ft/deeplinking-link-component 2017-12-12 09:18:12 -06:00
Helder Sepulveda
b2a435afdc Replace text with Loading throbber 2017-12-12 07:41:33 -05:00
kyle
5c17153df1 Merge branch 'master' into master 2017-12-11 20:29:02 -08:00
kyle
aaf62a4e60 Merge branch 'master' into patch-1 2017-12-11 19:20:29 -08:00
kyle
91ed3baae7 Merge branch 'master' into bug/loading 2017-12-11 19:18:52 -08:00
kyle
af14cc9e78 Add missing comma 2017-12-11 19:09:00 -08:00
kyle
a94c6c0e7f Merge branch 'master' into feature/deeplink-zenscroll 2017-12-11 19:05:16 -08:00
Greg Thompson
f819612144 Merge branch 'master' into ft/deeplinking-link-component 2017-12-11 14:28:28 -06:00
Greg Thompson
d2e931f3e1 DeepLink feedback 2017-12-11 14:27:28 -06:00
Helder Sepulveda
8becc9a9a7 Update response-body.jsx
Add support for svg images, with this change we will show an actual preview of the image
2017-12-11 15:14:58 -05:00