Commit Graph

61 Commits

Author SHA1 Message Date
dersvenhesse
8bdf2933d5 improve: showing showing server description in dropdown (via #5015)
* Showing server description in dropdown

* Slight syntax improvements

* use template strings and ` - `
2018-11-26 23:18:57 +01:00
kyle
c5c4e08368 improve: nest Servers within Schemes container (via #4911)
* improve: nest Servers within Schemes container

* linter fixes
2018-09-28 20:33:06 -05:00
kyle
1690b319af improve: multipart + formencoded rendering (via #4910) 2018-09-28 19:26:47 -05:00
kyle
54276c95e2 fix: gracefully handle empty request bodies (via #4859) 2018-09-07 16:18:13 -07:00
kyle
708a96dcab improvement: urlencoded Request Body rendering (via #4823)
* use request body schema `required` for marking required urlencoded properties

* don't use sample schema value as a fallback

* modify property layout to mimic regular parameters

* clean up

* use default or example for iniital values
2018-08-17 18:00:06 -07:00
kyle
478d93ae08 Example (#4730)
* add tests for example feature
* refactor ParameterRow value setter logic
* aside: fix property access in sampleFromSchema
* prioritize media type examples for OAS3 responses
* use `example` in schema level example
* refactor: move stringify to utils
* prioritize media type examples in OAS3 request bodies
* modify nightwatch config
* fix parameter/response regressions
* reorder and broaden default value sources
* update lockfile
2018-07-14 03:09:37 -04:00
kyle
4055f51b93 fix: support multimedia media types for file upload (#4705) 2018-07-07 02:36:48 -05:00
kyle
8f65483510 fix: handle urlencoded array data correctly + don't stringify non-object sample values (#4704)
* fix: handle urlencoded array data correctly

* fix: don't stringify non-object sample values

* fix linter
2018-07-07 02:30:40 -05:00
Sofiia
8416b043ea housekeeping: factor out components for easier BaseLayout reuse (#4604)
* improve: wrap schemes to encapsulate rendering logic
* improve: wrap filter to encapsulate rendering logic
* improve: wrap info section to encapsulate rendering logic
* improve: wrap servers plugin to encapsulate rendering logic
* improve: added tests for schemes-wrapper rendering logic
* improve: added tests for info-wrapper rendering logic, also do not render info if info is undefined
* improve: added tests for filter rendering logic
* improve: added tests for servers-wrapper rendering logic
* `InfoWrapper` -> `InfoContainer`
* add `containers` alias to Babel configuration
* `SchemesWrapper` -> `SchemesContainer`
* drop `container` from container file names
* `ServersWrapper` -> `ServersContainer`
* `Filter` -> `FilterContainer`
* follow `core/containers` pattern in BasePreset
2018-06-14 19:06:20 -07:00
kyle
798cc88968 linter fixes (#4595)
* v3.16.0

* rebuild dist

* rework travis early-success trigger

* Linter fixes
2018-05-26 01:14:09 -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
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
kyle
932cc9838c fix: Callback component $$ref handling (#4454) 2018-04-18 18:05:15 -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
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
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
bb84da4e1d fix(oas3-editor-rendering): default to first server if current server becomes invalid (#4139)
* 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
2018-01-19 21:38:12 -06:00
Kyle Shockey
9bad35ed85 Refactor specPath to Im data structures to avoid waste renders 2017-12-28 18:04:12 -06:00
kyle
bfb4c7a8d7 Merge branch 'master' into feature/spec-path 2017-12-07 16:49:34 -08:00
Kyle Shockey
6f5649c6ba Only set the first server as current if we...
...don't already have a currentServer.

This avoids having the selected server reset each time the
operation is expanded, or the Try-It-Out mode is entered.
2017-11-30 17:28:35 -08:00
Kyle Shockey
0f86524514 Don't render if there are no servers defined 2017-11-30 17:11:49 -08:00
Kyle Shockey
ef3ccd7a23 Move server styles into its own scss file; add a little polish 2017-11-30 17:06:17 -08:00
Kyle Shockey
0c0c9a6519 LESS bugs 2017-11-30 16:49:26 -08:00
Kyle Shockey
945d7a3a0f Basic OperationServers wireup 2017-11-30 16:34:36 -08:00
Kyle Shockey
7e9d8f0b37 Wire up OperationServers passthrough 2017-11-30 15:30:46 -08:00
Kyle Shockey
5d3efbb5f7 Display option level information in message, not header 2017-11-30 14:37:26 -08:00
Kyle Shockey
0997c5e5d4 Remove hardwired "Server" header, make global one prettier 2017-11-30 14:34:01 -08:00
Kyle Shockey
21ff236e43 Basic OperationServers display 2017-11-30 14:25:05 -08:00
Kyle Shockey
07a9410ee5 Create OperationServers component 2017-11-30 14:07:42 -08:00
Kyle Shockey
25b9fb28dc Move Server Variables header to a more sensible location 2017-11-30 13:50:39 -08:00
Kyle Shockey
26eb07da33 Linter fixes 2017-11-17 18:52:39 -08:00
Kyle Shockey
33f8338560 Prevent RequestBody from accessing a media type that ceased to exist 2017-11-17 18:45:19 -08:00
Kyle Shockey
200b361328 Recalculate example value when requestBody value changes 2017-11-17 17:20:01 -08:00
Kyle Shockey
f44dfebd2a Add empty string tag for Callback operations 2017-11-17 16:15:43 -08:00
Kyle Shockey
84db66eb94 Rewire Callbacks usage of Operation to match new interface 2017-11-17 14:43:14 -08:00
Greg Thompson
f2cbfd0e51 contentType prop not required 2017-11-07 11:17:05 -06:00
Josh Ponelat
49d15e2a6f add specPath to parameters/requstBody 2017-11-03 17:50:47 +02:00
Helen Kosova
73371b4f9c Removed redundant "In:" label from Bearer auth dialog 2017-10-30 21:01:40 +03:00
Kyle Shockey
c9674a1fc5 Refactor Auths component flow; create component that supports HTTP auths 2017-10-18 21:23:28 -07:00
Kyle Shockey
8354132915 Fix problems regarding request body display 2017-10-02 14:45:51 -07:00
Kyle Shockey
5bc096d32b Fit linter and tests 2017-09-08 18:44:11 -07:00
Kyle Shockey
7a2c7d2cdc Squash commit: OAS3 Try-It-Out changes 2017-09-05 13:59:31 -07:00
Kyle
c5f5eff900 Merge branch 'master' into bug/3447-write-only 2017-08-10 17:16:51 -07:00
Kyle Shockey
35013d0945 Merge branch 'master' of github.com:swagger-api/swagger-ui 2017-08-08 20:15:17 -07:00
Kyle Shockey
31bf1d3779 MOAR link styling 2017-08-08 20:07:59 -07:00
Kyle Shockey
9bb0cd7689 Correct funky CSS for links 2017-08-08 19:20:28 -07:00
Kyle Shockey
15b70b6f2d Set writeOnly flags in correct places 2017-08-03 17:42:04 -07:00
Kyle Shockey
b994ae7d09 Fix bad PropTypes reference 2017-07-28 22:11:55 -07:00
Kyle Shockey
b373182afe ESLint fixes 2017-07-28 19:47:46 -07:00