Commit Graph

37 Commits

Author SHA1 Message Date
kyle
8e295c23a4 Improvement: Hash-keyed Try-It-Out parameter value storage (#4670)
* allow param update by identity + hashed value storage

* add specActions.changeParamByIdentity

* add identity-based lookup support in spec selectors

* migrate `changeParam` usage to `changeParamByIdentity`

* migrate usage of `parameterWithMeta` to `parameterWithMetaByIdentity`

* update invocations of `changeParamByIdentity` to match fn signature

* use OrderedMap throughout hash-based selectors for consistency

* normalize usage of ParameterRow `onChange`

* migrate bug 4557 tests to reflect new ParameterRow interface

* remove exclusive test blocks

* linter fixes

* copy Parameters changes into OAS3 wrapper

* use rawParam for meta lookups in ParameterRow
2018-06-21 21:36:38 -07:00
kyle
a2015ee08b Revert "initial perf, which gets stripped out in production (#4131)" (#4636)
This reverts commit 5ea2150ae7.
2018-06-08 23:18:55 -07:00
Josh Ponelat
5ea2150ae7 initial perf, which gets stripped out in production (#4131) 2018-05-30 13:44:19 -07:00
kyle
43304aa80a feat: OAS3 binary media type support (#4592)
* fix(validator-badge): resolve definition URLs against browser location

* use param as meta parameter if not found

* convert request body from Immutable if necessary

* show file upload for `format: binary` and `format: base64` jsonschema strings

* add `dispatchInitialValue` prop to JsonSchemaForm

* add optional subkey parameter to onChange

* add binary media type support to request body
2018-05-25 20:37:58 -07: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
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
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
kyle
10b4f5d8a7 Merge branch 'master' into support/editor-validation-refactor 2017-12-23 00:18:26 -06:00
Kyle Shockey
ca0b248df2 Prevent non-object values from being dispatched as new JSON content 2017-12-22 23:19:10 -06:00
Kyle Shockey
68c689e491 Type-check errors before iterating over them 2017-12-20 13:59:22 -06: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
keik
372b1c6a6a Fix case style 2017-12-06 15:29:34 +09:00
Kyle Shockey
bb57fd2406 Send server variables to Client as JS objects 2017-11-30 20:11:30 -08:00
Kyle Shockey
d7d061b5af Provide operation server data to Swagger-Client 2017-11-30 17:26:49 -08:00
Kyle Shockey
26428cd63b Provide interceptors to SwaggerClient.resolve 2017-10-26 14:51:00 -07:00
Josh Ponelat
c6f354ae6c clean up spec actions a bit 2017-10-25 09:39:44 +02:00
Josh Ponelat
84cc9489d4 fix typo with clear_validate_params 2017-10-25 09:39:31 +02:00
Owen Conti
7344315c34 Added tests for isOAS3 in validateParam function. 2017-10-11 18:34:24 -06:00
Owen Conti
7ef8a7ddc7 Merge branch 'master' of github.com:swagger-api/swagger-ui into bug/3511-query-formData-parameters
# Conflicts:
#	src/core/components/parameter-row.jsx
#	src/core/plugins/spec/actions.js
2017-09-18 16:59:08 -06:00
Kyle Shockey
277cc81a8c OAS3 Accept header control: State-side 2017-09-12 19:39:52 -07:00
Kyle Shockey
d14ae62aa5 Parse JSON requestBodies so Client can consume them correctly 2017-09-05 15:07:55 -07:00
Kyle Shockey
7a2c7d2cdc Squash commit: OAS3 Try-It-Out changes 2017-09-05 13:59:31 -07:00
Mike Gilbode
087ed20384 Add support for requestInterceptor / responseInterceptor.
- Display mutated requests from request interceptor in curl output in UI.
  Put this behind showMutatedRequest flag so that the mutation can be
  silent.
- Document requestInterceptor, responseInterceptor and showMutatedRequest
  in README.md
- Add tests
2017-08-13 01:14:41 -04:00
Owen Conti
fdb0d13089 Fixes #3511 - Update changeParameter calls to accept in value to identify parameters based on name plus in value 2017-08-02 22:07:48 -06:00
shockey
afaa5619bb Merge branch 'master' into bug/3072-error-response-fixes 2017-06-29 17:20:09 -07:00
Owen Conti
ddb5704637 #3072 - Display response body and headers for requests that result in non-200 responses. Add test to ensure error and response are merged correctly 2017-06-25 13:28:14 -06:00
Owen Conti
7049a5960c #3135 - Add request duration to response details 2017-06-25 09:16:35 -06:00
Anna Bodnia
d5b9552a5a removed debugger 2017-05-22 17:13:31 +03:00
Anna Bodnia
edfe88d299 modelPropertyMacro, parameterMacro 2017-05-19 18:50:51 +03:00
Kyle Shockey
6e40d04741 take advantage of Swagger-Client opId improvements 2017-05-13 09:50:34 -07:00
Kyle Shockey
5be31ac909 Pass around contextUrl correctly 2017-04-13 19:24:02 -07:00
Kyle Shockey
e2b1757f8f Infer contextUrl through documentation scheme + host if spec url is relative 2017-04-07 20:51:07 -07:00
Kyle Shockey
40ccf6aa98 Send spec url to swagger-client 2017-03-25 00:35:52 -07:00
Kyle Shockey
e1fcbfbf09 Linter error fixes 2017-03-23 16:36:45 -07:00
Josh Ponelat
3a2185c158 remove double-encoding of response (ie: serializeRes ) 2017-03-19 08:38:16 +02:00
Ron
f22a628934 in with the new 2017-03-17 21:17:53 -07:00