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

Schema with object in object #40

Open
charliefancelli opened this issue Mar 27, 2018 · 0 comments
Open

Schema with object in object #40

charliefancelli opened this issue Mar 27, 2018 · 0 comments

Comments

@charliefancelli
Copy link

charliefancelli commented Mar 27, 2018

Hi,

Is it possible to describe a schema with an object in a object ?
The idea is to describe an object button with its own properties and using this object in many other objects like in this example :

"schema": {
	"button": {
		"type": "object",
		"legend": "Bouton",
		"properties": {
			"title": {
			  "title": "Text in the button",
			  "type": "string"
			},
			"link": {
			  "title": "Link of the button",
			  "type": "string",
			},
			"type": {
			  "title": "Type of link",
			  "type": "string",
			  "enum": ["_self", "_blank"]
			}
		}
	},
	"sectionTitle": {
 		"type": "object",
		"properties": {
			"title": {
			  "title": "Titre",
			  "description": "",
			  "type": "string"
			},
			"button": {
				"type": "button"
			}
		}
	},
	"myItem": {
		"type": "object",
		"properties": {
			"other": {
			  "title": "Other object",
			  "description": "",
			  "type": "string"
			},
			"button": {
				"type": "button"
			}
		}
   	}
...

Thanks,

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

1 participant