Skip to content

JsonSchema\Exception\InvalidSchemaMediaTypeException for file:// schema's #860

@Vincentv92

Description

@Vincentv92

Since release 5.3.1 we are running into the exception of invalid schema media types. On 5.3.0 our codebase did not have any issues with the mediatype.

When i look at the changelog 5.3.0...5.3.1 it appears it starts checking for http_get_last_response_headers

The challenge we are facing is that our test suite is running an integration test (in http context) but it validates the schema with a local file on disk. It appears, with this change, it is checking the headers of the http call of the integration test and not of the actual schema (because it's file://, there is no http header) which does not match up with the Media type application/schema+json expected simply because there is no header.

I'am still digging what a potential solution could be, but i first wanted the issue report here in case someone else is also running into this

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions