This is a sample of the json schema that I am using . Similarly there are other schemas with different fields based on the user input on the previous page.
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"title": "Product ID",
"properties": {
"suite": {
"type": "string",
"description": "Suite",
"enum": [
"PRICING_TEST",
"PRICING_DYNAMIC",
"E2E",
"E2E_TIME_PERIOD"
]
},
"tag": {
"type": "string",
"description": "Tag",
"examples": [
"e2e-supplier-api-avail-and-pricing"
]
},
"currency": {
"type": "string",
"description": "Currency",
"examples": [
"EUR"
]
},
"ticketType": {
"type": "string",
"description": "Ticket Type",
"enum": [
"TEXT",
"BARCODE_CODE39",
"BARCODE_CODE128",
"QR_CODE",
"DATA_MATRIX",
"EAN_13",
"ITF",
"PDF_FILE",
"AZTEC"
]
},
"ticketCode": {
"type": "string",
"description": "Ticket Code"
},
"vacancies": {
"type": "number",
"description": "Vacancies",
"examples": [
100
]
},
"pricesByCategory": {
"type": "object",
"properties": {
"ADULT": {
"type": "number"
},
"CHILD": {
"type": "number"
},
"YOUTH": {
"type": "number"
},
"INFANT": {
"type": "number"
},
"SENIOR": {
"type": "number"
},
"STUDENT": {
"type": "number"
}
},
"description": "Category mapping"
},
"data": {
"type": "object",
"properties": {
"configuration": {
"type": "string",
"description": "Configuration"
},
"cutoffSeconds": {
"type": "number",
"description": "Cut-off Seconds"
},
"errorCode": {
"type": "string",
"description": "Error code",
"examples": [
"VALIDATION_FAILURE"
]
},
"method": {
"type": "string",
"description": "Method",
"enum": [
"get-vacancies",
"addToCart",
"removeFromCart",
"confirm",
"cancel-confirm",
"notify"
]
}
}
}
}
}
After using both vanillaRenderes and VuetifyRenderes together, getting this type of form on the FE.
-
Can you suggest a better solution (better renderer) in order to improve how form looks on the FE. e.g. there are no borders on the text box. I haven’t added a UI Schema as it is based on the fields of the form, that keeps changing in my use case based on the user input on the previous page
-
Can you also suggest how to control the input in each fields without Using UI schema? For example if the minLength is 3 and user only enters 2 characters, then put a red alert below the text box.
Similarly control for the String and Integer fields?
In the other schemas , we also have fields with type : “array”, e.g. -
"startTime": {
"type": "array",
"description": "Start time",
"examples": [
"09:00"
]
},
Does JSON Forms supports string array , and not the key value pair array i.e. { 0 : 09:00 , 1 : 11:00 } ??
Additional Note : We are soon going to migrate to Vue3 , thats why I chose JSONForms as it compatible with both Vue2 and Vue3 .