David Porter
ddabcf8025
Merge pull request #286 from boekkooi-fresh/array-as-object
...
Support json_decode assoc
2016-08-01 19:40:51 -05:00
David Porter
c269bdaa37
Merge pull request #278 from abacaphiliac/exception-interface
...
Exception interface
2016-07-25 18:45:42 -05:00
Ben Saunders
321f6af994
Updating to use more correct hostname regex. This fixes #129
2016-07-07 16:19:47 -07:00
Warnar Boekkooi
9d8a082093
Implemented TypeCheck to allow for a common interface on how to check arrays and/or objects
2016-07-04 11:47:19 +02:00
Warnar Boekkooi
ceaece4fa5
Minor code style changes
2016-07-04 11:47:19 +02:00
Tim Younger
1a5f3396ef
add tests to validate existing exception hierarchy, in preparation for adjustment. add \RuntimeException wrapper. update all extensions of \RuntimeException to extend the wrapper. spl-exception wrappers now implement a common exception interface for this package. this allows consumers to handle all custom exception types thrown by catching the common interface rather than by catching each specific extension or their spl parents.
2016-06-28 13:10:14 -07:00
David Porter
8490e828c1
Merge pull request #234 from ehimen/fix-zero-secfrac
...
Fix: allow explicit 0 secfracs in datetime format
2016-06-28 15:00:59 -05:00
Tim B
e2d31ed665
fix instancing wrong type, breaks inheritance
...
when inheriting from TypeConstraint to change the behaviour of `validateType` (e.g. to add support for custom types), this would switch from the extended class to the base class if type is an array of types
2016-06-22 18:02:57 +02:00
Andy Cook
ffc856dbbe
Fix: allow explicit 0 secfracs in datetime format
2016-06-09 13:18:46 +01:00
David Porter
6b2a33e6a7
Merge pull request #273 from dmitry-varennikov-eventbase/uri-retriever-error-handler-2
...
Throw `ResourceNotFoundException` outside of re-defined error-handler
2016-06-02 05:59:52 -05:00
dishuostec
3ba138c6a1
Wrong constraint of error
2016-06-02 13:55:17 +08:00
Dmitry Varennikov
534f66da19
Throw ResourceNotFoundException
outside of re-defined error-handler
2016-05-25 11:33:05 -07:00
David Porter
5292a93418
Revert "Do not override error handler"
2016-05-23 16:50:55 -05:00
David Porter
6f4c8c9ced
Merge pull request #262 from dmitry-varennikov-eventbase/uri-retriever-error-handler
...
Do not override error handler
2016-05-10 15:37:51 -05:00
Dmitry Varennikov
780dd6f45f
Deleted unused stream context and check if a local file exists
2016-05-10 13:27:43 -07:00
Sławomir Chrobak
84decc9a66
Skips min/max properties validation for non objects
2016-04-29 17:04:39 +02:00
bighappyface
0e7add4652
feat(UriRetriever): application/json support
2016-04-28 08:29:49 -05:00
Joost Nijhuis
e265e9f66d
Fix RefResolver and make it compatible with draft-04 #240
2016-04-13 18:05:27 +02:00
Benoît Burnichon
6474265bda
Simplify FormatConstraint using helper class
2016-03-03 13:30:26 +01:00
Benoît Burnichon
b9ddba5760
Add Rfc339 utility class to create instances of DateTime
2016-03-03 13:24:40 +01:00
Royston Tong
dd80ff0585
Aligning error output to use json_encode() instead of print_r() when displaying objects or arrays in error message.
2016-02-27 18:57:30 +00:00
Rudolf Tucek
c2a874562e
Moving constraints min- and maxProperties to ObjectConstraint as requested from PR 224 and fixing issue 215.
2016-02-15 07:32:13 +01:00
bighappyface
10bbd1fca3
feat(Factory): add setConstraintClass
...
Adds support for setting arbitrary constraint classes by constraint name to the constraint factory
2016-01-24 12:41:17 -06:00
David Porter
dc048c6a90
Merge pull request #213 from wpillar/fix-exclusive-min-max-strictness
...
Fix exclusive min/max strictness
2016-01-06 13:07:30 -06:00
Will Pillar
8644cbeb6b
Fix exclusive min/max strictness
2016-01-06 17:43:07 +00:00
David Porter
f9e27c3e20
Merge pull request #207 from johnnoel/master
...
Fix non-6 digit microsecond date time formats
2016-01-06 08:37:04 -06:00
Dmitry Yuzhakov
f1e51539cb
Adjusted $depth restoration in RefResolver if JsonDecodingException was thrown.
2015-12-21 15:32:01 +02:00
John Noel
f3cb7ff9a7
Fix non-6 digit microsecond date time formats
...
RFC3339 allows for second fractions to be any length, however PHP's
date/time formatting ALWAYS prints them out as 6 digits. This means if a
date-time is passed with a < 6 digit second fractional, the
FormatConstraint::validateDateTime will fail as the formatted date will
contain 6 digits.
E.g. '2000-05-01T12:12:12.123Z' is passed as a date time and is valid.
However after parsing, format() will produce
'2000-05-01T12:12:12:12.123000Z'.
Fixes issue #145 .
2015-12-15 19:54:59 +00:00
Jonathan Sundqvist
73ef463f5e
An email is a string, not much else.
2015-12-15 19:16:01 +00:00
Taras ~TSK~ Anatsko
505e6f3e7f
add path to required properties
2015-12-14 12:36:59 -08:00
David Porter
8abfcaae17
Merge pull request #202 from dicexq/master
...
Fix CollectionConstraint to allow uniqueItems to be false
2015-12-03 11:25:46 -06:00
Paulo Ribeiro
2ba8f95290
delimiter defaulted to a value before loop
2015-12-02 17:52:34 -02:00
Wesley Abbenhuis
52d756792b
Fix CollectionConstraint to allow uniqueItems to be false
...
According to the latest json-schema-validation.
uniqueItems should be either a boolean or if not present, set to false
2015-12-02 10:30:37 +01:00
Paulo Ribeiro
a2beb4e587
bugfix: patternProperties raised errors when the pattern contained slash. Now the delimiter to evaluate the regex is chosen dynamically.
2015-11-11 10:15:28 -02:00
David Porter
0a9aec37ed
Merge pull request #186 from mrix/fix-additional-properties-validation
...
Fix additional properties validation
2015-11-08 07:40:31 -06:00
David Porter
09ab4dfcb2
Merge pull request #143 from Maks3w/feature/constraint-factory
...
Add constraint factory
2015-11-08 07:40:24 -06:00
sid
acdaf80a9c
* Added two optional arguments to addError method to make it easier for custom error messages
...
* Added more information to the error message of StringConstraint
* Added more information to the Constraint addError
* Unknown format does not generate error
* Updated the test so that unknown format does not throw an error
* Make messages to start with a capital letter consistently
2015-10-14 09:16:19 +13:00
aevtushenko
aaf78b2626
Fix error when additionalProperties validation is ignored.
2015-08-31 11:00:47 +06:00
Andy Raines
a24143ed38
Now more functionality for references works, although Im not sure this is the correct place for it to live
2015-08-15 15:56:39 +01:00
David Porter
8dc9b9d85a
Merge pull request #161 from f-go/max_depth_fix
...
Throw exception if max depth exceeded
2015-07-14 11:29:50 -05:00
Frank Göldner
0398e45d9e
Throw exception if max depth exceeded
2015-07-14 10:27:20 +02:00
Andreas Möller
5ac997b43c
Fix: Be more specific with error message
2015-07-13 19:05:04 -04:00
Andreas Möller
1e9f9b2c02
Fix: Start all messages with a capital letter
2015-07-13 09:36:57 -04:00
David Porter
44adc6f255
Merge pull request #167 from localheinz/fix/return
...
Fix: Constraint::addError() does not return anything
2015-07-13 00:06:53 -05:00
David Porter
66c1330d0f
Merge pull request #154 from samkeen/fix_empty_property_keyname_when_property_is_missing
...
For missing properties, the key for that error in set to ""
2015-07-13 00:06:01 -05:00
Andreas Möller
67629df54a
Fix: Constraint::addError() does not return anything
2015-07-12 23:09:38 -04:00
Andreas Möller
72e81d6821
Fix: Remove unused imports
2015-07-12 23:04:55 -04:00
samkeen
a71086d68b
For missing properties, the key for that error in set to ""
...
- Expected bahavior is that the key would be set to the poperty name.
- added tests to ensure the "property" is populated regardless
of required attribute is completely missing or has empty value.
2015-06-16 15:45:20 -07:00
Maks3w
34f9ae1d8b
Add constraint factory
...
This factory can be injected and allow extend built-in constraint types with custom ones.
2015-06-14 22:32:02 +02:00
David Porter
7f55a9727e
Merge pull request #153 from alecsammon/missingFileWarning
...
Fix warning on file_get_contents
2015-06-14 14:57:49 -05:00