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

Issue resolving parent properties #104

Open
sathishk opened this issue Sep 21, 2017 · 3 comments
Open

Issue resolving parent properties #104

sathishk opened this issue Sep 21, 2017 · 3 comments

Comments

@sathishk
Copy link

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

@KiSchulte
Copy link

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.

@sathishk
Copy link
Author

sathishk commented Oct 9, 2017

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

@KiSchulte
Copy link

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.

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