You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a JSON schema with a property key "$csv" of type "string".
This property item if it is under an "object" type, or "object" type under another "object" type then it works.
But if it is under an "object" type under another "array" type then it does not work.
Below is the JSON schema.
{
"$schema": "http://json-schema.org/draft-04/schema",
"title": "myData JSON Schema",
"description": "JSON Schema for myData config JSON document.",
"type": "object",
"ui": { "widgetConfig": { "layout": "h" } },
"properties": {
"server": {
"type": "string",
"default": "127.0.0.1:1883",
"ui": {
"label": "Server",
"description": "IP address and port number of destination server."
}
},
"$csv": {
"type": "string",
"default": "mydata-ts.csv",
"ui": {
"label": "File Name $",
"description": "Key is $csv. This works."
}
},
"csv": {
"type": "string",
"default": "mydata-ts.csv",
"ui": {
"label": "File Name",
"description": "Key is csv."
}
},
"task": {
"type": "array",
"ui": {
"label": "Tasks",
"description": "The configuration."
},
"items": {
"type": "object",
"ui": {
"label": "Task Item",
"description": "The task items.",
"widgetConfig": { "layout": "h" } },
"properties": {
"enable": {
"type": "boolean",
"default": true,
"ui": {
"label": "Enable",
"description": "Enable or disable the Modbus Master.",
"widget": "select"
}
},
"$csv": {
"type": "string",
"default": "mydata-ts.csv",
"ui": {
"label": "File Name $",
"description": "Key is $csv. This does not work. Why?"
}
},
"csv": {
"type": "string",
"default": "mydata-ts.csv",
"ui": {
"label": "File Name",
"description": "Key is csv."
}
},
"file": {
"type": "object",
"ui": { "widgetConfig": { "layout": "h" } },
"properties": {
"server": {
"type": "string",
"default": "127.0.0.1:1883",
"ui": {
"label": "Server",
"description": "IP address and port number of destination server."
}
},
"$csv": {
"type": "string",
"default": "mydata-ts.csv",
"ui": {
"label": "File Name $",
"description": "Key is $csv. This works."
}
},
"csv": {
"type": "string",
"default": "mydata-ts.csv",
"ui": {
"label": "File Name",
"description": "Key is csv."
}
}
}
},
"data": {
"type": "array",
"ui": {
"label": "Files",
"description": "List of Configuration files."
},
"items": {
"type": "object",
"ui": {
"label": "File List",
"description": "List of CSV configuration files.",
"widgetConfig": { "layout": "h" }
},
"properties": {
"$csv": {
"type": "string",
"default": "mydata-ts.csv",
"ui": {
"label": "File Name $",
"description": "Key is $csv. This does not work. Why?"
}
},
"csv": {
"type": "string",
"default": "mydata-ts.csv",
"ui": {
"label": "File Name",
"description": "Key is csv."
}
}
}
}
}
}
}
}
}
}
Below is the output generated using ncform playground https://ncform.github.io/ncform/ncform-show/playground/index.html.
The working one is highlighted in green, while the one not working is highlighted in red. I would like the red one to work correctly. Thanks.
The text was updated successfully, but these errors were encountered:
I have a JSON schema with a property key "$csv" of type "string".
This property item if it is under an "object" type, or "object" type under another "object" type then it works.
But if it is under an "object" type under another "array" type then it does not work.
Below is the JSON schema.
{
"$schema": "http://json-schema.org/draft-04/schema",
"title": "myData JSON Schema",
"description": "JSON Schema for myData config JSON document.",
"type": "object",
"ui": { "widgetConfig": { "layout": "h" } },
"properties": {
"server": {
"type": "string",
"default": "127.0.0.1:1883",
"ui": {
"label": "Server",
"description": "IP address and port number of destination server."
}
},
"$csv": {
"type": "string",
"default": "mydata-ts.csv",
"ui": {
"label": "File Name $",
"description": "Key is $csv. This works."
}
},
"csv": {
"type": "string",
"default": "mydata-ts.csv",
"ui": {
"label": "File Name",
"description": "Key is csv."
}
},
"task": {
"type": "array",
"ui": {
"label": "Tasks",
"description": "The configuration."
},
"items": {
"type": "object",
"ui": {
"label": "Task Item",
"description": "The task items.",
"widgetConfig": { "layout": "h" } },
"properties": {
"enable": {
"type": "boolean",
"default": true,
"ui": {
"label": "Enable",
"description": "Enable or disable the Modbus Master.",
"widget": "select"
}
},
"$csv": {
"type": "string",
"default": "mydata-ts.csv",
"ui": {
"label": "File Name $",
"description": "Key is $csv. This does not work. Why?"
}
},
"csv": {
"type": "string",
"default": "mydata-ts.csv",
"ui": {
"label": "File Name",
"description": "Key is csv."
}
},
"file": {
"type": "object",
"ui": { "widgetConfig": { "layout": "h" } },
"properties": {
"server": {
"type": "string",
"default": "127.0.0.1:1883",
"ui": {
"label": "Server",
"description": "IP address and port number of destination server."
}
},
"$csv": {
"type": "string",
"default": "mydata-ts.csv",
"ui": {
"label": "File Name $",
"description": "Key is $csv. This works."
}
},
"csv": {
"type": "string",
"default": "mydata-ts.csv",
"ui": {
"label": "File Name",
"description": "Key is csv."
}
}
}
},
"data": {
"type": "array",
"ui": {
"label": "Files",
"description": "List of Configuration files."
},
"items": {
"type": "object",
"ui": {
"label": "File List",
"description": "List of CSV configuration files.",
"widgetConfig": { "layout": "h" }
},
"properties": {
"$csv": {
"type": "string",
"default": "mydata-ts.csv",
"ui": {
"label": "File Name $",
"description": "Key is $csv. This does not work. Why?"
}
},
"csv": {
"type": "string",
"default": "mydata-ts.csv",
"ui": {
"label": "File Name",
"description": "Key is csv."
}
}
}
}
}
}
}
}
}
}
Below is the output generated using ncform playground https://ncform.github.io/ncform/ncform-show/playground/index.html.
The working one is highlighted in green, while the one not working is highlighted in red. I would like the red one to work correctly. Thanks.
The text was updated successfully, but these errors were encountered: