json-schema-form / json-schema-form-core

Core library
MIT License
65 stars 13 forks source link

Support for $ref? #1

Closed chinshr closed 7 years ago

chinshr commented 8 years ago

Do you have an ETA for $ref support as in the example below?

{
  "$schema": "http://json-schema.org/draft-04/schema#",

  "definitions": {
    "notes": {
      "type": "object",
      "properties": {
        "classification": {
          "type": "string",
          "enum": [
            "Lite",
            "Premium",
            "Plus",
          ]
        }
      }
    }
  },

  "title": "Customer Creative Brief",
  "type": "object",
  "properties": {
    "notes": { "$ref": "#/definitions/notes" }
  }
}
nicklasb commented 8 years ago

The situation is that the core it being broken out and that the community is preparing a 1.0 release. As this is a FOSS-project, ETA:s are difficult, so I would not dare any precises guesses and probably others won't either. It would be nice to get local $ref in 1.0, but it may also be in 1.1, the consensus seem to be that anyOf has slightly higher priority (as this can be worked around by server side resolution in many cases).

But I suppose we are talking a couple of months at the most, hopefully sooner. The discussion has been here, with an apparent work around in the original discussion about you could use until the formal support is added.

https://github.com/json-schema-form/angular-schema-form/issues/69

Anthropic commented 7 years ago

@chinshr $ref is supported in the latest versions