Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uploading JSONSchema with $ref fails #34

Open
tegx opened this issue Jul 2, 2021 · 1 comment
Open

Uploading JSONSchema with $ref fails #34

tegx opened this issue Jul 2, 2021 · 1 comment
Labels
discussion If there are multiple options, they can be discussed.

Comments

@tegx
Copy link

tegx commented Jul 2, 2021

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.

@VolkerHartmann VolkerHartmann added the discussion If there are multiple options, they can be discussed. label Jul 21, 2021
@VolkerHartmann
Copy link
Contributor

Not sure how to handle this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion If there are multiple options, they can be discussed.
Projects
None yet
Development

No branches or pull requests

2 participants