Commit Graph

52 Commits

Author SHA1 Message Date
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
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
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
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
Kyle Shockey
40bd720eb4 Correctly validate OAS3 parameters that lack a schema 2017-11-28 22:19:53 -06:00
Kyle Shockey
d92a27bdab Add failing tests 2017-11-10 10:40:03 -08: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
390f4b17b1 Add graceful failure test 2017-11-03 17:11:39 -07:00
Kyle Shockey
17e6d81504 Format XML with xml-but-prettier 2017-11-02 15:13:10 -07: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
551a82d120 Remove describe.only 2017-10-30 18:00:59 -07:00
Kyle Shockey
b9fa5e5bb2 Add sanitizeUrl tests 2017-10-30 17:57:43 -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
ac24f4376b Add validatePattern & UnitTest 2017-10-21 13:04:53 -04:00
Owen Conti
18a681e231 Update all the validateParam tests to use the assertValidateParam factory 2017-10-11 19:50:02 -06:00
Owen Conti
7c8942e61c Update to utils.js to use a common method for asserting the validateParam function. 2017-10-11 19:19:24 -06:00
Owen Conti
7344315c34 Added tests for isOAS3 in validateParam function. 2017-10-11 18:34:24 -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
515726b386 Add test for negative num
Testing valid negative number with min and max
2017-09-24 15:45:42 -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
Kyle Shockey
6b59707af1 Fix tests 2017-09-22 19:50:36 -07:00
HelderSepu
e08f31d674 Add UnitTests for validateDateTime & validateGuid 2017-09-22 21:37:33 -04:00
Owen Conti
f63f022e0c Remove .only from utils test 2017-09-17 09:48:26 -06:00
Kyle Shockey
6010245210 Roll back win import removal
Lost in merge conflict....
2017-09-15 20:29:49 -07:00
Kyle
bd5424308f Merge branch 'master' into bug/oas3-accept-controls 2017-09-15 20:21:27 -07:00
Owen Conti
33ee880f36 Add extra check for String types in createDeepLinkPath. Add trim() call on passed-in value in createDeepLinkPath. Added unit tests for new deep link util functions. 2017-09-15 17:17:45 -06:00
Kyle Shockey
26edaa5f0b OAS3 Accept header control: Component-side 2017-09-12 17:22:51 -07:00
Owen Conti
f570ffcd82 Reimplemented changes from PR #3427. Added fix for validating request bodies. 2017-07-24 18:46:30 -06:00
Owen Conti
87e7142f1f Revert "Update parameter <select> elements to render 'invalid' classes. Add '.invalid' CSS for <select> elements. Rework validateParam() function. Added .btn-sm class for "Add item" and "Remove item" buttons in array parameters. Reduce border-width on <select> elements inside parameters. Update tests for utils.validateParam()."
This reverts commit 666e22f989.
2017-07-24 18:26:09 -06:00
shockey
10f12c287e Merge branch 'master' into fix-orderedmap-length 2017-07-21 19:07:36 -07:00
Owen Conti
666e22f989 Update parameter <select> elements to render 'invalid' classes. Add '.invalid' CSS for <select> elements. Rework validateParam() function. Added .btn-sm class for "Add item" and "Remove item" buttons in array parameters. Reduce border-width on <select> elements inside parameters. Update tests for utils.validateParam(). 2017-07-20 21:33:57 -06:00
Leon Weidauer
25c63b5f76 Fix length issue in OrderedMaps
Previously, a definiton with a 'length' property with numeric value
would result in an OrderedMap of that length.

This is now fixed and covered by tests
2017-07-20 12:01:00 +02:00
Owen Conti
6beaaca6e6 Fixes #3361 - Check for null and undefined values in validateParam 2017-07-10 19:46:32 -06:00
Owen Conti
551a5a81a1 Fix test for falsy values 2017-07-04 16:48:23 -06:00
Owen Conti
dd1b87e3d7 Fixes #3309 - Add same styles as regular input elements to file inputs. Add test for validating file type. 2017-07-03 18:04:49 -06:00
Owen Conti
5119c7a5db Fixes #3299 - export validateNumber and validateInteger for easy reuse and testing. Broke validateParam required check onto multiple lines. Added tests for validateNumber, validateInteger, and validateParam 2017-06-27 20:01:09 -06:00