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

Relative base uri means references cannot be resolved #299

Open
jazpearson opened this issue Sep 14, 2022 · 0 comments
Open

Relative base uri means references cannot be resolved #299

jazpearson opened this issue Sep 14, 2022 · 0 comments

Comments

@jazpearson
Copy link

In this simple schema example, the $id is a relative URI.
However, when i try to use $defs within the schema to make things re-usable within the schema, there are issues trying to resolve the schema reference:

Could not resolve schema reference 'schemas/customer#/$defs/name'. Path 'properties.first_name', line 5, position 19.
{
  "$id": "/schemas/customer",
  "type": "object",
  "properties": {
    "first_name": { "$ref": "#/$defs/name" }
  },
  "required": [ "first_name" ],
  "$defs": {
    "name": { "type": "string" }
  }
}

Are relative base URIs just a complete no-no or is there something wrong with the schema, or perhaps is the library missing something?

Any help would be most appreciated. We do have a license for this too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant