Skip to content

Reference to local files (with relative/no path) doesn't work #98

@sblask

Description

@sblask

I am trying to create a json schema (draft 4) which uses definitions from another file and includes them using $ref. I don't have any URL set up for the definitions file and I wasn't planning on doing that. I thought "$ref": "definitions.json#a_definition" (definitions.json lying in the same directory) would be enough, but I get a "No such file or directory" error.

I am not sure this should work, but this: http://code.google.com/p/jsonschema2pojo/wiki/Reference#$ref suggests it should ("$ref" : "user.json"). Googling/reading the draft didn't get me anywhere.

Using file://absolute/path/to/json/file does work, but that would be super ugly. Is there a better way to do what I want to do? Or is this something that needs fixing?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions