brutusin/json-forms

Issue resolving parent properties

Opened this issue · 3 comments

I have 3 schemas (A, B and C). each has one property each. Where as C is referencing B and B is referencing A. A is Parent, B is child and C is grandchild. Below is the schema.

{
	"$schema": "http://json-schema.org/draft-06/schema#",
	"id": "C",
	"type": "object",
	"$ref": "#/definitions/B",
	"definitions": {
		"A": {
			"$schema": "http://json-schema.org/draft-06/schema#",
			"id": "A",
			"type": "object",
			"properties": {
				"A-Prop": {
					"type": "string"
				}
			}
		},
		"B": {
			"$schema": "http://json-schema.org/draft-06/schema#",
			"id": "B",
			"type": "object",
			"$ref": "#/definitions/A",
			"properties": {
				"B-Prop": {
					"type": "string"
				}
			}
		}
	},
	"properties": {
		"C-Prop": {
			"type": "string"
		}
	}
}

When i pass this to the json-form i expect to all the 3 properties . but i see only the property of A as given below

screen shot 2017-09-21 at 7 39 04 pm

Mhh, whats the reason for this structure. Maybe you can describe what you want to achieve.
I don't understand hwat you mean with referencing, here.

I am doing inheritance here. I have 3 types . A, B and C. A is my Base Type . B extends A. C extends B.

So, C should have 1 property and inherit 2 from it's super types A and B respectively. In total C should have 3 properties.

For Eg, If we supply the above schema at http://jeremydorn.com/json-editor/. We get below Form

screen shot 2017-10-09 at 3 06 49 pm

Ok got it. I assume you just reduced it to an easy example. I just wan't sure what you wanted ti achieve with this structure.