Commit Graph

97 Commits

Author SHA1 Message Date
Andrey Torsunov
505d056c71 improve: add support of RFC5987 Content-Disposition formats (via #4952)
* Add support of RFC5987 for Content-Disposition

For example, `attachement; filename*=UTF-8'ru'%D1%81%D0%B2%D0%B5%D0%B4%D0%B5%D0%BD%D0%B8%D1%8F.xlsx` in result will be  `сведения.xlsx`.

* Test of support of RFC5987 in Content-Disposition
2018-10-19 11:42:37 -05:00
kyle
3c3b7e0bf1 bug(deeplinking): escaping breaks whitespaces & underscored tags/ids (via #4953)
* add tests for operation lacking an operationId
* add deep linking tests for tags/operationIds with underscores
* migrate from `_` to `%20` for deeplink hash whitespace escaping
* add backwards compatibility for `_` whitespace escaping
* update util unit tests
2018-10-16 18:51:29 -05:00
kyle
955352251b fix(try-it-out): stringify numerical initial values in ParameterRow (#4767)
* add failing tests
* coerce initial values to string
* only convert numbers to strings when setting parameter values
2018-07-27 01:17:36 -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
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
kyle
9d02a7d8ad fix(sample-gen): respect null values in examples (via #4679)
* improvement: re-enable and improve Models jump-to-path

* fix(sample-gen): respect null values in examples
2018-06-27 19:40:00 -07:00
kyle
f53f92351e fix: sample generation for nested oject schemas (#4648) 2018-06-14 16:56:03 -07:00
kyle
c1007a287b feature: OAS3 object parameter support (#4563)
* render suitable interface for `type: object` parameters

* validate OAS3 object parameters correctly

* display parameter validation errors

* remove irrelevant css classes

* rm comment

* fix failing tests

* add validateParam tests

* add enzyme tests for object parameter rendering

* run actual tests first
2018-05-16 22:48:44 -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
Ville Skyttä
14473dd51d fix: misc. spelling errors (#4421) 2018-04-09 15:58:52 -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
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
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
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
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
linelson
b3e80cc500 fix(tic-validation): uuid format parameter validation should be case insensitive (#4102)
* fix uuid validation casing (#4099)
* add test
2018-01-11 18:42:37 -06:00
narutowyh
12a9fbc0ca fix: ignore prototype's keys in a handful of for...in loops 2018-01-05 21:57:17 -06:00
Juan J. Jimenez-Anca
bd41b736a8 feat: display last error when definition/config load fails
Contains a breaking internal API change to `errActions.newThrownErr`, which will require a MINOR version bump. Swagger-Editor does not depend on the old usage style.
2018-01-05 21:45:21 -06:00
Josh Ponelat
733cddf146 Be more nodejs friendly, tweak some lines 2017-12-06 21:02:45 +02:00
Kyle Shockey
40bd720eb4 Correctly validate OAS3 parameters that lack a schema 2017-11-28 22:19:53 -06:00
Greg Thompson
0d0b3279bb Merge branch 'master' into ft/3052-extensions 2017-11-13 09:29:19 -06:00
Kyle Shockey
365585ceea Add check for 0 value for number and integer parameter values 2017-11-10 10:45:19 -08:00
Greg Thompson
a58cd25f08 Merge branch 'master' into ft/3052-extensions 2017-11-06 09:18:51 -06:00
Greg Thompson
44c422eba3 parameter extensions display 2017-11-06 09:17:30 -06:00
kyle
4315cf6b94 Merge branch 'master' into bug/validation-messages 2017-11-03 17:17:21 -07:00
kyle
b584837f42 Merge branch 'master' into master 2017-11-03 17:12:35 -07:00
Kyle Shockey
17e6d81504 Format XML with xml-but-prettier 2017-11-02 15:13:10 -07:00
HelderSepu
034ebb021c Remove redundant Boolean call 2017-11-01 22:00:39 -04:00
Helder Sepulveda
7fd1a03c1d Merge branch 'master' into bug/slow-formatXml 2017-11-01 21:52:45 -04:00
HelderSepu
f600fe8dbb Simplify formatXml 2017-11-01 21:48:18 -04:00
Helder Sepulveda
87bbb9eb9f Merge branch 'master' into bug/validation-messages 2017-11-01 09:33:00 -04:00
Helder Sepulveda
d73715f1fa Merge branch 'master' into master 2017-11-01 09:32:49 -04:00
Kyle Shockey
1aa1907128 Check for input type and string length before sanitizing a URL 2017-10-31 12:35:08 -07:00
Kyle Shockey
afa615e01d Add URL sanitizer to avoid javascript: XSS attack vector 2017-10-30 17:43:23 -07:00
HelderSepu
ec2179f019 Fix issue with the error messages
Many of the errors where incorrectly showing "Required field is not
provided" when the field was provided but not valid.
This was raised by @ron on PR #3825
2017-10-28 16:21:40 -04:00
HelderSepu
43c5d9a8c9 Revert "Add objectCheck"
This reverts commit 87d11f99dd.
2017-10-24 18:35:28 -04:00
HelderSepu
87d11f99dd Add objectCheck
Squeeze fix for required object on this PR
2017-10-24 17:49:56 -04:00
HelderSepu
efa468bac5 remove semicolon 2017-10-21 13:20:48 -04:00
HelderSepu
ac24f4376b Add validatePattern & UnitTest 2017-10-21 13:04:53 -04:00
Owen Conti
7344315c34 Added tests for isOAS3 in validateParam function. 2017-10-11 18:34:24 -06:00
Owen Conti
a0f8f9a05d Fixes #3747
Update `validateParam` to handle OAS3 parameters.
2017-10-11 17:46:38 -06:00
Kyle Shockey
012313e236 Handle cases where maximum and minimum are 0 2017-09-28 17:59:07 -07:00
kyle
27da2a7d3b Merge branch 'master' into ft/validation 2017-09-28 17:53:14 -07:00
HelderSepu
a408fb1f23 Correction from @shockey 2017-09-28 20:40:22 -04:00
HelderSepu
7d40d72281 Add validateMaximum & validateMinimum
This address some of the validation requested on Issue #993
2017-09-24 11:43:47 -04:00
HelderSepu
a5c7083726 Add validation for min and max length 2017-09-23 14:14:58 -04:00
HelderSepu
e08f31d674 Add UnitTests for validateDateTime & validateGuid 2017-09-22 21:37:33 -04:00
HelderSepu
7d9b56255c Correction to the validateDateTime 2017-09-22 17:44:01 -04:00
HelderSepu
11768b16bf Correct IF for validateDateTime & validateGuid 2017-09-22 11:30:07 -04:00
HelderSepu
85b7b7241d Add validateDateTime & validateGuid
Initial work to tacke some of the missing validation (Issue #993)
2017-09-19 14:31:27 -04:00