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

Can't resolve any reference to external schema #241

Closed
ThomasKuhlmann opened this issue Jul 8, 2021 · 1 comment
Closed

Can't resolve any reference to external schema #241

ThomasKuhlmann opened this issue Jul 8, 2021 · 1 comment

Comments

@ThomasKuhlmann
Copy link

Hi,

I am using https://github.com/bcherny/json-schema-to-typescript and keep running immediately into issues when trying to reference another JSON schema file.

Right now I created two simple test files:

project.json

{
  "$id": "project",
  "type": "object",
  "properties": {
    "priority": { "$ref": "priority" }
  }
}

priority.json

{
  "$id": "priority",
  "type": "string",
  "default": "priority string"
}

I pretty much immediately get this error:
'SyntaxError: Unable to resolve $ref pointer "/Users/thomaskuhlmann/Projects/kreelu/packages/backend/cloud/src/schemas/priority"

The path is correct, and there aren't any further details anywhere - any suggestions on how to troubleshoot this one?

Much obliged!
Thomas

@philsturgeon
Copy link
Member

This tool was not designed to resolve $id. The conversation is over here and it’s basically in need of a new tool which is not yet finished. #145

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

2 participants