Skip to content

Uploading JSONSchema with $ref fails #34

@tegx

Description

@tegx

When I upload a schema with a property using $ref, I get the error java.io.FileNotFoundException: http://example.org/abc.
I would expect that the validator does not resolve this URL and only checks if the schema is valid against the metaschema.

Example:

{
    "$schema": "https://json-schema.org/draft/2019-09/schema",
    "$id": "http://example.org/idontcare",
    "title": "Doesntmatter",
    "type": "object",
    "properties": {
        "abc": {
            "$ref": "http://example.org/abc"
        }
    }
}

Hint: I think the problem is that in JsonUtils::validateJsonSchemaDocument the same validation method is used as validating a document against a schema which requires resolving the URL.

Metadata

Metadata

Assignees

No one assigned

    Labels

    discussionIf there are multiple options, they can be discussed.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions