Closed
Description
Having a minor issue with validation against a Schema that's being served off of GitHub (using the raw URL retrieve):
Stack trace:
#0 /Users/dylan/GitHub/swimguide-web/vendor/justinrainbow/json-schema/src/JsonSchema/Uri/UriRetriever.php(190): JsonSchema\Uri\UriRetriever->confirmMediaType(Object(JsonSchema\Uri\Retrievers\FileGetContents), 'https://raw.git...')
#1 /Users/dylan/GitHub/swimguide-web/vendor/justinrainbow/json-schema/src/JsonSchema/Uri/UriRetriever.php(162): JsonSchema\Uri\UriRetriever->loadSchema('https://raw.git...')
#2 /Users/dylan/GitHub/swimguide-web/vendor/justinrainbow/json-schema/src/JsonSchema/SchemaStorage.php(52): JsonSchema\Uri\UriRetriever->retrieve('https://raw.git...')
#3 /Users/dylan/GitHub/swimguide-web/vendor/justinrainbow/json-schema/src/JsonSchema/SchemaStorage.php(115): JsonSchema\SchemaStorage->addSchema('https://raw.git...')
#4 /Users/dylan/GitHub/swimguide-web/vendor/justinrainb in /Users/dylan/GitHub/swimguide-web/vendor/justinrainbow/json-schema/src/JsonSchema/Uri/UriRetriever.php on line 73
Basically, it looks like UriRetriever.php is demanding that the mime type of the schema document is application/schema+json
. GitHub spits out text/plain
.
Any flag or option possible to make UrlValidator ignore this and simply validate the schema syntactically?
Metadata
Metadata
Assignees
Labels
No labels