Form generation for part of schema
geethapriya-mc opened this issue · 1 comments
using schema,
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "VehicleSettings",
"type": "object",
"additionalProperties": true,
"required": [
"Products"
],
"properties": {
"Products": {
"$ref": "#/definitions/ProductsModel"
}
},
"definitions": {
"ProductsModel": {
"type": "object",
"additionalProperties": true,
"required": [
"Toyota",
"Benz",
"Icon"
],
"properties": {
"Toyota": {
"$ref": "#/definitions/ToyotaModel"
},
"Benz": {
"$ref": "#/definitions/BenzModel"
}
}
},
"ToyotaModel": {
"type": "object",
"additionalProperties": true,
"required": [
"Capacity"
],
"properties": {
"Capacity": {
"title": "feul capacity",
"type": "string",
"default": "(undefined)",
"minLength": 2
}
}
},
"BenzModel": {
"type": "object",
"additionalProperties": true,
"required": [
"FuelCapacity",
"Milage"
],
"properties": {
"FuelCapacity": {
"title": "Fuel Capacity",
"type": "integer",
"format": "int32",
"default": 50
},
"Milage": {
"title": "Km/hr",
"type": "integer",
"format": "int32",
"default": 100
}
}
}
}
}
As a user/developer, how should the form definition look like if i want to generate UI for only
vehicleSettings.Products.Benz
The generated UI form should contain
FuelCapacity and Milage feilds.
It would only work in the alphas that have support for $ref, but if you use that then you can use a UI Schema of:
[
"Products.Benz"
]