Skip to content

Local file reference does not appear to be working. #50

@trajano

Description

@trajano

I tried to use this with a JSON that contains local references which resolve using json-to-typescript

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "Completed Quiz",
  "type": "object",
  "required": ["studentInfo", "evaluationInfo", "completedQuiz"],
  "properties": {
    "studentInfo": {
      "type": "object",
      "oneOf": [{ "$ref": "./XXXXStudent.schema.json" }]
    }
  }
}

But I get

C:\Users\trajano\AppData\Local\Volta\tools\image\packages\json-schema-faker-cli\node_modules\json-schema-faker-cli\node_modules\json-schema-faker\dist\main.cjs:2646
      throw new Error(`${e.message} in /${e.path.join("/")}`);
      ^

Error: Error: Reference not found: ./XXXXStudent.schema.json
    at recursiveUtil.resolveSchema (C:\Users\trajano\AppData\Local\Volta\tools\image\packages\json-schema-faker-cli\node_modules\json-schema-faker-cli\node_modules\json-schema-faker\dist\main.cjs:2497:21)

I verified that ./XXXXStudent.schema.json exists in the same folder.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions