diff --git a/bundles/af-core/src/main/java/com/adobe/cq/forms/core/components/internal/models/v1/form/FragmentImpl.java b/bundles/af-core/src/main/java/com/adobe/cq/forms/core/components/internal/models/v1/form/FragmentImpl.java index 9cff4e983f..0614fcef10 100644 --- a/bundles/af-core/src/main/java/com/adobe/cq/forms/core/components/internal/models/v1/form/FragmentImpl.java +++ b/bundles/af-core/src/main/java/com/adobe/cq/forms/core/components/internal/models/v1/form/FragmentImpl.java @@ -43,7 +43,9 @@ import com.adobe.cq.forms.core.components.models.form.FormContainer; import com.adobe.cq.forms.core.components.models.form.Fragment; import com.adobe.cq.forms.core.components.util.ComponentUtils; +import com.adobe.cq.forms.core.components.views.Views; import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonView; @Model( adaptables = { SlingHttpServletRequest.class, Resource.class }, @@ -80,7 +82,7 @@ private void initFragmentModel() { } } - @JsonIgnore + @JsonView(Views.Author.class) public String getFragmentPath() { return fragmentPath; } diff --git a/bundles/af-core/src/main/java/com/adobe/cq/forms/core/components/models/form/FormContainer.java b/bundles/af-core/src/main/java/com/adobe/cq/forms/core/components/models/form/FormContainer.java index 67717dffd6..463ccbbbd4 100644 --- a/bundles/af-core/src/main/java/com/adobe/cq/forms/core/components/models/form/FormContainer.java +++ b/bundles/af-core/src/main/java/com/adobe/cq/forms/core/components/models/form/FormContainer.java @@ -64,7 +64,7 @@ public interface FormContainer extends Container { */ String PN_CLIENT_LIB_REF = GuideConstants.CLIENT_LIB_REF; - String DEFAULT_FORMS_SPEC_VERSION = "0.14.2"; + String DEFAULT_FORMS_SPEC_VERSION = "0.15.2"; /** * Returns form metadata {@link FormMetaData} diff --git a/bundles/af-core/src/test/java/com/adobe/cq/forms/core/Utils.java b/bundles/af-core/src/test/java/com/adobe/cq/forms/core/Utils.java index e9ec338061..bfb7df2ce1 100644 --- a/bundles/af-core/src/test/java/com/adobe/cq/forms/core/Utils.java +++ b/bundles/af-core/src/test/java/com/adobe/cq/forms/core/Utils.java @@ -53,7 +53,7 @@ */ public class Utils { - public static InputStream getJson(Object model) { + public static InputStream getJson(Object model, Class viewType) { Writer writer = new StringWriter(); ObjectMapper mapper = new ObjectMapper(); PageModuleProvider pageModuleProvider = new PageModuleProvider(); @@ -61,7 +61,7 @@ public static InputStream getJson(Object model) { DefaultMethodSkippingModuleProvider defaultMethodSkippingModuleProvider = new DefaultMethodSkippingModuleProvider(); mapper.registerModule(defaultMethodSkippingModuleProvider.getModule()); try { - mapper.writerWithView(Views.Publish.class).writeValue(writer, model); + mapper.writerWithView(viewType).writeValue(writer, model); } catch (IOException e) { fail(String.format("Unable to generate JSON export for model %s: %s", model.getClass().getName(), e.getMessage())); @@ -77,7 +77,7 @@ public static InputStream getCompleteJson(Object model) { DefaultMethodSkippingModuleProvider defaultMethodSkippingModuleProvider = new DefaultMethodSkippingModuleProvider(); mapper.registerModule(defaultMethodSkippingModuleProvider.getModule()); try { - mapper.writer().writeValue(writer, model); + mapper.writerWithView(Views.Author.class).writeValue(writer, model); } catch (IOException e) { fail(String.format("Unable to generate JSON export for model %s: %s", model.getClass().getName(), e.getMessage())); @@ -95,8 +95,8 @@ public static InputStream getCompleteJson(Object model) { * @param expectedJsonResource * the class path resource providing the expected JSON object */ - public static void testJSONExport(Object model, String expectedJsonResource) { - InputStream modeInputStream = getJson(model); + public static void testJSONExport(Object model, String expectedJsonResource, Class viewType) { + InputStream modeInputStream = getJson(model, viewType); JsonReader outputReader = Json.createReader(modeInputStream); InputStream is = Utils.class.getResourceAsStream(expectedJsonResource); if (is != null) { @@ -113,6 +113,20 @@ public static void testJSONExport(Object model, String expectedJsonResource) { } } + /** + * Provided a {@code model} object and an {@code expectedJsonResource} identifying a JSON file in the class path, + * this method will test the JSON export of the model and compare it to the JSON object provided by the + * {@code expectedJsonResource}. + * + * @param model + * the Sling Model + * @param expectedJsonResource + * the class path resource providing the expected JSON object + */ + public static void testJSONExport(Object model, String expectedJsonResource) { + testJSONExport(model, expectedJsonResource, Views.Publish.class); + } + /** * The given model is validated against adaptive form specification * @@ -126,14 +140,14 @@ public static void testSchemaValidation(@NotNull Object model) { // create an instance of the JsonSchemaFactory using version flag JsonSchemaFactory schemaFactory = JsonSchemaFactory.getInstance(SpecVersion.VersionFlag.V7); try { - InputStream schemaStream = Utils.class.getResourceAsStream("/schema/0.14.2/adaptive-form.schema.json"); + InputStream schemaStream = Utils.class.getResourceAsStream("/schema/0.15.2/adaptive-form.schema.json"); JsonSchema schema = schemaFactory.getSchema(schemaStream); // read data from the stream and store it into JsonNode JsonNode json = objectMapper.readTree(jsonStream); // if there is a version bump of schema, then it needs to be validated against its corresponding sling model here // by explicitly checking the model implementation if (!(model instanceof FormContainerImpl)) { - InputStream formContainerTemplate = Utils.class.getResourceAsStream("/schema/0.14.2/form.json"); + InputStream formContainerTemplate = Utils.class.getResourceAsStream("/schema/0.15.2/form.json"); JsonNode formContainerTemplateNode = objectMapper.readTree(formContainerTemplate); ((ObjectNode) formContainerTemplateNode).putArray("items").add(json); json = formContainerTemplateNode; diff --git a/bundles/af-core/src/test/java/com/adobe/cq/forms/core/components/internal/models/v1/form/FragmentImplTest.java b/bundles/af-core/src/test/java/com/adobe/cq/forms/core/components/internal/models/v1/form/FragmentImplTest.java index ec4b4ec85f..2faf4b2d1c 100644 --- a/bundles/af-core/src/test/java/com/adobe/cq/forms/core/components/internal/models/v1/form/FragmentImplTest.java +++ b/bundles/af-core/src/test/java/com/adobe/cq/forms/core/components/internal/models/v1/form/FragmentImplTest.java @@ -38,6 +38,7 @@ import com.adobe.cq.forms.core.components.models.form.FormClientLibManager; import com.adobe.cq.forms.core.components.models.form.Fragment; import com.adobe.cq.forms.core.components.models.form.TextInput; +import com.adobe.cq.forms.core.components.views.Views; import com.adobe.cq.forms.core.context.FormsCoreComponentTestContext; import com.day.cq.wcm.api.NameConstants; import com.day.cq.wcm.msm.api.MSMNameConstants; @@ -55,6 +56,7 @@ public class FragmentImplTest { private static final String PATH_FRAGMENT = CONTENT_ROOT + "/fragment"; private static final String PATH_FRAGMENT_DAMPATH = CONTENT_ROOT + "/fragment-dampath"; private static final String PATH_FRAGMENT_WITHOUT_FIELDTYPE = CONTENT_ROOT + "/fragment-without-fieldtype"; + private static final String PATH_FRAGMENT_WITH_FRAGMENT_PATH = CONTENT_ROOT + "/fragment-with-fragment-path"; private final AemContext context = FormsCoreComponentTestContext.newAemContext(); @BeforeEach @@ -133,6 +135,12 @@ void testJSONExportWithDamPath() throws Exception { Utils.testJSONExport(fragment, Utils.getTestExporterJSONPath(BASE, PATH_FRAGMENT_DAMPATH)); } + @Test + void testJSONExportWithFragmentPath() throws Exception { + Fragment fragment = Utils.getComponentUnderTest(PATH_FRAGMENT_WITH_FRAGMENT_PATH, Fragment.class, context); + Utils.testJSONExport(fragment, Utils.getTestExporterJSONPath(BASE, PATH_FRAGMENT_WITH_FRAGMENT_PATH), Views.Author.class); + } + @Test void testGetChildrenModels() { Fragment fragment = Utils.getComponentUnderTest(PATH_FRAGMENT, Fragment.class, context); diff --git a/bundles/af-core/src/test/resources/form/fragment/exporter-fragment-with-fragment-path.json b/bundles/af-core/src/test/resources/form/fragment/exporter-fragment-with-fragment-path.json new file mode 100644 index 0000000000..f9cb5a81ed --- /dev/null +++ b/bundles/af-core/src/test/resources/form/fragment/exporter-fragment-with-fragment-path.json @@ -0,0 +1,56 @@ +{ + "id": "fragment-c83f64bf1d", + "fieldType": "panel", + "name": "fragment-123", + "type": "object", + "repeatable": true, + "minOccur": 0, + "maxOccur": 4, + "fragmentPath": "/content/affragment", + "properties": { + "customProp": "customPropValue", + "fd:dor": { + "dorExclusion": false, + "dorExcludeTitle": false, + "dorExcludeDescription": false + }, + "fd:path": "/content/fragment-with-fragment-path", + "fd:fragment": true, + "fd:viewType": "fragment" + }, + "label": { + "value": "Fragment" + }, + "events": { + "custom:setProperty": [ + "$event.payload" + ] + }, + ":itemsOrder": [ + "textinput" + ], + ":items": { + "textinput": { + "id": "textinput-233cc688ba", + "fieldType": "text-input", + "name": "fragmenttextinput", + "type": "string", + "label": { + "value": "Text Input" + }, + "properties": { + "fd:dor": { + "dorExclusion": false + }, + "fd:path": "/content/affragment/jcr:content/guideContainer/textinput" + }, + "events": { + "custom:setProperty": [ + "$event.payload" + ] + }, + ":type": "core/fd/components/form/textinput/v1/textinput" + } + }, + ":type": "core/fd/components/form/fragment/v1/fragment" +} \ No newline at end of file diff --git a/bundles/af-core/src/test/resources/form/fragment/test-content.json b/bundles/af-core/src/test/resources/form/fragment/test-content.json index 93caa46d2c..eb61e61c96 100644 --- a/bundles/af-core/src/test/resources/form/fragment/test-content.json +++ b/bundles/af-core/src/test/resources/form/fragment/test-content.json @@ -41,6 +41,21 @@ "sling:resourceType": "core/fd/components/form/fragment/v1/fragment", "fragmentPath": "/content/affragment" }, + "fragment-with-fragment-path": { + "jcr:primaryType": "nt:unstructured", + "wrapData": true, + "jcr:title": "Fragment", + "minOccur": "0", + "jcr:lastModifiedBy": "admin", + "name": "fragment-123", + "maxOccur": "4", + "jcr:lastModified": "Fri Jun 02 2023 12:34:24 GMT+0530", + "repeatable": true, + "sling:resourceType": "core/fd/components/form/fragment/v1/fragment", + "fieldType": "panel", + "fragmentPath": "/content/affragment", + "customProp": "customPropValue" + }, "affragment": { "jcr:primaryType": "nt:unstructured", "jcr:title": "AF Fragment (v2)", diff --git a/bundles/af-core/src/test/resources/schema/0.15.2/adaptive-form-aem-allowed-components.schema.json b/bundles/af-core/src/test/resources/schema/0.15.2/adaptive-form-aem-allowed-components.schema.json new file mode 100644 index 0000000000..01df34336b --- /dev/null +++ b/bundles/af-core/src/test/resources/schema/0.15.2/adaptive-form-aem-allowed-components.schema.json @@ -0,0 +1,18 @@ +{ + "$id": "classpath:/schema/0.15.2/adaptive-form-aem-allowed-components.schema.json", + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "title": "Allowed Components object for the current panel.", + "description": "This is applicable only if the panel's layout is grid system. This property is useful if needs to show list of allowed components in the client while authoring the panel.", + "properties": { + "components": { + "type": "array", + "title": "List of simple objects representing all Allowed Components for the given panel" + }, + "applicable": { + "type": "boolean", + "title": "Is the given panel contained by a page, with authored template structure and is the given panel set as editable (unlocked)", + "description": "true if the template has structure support and the panel is editable, false otherwise" + } + } +} \ No newline at end of file diff --git a/bundles/af-core/src/test/resources/schema/0.15.2/adaptive-form-aem-responsive-grid-properties.schema.json b/bundles/af-core/src/test/resources/schema/0.15.2/adaptive-form-aem-responsive-grid-properties.schema.json new file mode 100644 index 0000000000..3d73b635e5 --- /dev/null +++ b/bundles/af-core/src/test/resources/schema/0.15.2/adaptive-form-aem-responsive-grid-properties.schema.json @@ -0,0 +1,52 @@ +{ + "$id": "classpath:/schema/0.15.2/adaptive-form-aem-responsive-grid-properties.schema.json", + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "properties": { + "allowedComponents": { + "$ref": "./adaptive-form-aem-allowed-components.schema.json" + }, + "appliedCssClassNames": { + "title": "CSS classes delimited using a SPACE character", + "description": "Describes the style system information associated with the current form element", + "type": "string", + "examples": [ + { + "appliedCssClassNames": "outlined red-border" + } + ] + }, + "gridClassNames": { + "title": "The CSS class names to be applied to the current panel delimited using a SPACE character", + "description": "This is applicable only if the panel's layout is grid system.", + "type": "string", + "examples": [ + { + "gridClassNames": "aem-Grid aem-Grid--12 aem-Grid--default--12" + } + ] + }, + "columnClassNames": { + "title": "The CSS class names associated with each responsive grid column and listed by column name", + "description": "This is applicable only if the panel's layout is grid system.", + "type": "object", + "examples": [ + { + "columnClassNames": { + "title_v3": "aem-GridColumn aem-GridColumn--default--12" + } + } + ] + }, + "columnCount": { + "title": "The number of columns available for direct children in the panel.", + "description": "This is applicable only if the panel's layout is grid system.", + "type": "number", + "examples": [ + { + "columnCount": 12 + } + ] + } + } +} \ No newline at end of file diff --git a/bundles/af-core/src/test/resources/schema/0.15.2/adaptive-form-container-dor-properties.schema.json b/bundles/af-core/src/test/resources/schema/0.15.2/adaptive-form-container-dor-properties.schema.json new file mode 100644 index 0000000000..8a7b0c8c28 --- /dev/null +++ b/bundles/af-core/src/test/resources/schema/0.15.2/adaptive-form-container-dor-properties.schema.json @@ -0,0 +1,44 @@ +{ + "$id": "classpath:/schema/0.15.2/adaptive-form-container-dor-properties.schema.json", + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "properties": { + "dorType": { + "title": "DOR Type", + "description": "Describes the type of Document of Record (DOR)", + "type": "string", + "enum": [ + "generate", + "select" + ], + "examples": [ + { + "dorType": "generate" + } + ] + }, + "dorTemplateRef": { + "title": "DOR Template Reference", + "description": "Reference to the template for the Document of Record (DOR).", + "type": "string", + "examples": [ + { + "dorTemplateRef": "/content/dam/formsanddocuments/acro form conversion.pdf" + } + ] + }, + "dorTemplateType": { + "title": "DOR Template Type", + "description": "Type of the template for the Document of Record (DOR).", + "enum": [ + "acroform", + "xfa" + ], + "type": "string" + }, + "pageTemplate": { + "$ref": "./print/adaptive-form-page-template-properties.schema.json" + } + } +} \ No newline at end of file diff --git a/bundles/af-core/src/test/resources/schema/0.15.2/adaptive-form-data-constraints.schema.json b/bundles/af-core/src/test/resources/schema/0.15.2/adaptive-form-data-constraints.schema.json new file mode 100644 index 0000000000..dfd2d12e2b --- /dev/null +++ b/bundles/af-core/src/test/resources/schema/0.15.2/adaptive-form-data-constraints.schema.json @@ -0,0 +1,143 @@ +{ + "$id": "classpath:/schema/0.15.2/adaptive-form-data-constraints.schema.json", + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "Constraints applicable to fields", + "type": "object", + "properties": { + "accept": { + "title": "The constraint is applicable for fields having type file or with fields having type string and format as data-url / binary. It signifies the list of IANA media types that fields can accept.", + "type": "array", + "items": { + "type": "string" + } + }, + "enforceEnum": { + "title": "Whether a user can enter a value that is not present in the enum array", + "description": "If set to true, a user will be able to enter any other value that is not in the list of enum. That generally means that enum is used a aid for users to enter the value but is not a validation constraint.", + "type": "boolean" + }, + "exclusiveMaximum": { + "title": "maximum value or date (exclusive)", + "oneOf": [ + { + "type": "string", + "format": "date" + }, + { + "type": "number" + } + ] + }, + "exclusiveMinimum": { + "title": "minimum value or date (exclusive)", + "oneOf": [ + { + "type": "string", + "format": "date" + }, + { + "type": "number" + } + ] + }, + "format": { + "title": "formats as specified in JSON Schema. The constraint is applicable only for string data types", + "type": "string", + "enum": [ + "date", + "email", + "date-time", + "data-url" + ] + }, + "maxFileSize": { + "title": "The constraint is applicable for fields having type file or with fields having type string and format as data-url / binary. It signifies the maximum file size as per IEC specification", + "type": "string" + }, + "maximum": { + "title": "maximum value or date (inclusive)", + "oneOf": [ + { + "type": "string", + "format": "date" + }, + { + "type": "number" + } + ] + }, + "maxItems": { + "title": "Maximum number of items in a field/panel capturing array data", + "type": "number" + }, + "maxOccur": { + "title": "Maximum number of occurrence of repeating panel - capturing array data,", + "type": "number" + }, + "maxLength": { + "title": "Maximum Length of the data. The constraint is applicable only for string data types", + "type": "number" + }, + "minimum": { + "title": "minimum value or date (inclusive)", + "oneOf": [ + { + "type": "string", + "format": "date" + }, + { + "type": "number" + } + ] + }, + "minItems": { + "title": "Minimum number of items in a field/panel capturing array data", + "type": "number" + }, + "minOccur": { + "title": "Minimum number of occurrence of repeating panel - capturing array data", + "type": "number" + }, + "minLength": { + "title": "Minimum Length of the data. The constraint is applicable only for string data types", + "type": "number" + }, + "pattern": { + "title": "The regular expression against which the value will be compared against", + "type": "string", + "format": "regex" + }, + "required": { + "type": "boolean", + "title": "Indicates whether the value is required or not" + }, + "step": { + "title": "The constraint is applicable for fields having type number. It signifies the value should be a multipleOf some number", + "type": "number" + }, + "type": { + "title": "Data Type of the value that this field captures. When submitting the value will be coerced into the format specified by the type", + "type": "string", + "enum": [ + "string", + "file", + "number", + "array", + "object", + "string[]", + "file[]", + "number[]", + "boolean[]", + "boolean" + ] + }, + "uniqueItems": { + "title": "Array items must be unique", + "type": "boolean" + }, + "validationExpression": { + "type": "string", + "format": "json-formula" + } + } +} \ No newline at end of file diff --git a/bundles/af-core/src/test/resources/schema/0.15.2/adaptive-form-data-layer.schema.json b/bundles/af-core/src/test/resources/schema/0.15.2/adaptive-form-data-layer.schema.json new file mode 100644 index 0000000000..0df12a9ebd --- /dev/null +++ b/bundles/af-core/src/test/resources/schema/0.15.2/adaptive-form-data-layer.schema.json @@ -0,0 +1,60 @@ +{ + "$id": "classpath:/schema/0.15.2/adaptive-form-data-layer.schema.json", + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "properties": { + "@id": { + "type": "string", + "title": "Id of the form element" + }, + "@type": { + "type": "string", + "title": "Type of the form element used in the data layer" + }, + "repo:modifyDate": { + "type": "string", + "title": "Last modified date using ISO 8601 standard" + }, + "parentId": { + "type": "string", + "title": "Parent id of the form element" + }, + "dc:title": { + "type": "string", + "title": "Label of the form element used in the data layer" + }, + "dc:description": { + "type": "string", + "title": "Description of the form element used in the data layer" + }, + "xdm:text": { + "type": "string", + "title": "Text of the form element used in the data layer" + }, + "xdm:linkURL": { + "type": "string", + "title": "Link URL of the form element used in the data layer" + }, + "fieldType": { + "title": "Type of widget to show to the user for capturing the data", + "enum": [ + "text-input", + "number-input", + "date-input", + "file-input", + "multiline-input", + "drop-down", + "radio-group", + "checkbox-group", + "checkbox", + "switch", + "plain-text", + "button", + "panel", + "image", + "email", + "captcha" + ] + } + } +} \ No newline at end of file diff --git a/bundles/af-core/src/test/resources/schema/0.15.2/adaptive-form-defaults.schema.json b/bundles/af-core/src/test/resources/schema/0.15.2/adaptive-form-defaults.schema.json new file mode 100644 index 0000000000..63acc34b8e --- /dev/null +++ b/bundles/af-core/src/test/resources/schema/0.15.2/adaptive-form-defaults.schema.json @@ -0,0 +1,255 @@ +{ + "$id": "classpath:/schema/0.15.2/adaptive-form-defaults.schema.json", + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "The schema defines the default field types for Form Fields", + "allOf": [ + { + "title": "Default field for capturing date types is date-input", + "if": { + "type": "object", + "properties": { + "type": { + "const": "string" + }, + "format": { + "const": "date" + } + }, + "required": [ + "type", + "format" + ] + }, + "then": { + "type": "object", + "properties": { + "fieldType": { + "default": "date-input" + } + } + } + }, + { + "title": "Default field for capturing file types is file-input", + "if": { + "type": "object", + "properties": { + "type": { + "enum": [ + "file", + "file[]" + ] + } + }, + "required": [ + "type" + ] + }, + "then": { + "type": "object", + "properties": { + "fieldType": { + "default": "file-input" + } + } + } + }, + { + "title": "Default field for capturing file types is file-input", + "if": { + "type": "object", + "properties": { + "type": { + "const": "string" + }, + "format": { + "enum": [ + "binary", + "data-url" + ] + } + }, + "required": [ + "type", + "format" + ] + }, + "then": { + "type": "object", + "properties": { + "fieldType": { + "default": "file-input" + } + } + } + }, + { + "title": "Default field for capturing string type is text-input", + "if": { + "type": "object", + "properties": { + "type": { + "const": "string" + } + }, + "required": [ + "type" + ] + }, + "then": { + "type": "object", + "properties": { + "fieldType": { + "default": "text-input" + } + } + } + }, + { + "title": "Default Field for capturing number types is number-input", + "if": { + "type": "object", + "properties": { + "type": { + "const": "number" + } + }, + "required": [ + "type" + ] + }, + "then": { + "type": "object", + "properties": { + "fieldType": { + "default": "number-input" + } + } + } + }, + { + "title": "Default field for capturing data that can be only be one of two values is checkbox", + "if": { + "type": "object", + "properties": { + "enum": { + "type": "array", + "maxItems": 2 + } + }, + "required": [ + "enum" + ] + }, + "then": { + "type": "object", + "properties": { + "fieldType": { + "default": "checkbox" + } + } + } + }, + { + "title": "Default field for capturing boolean data is checkbox", + "if": { + "type": "object", + "properties": { + "type": { + "const": "boolean" + } + }, + "required": [ + "type" + ] + }, + "then": { + "type": "object", + "properties": { + "fieldType": { + "default": "checkbox" + }, + "enum": { + "default": [ + true, + false + ] + } + } + } + }, + { + "title": "Default field for capturing data that allows only a set of options is drop-down", + "if": { + "type": "object", + "properties": { + "enum": { + "type": "array", + "minItems": 3 + } + }, + "required": [ + "enum" + ] + }, + "then": { + "type": "object", + "properties": { + "fieldType": { + "default": "drop-down" + } + } + } + }, + { + "title": "Default field for capturing complex types is panel", + "if": { + "type": "object", + "properties": { + "items": { + "type": [ + "array", + "object" + ] + } + }, + "required": [ + "items" + ] + }, + "then": { + "type": "object", + "properties": { + "fieldType": { + "default": "panel" + } + } + } + }, + { + "title": "Default value of dataRef for static text is none", + "if": { + "type": "object", + "properties": { + "fieldType": { + "enum": [ + "button", + "plain-text" + ] + } + }, + "required": [ + "fieldType" + ] + }, + "then": { + "type": "object", + "properties": { + "dataRef": { + "default": "none" + } + } + } + } + ] +} \ No newline at end of file diff --git a/bundles/af-core/src/test/resources/schema/0.15.2/adaptive-form-dor-properties.schema.json b/bundles/af-core/src/test/resources/schema/0.15.2/adaptive-form-dor-properties.schema.json new file mode 100644 index 0000000000..c260dee242 --- /dev/null +++ b/bundles/af-core/src/test/resources/schema/0.15.2/adaptive-form-dor-properties.schema.json @@ -0,0 +1,61 @@ +{ + "$id": "classpath:/schema/0.15.2/adaptive-form-dor-properties.schema.json", + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "properties": { + "dorColspan": { + "title": "DOR Colspan", + "description": "Specifies the colspan attribute for the Document of Record (DOR). This attribute controls the number of columns a form element should span.", + "type": "string" + }, + "breakAfterText": { + "title": "Break After Text", + "description": "Indicates whether a break should occur after the text content of the Document of Record (DOR). This affects the layout and presentation of the DOR.", + "type": "string" + }, + "breakBeforeText": { + "title": "Break Before Text", + "description": "Indicates whether a break should occur before the text content of the Document of Record (DOR). This influences the layout and presentation of the DOR.", + "type": "string" + }, + "overflowText": { + "title": "Overflow Text", + "description": "Specifies how overflow should be handled for the text content of the Document of Record (DOR). This property controls how text exceeding the available space is displayed.", + "type": "string" + }, + "dorLayoutType": { + "title": "DOR Layout Type", + "description": "Defines the layout type for the Document of Record (DOR). This property determines how the DOR elements are arranged and presented.", + "type": "string" + }, + "dorNumCols": { + "title": "DOR Number of Columns", + "description": "Specifies the number of columns for the layout of the Document of Record (DOR). This property determines how the DOR elements are arranged and presented in columns.", + "type": "string" + }, + "dorBindRef": { + "title": "DOR Binding Reference", + "description": "Specifies the binding reference for the Document of Record (DOR). This property determines how the DOR elements are bound to data.", + "type": "string" + }, + "dorExclusion": { + "title": "DOR Exclusion.", + "description": "Exclusion flag for the Document of Record (DOR).", + "type": "boolean" + }, + "dorExcludeTitle": { + "title": "Exclude Title in DOR.", + "description": "Flag to exclude title in the Document of Record (DOR).", + "type": "boolean" + }, + "dorExcludeDescription": { + "title": "Exclude Description in DOR.", + "description": "Flag to exclude description in the Document of Record (DOR).", + "type": "boolean" + }, + "dorContainer": { + "$ref": "./print/adaptive-form-dor-container-properties.schema.json" + } + } +} \ No newline at end of file diff --git a/bundles/af-core/src/test/resources/schema/0.15.2/adaptive-form-events.schema.json b/bundles/af-core/src/test/resources/schema/0.15.2/adaptive-form-events.schema.json new file mode 100644 index 0000000000..d1abf9a5fb --- /dev/null +++ b/bundles/af-core/src/test/resources/schema/0.15.2/adaptive-form-events.schema.json @@ -0,0 +1,79 @@ +{ + "$id": "classpath:/schema/0.15.2/adaptive-form-events.schema.json", + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "Specify what operations to perform on certain user or custom events.", + "description": "Events is a dictionary of eventName to the actions to perform. Whenever the event is dispatched the expressions defined on that event are evaluated. The return value of that expression is applied to the field. The return value of the expression can be either of\n * null, literal or array: The value property of the field is set to the return value\n * dictionary: The field json is merged with the returned dictionary\n * empty dictionary: the field should not be modified.", + "$defs": { + "SingleEventHandler": { + "type": "string", + "format": "json-formula" + }, + "EventHandler": { + "oneOf": [ + { + "$ref": "#/$defs/SingleEventHandler" + }, + { + "type": "array", + "items": { + "$ref": "#/$defs/SingleEventHandler" + } + } + ] + } + }, + "type": "object", + "properties": { + "click": { + "$ref": "#/$defs/EventHandler" + }, + "initialize": { + "$ref": "#/$defs/EventHandler" + }, + "focus": { + "$ref": "#/$defs/EventHandler" + }, + "blur": { + "$ref": "#/$defs/EventHandler" + }, + "change": { + "$ref": "#/$defs/EventHandler" + }, + "submit": { + "$ref": "#/$defs/EventHandler" + } + }, + "propertyNames": { + "anyOf": [ + { + "enum": [ + "click", + "initialize", + "focus", + "blur", + "change", + "submit", + "submitError", + "submitFailure", + "submitSuccess" + ] + }, + { + "pattern": "custom:[a-zA-Z0-9]+" + } + ], + "errorMessage": "${0} is not a valid Event Name. It should be either click, initialize, focus, blur, change, submitError, submitFailure, submitSuccess or a custom event" + }, + "examples": [ + { + "Terms&Conditions": [ + { + "name": "terms" + }, + { + "click": "{value: true}" + } + ] + } + ] +} \ No newline at end of file diff --git a/bundles/af-core/src/test/resources/schema/0.15.2/adaptive-form-label.schema.json b/bundles/af-core/src/test/resources/schema/0.15.2/adaptive-form-label.schema.json new file mode 100644 index 0000000000..1e1517025a --- /dev/null +++ b/bundles/af-core/src/test/resources/schema/0.15.2/adaptive-form-label.schema.json @@ -0,0 +1,24 @@ +{ + "$id": "classpath:/schema/0.15.2/adaptive-form-label.schema.json", + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "properties": { + "richText": { + "type": "boolean", + "default": false, + "title": "If the value of the label is to be considered as rich text or plain text" + }, + "visible": { + "type": "boolean", + "title": "If the field's visible property is false, this property is ignored.", + "default": true + }, + "value": { + "type": "string", + "title": "The content of the label. If the rich text property is set to true, the contents will be considered as Rich Text" + } + }, + "required": [ + "value" + ] +} \ No newline at end of file diff --git a/bundles/af-core/src/test/resources/schema/0.15.2/adaptive-form-properties.schema.json b/bundles/af-core/src/test/resources/schema/0.15.2/adaptive-form-properties.schema.json new file mode 100644 index 0000000000..55edb3c17a --- /dev/null +++ b/bundles/af-core/src/test/resources/schema/0.15.2/adaptive-form-properties.schema.json @@ -0,0 +1,344 @@ +{ + "$id": "classpath:/schema/0.15.2/adaptive-form-properties.schema.json", + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "$defs": { + "SingleEventHandler": { + "type": "string", + "format": "json-formula" + }, + "EventHandler": { + "oneOf": [ + { + "$ref": "#/$defs/SingleEventHandler" + }, + { + "type": "array", + "items": { + "$ref": "#/$defs/SingleEventHandler" + } + } + ] + } + }, + "allOf": [ + { + "$ref": "./adaptive-form-aem-responsive-grid-properties.schema.json" + }, + { + "type": "object", + "properties": { + ":type": { + "type": "string", + "title": "A hint to the rendering engine for rendering custom components." + }, + "altText": { + "title": "For images an alternate string to be displayed in case image cannot be shown", + "type": "string" + }, + "autocomplete": { + "title": "Provide assistance to the end users to autocomplete values saved during previous form filling sessions", + "type": "string" + }, + "checked": { + "title": "Indicates the checked status of the checkbox. The property is available only for fieldType checkbox If the value of this property is true, then the checkbox is selected and its value is set to on value. This value overrides the default property in case of a conflict.", + "type": "boolean" + }, + "constraintMessages": { + "title": "An object containing the custom error messages to be shown to the end user on different constraint validation", + "type": "object", + "propertyNames": { + "enum": [ + "type", + "required", + "minimum", + "maximum", + "minLength", + "maxLength", + "step", + "format", + "pattern", + "minItems", + "maxItems", + "maxOccur", + "minOccur", + "maxFileSize", + "accept", + "uniqueItems", + "enforceEnum", + "validationExpression" + ], + "errorMessage": "${0} is not a valid constraintMessage" + } + }, + "dataFormat": { + "type": "string", + "title": "The format in which the value will be exported or submitted. Applicable for date and number types." + }, + "dataRef": { + "type": [ + "string", + "null" + ], + "title": "The jsonpath of the data instance that is mapped to the field's value.", + "description": "It will be defined relative to the parent's dataRef property except for the two conditions. * null signifying don't save the data of this field or panel. * jsonpath begining with \"$.\" signifying that the jsonpath is not relative to the parent's dataRef property.\nIf the parent's dataRef is set to \"none\", then it will be relative to the" + }, + "default": { + "title": "The value of the field when no value is provided by the end user or data model.", + "description": "The type of this property should match the value of the `type` property defined in the Field. If not, then a type coercion will be tried and if that fails, the value will be set to null.", + "oneOf": [ + { + "type": [ + "string", + "number", + "boolean" + ] + }, + { + "type": "array", + "items": { + "type": [ + "string", + "number", + "boolean" + ] + } + } + ] + }, + "description": { + "type": "string", + "title": "Extra description to be shown to the user to aid in form filling experience. It can be rich text. Can be used as help text for a field or a top level description for a Panel" + }, + "displayFormat": { + "type": "string", + "title": "The format in which the value will be displayed to the user on screen in the field.", + "description": "The format in which the value will be displayed to the user on screen in the field. Applicable for date and number types. For example when using a currency field, the currency sign should be shown to the user." + }, + "editFormat": { + "type": "string", + "title": "The format in which the value will be edited by the user.", + "description": "The format in which the value will be edited by the user. Applicable for date and number types. For instance users in Germany would want to interchange decimal (.) and comma (,) when entering numerical values." + }, + "displayValueExpression": { + "type": "string", + "title": "The json-formula expression which when evaluated will return the value that will be displayed to the user on screen in the field.", + "description": "The json-formula expression which when evaluated will return the value that will be displayed to the user on screen in the field. Applicable for date,number, text, email and telephone input fields. For instance users might need to mask certain chars in the input." + }, + "emptyValue": { + "type": [ + "string" + ], + "title": "The value when user has not entered any value in the field", + "description": "Determines what value should be saved when user has not entered any value in the field. Can be one of\n * null\n * undefined\n * \"\" (empty string) (only valid for dataType = string)", + "enum": [ + "null", + "undefined", + "" + ] + }, + "enabled": { + "type": "boolean", + "title": "whether the field is enabled and takes part in rules, events etc. A disabled field can have calculations and custom events" + }, + "enum": { + "title": "A list of options to put restrictions on the possible values of the field", + "description": "The type of values in the enum array must match the value of the `type` property defined in the field. For array type fields, the type of element in the In case the `type` property is not defined, then the type of elements in the enum becomes the value of the `type` property. If the value of the `type` property doesn't match with the type of values in the `enum` array, then a type coercion will be made to match the `type` property. If the coercion is not possible, then the value will be set to null", + "type": "array", + "items": { + "type": [ + "string", + "boolean", + "number" + ] + }, + "uniqueItems": true + }, + "enumNames": { + "title": "A user friendly text to display for the possible options to be shown to the end user.", + "description": "The length of enum and enumNames array must match. In case the length of enum is greator, then those will be used as display text for the user. If the length of enumNames is greator, those will be discarded. enumNames will be an array of rich text strings.", + "type": "array", + "items": { + "type": "string" + } + }, + "events": { + "$ref": "./adaptive-form-events.schema.json" + }, + "fieldType": { + "title": "Type of widget to show to the user for capturing the data", + "description": "It must be one of the types from the list * text-input * number-input * date-input * datetime-input * file-input * drop-down * radio-group * plain-text * checkbox * button * plain-text * panel * multiline-input * panel * image * email * captcha * tel * password * range * color * hidden * url * pageset * pagearea * medium * contentarea * barcode * line * rectangle * proto * template", + "enum": [ + "text-input", + "number-input", + "date-input", + "datetime-input", + "file-input", + "multiline-input", + "drop-down", + "radio-group", + "checkbox-group", + "checkbox", + "switch", + "plain-text", + "button", + "panel", + "image", + "email", + "captcha", + "tel", + "password", + "range", + "color", + "hidden", + "url", + "pageset", + "pagearea", + "medium", + "contentarea", + "barcode", + "line", + "rectangle", + "proto", + "template" + ] + }, + "label": { + "$ref": "./adaptive-form-label.schema.json" + }, + "lang": { + "type": "string", + "title": "The language to use for formatting the field.", + "description": "The language needs to be defined as per the [BCP 47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) tag" + }, + "dataLayer": { + "$ref": "./adaptive-form-data-layer.schema.json" + }, + "name": { + "type": "string", + "title": "Name of the element. It is also the key in the JSON data, if dataRef is not defined explicitly, that the form produces. If two fields/panels under a same panel have the same name, their values will be same" + }, + "placeholder": { + "type": "string", + "title": "The placeholder to show on the widget." + }, + "properties": { + "title": "An object containing custom properties that can be modified via rules as well.", + "type": "object", + "properties": { + "fd:dor": { + "$ref": "./adaptive-form-dor-properties.schema.json" + } + }, + "additionalProperties": true + }, + "readOnly": { + "type": "boolean", + "title": "whether the field should be readOnly to author or not", + "description": "Determines how an element is treated: 'readOnly=true' means it cannot be modified by user. It will participate in all the events." + }, + "richText": { + "type": "boolean", + "description": "whether the content of the text to be treated as rich text or not" + }, + "rules": { + "type": "object", + "title": "Rules that modify the property of the object dynamically", + "description": "An author can dynamically change any property that is defined in the spec as modifiable. The rules are evaluated whenever the dependency changes. Apart from properties defined on the field, rules can have an extra key `value` which auto computes the value of the field", + "additionalProperties": { + "type": "string" + }, + "propertyNames": { + "not": { + "enum": [ + "name", + "default", + "type", + "fieldType", + "items", + "displayFormat", + "editFormat", + "rules", + "events", + "props" + ] + } + }, + "examples": [ + { + "rules": { + "required": "$form.maritalStatus.value == 'married'" + } + }, + { + "lastName": { + "name": "lastName", + "rules": { + "value": "$form.firstName.value & ' ' & $form.lastName.value" + } + } + } + ] + }, + "screenReaderText": { + "type": "string", + "title": "a string to indicate the text to be read by screen readers" + }, + "tooltip": { + "type": "string", + "title": "Tooltip of the form element" + }, + "visible": { + "type": "boolean", + "title": "whether the field should be visible to author or not" + }, + "fragmentPath": { + "type": "string", + "title": "The path to the fragment that is used to render the fragment", + "description": "This property would only be present if fd:viewType is set to fragment" + }, + "id": { + "type": "string", + "title": "unique identifier for a form element" + }, + "items": { + "title": "Fields/Panels inside a Panel", + "description": "If the Fields inside a panel are repeatable then the items should be an array containing only 1 field", + "type": "array", + "errorMessage": { + "oneOf": "Items must be an array with atleast 1 field" + } + }, + "repeatable": { + "type": "boolean", + "title": "whether the field/panel should be repeatable or not", + "description": "If the property is present on a field, then the data would be generated as an array depending upon the type property on the field and if the property is present on a panel then the data would be an array of object/array depending upon the value of the type property. If the type is object, then items must have a name property. If type is array, then name property in the items would be ignored." + }, + ":items": { + "title": "Fields/Panels inside a Panel", + "description": "If the Fields inside a panel are repeatable then the items should be an array containing only 1 field", + "type": "object", + "errorMessage": { + "oneOf": "Items must be an object with atleast 1 field" + } + }, + ":itemsOrder": { + "title": "Order of Fields/Panels inside a Panel", + "description": "Order of items in the object specified by :items", + "type": "array", + "errorMessage": { + "oneOf": "Items Order must be an array with atleast 1 field" + }, + "examples": [ + { + ":itemsOrder": [ + "firstName", + "lastName" + ] + } + ] + } + } + } + ] +} \ No newline at end of file diff --git a/bundles/af-core/src/test/resources/schema/0.15.2/adaptive-form-property-restrictions.schema.json b/bundles/af-core/src/test/resources/schema/0.15.2/adaptive-form-property-restrictions.schema.json new file mode 100644 index 0000000000..a86c558edf --- /dev/null +++ b/bundles/af-core/src/test/resources/schema/0.15.2/adaptive-form-property-restrictions.schema.json @@ -0,0 +1,396 @@ +{ + "$id": "classpath:/schema/0.15.2/adaptive-form-property-restrictions.schema.json", + "$schema": "http://json-schema.org/draft-07/schema#", + "$defs": { + "Date": { + "title": "property with type date", + "type": "string", + "format": "date" + }, + "DateField": { + "type": "object", + "properties": { + "type": { + "enum": [ + "string", + "string[]" + ] + }, + "format": { + "const": "date" + } + }, + "required": [ + "type", + "format" + ] + }, + "NumberField": { + "type": "object", + "properties": { + "type": { + "enum": [ + "number", + "number[]" + ] + } + }, + "required": [ + "type" + ] + }, + "DateOrNumberField": { + "type": "object", + "oneOf": [ + { + "$ref": "#/$defs/NumberField" + }, + { + "$ref": "#/$defs/DateField" + } + ] + }, + "StringTypeField": { + "title": "field having type string", + "type": "object", + "properties": { + "type": { + "enum": [ + "string", + "string[]" + ] + } + } + }, + "FileTypeField": { + "title": "field with type file having format as data-url or binary", + "type": "object", + "properties": { + "type": { + "enum": [ + "string", + "string[]" + ] + }, + "format": { + "enum": [ + "binary", + "data-url" + ] + } + } + }, + "OptimizedFileTypeField": { + "title": "field having type file", + "type": "object", + "properties": { + "type": { + "enum": [ + "file", + "file[]" + ] + } + } + } + }, + "title": "The schema defines constraints on which Headless Adaptive Form properties can be used together", + "allOf": [ + { + "title": "minimum constraint is valid only for numeric or date types", + "type": "object", + "dependencies": { + "minimum": { + "oneOf": [ + { + "allOf": [ + { + "type": "object", + "properties": { + "minimum": { + "type": "number" + } + } + }, + { + "$ref": "#/$defs/NumberField" + } + ] + }, + { + "allOf": [ + { + "type": "object", + "properties": { + "minimum": { + "$ref": "#/$defs/Date" + } + } + }, + { + "$ref": "#/$defs/DateField" + } + ] + } + ] + } + }, + "errorMessage": "minimum constraint is valid only for numeric or date types" + }, + { + "title": "exclusiveMinimum constraint is valid only for numeric or date types", + "type": "object", + "dependencies": { + "exclusiveMinimum": { + "oneOf": [ + { + "allOf": [ + { + "type": "object", + "properties": { + "exclusiveMinimum": { + "type": "number" + } + } + }, + { + "$ref": "#/$defs/NumberField" + } + ] + }, + { + "allOf": [ + { + "type": "object", + "properties": { + "exclusiveMinimum": { + "$ref": "#/$defs/Date" + } + } + }, + { + "$ref": "#/$defs/DateField" + } + ] + } + ] + } + }, + "errorMessage": "exclusiveMinimum constraint is valid only for numeric or date types" + }, + { + "title": "maximum constraint is valid only for numeric or date types", + "type": "object", + "dependencies": { + "maximum": { + "oneOf": [ + { + "allOf": [ + { + "type": "object", + "properties": { + "maximum": { + "type": "number" + } + } + }, + { + "$ref": "#/$defs/NumberField" + } + ] + }, + { + "allOf": [ + { + "type": "object", + "properties": { + "maximum": { + "$ref": "#/$defs/Date" + } + } + }, + { + "$ref": "#/$defs/DateField" + } + ] + } + ] + } + }, + "errorMessage": "maximum constraint is valid only for numeric or date types" + }, + { + "title": "exclusiveMaximum constraint is valid only for numeric or date types", + "type": "object", + "dependencies": { + "exclusiveMinimum": { + "oneOf": [ + { + "allOf": [ + { + "type": "object", + "properties": { + "exclusiveMinimum": { + "type": "number" + } + } + }, + { + "$ref": "#/$defs/NumberField" + } + ] + }, + { + "allOf": [ + { + "type": "object", + "properties": { + "exclusiveMinimum": { + "$ref": "#/$defs/Date" + } + } + }, + { + "$ref": "#/$defs/DateField" + } + ] + } + ] + } + }, + "errorMessage": "exclusiveMaximum constraint is valid only for numeric or date types" + }, + { + "title": "step constraint is valid only for number type or date types", + "type": "object", + "dependencies": { + "step": { + "$ref": "#/$defs/DateOrNumberField" + } + }, + "errorMessage": "step constraint is valid only for date and number type" + }, + { + "title": "format, pattern, minLength and maxLength constraint are valid only for fields with type string", + "type": "object", + "dependencies": { + "format": { + "$ref": "#/$defs/StringTypeField" + }, + "pattern": { + "$ref": "#/$defs/StringTypeField" + }, + "minLength": { + "$ref": "#/$defs/StringTypeField" + }, + "maxLength": { + "$ref": "#/$defs/StringTypeField" + } + }, + "errorMessage": "format, pattern, minLength and maxLength constraint are valid only for fields with type string" + }, + { + "title": "enforceEnum is valid only if enum property is defined", + "type": "object", + "dependencies": { + "enforceEnum": { + "type": "object", + "required": [ + "enum" + ] + } + }, + "errorMessage": "enforceEnum is valid only if enum property is defined" + }, + { + "title": "minItems, maxItems, uniqueItems are valid only for type array", + "type": "object", + "dependencies": { + "minItems": { + "type": "object", + "properties": { + "type": { + "enum": [ + "array", + "string[]", + "boolean[]", + "number[]", + "file[]" + ] + } + } + }, + "maxItems": { + "type": "object", + "properties": { + "type": { + "enum": [ + "array", + "string[]", + "boolean[]", + "number[]", + "file[]" + ] + } + } + }, + "uniqueItems": { + "type": "object", + "properties": { + "type": { + "enum": [ + "array", + "string[]", + "boolean[]", + "number[]", + "file[]" + ] + } + } + } + }, + "errorMessage": "minItems, maxItems are valid only for type array" + }, + { + "title": "maxFileSize, accept are valid only for file types", + "type": "object", + "dependencies": { + "maxFileSize": { + "oneOf": [ + { + "$ref": "#/$defs/OptimizedFileTypeField" + }, + { + "$ref": "#/$defs/FileTypeField" + } + ] + }, + "accept": { + "oneOf": [ + { + "$ref": "#/$defs/OptimizedFileTypeField" + }, + { + "$ref": "#/$defs/FileTypeField" + } + ] + } + }, + "errorMessage": "maxFileSize, accept are valid only for file types" + }, + { + "title": "editFormat, displayFormat, dataFormat are valid only for fields with type date or number", + "type": "object", + "dependencies": { + "editFormat": { + "$ref": "#/$defs/DateOrNumberField" + }, + "displayFormat": { + "$ref": "#/$defs/DateOrNumberField" + }, + "dataFormat": { + "$ref": "#/$defs/DateOrNumberField" + } + } + } + ] +} \ No newline at end of file diff --git a/bundles/af-core/src/test/resources/schema/0.15.2/adaptive-form-sign-properties.schema.json b/bundles/af-core/src/test/resources/schema/0.15.2/adaptive-form-sign-properties.schema.json new file mode 100644 index 0000000000..7442fc25ee --- /dev/null +++ b/bundles/af-core/src/test/resources/schema/0.15.2/adaptive-form-sign-properties.schema.json @@ -0,0 +1,25 @@ +{ + "$id": "classpath:/schema/0.15.2/adaptive-form-sign-properties.schema.json", + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "properties": { + "firstSignerFormFiller": { + "title": "First Signer Form Filler", + "description": "Specifies whether the signer is the first form filler.", + "type": "boolean" + }, + "workflowType": { + "title": "Workflow Type", + "enum": [ + "SEQUENTIAL", + "PARALLEL" + ], + "description": "Specifies the type of workflow for the sign.", + "type": "string" + }, + "signers": { + "$ref": "./adaptive-form-signer-properties.schema.json" + } + } +} \ No newline at end of file diff --git a/bundles/af-core/src/test/resources/schema/0.15.2/adaptive-form-signer-properties.schema.json b/bundles/af-core/src/test/resources/schema/0.15.2/adaptive-form-signer-properties.schema.json new file mode 100644 index 0000000000..41873238ed --- /dev/null +++ b/bundles/af-core/src/test/resources/schema/0.15.2/adaptive-form-signer-properties.schema.json @@ -0,0 +1,83 @@ +{ + "$id": "classpath:/schema/0.15.2/adaptive-form-signer-properties.schema.json", + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "Signers Information", + "description": "Represents information about signers.", + "type": "object", + "additionalProperties": true, + "properties": { + "signerTitle": { + "title": "Signer Title", + "description": "The title or name of the signer.", + "type": "string" + }, + "email": { + "title": "Email Information", + "description": "Information about the signer's email address.", + "type": "object", + "properties": { + "type": { + "title": "Email Type", + "description": "Indicates whether the email value is sourced from form data or form configuration.", + "type": "string", + "enum": [ + "data", + "form" + ] + }, + "value": { + "title": "Email Address", + "description": "The email address value.", + "type": "string" + } + } + }, + "countryCode": { + "title": "Country Code", + "description": "Information about the country code for the phone number.", + "type": "object", + "properties": { + "type": { + "title": "Country Code Type", + "description": "Indicates whether the country code value is sourced from form data or form configuration.", + "type": "string", + "enum": [ + "data", + "form" + ] + }, + "value": { + "title": "Country Code Value", + "description": "The country code value.", + "type": "string" + } + } + }, + "phone": { + "title": "Phone Number", + "description": "Information about the signer's phone number.", + "type": "object", + "properties": { + "type": { + "title": "Phone Number Type", + "description": "Indicates whether the phone number value is sourced from form data or form configuration.", + "type": "string", + "enum": [ + "data", + "form" + ] + }, + "value": { + "title": "Phone Number Value", + "description": "The phone number value.", + "type": "string" + } + } + }, + "securityOption": { + "title": "Security Option", + "description": "Specifies the security option for the signer.", + "type": "string" + } + } +} \ No newline at end of file diff --git a/bundles/af-core/src/test/resources/schema/0.15.2/adaptive-form.schema.json b/bundles/af-core/src/test/resources/schema/0.15.2/adaptive-form.schema.json new file mode 100644 index 0000000000..189875cd22 --- /dev/null +++ b/bundles/af-core/src/test/resources/schema/0.15.2/adaptive-form.schema.json @@ -0,0 +1,1955 @@ +{ + "$id": "classpath:/schema/0.15.2/adaptive-form.schema.json", + "$schema": "http://json-schema.org/draft-07/schema#", + "$defs": { + "FormElement": { + "allOf": [ + { + "$ref": "./adaptive-form-properties.schema.json" + }, + { + "$ref": "./adaptive-form-data-constraints.schema.json" + }, + { + "$ref": "./adaptive-form-property-restrictions.schema.json" + } + ] + }, + "TextField": { + "if": { + "type": "object", + "properties": { + "fieldType": { + "enum": [ + "text-input", + "multiline-input" + ] + } + }, + "required": [ + "fieldType" + ] + }, + "then": { + "type": "object", + "properties": { + "fieldType": { + "enum": [ + "text-input", + "multiline-input" + ] + }, + "rules": { + "type": "object", + "propertyNames": { + "enum": [ + "description", + "enabled", + "enum", + "enumNames", + "label", + "properties", + "readOnly", + "required", + "value", + "visible" + ] + } + } + }, + "propertyNames": { + "enum": [ + ":type", + "appliedCssClassNames", + "autocomplete", + "constraintMessages", + "dataFormat", + "dataLayer", + "dataRef", + "default", + "description", + "displayFormat", + "displayValueExpression", + "editFormat", + "emptyValue", + "enforceEnum", + "enabled", + "enum", + "enumNames", + "events", + "exclusiveMaximum", + "exclusiveMinimum", + "fieldType", + "format", + "id", + "label", + "lang", + "maximum", + "maxLength", + "minimum", + "minLength", + "name", + "pattern", + "placeholder", + "properties", + "readOnly", + "required", + "rules", + "screenReaderText", + "type", + "tooltip", + "validationExpression", + "visible" + ], + "errorMessage": { + "enum": "${0} property is not allowed in text-input" + } + }, + "errorMessage": { + "properties": { + "fieldType": "${0/fieldType} is not a valid TextField field type. It should be text-input" + } + } + } + }, + "NumberField": { + "if": { + "type": "object", + "properties": { + "fieldType": { + "const": "number-input" + } + }, + "required": [ + "fieldType" + ] + }, + "then": { + "type": "object", + "properties": { + "type": { + "enum": [ + "number", + "integer" + ] + }, + "fieldType": { + "const": "number-input" + }, + "rules": { + "type": "object", + "propertyNames": { + "enum": [ + "description", + "enabled", + "enum", + "enumNames", + "label", + "maximum", + "minimum", + "properties", + "readOnly", + "required", + "value", + "visible" + ] + } + } + }, + "propertyNames": { + "enum": [ + ":type", + "appliedCssClassNames", + "autocomplete", + "constraintMessages", + "dataFormat", + "dataLayer", + "dataRef", + "default", + "description", + "displayFormat", + "displayValueExpression", + "editFormat", + "enabled", + "enforceEnum", + "enum", + "enumNames", + "events", + "exclusiveMaximum", + "exclusiveMinimum", + "fieldType", + "id", + "label", + "lang", + "maximum", + "minimum", + "name", + "placeholder", + "properties", + "readOnly", + "required", + "rules", + "screenReaderText", + "step", + "type", + "tooltip", + "validationExpression", + "visible" + ], + "errorMessage": { + "enum": "${0} property is not allowed in NumberField" + } + } + } + }, + "SwitchField": { + "if": { + "type": "object", + "properties": { + "fieldType": { + "enum": [ + "switch", + "checkbox" + ] + } + }, + "required": [ + "fieldType" + ] + }, + "then": { + "type": "object", + "properties": { + "fieldType": { + "enum": [ + "switch", + "checkbox" + ] + }, + "enum": { + "type": "array", + "maxItems": 2 + }, + "rules": { + "type": "object", + "propertyNames": { + "enum": [ + "description", + "enabled", + "enum", + "enumNames", + "label", + "checked", + "properties", + "readOnly", + "required", + "value", + "visible" + ] + } + } + }, + "propertyNames": { + "enum": [ + ":type", + "appliedCssClassNames", + "checked", + "constraintMessages", + "dataFormat", + "dataLayer", + "dataRef", + "default", + "description", + "enabled", + "enforceEnum", + "enum", + "enumNames", + "events", + "fieldType", + "id", + "label", + "name", + "properties", + "readOnly", + "required", + "rules", + "screenReaderText", + "tooltip", + "type", + "validationExpression", + "visible" + ], + "errorMessage": { + "enum": "${0} property is not allowed in SwitchField" + } + }, + "errorMessage": { + "properties": { + "fieldType": "${0/fieldType} is not a valid SwitchField field type. It should be either switch or checkbox" + } + }, + "anyOf": [ + { + "type": "object", + "required": [ + "enum" + ] + }, + { + "type": "object", + "properties": { + "type": { + "const": "boolean" + } + }, + "required": [ + "type" + ] + } + ] + } + }, + "DateField": { + "if": { + "type": "object", + "properties": { + "fieldType": { + "const": "date-input" + } + }, + "required": [ + "fieldType" + ] + }, + "then": { + "type": "object", + "properties": { + "fieldType": { + "const": "date-input" + }, + "type": { + "const": "string" + }, + "format": { + "const": "date" + }, + "rules": { + "type": "object", + "propertyNames": { + "enum": [ + "description", + "enabled", + "enum", + "enumNames", + "label", + "maximum", + "minimum", + "properties", + "readOnly", + "required", + "value", + "visible" + ] + } + } + }, + "propertyNames": { + "enum": [ + ":type", + "appliedCssClassNames", + "constraintMessages", + "dataFormat", + "dataLayer", + "dataRef", + "default", + "description", + "displayFormat", + "displayValueExpression", + "editFormat", + "enabled", + "enforceEnum", + "enum", + "enumNames", + "events", + "exclusiveMaximum", + "exclusiveMinimum", + "fieldType", + "format", + "id", + "label", + "lang", + "maximum", + "minimum", + "name", + "placeholder", + "properties", + "readOnly", + "required", + "rules", + "screenReaderText", + "step", + "tooltip", + "type", + "validationExpression", + "visible" + ], + "errorMessage": { + "enum": "${0} property is not allowed in DateField" + } + }, + "errorMessage": { + "properties": { + "fieldType": "${0/fieldType} is not a valid DateField field type. It should be date-input" + } + } + } + }, + "DateTimeField": { + "if": { + "type": "object", + "properties": { + "fieldType": { + "const": "datetime-input" + } + }, + "required": [ + "fieldType" + ] + }, + "then": { + "type": "object", + "properties": { + "fieldType": { + "const": "datetime-input" + }, + "type": { + "const": "string" + }, + "format": { + "const": "date-time" + }, + "rules": { + "type": "object", + "propertyNames": { + "enum": [ + "description", + "enabled", + "label", + "maximum", + "minimum", + "properties", + "readOnly", + "required", + "value", + "visible" + ] + } + } + }, + "propertyNames": { + "enum": [ + ":type", + "appliedCssClassNames", + "constraintMessages", + "dataFormat", + "dataLayer", + "dataRef", + "default", + "description", + "displayFormat", + "editFormat", + "enabled", + "events", + "exclusiveMaximum", + "exclusiveMinimum", + "fieldType", + "format", + "id", + "label", + "lang", + "maximum", + "minimum", + "name", + "placeholder", + "properties", + "readOnly", + "required", + "rules", + "screenReaderText", + "step", + "tooltip", + "type", + "validationExpression", + "visible" + ] + } + } + }, + "EmailField": { + "if": { + "type": "object", + "properties": { + "fieldType": { + "const": "email" + } + }, + "required": [ + "fieldType" + ] + }, + "then": { + "type": "object", + "properties": { + "fieldType": { + "const": "email" + }, + "type": { + "const": "string" + }, + "format": { + "const": "email" + }, + "rules": { + "type": "object", + "propertyNames": { + "enum": [ + "description", + "enabled", + "enum", + "enumNames", + "label", + "maximum", + "minimum", + "properties", + "readOnly", + "required", + "value", + "visible" + ] + } + } + }, + "propertyNames": { + "enum": [ + ":type", + "appliedCssClassNames", + "constraintMessages", + "dataLayer", + "dataRef", + "default", + "description", + "enabled", + "enforceEnum", + "enum", + "enumNames", + "events", + "fieldType", + "id", + "label", + "maxItems", + "minItems", + "name", + "placeholder", + "properties", + "readOnly", + "required", + "rules", + "screenReaderText", + "tooltip", + "type", + "uniqueItems", + "validationExpression", + "visible" + ], + "errorMessage": { + "enum": "${0} property is not allowed in EmailFIeld" + } + }, + "errorMessage": { + "properties": { + "fieldType": "${0/fieldType} is not a valid EmailField field type. It should be email" + } + } + } + }, + "SelectionField": { + "if": { + "type": "object", + "properties": { + "fieldType": { + "enum": [ + "drop-down", + "checkbox-group" + ] + } + }, + "required": [ + "fieldType" + ] + }, + "then": { + "type": "object", + "properties": { + "fieldType": { + "enum": [ + "drop-down", + "checkbox-group" + ] + }, + "type": { + "enum": [ + "string", + "number", + "boolean", + "string[]", + "number[]", + "boolean[]" + ] + }, + "rules": { + "type": "object", + "propertyNames": { + "enum": [ + "description", + "enabled", + "enum", + "enumNames", + "label", + "properties", + "readOnly", + "required", + "value", + "visible" + ] + } + } + }, + "propertyNames": { + "enum": [ + ":type", + "appliedCssClassNames", + "constraintMessages", + "dataLayer", + "dataRef", + "default", + "description", + "enabled", + "enforceEnum", + "enum", + "enumNames", + "events", + "fieldType", + "id", + "label", + "maxItems", + "minItems", + "name", + "placeholder", + "properties", + "readOnly", + "required", + "rules", + "screenReaderText", + "tooltip", + "type", + "uniqueItems", + "validationExpression", + "visible" + ], + "errorMessage": { + "enum": "${0} property is not allowed in SelectionField" + } + }, + "required": [ + "enum" + ], + "errorMessage": { + "required": { + "enum": "Options are missing from selection. Add an empty enum array" + }, + "properties": { + "fieldType": "${0/fieldType} is not a valid SelectionField field type. It should be either drop-down or checkbox-group" + } + } + } + }, + "RadioGroupField": { + "if": { + "type": "object", + "properties": { + "fieldType": { + "const": "radio-group" + } + }, + "required": [ + "fieldType" + ] + }, + "then": { + "type": "object", + "properties": { + "fieldType": { + "const": "radio-group" + }, + "type": { + "enum": [ + "string", + "number", + "boolean" + ] + }, + "rules": { + "type": "object", + "propertyNames": { + "enum": [ + "description", + "enabled", + "enum", + "enumNames", + "label", + "properties", + "readOnly", + "required", + "value", + "visible" + ] + } + } + }, + "propertyNames": { + "enum": [ + ":type", + "appliedCssClassNames", + "constraintMessages", + "dataLayer", + "dataRef", + "default", + "description", + "enabled", + "enforceEnum", + "enum", + "enumNames", + "events", + "fieldType", + "id", + "label", + "name", + "placeholder", + "properties", + "readOnly", + "required", + "rules", + "screenReaderText", + "tooltip", + "type", + "validationExpression", + "visible" + ], + "errorMessage": { + "enum": "${0} property is not allowed in RadioGroupField" + } + }, + "required": [ + "enum" + ], + "errorMessage": { + "properties": { + "fieldType": "${0/fieldType} is not a valid radio group field type. It should be radio-group" + } + } + } + }, + "FileField": { + "if": { + "type": "object", + "properties": { + "fieldType": { + "const": "file-input" + } + }, + "required": [ + "fieldType" + ] + }, + "then": { + "type": "object", + "properties": { + "fieldType": { + "enum": [ + "file-input" + ] + }, + "rules": { + "type": "object", + "propertyNames": { + "enum": [ + "description", + "enabled", + "enum", + "enumNames", + "label", + "properties", + "readOnly", + "required", + "value", + "visible" + ] + } + } + }, + "propertyNames": { + "enum": [ + ":type", + "accept", + "appliedCssClassNames", + "constraintMessages", + "dataLayer", + "dataRef", + "default", + "description", + "enabled", + "enum", + "enumNames", + "events", + "fieldType", + "format", + "id", + "label", + "maxFileSize", + "maxItems", + "minItems", + "name", + "placeholder", + "properties", + "readOnly", + "required", + "rules", + "screenReaderText", + "tooltip", + "type", + "uniqueItems", + "validationExpression", + "visible" + ], + "errorMessage": { + "enum": "${0} property is not allowed in file-input" + } + } + } + }, + "Button": { + "title": "Clickable Button Field", + "if": { + "type": "object", + "properties": { + "fieldType": { + "enum": [ + "button" + ] + } + }, + "required": [ + "fieldType" + ] + }, + "then": { + "type": "object", + "properties": { + "fieldType": { + "const": "button" + }, + "rules": { + "type": "object", + "propertyNames": { + "enum": [ + "description", + "enabled", + "label", + "properties", + "value", + "visible" + ] + } + } + }, + "propertyNames": { + "enum": [ + ":type", + "appliedCssClassNames", + "dataLayer", + "dataRef", + "description", + "enabled", + "events", + "fieldType", + "id", + "label", + "name", + "properties", + "rules", + "screenReaderText", + "tooltip", + "visible" + ], + "errorMessage": { + "enum": "${0} property is not allowed in Button" + } + } + } + }, + "StaticField": { + "title": "Static Field represents the Field that do not capture value from the user but can be", + "if": { + "type": "object", + "properties": { + "fieldType": { + "enum": [ + "plain-text" + ] + } + }, + "required": [ + "fieldType" + ] + }, + "then": { + "type": "object", + "properties": { + "fieldType": { + "enum": [ + "plain-text" + ] + }, + "rules": { + "type": "object", + "propertyNames": { + "enum": [ + "properties", + "value", + "visible" + ] + } + } + }, + "propertyNames": { + "enum": [ + ":type", + "appliedCssClassNames", + "dataLayer", + "dataRef", + "events", + "fieldType", + "id", + "name", + "properties", + "richText", + "rules", + "value", + "visible" + ], + "errorMessage": { + "enum": "${0} property is not allowed in StaticField" + } + } + } + }, + "Image": { + "title": "Image Component", + "if": { + "type": "object", + "properties": { + "fieldType": { + "enum": [ + "image" + ] + } + }, + "required": [ + "fieldType" + ] + }, + "then": { + "type": "object", + "properties": { + "fieldType": { + "enum": [ + "image" + ] + }, + "rules": { + "type": "object", + "propertyNames": { + "enum": [ + "altText", + "description", + "properties", + "value", + "visible" + ] + } + } + }, + "propertyNames": { + "enum": [ + ":type", + "altText", + "appliedCssClassNames", + "dataLayer", + "dataRef", + "description", + "events", + "fieldType", + "id", + "name", + "properties", + "rules", + "value", + "visible" + ], + "errorMessage": { + "enum": "${0} property is not allowed in Image" + } + } + } + }, + "Panel": { + "if": { + "type": "object", + "properties": { + "fieldType": { + "const": "panel" + } + }, + "required": [ + "fieldType" + ] + }, + "then": { + "allOf": [ + { + "$ref": "#/$defs/Container" + }, + { + "type": "object", + "properties": { + "fieldType": { + "enum": [ + "panel" + ] + }, + "type": { + "enum": [ + "object", + "array" + ] + }, + "rules": { + "type": "object", + "propertyNames": { + "enum": [ + "description", + "enabled", + "label", + "maxItems", + "minItems", + "maxOccur", + "minOccur", + "repeatable", + "properties", + "required", + "value", + "visible" + ] + } + } + }, + "propertyNames": { + "enum": [ + ":type", + ":items", + ":itemsOrder", + "allowedComponents", + "appliedCssClassNames", + "columnClassNames", + "columnCount", + "constraintMessages", + "dataLayer", + "dataRef", + "description", + "enabled", + "events", + "fieldType", + "id", + "items", + "label", + "lang", + "maxItems", + "maxOccur", + "minItems", + "minOccur", + "name", + "properties", + "readOnly", + "repeatable", + "required", + "rules", + "screenReaderText", + "tooltip", + "type", + "uniqueItems", + "validationExpression", + "visible", + "fragmentPath" + ], + "errorMessage": { + "enum": "${0} property is not allowed in Panel" + } + }, + "anyOf": [ + { + "required": [ + "items" + ] + }, + { + "required": [ + ":items", + ":itemsOrder" + ] + } + ] + } + ] + } + }, + "Captcha": { + "title": "Captcha Component", + "if": { + "type": "object", + "properties": { + "fieldType": { + "enum": [ + "captcha" + ] + } + }, + "required": [ + "fieldType" + ] + }, + "then": { + "type": "object", + "properties": { + "fieldType": { + "enum": [ + "captcha" + ] + } + }, + "propertyNames": { + "enum": [ + ":type", + "appliedCssClassNames", + "dataLayer", + "description", + "enabled", + "events", + "fieldType", + "id", + "label", + "name", + "properties", + "readOnly", + "required", + "tooltip", + "type", + "validationExpression", + "visible", + "captchaDisplayMode", + "captchaProvider", + "captchaSiteKey" + ], + "errorMessage": { + "enum": "${0} property is not allowed in Captcha" + } + } + } + }, + "CustomElement": { + "if": { + "allOf": [ + { + "type": "object", + "not": { + "required": [ + "fieldType" + ] + } + }, + { + "type": "object", + "required": [ + ":type" + ] + } + ] + }, + "then": { + "type": "object", + "properties": { + ":type": { + "type": "string" + }, + ":itemsOrder": { + "$ref": "#/$defs/ColonItemsOrder" + }, + ":items": { + "$ref": "#/$defs/ColonItems" + } + }, + "required": [ + ":type" + ], + "additionalProperties": true, + "dependencies": { + ":items": { + "type": "object", + "required": [ + ":type", + ":itemsOrder" + ] + } + } + } + }, + "PageSet": { + "if": { + "type": "object", + "properties": { + "fieldType": { + "const": "pageset" + } + }, + "required": [ + "fieldType" + ] + }, + "then": { + "allOf": [ + { + "$ref": "#/$defs/Container" + }, + { + "type": "object", + "properties": { + "fieldType": { + "enum": [ + "pageset" + ] + }, + "type": { + "enum": [ + "object", + "array", + "string" + ] + } + }, + "propertyNames": { + "enum": [ + ":type", + ":items", + ":itemsOrder", + "fieldType", + "id", + "items", + "properties", + "label", + "events", + "type", + "name" + ], + "errorMessage": { + "enum": "${0} property is not allowed in PageSet" + } + }, + "anyOf": [ + { + "required": [ + "items" + ] + }, + { + "required": [ + ":items", + ":itemsOrder" + ] + } + ] + } + ] + } + }, + "PageArea": { + "if": { + "type": "object", + "properties": { + "fieldType": { + "const": "pagearea" + } + }, + "required": [ + "fieldType" + ] + }, + "then": { + "allOf": [ + { + "$ref": "#/$defs/Container" + }, + { + "type": "object", + "properties": { + "fieldType": { + "enum": [ + "pagearea" + ] + }, + "type": { + "enum": [ + "object", + "array", + "string" + ] + } + }, + "propertyNames": { + "enum": [ + ":type", + ":items", + ":itemsOrder", + "fieldType", + "id", + "items", + "name", + "properties", + "label", + "events", + "type" + ], + "errorMessage": { + "enum": "${0} property is not allowed in PageArea" + } + }, + "anyOf": [ + { + "required": [ + "items" + ] + }, + { + "required": [ + ":items", + ":itemsOrder" + ] + } + ] + } + ] + } + }, + "Medium": { + "title": "Medium Component", + "if": { + "type": "object", + "properties": { + "fieldType": { + "enum": [ + "medium" + ] + } + }, + "required": [ + "fieldType" + ] + }, + "then": { + "type": "object", + "properties": { + "fieldType": { + "enum": [ + "medium" + ] + } + }, + "propertyNames": { + "enum": [ + ":type", + "fieldType", + "id", + "properties", + "name", + "events" + ], + "errorMessage": { + "enum": "${0} property is not allowed in Medium" + } + } + } + }, + "ContentArea": { + "title": "Content Area Component", + "if": { + "type": "object", + "properties": { + "fieldType": { + "enum": [ + "contentarea" + ] + } + }, + "required": [ + "fieldType" + ] + }, + "then": { + "type": "object", + "properties": { + "fieldType": { + "enum": [ + "contentarea" + ] + } + }, + "propertyNames": { + "enum": [ + ":type", + "fieldType", + "id", + "name", + "properties", + "name", + "events" + ], + "errorMessage": { + "enum": "${0} property is not allowed in Content Area" + } + } + } + }, + "Barcode": { + "title": "Barcode Component", + "if": { + "type": "object", + "properties": { + "fieldType": { + "enum": [ + "barcode" + ] + } + }, + "required": [ + "fieldType" + ] + }, + "then": { + "type": "object", + "properties": { + "fieldType": { + "enum": [ + "barcode" + ] + } + }, + "propertyNames": { + "enum": [ + ":type", + "fieldType", + "id", + "dataRef", + "name", + "properties", + "events" + ], + "errorMessage": { + "enum": "${0} property is not allowed in Barcode" + } + } + } + }, + "Line": { + "title": "Line Component", + "if": { + "type": "object", + "properties": { + "fieldType": { + "enum": [ + "line" + ] + } + }, + "required": [ + "fieldType" + ] + }, + "then": { + "type": "object", + "properties": { + "fieldType": { + "enum": [ + "line" + ] + } + }, + "propertyNames": { + "enum": [ + ":type", + "fieldType", + "id", + "name", + "properties", + "events" + ], + "errorMessage": { + "enum": "${0} property is not allowed in Line" + } + } + } + }, + "Rectangle": { + "title": "Rectangle Component", + "if": { + "type": "object", + "properties": { + "fieldType": { + "enum": [ + "rectangle" + ] + } + }, + "required": [ + "fieldType" + ] + }, + "then": { + "type": "object", + "properties": { + "fieldType": { + "enum": [ + "rectangle" + ] + } + }, + "propertyNames": { + "enum": [ + ":type", + "fieldType", + "id", + "name", + "properties", + "events" + ], + "errorMessage": { + "enum": "${0} property is not allowed in Rectangle" + } + } + } + }, + "Proto": { + "if": { + "type": "object", + "properties": { + "fieldType": { + "const": "proto" + } + }, + "required": [ + "fieldType" + ] + }, + "then": { + "allOf": [ + { + "$ref": "#/$defs/Container" + }, + { + "type": "object", + "properties": { + "fieldType": { + "enum": [ + "proto" + ] + }, + "type": { + "enum": [ + "object", + "array", + "string" + ] + } + }, + "propertyNames": { + "enum": [ + ":type", + ":items", + ":itemsOrder", + "fieldType", + "id", + "items", + "properties", + "label", + "events", + "type", + "name" + ], + "errorMessage": { + "enum": "${0} property is not allowed in Proto" + } + }, + "anyOf": [ + { + "required": [ + "items" + ] + }, + { + "required": [ + ":items", + ":itemsOrder" + ] + } + ] + } + ] + } + }, + "Child": { + "allOf": [ + { + "anyOf": [ + { + "type": "object", + "required": [ + "fieldType" + ] + }, + { + "type": "object", + "required": [ + ":type" + ] + }, + { + "type": "object", + "required": [ + "type" + ] + }, + { + "type": "object", + "required": [ + "enum" + ] + }, + { + "type": "object", + "required": [ + "items" + ] + }, + { + "type": "object", + "required": [ + ":items", + ":itemsOrder" + ] + } + ] + }, + { + "allOf": [ + { + "$ref": "#/$defs/FormElement" + }, + { + "$ref": "#/$defs/FileField" + }, + { + "$ref": "#/$defs/NumberField" + }, + { + "$ref": "#/$defs/DateField" + }, + { + "$ref": "#/$defs/EmailField" + }, + { + "$ref": "#/$defs/SwitchField" + }, + { + "$ref": "#/$defs/SelectionField" + }, + { + "$ref": "#/$defs/RadioGroupField" + }, + { + "$ref": "#/$defs/TextField" + }, + { + "$ref": "#/$defs/Panel" + }, + { + "$ref": "#/$defs/Button" + }, + { + "$ref": "#/$defs/StaticField" + }, + { + "$ref": "#/$defs/Image" + }, + { + "$ref": "#/$defs/Captcha" + }, + { + "$ref": "#/$defs/CustomElement" + }, + { + "$ref": "#/$defs/PageSet" + }, + { + "$ref": "#/$defs/PageArea" + }, + { + "$ref": "#/$defs/Medium" + }, + { + "$ref": "#/$defs/ContentArea" + }, + { + "$ref": "#/$defs/Barcode" + }, + { + "$ref": "#/$defs/Line" + }, + { + "$ref": "#/$defs/Rectangle" + }, + { + "$ref": "#/$defs/Proto" + } + ] + } + ], + "errorMessage": "Object doesn't match any field type" + }, + "Items": { + "type": "array", + "items": { + "$ref": "#/$defs/Child" + } + }, + "ColonItems": { + "type": "object", + "additionalProperties": { + "$ref": "#/$defs/Child" + } + }, + "ColonItemsOrder": { + "type": "array", + "items": { + "type": "string" + } + }, + "Container": { + "type": "object", + "properties": { + "items": { + "$ref": "#/$defs/Items" + }, + ":items": { + "$ref": "#/$defs/ColonItems" + }, + ":itemsOrder": { + "$ref": "#/$defs/ColonItemsOrder" + }, + "anyOf": [ + { + "required": [ + "items" + ] + }, + { + "required": [ + ":items", + ":itemsOrder" + ] + } + ] + } + } + }, + "type": "object", + "allOf": [ + { + "$ref": "./adaptive-form-aem-responsive-grid-properties.schema.json" + }, + { + "type": "object", + "properties": { + "data": { + "type": "object" + }, + "events": { + "type": "object", + "propertyNames": { + "anyOf": [ + { + "enum": [ + "submit", + "reset", + "initialize" + ] + }, + { + "pattern": "custom:[a-zA-Z0-9]+" + } + ] + } + }, + ":type": { + "type": "string", + "title": "A hint to the rendering engine for rendering custom components." + }, + "action": { + "title": "URL indicating the endpoint where the data would be submitted when submit event is triggered", + "type": "string" + }, + "adaptiveform": { + "anyOf": [ + { + "const": "0.11.0-Pre" + }, + { + "const": "0.12.0" + }, + { + "const": "0.12.1" + }, + { + "const": "0.12.5" + }, + { + "const": "0.13.0" + }, + { + "const": "0.14.0" + }, + { + "const": "0.14.1" + }, + { + "const": "0.14.2" + }, + { + "const": "0.15.0" + }, + { + "const": "0.15.1" + }, + { + "const": "0.15.2" + } + ] + }, + "description": { + "type": "string", + "title": "A user friendly description of the form" + }, + "fieldType": { + "const": "form" + }, + "id": { + "type": "string", + "title": "unique identifier for a form element" + }, + "items": { + "$ref": "#/$defs/Items" + }, + ":items": { + "$ref": "#/$defs/ColonItems" + }, + ":itemsOrder": { + "$ref": "#/$defs/ColonItemsOrder" + }, + "lang": { + "type": "string", + "title": "The language in which the Form was authored.", + "description": "The language needs to be defined as per the [BCP 47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) tag" + }, + "metadata": { + "type": "object", + "properties": { + "version": { + "type": "string" + }, + "grammar": { + "const": "json-formula-1.0.0" + }, + "formattingLanguage": { + "const": "xfa-picture-clause" + } + }, + "required": [ + "version" + ] + }, + "properties": { + "title": "An object containing custom properties that can be modified via rules as well.", + "type": "object", + "properties": { + "fd:dor": { + "$ref": "./adaptive-form-container-dor-properties.schema.json" + }, + "fd:signerInfo": { + "$ref": "./adaptive-form-sign-properties.schema.json" + } + }, + "additionalProperties": true + }, + "rules": { + "type": "object", + "propertyNames": { + "enum": [ + "properties" + ] + } + }, + "title": { + "type": "string", + "maxLength": 140, + "title": "A user friendly one line title for the form" + }, + "additionalProperties": false + } + } + ], + "anyOf": [ + { + "required": [ + "metadata", + "items", + "adaptiveform", + "fieldType" + ] + }, + { + "required": [ + "metadata", + ":items", + ":itemsOrder", + "adaptiveform", + "fieldType" + ] + } + ] +} \ No newline at end of file diff --git a/bundles/af-core/src/test/resources/schema/0.15.2/form.json b/bundles/af-core/src/test/resources/schema/0.15.2/form.json new file mode 100644 index 0000000000..dfdb2216b9 --- /dev/null +++ b/bundles/af-core/src/test/resources/schema/0.15.2/form.json @@ -0,0 +1,14 @@ +{ + "items": [ + ], + "fieldType" : "form", + "metadata": { + "action": "/a/b", + "dataUrl": "/c/d", + "locale": "en-us", + "grammar": "json-formula-1.0.0", + "version": "1.0.0" + }, + "adaptiveform":"0.15.2", + ":type": "core/fd/components/form/container/v2/container" +} \ No newline at end of file diff --git a/bundles/af-core/src/test/resources/schema/0.15.2/print/adaptive-form-dor-container-border.schema.json b/bundles/af-core/src/test/resources/schema/0.15.2/print/adaptive-form-dor-container-border.schema.json new file mode 100644 index 0000000000..d12754e0f3 --- /dev/null +++ b/bundles/af-core/src/test/resources/schema/0.15.2/print/adaptive-form-dor-container-border.schema.json @@ -0,0 +1,23 @@ +{ + "$id": "classpath:/schema/0.15.2/print/adaptive-form-dor-container-border.schema.json", + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "description": "Specifies the border properties for the object.", + "additionalProperties": false, + "properties": { + "presence": { + "title": "Border Presence", + "description": "Specifies the presence attribute for the border.", + "type": "string" + }, + "edges": { + "$ref": "./adaptive-form-dor-container-edges.schema.json" + }, + "corners": { + "$ref": "./adaptive-form-dor-container-corners.schema.json" + }, + "fill": { + "$ref": "./adaptive-form-dor-container-fill.schema.json" + } + } +} \ No newline at end of file diff --git a/bundles/af-core/src/test/resources/schema/0.15.2/print/adaptive-form-dor-container-corners.schema.json b/bundles/af-core/src/test/resources/schema/0.15.2/print/adaptive-form-dor-container-corners.schema.json new file mode 100644 index 0000000000..24d90f6b26 --- /dev/null +++ b/bundles/af-core/src/test/resources/schema/0.15.2/print/adaptive-form-dor-container-corners.schema.json @@ -0,0 +1,30 @@ +{ + "$id": "classpath:/schema/0.15.2/print/adaptive-form-dor-container-corners.schema.json", + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "Border Corners", + "description": "Specifies the corners for the border.", + "type": "object", + "additionalProperties": false, + "properties": { + "top": { + "title": "Top Corner of the border", + "description": "Specifies the top corner for the border.", + "$ref": "./adaptive-form-dor-container-type-definitions.schema.json#/$defs/Corner" + }, + "left": { + "title": "Left Corner of the border", + "description": "Specifies the left corner for the border.", + "$ref": "./adaptive-form-dor-container-type-definitions.schema.json#/$defs/Corner" + }, + "right": { + "title": "Right Corner of the border", + "description": "Specifies the right corner for the border.", + "$ref": "./adaptive-form-dor-container-type-definitions.schema.json#/$defs/Corner" + }, + "bottom": { + "title": "Bottom Corner of the border", + "description": "Specifies the bottom corner for the border.", + "$ref": "./adaptive-form-dor-container-type-definitions.schema.json#/$defs/Corner" + } + } +} \ No newline at end of file diff --git a/bundles/af-core/src/test/resources/schema/0.15.2/print/adaptive-form-dor-container-edges.schema.json b/bundles/af-core/src/test/resources/schema/0.15.2/print/adaptive-form-dor-container-edges.schema.json new file mode 100644 index 0000000000..5cc0350300 --- /dev/null +++ b/bundles/af-core/src/test/resources/schema/0.15.2/print/adaptive-form-dor-container-edges.schema.json @@ -0,0 +1,30 @@ +{ + "$id": "classpath:/schema/0.15.2/print/adaptive-form-dor-container-edges.schema.json", + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "Border Edges", + "description": "Specifies the edges for the border.", + "type": "object", + "additionalProperties": false, + "properties": { + "top": { + "title": "Top Edge of the border", + "description": "Specifies the top edge for the border.", + "$ref": "./adaptive-form-dor-container-type-definitions.schema.json#/$defs/Edge" + }, + "left": { + "title": "Left Edge of the border", + "description": "Specifies the left edge for the border.", + "$ref": "./adaptive-form-dor-container-type-definitions.schema.json#/$defs/Edge" + }, + "right": { + "title": "Right Edge of the border", + "description": "Specifies the right edge for the border.", + "$ref": "./adaptive-form-dor-container-type-definitions.schema.json#/$defs/Edge" + }, + "bottom": { + "title": "Bottom Edge of the border", + "description": "Specifies the bottom edge for the border.", + "$ref": "./adaptive-form-dor-container-type-definitions.schema.json#/$defs/Edge" + } + } +} \ No newline at end of file diff --git a/bundles/af-core/src/test/resources/schema/0.15.2/print/adaptive-form-dor-container-fill.schema.json b/bundles/af-core/src/test/resources/schema/0.15.2/print/adaptive-form-dor-container-fill.schema.json new file mode 100644 index 0000000000..1122006056 --- /dev/null +++ b/bundles/af-core/src/test/resources/schema/0.15.2/print/adaptive-form-dor-container-fill.schema.json @@ -0,0 +1,71 @@ +{ + "$id": "classpath:/schema/0.15.2/print/adaptive-form-dor-container-fill.schema.json", + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "Border Fill", + "description": "Specifies the fill for the border.", + "type": "object", + "additionalProperties": false, + "properties": { + "color": { + "title": "Fill Color", + "description": "Specifies the color attribute for the fill.", + "$ref": "./adaptive-form-dor-container-type-definitions.schema.json#/$defs/Color" + }, + "linear": { + "title": "Linear Fill", + "description": "Specifies the linear fill for the border.", + "type": "object", + "properties": { + "type": { + "title": "Linear Fill Type", + "description": "Specifies the type for the linear fill.", + "type": "string" + }, + "color": { + "title": "Linear Color", + "description": "Specifies the color attribute for the linear.", + "$ref": "./adaptive-form-dor-container-type-definitions.schema.json#/$defs/Color" + } + } + }, + "pattern": { + "title": "Pattern Fill", + "description": "Specifies the pattern fill for the border.", + "type": "object", + "properties": { + "type": { + "title": "Pattern Fill Type", + "description": "Specifies the type for the pattern fill.", + "type": "string" + }, + "color": { + "title": "Pattern Color", + "description": "Specifies the color attribute for the pattern.", + "$ref": "./adaptive-form-dor-container-type-definitions.schema.json#/$defs/Color" + } + } + }, + "radial": { + "title": "Radial Fill", + "description": "Specifies the radial fill for the border.", + "type": "object", + "properties": { + "type": { + "title": "Radial Fill Type", + "description": "Specifies the type for the radial fill.", + "type": "string" + }, + "color": { + "title": "Radial Color", + "description": "Specifies the color attribute for the radial.", + "$ref": "./adaptive-form-dor-container-type-definitions.schema.json#/$defs/Color" + } + } + }, + "solid": { + "title": "Solid Fill", + "description": "Specifies the solid fill for the border.", + "type": "object" + } + } +} \ No newline at end of file diff --git a/bundles/af-core/src/test/resources/schema/0.15.2/print/adaptive-form-dor-container-font.schema.json b/bundles/af-core/src/test/resources/schema/0.15.2/print/adaptive-form-dor-container-font.schema.json new file mode 100644 index 0000000000..2ead0627a0 --- /dev/null +++ b/bundles/af-core/src/test/resources/schema/0.15.2/print/adaptive-form-dor-container-font.schema.json @@ -0,0 +1,70 @@ +{ + "$id": "classpath:/schema/0.15.2/print/adaptive-form-dor-container-font.schema.json", + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "Font", + "description": "Specifies the font for the object.", + "type": "object", + "additionalProperties": false, + "properties": { + "typeface": { + "title": "Typeface", + "description": "Specifies the typeface for the font.", + "type": "string" + }, + "size": { + "title": "Size", + "description": "Specifies the size for the font.", + "type": "string" + }, + "baselineShift": { + "title": "Baseline Shift", + "description": "Specifies the baseline shift for the font.", + "type": "string" + }, + "weight": { + "title": "Weight", + "description": "Specifies the weight for the font.", + "type": "string" + }, + "lineThrough": { + "title": "Line Through", + "description": "Specifies the line through for the font.", + "type": "string" + }, + "posture": { + "title": "Posture", + "description": "Specifies the posture for the font.", + "type": "string" + }, + "fontHorizontalScale": { + "title": "Font Horizontal Scale", + "description": "Specifies the font horizontal scale for the font.", + "type": "string" + }, + "fontVerticalScale": { + "title": "Font Vertical Scale", + "description": "Specifies the font vertical scale for the font.", + "type": "string" + }, + "kerningMode": { + "title": "Kerning Mode", + "description": "Specifies the kerning mode for the font.", + "type": "string" + }, + "letterSpacing": { + "title": "Letter Spacing", + "description": "Specifies the letter spacing for the font.", + "type": "string" + }, + "underline": { + "title": "Underline", + "description": "Specifies the underline for the font.", + "type": "string" + }, + "fill": { + "title": "Fill", + "description": "Specifies the fill for the font.", + "$ref": "./adaptive-form-dor-container-fill.schema.json" + } + } +} \ No newline at end of file diff --git a/bundles/af-core/src/test/resources/schema/0.15.2/print/adaptive-form-dor-container-items.schema.json b/bundles/af-core/src/test/resources/schema/0.15.2/print/adaptive-form-dor-container-items.schema.json new file mode 100644 index 0000000000..a8c41c6c58 --- /dev/null +++ b/bundles/af-core/src/test/resources/schema/0.15.2/print/adaptive-form-dor-container-items.schema.json @@ -0,0 +1,90 @@ +{ + "$id": "classpath:/schema/0.15.2/print/adaptive-form-dor-container-items.schema.json", + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "Items", + "description": "Specifies the items for the object.", + "type": "object", + "additionalProperties": false, + "properties": { + "integers": { + "title": "Integers", + "description": "Specifies the integers for the items.", + "type": "array", + "items": { + "$ref": "./adaptive-form-dor-container-type-definitions.schema.json#/$defs/IntegerValue" + } + }, + "texts": { + "title": "Texts", + "description": "Specifies the texts for the items.", + "type": "array", + "items": { + "$ref": "./adaptive-form-dor-container-type-definitions.schema.json#/$defs/TextValue" + } + }, + "booleans": { + "title": "Booleans", + "description": "Specifies the booleans for the items.", + "type": "array", + "items": { + "$ref": "./adaptive-form-dor-container-type-definitions.schema.json#/$defs/BooleanValue" + } + }, + "dates": { + "title": "Dates", + "description": "Specifies the dates for the items.", + "type": "array", + "items": { + "$ref": "./adaptive-form-dor-container-type-definitions.schema.json#/$defs/DateValue" + } + }, + "dateTimes": { + "title": "Dates", + "description": "Specifies the dates for the items.", + "type": "array", + "items": { + "$ref": "./adaptive-form-dor-container-type-definitions.schema.json#/$defs/DateTimeValue" + } + }, + "decimals": { + "title": "Decimals", + "description": "Specifies the decimals for the items.", + "type": "array", + "items": { + "$ref": "./adaptive-form-dor-container-type-definitions.schema.json#/$defs/DecimalValue" + } + }, + "richTexts": { + "title": "Rich Texts", + "description": "Specifies the rich texts for the items.", + "type": "array", + "items": { + "$ref": "./adaptive-form-dor-container-type-definitions.schema.json#/$defs/RichTextValue" + } + }, + "floats": { + "title": "Floats", + "description": "Specifies the floats for the items.", + "type": "array", + "items": { + "$ref": "./adaptive-form-dor-container-type-definitions.schema.json#/$defs/FloatValue" + } + }, + "images": { + "title": "Images", + "description": "Specifies the images for the items.", + "type": "array", + "items": { + "$ref": "./adaptive-form-dor-container-type-definitions.schema.json#/$defs/ImageValue" + } + }, + "times": { + "title": "Times", + "description": "Specifies the times for the items.", + "type": "array", + "items": { + "$ref": "./adaptive-form-dor-container-type-definitions.schema.json#/$defs/TimeValue" + } + } + } +} \ No newline at end of file diff --git a/bundles/af-core/src/test/resources/schema/0.15.2/print/adaptive-form-dor-container-margin.schema.json b/bundles/af-core/src/test/resources/schema/0.15.2/print/adaptive-form-dor-container-margin.schema.json new file mode 100644 index 0000000000..0b9f457654 --- /dev/null +++ b/bundles/af-core/src/test/resources/schema/0.15.2/print/adaptive-form-dor-container-margin.schema.json @@ -0,0 +1,29 @@ +{ + "$id": "classpath:/schema/0.15.2/print/adaptive-form-dor-container-margin.schema.json", + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "description": "Specifies the margin properties for the object.", + "additionalProperties": false, + "properties": { + "topInset": { + "title": "Top Inset of the margin", + "description": "Specifies the top inset margin for the text edit.", + "type": "string" + }, + "leftInset": { + "title": "Left Inset of the margin", + "description": "Specifies the left inset margin for the text edit.", + "type": "string" + }, + "rightInset": { + "title": "Right Inset of the margin", + "description": "Specifies the right inset margin for the text edit.", + "type": "string" + }, + "bottomInset": { + "title": "Bottom Inset of the margin", + "description": "Specifies the bottom inset margin for the text edit.", + "type": "string" + } + } +} \ No newline at end of file diff --git a/bundles/af-core/src/test/resources/schema/0.15.2/print/adaptive-form-dor-container-para.schema.json b/bundles/af-core/src/test/resources/schema/0.15.2/print/adaptive-form-dor-container-para.schema.json new file mode 100644 index 0000000000..adba446c46 --- /dev/null +++ b/bundles/af-core/src/test/resources/schema/0.15.2/print/adaptive-form-dor-container-para.schema.json @@ -0,0 +1,60 @@ +{ + "$id": "classpath:/schema/0.15.2/print/adaptive-form-dor-container-para.schema.json", + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "Paragraph", + "description": "Specifies the paragraph for the object.", + "type": "object", + "additionalProperties": false, + "properties": { + "vAlign": { + "title": "Vertical Alignment", + "description": "Specifies the vertical alignment for the paragraph.", + "type": "string" + }, + "hAlign": { + "title": "Horizontal Alignment", + "description": "Specifies the horizontal alignment for the paragraph.", + "type": "string" + }, + "lineHeight": { + "title": "Line Height", + "description": "Specifies the line height for the paragraph.", + "type": "string" + }, + "spaceAbove": { + "title": "Space Above", + "description": "Specifies the space above for the paragraph.", + "type": "string" + }, + "spaceBelow": { + "title": "Space Below", + "description": "Specifies the space below for the paragraph.", + "type": "string" + }, + "marginLeft": { + "title": "Margin Left", + "description": "Specifies the margin left for the paragraph.", + "type": "string" + }, + "marginRight": { + "title": "Margin Right", + "description": "Specifies the margin right for the paragraph.", + "type": "string" + }, + "textIndent": { + "title": "Text Indent", + "description": "Specifies the text indent for the paragraph.", + "type": "string" + }, + "widows": { + "title": "Widows", + "description": "Specifies the widows for the paragraph.", + "type": "string" + }, + "orphan": { + "title": "Orphan", + "description": "Specifies the orphan for the paragraph.", + "type": "string" + } + } +} \ No newline at end of file diff --git a/bundles/af-core/src/test/resources/schema/0.15.2/print/adaptive-form-dor-container-properties.schema.json b/bundles/af-core/src/test/resources/schema/0.15.2/print/adaptive-form-dor-container-properties.schema.json new file mode 100644 index 0000000000..fdef1e6160 --- /dev/null +++ b/bundles/af-core/src/test/resources/schema/0.15.2/print/adaptive-form-dor-container-properties.schema.json @@ -0,0 +1,442 @@ +{ + "$id": "classpath:/schema/0.15.2/print/adaptive-form-dor-container-properties.schema.json", + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "title": "unique identifier for a form element" + }, + ":type": { + "type": "string", + "title": "A hint to the rendering engine for rendering custom components." + }, + "name": { + "type": "string", + "title": "Name of the form element" + }, + "type": { + "type": "string", + "title": "Type of the form element" + }, + "locale": { + "title": "Locale for the object", + "description": "Specifies the locale attribute for the object.", + "type": "string" + }, + "access": { + "title": "Access for the object", + "description": "Specifies the access attribute for the object.", + "type": "string" + }, + "width": { + "title": "Width", + "description": "Specifies the width for the object.", + "type": "string" + }, + "height": { + "title": "Height", + "description": "Specifies the height for the object.", + "type": "string" + }, + "left": { + "title": "Left", + "description": "Specifies the left attribute for the object.", + "type": "string" + }, + "top": { + "title": "Top", + "description": "Specifies the top attribute for the object.", + "type": "string" + }, + "maxH": { + "title": "Maximum Height", + "description": "Specifies the maximum height for the object.", + "type": "string" + }, + "minH": { + "title": "Minimum Height", + "description": "Specifies the minimum height for the object.", + "type": "string" + }, + "maxW": { + "title": "Maximum Width", + "description": "Specifies the maximum width for the object.", + "type": "string" + }, + "minW": { + "title": "Minimum Width", + "description": "Specifies the minimum width for the object.", + "type": "string" + }, + "layout": { + "title": "Layout", + "description": "Specifies the layout for the object.", + "type": "string" + }, + "presence": { + "title": "Presence", + "description": "Specifies the presence attribute for the object.", + "type": "string" + }, + "useHref": { + "title": "Use Href", + "description": "Specifies the use href for the object.", + "type": "string" + }, + "stock": { + "title": "Stock", + "description": "Specifies the stock for the object.", + "type": "string" + }, + "short": { + "title": "Short", + "description": "Specifies the short for the object.", + "type": "string" + }, + "long": { + "title": "Long", + "description": "Specifies the long for the object.", + "type": "string" + }, + "orientation": { + "title": "Orientation", + "description": "Specifies the orientation for the page.", + "type": "string" + }, + "columnWidths": { + "title": "Column Widths", + "description": "Specifies the column widths for the table object.", + "type": "string" + }, + "margin": { + "$ref": "./adaptive-form-dor-container-margin.schema.json" + }, + "border": { + "$ref": "./adaptive-form-dor-container-border.schema.json" + }, + "bind": { + "title": "Bind", + "description": "Specifies the bind for the object.", + "type": "object", + "properties": { + "ref": { + "title": "Bind Reference", + "description": "Specifies the reference for the bind.", + "type": "string" + }, + "match": { + "title": "Bind Match", + "description": "Specifies the match for the bind.", + "type": "string" + } + } + }, + "value": { + "$ref": "./adaptive-form-dor-container-value.schema.json" + }, + "para": { + "$ref": "./adaptive-form-dor-container-para.schema.json" + }, + "font": { + "$ref": "./adaptive-form-dor-container-font.schema.json" + }, + "ui": { + "$ref": "./adaptive-form-dor-container-ui.schema.json" + }, + "items": { + "$ref": "./adaptive-form-dor-container-items.schema.json" + }, + "traversal": { + "title": "Traversal", + "description": "Specifies the traversal for the object.", + "type": "object", + "properties": { + "traverse": { + "title": "Traverse", + "description": "Specifies the traverse for the traversal.", + "type": "object", + "properties": { + "ref": { + "title": "Traverse Reference", + "description": "Specifies the reference for the traverse.", + "type": "string" + }, + "operation": { + "title": "Traverse operation", + "description": "Specifies the operation for the traverse.", + "type": "string" + } + } + } + } + }, + "events": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "title": "Event Name", + "description": "Specifies the name for the event.", + "type": "string" + }, + "script": { + "$ref": "./adaptive-form-dor-container-script.schema.json" + }, + "activity": { + "title": "Event Activity", + "description": "Specifies the activity for the event.", + "type": "string" + }, + "ref": { + "title": "Event Reference", + "description": "Specifies the reference for the event.", + "type": "string" + } + } + } + }, + "desc": { + "title": "Description", + "description": "Specifies the description for the object.", + "type": "object", + "properties": { + "text": { + "title": "Text Description", + "description": "Specifies the text description for the object.", + "type": "object", + "properties": { + "content": { + "title": "Text Content", + "description": "Specifies the content for the text.", + "type": "string" + } + } + } + } + }, + "breakBefore": { + "title": "Break Before", + "description": "Indicates whether a break should occur before the object. This influences the layout and presentation of the object.", + "type": "object", + "properties": { + "target": { + "title": "Break Before Target", + "description": "Specifies the target for the break before.", + "type": "string" + }, + "targetType": { + "title": "Break Before Target Type", + "description": "Specifies the target type for the break before.", + "type": "string" + }, + "startNew": { + "title": "Start New", + "description": "Specifies whether a new page should start after the break before.", + "type": "string" + } + } + }, + "breakAfter": { + "title": "Break After", + "description": "Indicates whether a break should occur after the object. This affects the layout and presentation of the object.", + "type": "object", + "properties": { + "target": { + "title": "Break After Target", + "description": "Specifies the target for the break after.", + "type": "string" + }, + "targetType": { + "title": "Break After Target Type", + "description": "Specifies the target type for the break after.", + "type": "string" + }, + "startNew": { + "title": "Start New", + "description": "Specifies whether a new page should start after the break after.", + "type": "string" + } + } + }, + "keep": { + "title": "Keep", + "description": "Specifies the keep for the object.", + "type": "object", + "properties": { + "intact": { + "title": "Keep Intact", + "description": "Specifies whether the object should be kept intact.", + "type": "string" + }, + "next": { + "title": "Keep Next", + "description": "Specifies whether the next object should be kept.", + "type": "string" + }, + "previous": { + "title": "Keep Previous", + "description": "Specifies whether the previous object should be kept.", + "type": "string" + } + } + }, + "assist": { + "title": "Assist", + "description": "Specifies the assist for the object.", + "type": "object", + "properties": { + "role": { + "title": "Role", + "description": "Specifies the role for the assist.", + "type": "string" + }, + "tooltip": { + "title": "Tooltip", + "description": "Specifies the tooltip for the assist.", + "type": "object", + "properties": { + "content": { + "title": "Tooltip Content", + "description": "Specifies the content for the tooltip.", + "type": "string" + } + } + }, + "speak": { + "title": "Speak", + "description": "Specifies the speak for the assist.", + "type": "object", + "properties": { + "content": { + "title": "Speak Content", + "description": "Specifies the content for the speak.", + "type": "string" + }, + "priority": { + "title": "Speak Priority", + "description": "Specifies the priority for the speak.", + "type": "string" + } + } + } + } + }, + "caption": { + "title": "Caption", + "description": "Specifies the caption for the object.", + "type": "object", + "properties": { + "placement": { + "title": "Placement", + "description": "Specifies the placement for the caption.", + "type": "string" + }, + "reserve": { + "title": "Reserve", + "description": "Specifies the reserve for the caption.", + "type": "string" + }, + "presence": { + "title": "Presence", + "description": "Specifies the presence for the caption.", + "type": "string" + }, + "value": { + "$ref": "./adaptive-form-dor-container-value.schema.json" + }, + "margin": { + "$ref": "./adaptive-form-dor-container-margin.schema.json" + }, + "border": { + "$ref": "./adaptive-form-dor-container-border.schema.json" + }, + "font": { + "$ref": "./adaptive-form-dor-container-font.schema.json" + }, + "para": { + "$ref": "./adaptive-form-dor-container-para.schema.json" + } + } + }, + "variables": { + "title": "Variables", + "description": "Specifies the variables for the object.", + "type": "object", + "properties": { + "scripts": { + "title": "Scripts", + "description": "Specifies the scripts for the variables.", + "type": "array", + "items": { + "$ref": "./adaptive-form-dor-container-script.schema.json" + } + } + } + }, + "calculate": { + "title": "Calculate", + "description": "Specifies the calculate for the object.", + "type": "object", + "properties": { + "script": { + "$ref": "./adaptive-form-dor-container-script.schema.json" + }, + "override": { + "title": "Override", + "description": "Specifies the override for the calculate.", + "type": "string" + }, + "message": { + "$ref": "./adaptive-form-dor-container-type-definitions.schema.json#/$defs/Message" + } + } + }, + "validate": { + "title": "Validate", + "description": "Specifies the validate for the object.", + "type": "object", + "properties": { + "script": { + "$ref": "./adaptive-form-dor-container-script.schema.json" + }, + "message": { + "$ref": "./adaptive-form-dor-container-type-definitions.schema.json#/$defs/Message" + }, + "picture": { + "$ref": "./adaptive-form-dor-container-type-definitions.schema.json#/$defs/Picture" + } + } + }, + "occur": { + "title": "Occur", + "description": "Specifies the occur for the object.", + "type": "object", + "properties": { + "min": { + "title": "Minimum Occurrences", + "description": "Specifies the minimum occurrences for the object.", + "type": "string" + }, + "max": { + "title": "Maximum Occurrences", + "description": "Specifies the maximum occurrences for the object.", + "type": "string" + }, + "initial": { + "title": "Initial Occurrences", + "description": "Specifies the initial occurrences for the object.", + "type": "string" + } + } + }, + ":items": { + "$ref": "../adaptive-form.schema.json#/$defs/ColonItems" + }, + ":itemsOrder": { + "$ref": "../adaptive-form.schema.json#/$defs/ColonItemsOrder" + } + } +} \ No newline at end of file diff --git a/bundles/af-core/src/test/resources/schema/0.15.2/print/adaptive-form-dor-container-script.schema.json b/bundles/af-core/src/test/resources/schema/0.15.2/print/adaptive-form-dor-container-script.schema.json new file mode 100644 index 0000000000..8675e91d4b --- /dev/null +++ b/bundles/af-core/src/test/resources/schema/0.15.2/print/adaptive-form-dor-container-script.schema.json @@ -0,0 +1,35 @@ +{ + "$id": "classpath:/schema/0.15.2/print/adaptive-form-dor-container-script.schema.json", + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "Event Script", + "description": "Specifies the script for the event.", + "type": "object", + "additionalProperties": false, + "properties": { + "name": { + "title": "Script Name", + "description": "Specifies the name for the script.", + "type": "string" + }, + "runAt": { + "title": "Script Run At", + "description": "Specifies the run at for the script.", + "type": "string" + }, + "useHref": { + "title": "Script Use Href", + "description": "Specifies the use href for the script.", + "type": "string" + }, + "contentType": { + "title": "Script Content Type", + "description": "Specifies the content type for the script.", + "type": "string" + }, + "content": { + "title": "Image Content", + "description": "Specifies the content for the image.", + "type": "string" + } + } +} \ No newline at end of file diff --git a/bundles/af-core/src/test/resources/schema/0.15.2/print/adaptive-form-dor-container-type-definitions.schema.json b/bundles/af-core/src/test/resources/schema/0.15.2/print/adaptive-form-dor-container-type-definitions.schema.json new file mode 100644 index 0000000000..7e927f3ff8 --- /dev/null +++ b/bundles/af-core/src/test/resources/schema/0.15.2/print/adaptive-form-dor-container-type-definitions.schema.json @@ -0,0 +1,284 @@ +{ + "$id": "classpath:/schema/0.15.2/print/adaptive-form-dor-container-type-definitions.schema.json", + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "description": "Specifies the border properties for the object.", + "$defs": { + "Message": { + "title": "Text Value", + "description": "Specifies the text value for the object.", + "type": "object", + "properties": { + "content": { + "title": "Text Content", + "description": "Specifies the content for the text.", + "type": "string" + } + } + }, + "Picture": { + "title": "Picture Clause", + "description": "Specifies the picture for the user interface.", + "type": "object", + "properties": { + "content": { + "title": "Picture Clause Content", + "description": "Specifies the content for the picture.", + "type": "string" + } + } + }, + "Edge": { + "type": "object", + "properties": { + "presence": { + "title": "Edge Presence", + "description": "Specifies the presence attribute for the edge.", + "type": "string" + }, + "stroke": { + "title": "Edge Stroke", + "description": "Specifies the stroke attribute for the edge.", + "type": "string" + }, + "thickness": { + "title": "Edge Thickness", + "description": "Specifies the thickness attribute for the edge.", + "type": "string" + }, + "color": { + "title": "Edge Color", + "description": "Specifies the color attribute for the edge.", + "$ref": "#/$defs/Color" + } + } + }, + "Corner": { + "title": "Corner", + "description": "Specifies the corner.", + "type": "object", + "properties": { + "presence": { + "title": "Corner Presence", + "description": "Specifies the presence attribute for the corner.", + "type": "string" + }, + "stroke": { + "title": "Corner Stroke", + "description": "Specifies the stroke attribute for the corner.", + "type": "string" + }, + "thickness": { + "title": "Corner Thickness", + "description": "Specifies the thickness attribute for the corner.", + "type": "string" + }, + "radius": { + "title": "Corner Radius", + "description": "Specifies the radius attribute for the corner.", + "type": "string" + }, + "inverted": { + "title": "Corner Inverted", + "description": "Specifies the inverted attribute for the corner.", + "type": "string" + }, + "join": { + "title": "Corner Join", + "description": "Specifies the join attribute for the corner.", + "type": "string" + }, + "color": { + "title": "Corner Color", + "description": "Specifies the color attribute for the edge.", + "$ref": "#/$defs/Color" + } + } + }, + "Color": { + "title": "Color", + "description": "Specifies the color attribute.", + "type": "object", + "properties": { + "value": { + "title": "Color Value", + "description": "Specifies the color value.", + "type": "string" + } + } + }, + "TextValue": { + "title": "Text Value", + "description": "Specifies the text value for the object.", + "type": "object", + "properties": { + "content": { + "title": "Text Content", + "description": "Specifies the content for the text.", + "type": "string" + }, + "maxChars": { + "title": "Text Max Chars", + "description": "Specifies the maximum characters for the text.", + "type": "string" + } + } + }, + "IntegerValue": { + "title": "Integer Value", + "description": "Specifies the integer value for the object.", + "type": "object", + "properties": { + "content": { + "title": "Integer Content", + "description": "Specifies the content for the integer.", + "type": "string" + } + } + }, + "FloatValue": { + "title": "Float Value", + "description": "Specifies the float value for the object.", + "type": "object", + "properties": { + "content": { + "title": "Float Content", + "description": "Specifies the content for the float.", + "type": "string" + } + } + }, + "RichTextValue": { + "title": "Rich Text Value", + "description": "Specifies the rich text value for the object.", + "type": "object", + "properties": { + "content": { + "title": "Rich Text Content", + "description": "Specifies the content for the rich text.", + "type": "string" + }, + "contentType": { + "title": "Rich Text Content Type", + "description": "Specifies the content type for the rich text.", + "type": "string" + } + } + }, + "LineValue": { + "title": "Line Value", + "description": "Specifies the line value for the object.", + "type": "object", + "properties": { + "slope": { + "title": "Line Slope", + "description": "Specifies the slope for the line.", + "type": "string" + }, + "edge": { + "title": "Line Edge", + "description": "Specifies the edge for the line.", + "$ref": "#/$defs/Edge" + } + } + }, + "RectangleValue": { + "title": "Rectangle Value", + "description": "Specifies the rectangle value for the object.", + "type": "object", + "properties": { + "edges": { + "$ref": "./adaptive-form-dor-container-edges.schema.json" + }, + "corners": { + "$ref": "./adaptive-form-dor-container-corners.schema.json" + }, + "fill": { + "$ref": "./adaptive-form-dor-container-fill.schema.json" + } + } + }, + "ImageValue": { + "title": "Image Value", + "description": "Specifies the image value for the object.", + "type": "object", + "properties": { + "href": { + "title": "Image Href", + "description": "Specifies the href for the image.", + "type": "string" + }, + "content": { + "title": "Image Content", + "description": "Specifies the content for the image.", + "type": "string" + }, + "contentType": { + "title": "Image Content Type", + "description": "Specifies the content type for the image.", + "type": "string" + } + } + }, + "DateValue": { + "title": "Date Value", + "description": "Specifies the date value for the object.", + "type": "object", + "properties": { + "content": { + "title": "Date Content", + "description": "Specifies the content for the date.", + "type": "string" + } + } + }, + "DateTimeValue": { + "title": "Date Time Value", + "description": "Specifies the date time value for the object.", + "type": "object", + "properties": { + "content": { + "title": "Date Time Content", + "description": "Specifies the content for the date time.", + "type": "string" + } + } + }, + "BooleanValue": { + "title": "Boolean Value", + "description": "Specifies the boolean value for the object.", + "type": "object", + "properties": { + "content": { + "title": "Boolean Content", + "description": "Specifies the content for the boolean.", + "type": "string" + } + } + }, + "DecimalValue": { + "title": "Decimal Value", + "description": "Specifies the decimal value for the object.", + "type": "object", + "properties": { + "content": { + "title": "Decimal Content", + "description": "Specifies the content for the decimal.", + "type": "string" + } + } + }, + "TimeValue": { + "title": "Time Value", + "description": "Specifies the time value for the object.", + "type": "object", + "properties": { + "content": { + "title": "Time Content", + "description": "Specifies the content for the time.", + "type": "string" + } + } + } + } +} \ No newline at end of file diff --git a/bundles/af-core/src/test/resources/schema/0.15.2/print/adaptive-form-dor-container-ui.schema.json b/bundles/af-core/src/test/resources/schema/0.15.2/print/adaptive-form-dor-container-ui.schema.json new file mode 100644 index 0000000000..30ac035ec2 --- /dev/null +++ b/bundles/af-core/src/test/resources/schema/0.15.2/print/adaptive-form-dor-container-ui.schema.json @@ -0,0 +1,149 @@ +{ + "$id": "classpath:/schema/0.15.2/print/adaptive-form-dor-container-ui.schema.json", + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "User Interface", + "description": "Specifies the user interface for the object.", + "type": "object", + "additionalProperties": false, + "properties": { + "textEdit": { + "title": "Text Edit", + "description": "Specifies the text edit for the user interface.", + "type": "object", + "properties": { + "allowRichText": { + "title": "Allow Rich Text", + "description": "Specifies whether rich text is allowed for the text edit.", + "type": "string" + }, + "multiLine": { + "title": "Multi Line", + "description": "Specifies whether multiple lines are allowed for the text edit.", + "type": "string" + }, + "margin": { + "$ref": "./adaptive-form-dor-container-margin.schema.json" + }, + "border": { + "$ref": "./adaptive-form-dor-container-border.schema.json" + } + } + }, + "checkButton": { + "title": "Check Button", + "description": "Specifies the check button for the user interface.", + "type": "object", + "properties": { + "size": { + "title": "Size", + "description": "Specifies the size for the check button.", + "type": "string" + }, + "mark": { + "title": "Mark", + "description": "Specifies the mark for the check button.", + "type": "string" + }, + "shape": { + "title": "Shape", + "description": "Specifies the shape for the check button.", + "type": "string" + }, + "border": { + "$ref": "./adaptive-form-dor-container-border.schema.json" + } + } + }, + "dateTimeEdit": { + "title": "Date Time Edit", + "description": "Specifies the date time edit for the user interface.", + "type": "object", + "properties": { + "margin": { + "$ref": "./adaptive-form-dor-container-margin.schema.json" + }, + "border": { + "$ref": "./adaptive-form-dor-container-border.schema.json" + } + } + }, + "numericEdit": { + "title": "Numeric Edit", + "description": "Specifies the numeric edit for the user interface.", + "type": "object", + "properties": { + "margin": { + "$ref": "./adaptive-form-dor-container-margin.schema.json" + }, + "border": { + "$ref": "./adaptive-form-dor-container-border.schema.json" + } + } + }, + "imageEdit": { + "title": "Image Edit", + "description": "Specifies the image edit for the user interface.", + "type": "object", + "properties": { + "data": { + "title": "Referred or Embedded Image", + "description": "Indicates whether the image should be represented as a reference or should be embedded", + "type": "string" + }, + "margin": { + "$ref": "./adaptive-form-dor-container-margin.schema.json" + }, + "border": { + "$ref": "./adaptive-form-dor-container-border.schema.json" + } + } + }, + "picture": { + "$ref": "./adaptive-form-dor-container-type-definitions.schema.json#/$defs/Picture" + }, + "button": { + "title": "Button Edit", + "description": "Specifies the button edit for the user interface.", + "type": "object", + "properties": { + "highlight": { + "title": "Highlight", + "description": "Specifies the highlight for the button edit.", + "type": "string" + } + } + }, + "barcode": { + "title": "Barcode Edit", + "description": "Specifies the barcode edit for the user interface.", + "type": "object", + "properties": { + "type": { + "title": "Type", + "description": "Specifies the type for the barcode edit.", + "type": "string" + }, + "wideNarrowRatio": { + "title": "Wide Narrow Ratio", + "description": "Specifies the wide narrow ratio for the barcode edit.", + "type": "string" + }, + "textLocation": { + "title": "Text Location", + "description": "Specifies the text location for the barcode edit.", + "type": "string" + }, + "dataLength": { + "title": "Data Length", + "description": "Specifies the data length for the barcode edit.", + "type": "string" + }, + "checksum": { + "title": "Checksum", + "description": "Specifies the checksum for the barcode edit.", + "type": "string" + } + } + } + } +} \ No newline at end of file diff --git a/bundles/af-core/src/test/resources/schema/0.15.2/print/adaptive-form-dor-container-value.schema.json b/bundles/af-core/src/test/resources/schema/0.15.2/print/adaptive-form-dor-container-value.schema.json new file mode 100644 index 0000000000..0f47ced27c --- /dev/null +++ b/bundles/af-core/src/test/resources/schema/0.15.2/print/adaptive-form-dor-container-value.schema.json @@ -0,0 +1,46 @@ +{ + "$id": "classpath:/schema/0.15.2/print/adaptive-form-dor-container-value.schema.json", + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "Value", + "description": "Specifies the value for the object.", + "type": "object", + "additionalProperties": false, + "properties": { + "text": { + "$ref": "./adaptive-form-dor-container-type-definitions.schema.json#/$defs/TextValue" + }, + "integer": { + "$ref": "./adaptive-form-dor-container-type-definitions.schema.json#/$defs/IntegerValue" + }, + "float": { + "$ref": "./adaptive-form-dor-container-type-definitions.schema.json#/$defs/FloatValue" + }, + "richText": { + "$ref": "./adaptive-form-dor-container-type-definitions.schema.json#/$defs/RichTextValue" + }, + "line": { + "$ref": "./adaptive-form-dor-container-type-definitions.schema.json#/$defs/LineValue" + }, + "rectangle": { + "$ref": "./adaptive-form-dor-container-type-definitions.schema.json#/$defs/RectangleValue" + }, + "image": { + "$ref": "./adaptive-form-dor-container-type-definitions.schema.json#/$defs/ImageValue" + }, + "date": { + "$ref": "./adaptive-form-dor-container-type-definitions.schema.json#/$defs/DateValue" + }, + "dateTime": { + "$ref": "./adaptive-form-dor-container-type-definitions.schema.json#/$defs/DateTimeValue" + }, + "boolean": { + "$ref": "./adaptive-form-dor-container-type-definitions.schema.json#/$defs/BooleanValue" + }, + "decimal": { + "$ref": "./adaptive-form-dor-container-type-definitions.schema.json#/$defs/DecimalValue" + }, + "time": { + "$ref": "./adaptive-form-dor-container-type-definitions.schema.json#/$defs/TimeValue" + } + } +} \ No newline at end of file diff --git a/bundles/af-core/src/test/resources/schema/0.15.2/print/adaptive-form-page-template-properties.schema.json b/bundles/af-core/src/test/resources/schema/0.15.2/print/adaptive-form-page-template-properties.schema.json new file mode 100644 index 0000000000..6bad076517 --- /dev/null +++ b/bundles/af-core/src/test/resources/schema/0.15.2/print/adaptive-form-page-template-properties.schema.json @@ -0,0 +1,110 @@ +{ + "$id": "classpath:/schema/0.15.2/print/adaptive-form-page-template-properties.schema.json", + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "title": "unique identifier for a form element" + }, + ":type": { + "type": "string", + "title": "A hint to the rendering engine for rendering custom components." + }, + "config": { + "title": "Config for the template", + "type": "string", + "description": "Contains the xci config" + }, + "connectionSet": { + "title": "Data Connection Set", + "type": "string", + "description": "Contains the data connection details" + }, + "datasets": { + "title": "Data Sets for the template", + "type": "object", + "description": "Contains the data sets", + "properties": { + "dataDescriptions": { + "title": "Data Descriptions", + "type": "string", + "description": "Contains the data schema" + } + } + }, + "localeSet": { + "title": "Locale Set for the template", + "type": "string", + "description": "Contains the details about the locales" + }, + "xmpMetaData": { + "title": "XMP Metadata", + "type": "string", + "description": "Contains the details about XMP metadata for the output" + }, + "schemas": { + "title": "Data Schemas", + "type": "string", + "description": "Contains the data schemas" + }, + "template": { + "title": "Template Details", + "type": "object", + "description": "Contains the template details", + "properties": { + "id": { + "type": "string", + "title": "unique identifier for a form element" + }, + "items": { + "$ref": "../adaptive-form.schema.json#/$defs/Items" + }, + ":items": { + "$ref": "../adaptive-form.schema.json#/$defs/ColonItems" + }, + ":itemsOrder": { + "$ref": "../adaptive-form.schema.json#/$defs/ColonItemsOrder" + }, + ":type": { + "type": "string", + "title": "A hint to the rendering engine for rendering custom components." + }, + "events": { + "$ref": "../adaptive-form-events.schema.json" + }, + "fieldType": { + "title": "Type of widget to show to the user for capturing the data", + "description": "It must be template", + "enum": [ + "template" + ] + }, + "name": { + "type": "string", + "title": "Name of the element. It is also the key in the JSON data, if dataRef is not defined explicitly, that the form produces. If two fields/panels under a same panel have the same name, their values will be same" + }, + "label": { + "$ref": "../adaptive-form-label.schema.json" + }, + "properties": { + "title": "An object containing custom properties that can be modified via rules as well.", + "type": "object", + "properties": { + "fd:dor": { + "$ref": "../adaptive-form-dor-properties.schema.json" + } + }, + "additionalProperties": true + }, + "type": { + "type": [ + "string" + ], + "title": "Type of the form element" + } + } + } + } +} \ No newline at end of file