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

Error: JSONForm does not yet support schemas that use the $ref keyword. See: #54" #441

Open
PengZhao-GitHub opened this issue Dec 5, 2023 · 2 comments

Comments

@PengZhao-GitHub
Copy link

https://ulion.github.io/jsonform/playground/

JSON Schema - Inline $ref to definitions is supported in the playground above,

but when I use the example.html and give a schema with inline $ref, I get error as

"The JSON Form library returned:
Error: JSONForm does not yet support schemas that use the $ref keyword. See: #54"

Any idea? thanks!

@PengZhao-GitHub
Copy link
Author

PengZhao-GitHub commented Dec 5, 2023

Here is the JSON Schema - Inline $ref to definitions. It works well in the playground, but get error in the current master version.

{
  "schema": {
    "properties": {
      "animal": {
        "$ref": "#/definitions/animation"
      }
    },
    "definitions": {
      "animation": {
        "type": "object",
        "properties": {
          "duration": {
            "title": "Duration",
            "type": "integer"
          },
          "stepper": {
            "title": "Stepper",
            "type": "string"
          },
          "then": {
            "title": "Then",
            "type": "array",
            "maxItems": 1,
            "items": {
              "$ref": "#/definitions/animation"
            },
            "default": []
          }
        }
      }
    }
  }
}

edited: added code block for readability

@sdetweil
Copy link
Contributor

sdetweil commented Dec 7, 2023

this is a bug in playground.. $ref is not currently supported

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

No branches or pull requests

2 participants