You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Doing this results in an assertion failure with the message "is an invalid type for file". Here's a branch with a test case showing that: master...MasonM:bug-with-schema-file
Output on my machine:
$ ./vendor/bin/phpunit
PHPUnit 6.2.4 by Sebastian Bergmann and contributors.
.E............................................................... 65 / 93 ( 69%)
............................ 93 / 93 (100%)
Time: 93 ms, Memory: 10.00MB
There was 1 error:
1) FR3D\SwaggerAssertions\PhpUnit\AssertsTraitTest::testAssertResponseBodyMatchWithFile
JsonSchema\Exception\InvalidArgumentException: GIF89a,; is an invalid type for file
/Users/mmalone/src/SwaggerAssertions/vendor/justinrainbow/json-schema/src/JsonSchema/Constraints/TypeConstraint.php:143
/Users/mmalone/src/SwaggerAssertions/vendor/justinrainbow/json-schema/src/JsonSchema/Constraints/TypeConstraint.php:73
/Users/mmalone/src/SwaggerAssertions/vendor/justinrainbow/json-schema/src/JsonSchema/Constraints/Constraint.php:201
/Users/mmalone/src/SwaggerAssertions/vendor/justinrainbow/json-schema/src/JsonSchema/Constraints/UndefinedConstraint.php:130
/Users/mmalone/src/SwaggerAssertions/vendor/justinrainbow/json-schema/src/JsonSchema/Constraints/UndefinedConstraint.php:36
/Users/mmalone/src/SwaggerAssertions/vendor/justinrainbow/json-schema/src/JsonSchema/Constraints/Constraint.php:217
/Users/mmalone/src/SwaggerAssertions/vendor/justinrainbow/json-schema/src/JsonSchema/Constraints/SchemaConstraint.php:29
/Users/mmalone/src/SwaggerAssertions/vendor/justinrainbow/json-schema/src/JsonSchema/Validator.php:36
/Users/mmalone/src/SwaggerAssertions/src/PhpUnit/JsonSchemaConstraint.php:41
/Users/mmalone/src/SwaggerAssertions/src/PhpUnit/AssertsTrait.php:37
/Users/mmalone/src/SwaggerAssertions/tests/PhpUnit/AssertsTraitTest.php:43
ERRORS!
Tests: 93, Assertions: 211, Errors: 1.
The text was updated successfully, but these errors were encountered:
The Swagger 2.0 spec supports having a Schema object with root type "file", which is an extension to JSON Schema:
Doing this results in an assertion failure with the message "is an invalid type for file". Here's a branch with a test case showing that: master...MasonM:bug-with-schema-file
Output on my machine:
The text was updated successfully, but these errors were encountered: