diff --git a/example/src/examples/allOf/schema.json b/example/src/examples/allOf/schema.json
index c128998f..4535ec7a 100644
--- a/example/src/examples/allOf/schema.json
+++ b/example/src/examples/allOf/schema.json
@@ -1,4 +1,5 @@
{
+ "$schema": "http://json-schema.org/draft-07/schema#",
"definitions": {
"address": {
"type": "object",
@@ -14,11 +15,7 @@
"type": "string"
}
},
- "required": [
- "street_address",
- "city",
- "state"
- ]
+ "required": ["street_address", "city", "state"]
},
"user": {
"type": "object",
@@ -31,10 +28,7 @@
"type": "string"
}
},
- "required": [
- "name",
- "mail"
- ]
+ "required": ["name", "mail"]
}
},
"type": "object",
@@ -50,4 +44,4 @@
]
}
}
-}
\ No newline at end of file
+}
diff --git a/example/src/examples/anyOf-simple/schema.json b/example/src/examples/anyOf-simple/schema.json
index 0b7020ff..bf82edb3 100644
--- a/example/src/examples/anyOf-simple/schema.json
+++ b/example/src/examples/anyOf-simple/schema.json
@@ -1,4 +1,5 @@
{
+ "$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"foo": {
@@ -7,12 +8,9 @@
"type": "string"
},
{
- "enum": [
- "foo",
- "bar"
- ]
+ "enum": ["foo", "bar"]
}
]
}
}
-}
\ No newline at end of file
+}
diff --git a/example/src/examples/anyOf/schema.json b/example/src/examples/anyOf/schema.json
index 58c1d49a..3a1859db 100644
--- a/example/src/examples/anyOf/schema.json
+++ b/example/src/examples/anyOf/schema.json
@@ -1,4 +1,5 @@
{
+ "$schema": "http://json-schema.org/draft-07/schema#",
"definitions": {
"address": {
"type": "object",
@@ -14,11 +15,7 @@
"type": "string"
}
},
- "required": [
- "street_address",
- "city",
- "state"
- ]
+ "required": ["street_address", "city", "state"]
},
"user": {
"type": "object",
@@ -31,10 +28,7 @@
"type": "string"
}
},
- "required": [
- "name",
- "mail"
- ]
+ "required": ["name", "mail"]
}
},
"type": "object",
@@ -50,4 +44,4 @@
]
}
}
-}
\ No newline at end of file
+}
diff --git a/example/src/examples/array-restrict/schema.json b/example/src/examples/array-restrict/schema.json
index d6f69d1e..6b535ce3 100644
--- a/example/src/examples/array-restrict/schema.json
+++ b/example/src/examples/array-restrict/schema.json
@@ -1,4 +1,5 @@
{
+ "$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"comments": {
@@ -16,10 +17,7 @@
},
"enum": {
"type": "string",
- "enum": [
- "foo",
- "bar"
- ]
+ "enum": ["foo", "bar"]
}
}
},
@@ -27,4 +25,4 @@
"maxItems": 5
}
}
-}
\ No newline at end of file
+}
diff --git a/example/src/examples/array-with-reorder/schema.json b/example/src/examples/array-with-reorder/schema.json
index b2ac7ce4..fad10b75 100644
--- a/example/src/examples/array-with-reorder/schema.json
+++ b/example/src/examples/array-with-reorder/schema.json
@@ -1,4 +1,5 @@
{
+ "$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"comments": {
@@ -16,13 +17,10 @@
},
"enum": {
"type": "string",
- "enum": [
- "foo",
- "bar"
- ]
+ "enum": ["foo", "bar"]
}
}
}
}
}
-}
\ No newline at end of file
+}
diff --git a/example/src/examples/array/schema.json b/example/src/examples/array/schema.json
index b2ac7ce4..fad10b75 100644
--- a/example/src/examples/array/schema.json
+++ b/example/src/examples/array/schema.json
@@ -1,4 +1,5 @@
{
+ "$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"comments": {
@@ -16,13 +17,10 @@
},
"enum": {
"type": "string",
- "enum": [
- "foo",
- "bar"
- ]
+ "enum": ["foo", "bar"]
}
}
}
}
}
-}
\ No newline at end of file
+}
diff --git a/example/src/examples/basic/schema.json b/example/src/examples/basic/schema.json
index 9ca98a94..f6cc7ceb 100644
--- a/example/src/examples/basic/schema.json
+++ b/example/src/examples/basic/schema.json
@@ -1,4 +1,5 @@
{
+ "$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"name": {
diff --git a/example/src/examples/categorization-stepper-nav/schema.json b/example/src/examples/categorization-stepper-nav/schema.json
index dbb0480d..391c5133 100644
--- a/example/src/examples/categorization-stepper-nav/schema.json
+++ b/example/src/examples/categorization-stepper-nav/schema.json
@@ -1,4 +1,5 @@
{
+ "$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"firstName": {
@@ -21,14 +22,7 @@
},
"nationality": {
"type": "string",
- "enum": [
- "DE",
- "IT",
- "JP",
- "US",
- "RU",
- "Other"
- ]
+ "enum": ["DE", "IT", "JP", "US", "RU", "Other"]
},
"provideAddress": {
"type": "boolean"
@@ -74,4 +68,4 @@
}
}
}
-}
\ No newline at end of file
+}
diff --git a/example/src/examples/categorization-stepper/schema.json b/example/src/examples/categorization-stepper/schema.json
index dbb0480d..391c5133 100644
--- a/example/src/examples/categorization-stepper/schema.json
+++ b/example/src/examples/categorization-stepper/schema.json
@@ -1,4 +1,5 @@
{
+ "$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"firstName": {
@@ -21,14 +22,7 @@
},
"nationality": {
"type": "string",
- "enum": [
- "DE",
- "IT",
- "JP",
- "US",
- "RU",
- "Other"
- ]
+ "enum": ["DE", "IT", "JP", "US", "RU", "Other"]
},
"provideAddress": {
"type": "boolean"
@@ -74,4 +68,4 @@
}
}
}
-}
\ No newline at end of file
+}
diff --git a/example/src/examples/categorization/schema.json b/example/src/examples/categorization/schema.json
index dbb0480d..391c5133 100644
--- a/example/src/examples/categorization/schema.json
+++ b/example/src/examples/categorization/schema.json
@@ -1,4 +1,5 @@
{
+ "$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"firstName": {
@@ -21,14 +22,7 @@
},
"nationality": {
"type": "string",
- "enum": [
- "DE",
- "IT",
- "JP",
- "US",
- "RU",
- "Other"
- ]
+ "enum": ["DE", "IT", "JP", "US", "RU", "Other"]
},
"provideAddress": {
"type": "boolean"
@@ -74,4 +68,4 @@
}
}
}
-}
\ No newline at end of file
+}
diff --git a/example/src/examples/control-options/schema.json b/example/src/examples/control-options/schema.json
index 7e4cdc45..c2daad75 100644
--- a/example/src/examples/control-options/schema.json
+++ b/example/src/examples/control-options/schema.json
@@ -1,4 +1,5 @@
{
+ "$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"multilineString": {
diff --git a/example/src/examples/control/schema.json b/example/src/examples/control/schema.json
index 278b7758..43980d52 100644
--- a/example/src/examples/control/schema.json
+++ b/example/src/examples/control/schema.json
@@ -1,4 +1,5 @@
{
+ "$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"string": {
@@ -27,11 +28,7 @@
},
"enum": {
"type": "string",
- "enum": [
- "One",
- "Two",
- "Three"
- ]
+ "enum": ["One", "Two", "Three"]
}
}
-}
\ No newline at end of file
+}
diff --git a/example/src/examples/custom-renderer/schema.json b/example/src/examples/custom-renderer/schema.json
index 25c7f52d..92b0b7a0 100644
--- a/example/src/examples/custom-renderer/schema.json
+++ b/example/src/examples/custom-renderer/schema.json
@@ -1,4 +1,5 @@
{
+ "$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"exampleArray": {
diff --git a/example/src/examples/date/schema.json b/example/src/examples/date/schema.json
index 4ac37835..60a400c4 100644
--- a/example/src/examples/date/schema.json
+++ b/example/src/examples/date/schema.json
@@ -1,4 +1,5 @@
{
+ "$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"date": {
diff --git a/example/src/examples/datetime/schema.json b/example/src/examples/datetime/schema.json
index 94e8f746..c2c9b178 100644
--- a/example/src/examples/datetime/schema.json
+++ b/example/src/examples/datetime/schema.json
@@ -1,4 +1,5 @@
{
+ "$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"dateTime": {
diff --git a/example/src/examples/enum-in-array/schema.json b/example/src/examples/enum-in-array/schema.json
index 3da1e05b..bcefddd6 100644
--- a/example/src/examples/enum-in-array/schema.json
+++ b/example/src/examples/enum-in-array/schema.json
@@ -1,14 +1,12 @@
{
+ "$schema": "http://json-schema.org/draft-07/schema#",
"type": "array",
"items": {
"type": "object",
"properties": {
"plainEnum": {
"type": "string",
- "enum": [
- "foo",
- "bar"
- ]
+ "enum": ["foo", "bar"]
},
"oneOfEnum": {
"type": "string",
@@ -29,4 +27,4 @@
}
}
}
-}
\ No newline at end of file
+}
diff --git a/example/src/examples/enum/schema.json b/example/src/examples/enum/schema.json
index b21d8d72..1e3f6dcd 100644
--- a/example/src/examples/enum/schema.json
+++ b/example/src/examples/enum/schema.json
@@ -1,19 +1,14 @@
{
+ "$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"plainEnum": {
"type": "string",
- "enum": [
- "foo",
- "bar"
- ]
+ "enum": ["foo", "bar"]
},
"plainEnumSet": {
"type": "string",
- "enum": [
- "foo",
- "bar"
- ]
+ "enum": ["foo", "bar"]
},
"oneOfEnum": {
"type": "string",
@@ -50,4 +45,4 @@
]
}
}
-}
\ No newline at end of file
+}
diff --git a/example/src/examples/file/data.json b/example/src/examples/file/data.json
new file mode 100644
index 00000000..0967ef42
--- /dev/null
+++ b/example/src/examples/file/data.json
@@ -0,0 +1 @@
+{}
diff --git a/example/src/examples/file/i18n.json b/example/src/examples/file/i18n.json
new file mode 100644
index 00000000..7797d59b
--- /dev/null
+++ b/example/src/examples/file/i18n.json
@@ -0,0 +1,16 @@
+{
+ "en": {
+ "imageDataUri": {
+ "label": "Image File",
+ "error": {
+ "formatMaximum": "size should be less than ${limitText}"
+ }
+ },
+ "fileDataUriWithFileName": {
+ "label": "Image File"
+ },
+ "base64String": {
+ "label": "Image File"
+ }
+ }
+}
diff --git a/example/src/examples/file/index.ts b/example/src/examples/file/index.ts
new file mode 100644
index 00000000..b942ddff
--- /dev/null
+++ b/example/src/examples/file/index.ts
@@ -0,0 +1,12 @@
+import schema from './schema.json';
+import uischema from './uischema.json';
+import data from './data.json';
+import i18n from './i18n.json';
+import { UISchemaElement, JsonSchema } from '@jsonforms/core';
+
+export const input: {
+ schema: JsonSchema;
+ uischema: UISchemaElement;
+ data: any;
+ i18n: any;
+} = { schema, uischema, data, i18n };
diff --git a/example/src/examples/file/schema.json b/example/src/examples/file/schema.json
new file mode 100644
index 00000000..16bd3959
--- /dev/null
+++ b/example/src/examples/file/schema.json
@@ -0,0 +1,24 @@
+{
+ "$schema": "http://json-schema.org/draft-07/schema#",
+ "type": "object",
+ "properties": {
+ "imageDataUri": {
+ "type": "string",
+ "format": "uri",
+ "contentEncoding": "base64",
+ "contentMediaType": "image/*",
+ "description": "Image with maximum size of 1MB encoded as data URI"
+ },
+ "fileDataUriWithFileName": {
+ "type": "string",
+ "format": "binary",
+ "formatMaximum": "1048576",
+ "description": "File with maximum size of 1MB encoded as data URI and including the file name"
+ },
+ "base64String": {
+ "type": "string",
+ "contentEncoding": "base64",
+ "description": "File with maximum size of 1MB encoded as base64"
+ }
+ }
+}
diff --git a/example/src/examples/file/uischema.json b/example/src/examples/file/uischema.json
new file mode 100644
index 00000000..a427dfaf
--- /dev/null
+++ b/example/src/examples/file/uischema.json
@@ -0,0 +1,43 @@
+{
+ "type": "VerticalLayout",
+ "elements": [
+ {
+ "type": "Control",
+ "scope": "#/properties/imageDataUri",
+ "options": {
+ "showUnfocusedDescription": true,
+ "formatMaximum": "1048576",
+ "vuetify": {
+ "v-file-input": {
+ "showSize": true
+ }
+ }
+ }
+ },
+ {
+ "type": "Control",
+ "scope": "#/properties/fileDataUriWithFileName",
+ "options": {
+ "showUnfocusedDescription": true,
+ "vuetify": {
+ "v-file-input": {
+ "showSize": true
+ }
+ }
+ }
+ },
+ {
+ "type": "Control",
+ "scope": "#/properties/base64String",
+ "options": {
+ "showUnfocusedDescription": true,
+ "formatMaximum": 1048576,
+ "vuetify": {
+ "v-file-input": {
+ "showSize": true
+ }
+ }
+ }
+ }
+ ]
+}
diff --git a/example/src/examples/group-layout/schema.json b/example/src/examples/group-layout/schema.json
index 215f8fd8..963d4bf6 100644
--- a/example/src/examples/group-layout/schema.json
+++ b/example/src/examples/group-layout/schema.json
@@ -1,4 +1,5 @@
{
+ "$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"name": {
@@ -15,14 +16,7 @@
},
"nationality": {
"type": "string",
- "enum": [
- "DE",
- "IT",
- "JP",
- "US",
- "RU",
- "Other"
- ]
+ "enum": ["DE", "IT", "JP", "US", "RU", "Other"]
},
"personalData": {
"type": "object",
@@ -41,10 +35,7 @@
"default": 7
}
},
- "required": [
- "age",
- "height"
- ]
+ "required": ["age", "height"]
},
"occupation": {
"type": "string"
@@ -54,8 +45,5 @@
"maxLength": 5
}
},
- "required": [
- "occupation",
- "nationality"
- ]
-}
\ No newline at end of file
+ "required": ["occupation", "nationality"]
+}
diff --git a/example/src/examples/horizontal-layout/schema.json b/example/src/examples/horizontal-layout/schema.json
index 215f8fd8..963d4bf6 100644
--- a/example/src/examples/horizontal-layout/schema.json
+++ b/example/src/examples/horizontal-layout/schema.json
@@ -1,4 +1,5 @@
{
+ "$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"name": {
@@ -15,14 +16,7 @@
},
"nationality": {
"type": "string",
- "enum": [
- "DE",
- "IT",
- "JP",
- "US",
- "RU",
- "Other"
- ]
+ "enum": ["DE", "IT", "JP", "US", "RU", "Other"]
},
"personalData": {
"type": "object",
@@ -41,10 +35,7 @@
"default": 7
}
},
- "required": [
- "age",
- "height"
- ]
+ "required": ["age", "height"]
},
"occupation": {
"type": "string"
@@ -54,8 +45,5 @@
"maxLength": 5
}
},
- "required": [
- "occupation",
- "nationality"
- ]
-}
\ No newline at end of file
+ "required": ["occupation", "nationality"]
+}
diff --git a/example/src/examples/if-then-else/schema.json b/example/src/examples/if-then-else/schema.json
index 883ac90a..88fcd73a 100644
--- a/example/src/examples/if-then-else/schema.json
+++ b/example/src/examples/if-then-else/schema.json
@@ -1,4 +1,5 @@
{
+ "$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"b": {
@@ -12,15 +13,11 @@
"if": {
"properties": {
"b": {
- "enum": [
- false
- ]
+ "enum": [false]
}
}
},
"then": {
- "required": [
- "c"
- ]
+ "required": ["c"]
}
-}
\ No newline at end of file
+}
diff --git a/example/src/examples/index.ts b/example/src/examples/index.ts
index d887864d..efc0070c 100644
--- a/example/src/examples/index.ts
+++ b/example/src/examples/index.ts
@@ -46,6 +46,7 @@ import { input as rule } from './rule';
import { input as verticalLayout } from './vertical-layout';
import { input as huge } from './huge';
import { input as ifThenElse } from './if-then-else';
+import { input as file } from './file';
export const examples = [
{
@@ -68,6 +69,11 @@ export const examples = [
title: 'Control Options',
input: controlOptions,
},
+ {
+ id: 'file',
+ title: 'File',
+ input: file,
+ },
{
id: 'datetime',
title: 'Datetime',
diff --git a/example/src/examples/list-with-details-and-reorder/schema.json b/example/src/examples/list-with-details-and-reorder/schema.json
index 2714669b..8448b800 100644
--- a/example/src/examples/list-with-details-and-reorder/schema.json
+++ b/example/src/examples/list-with-details-and-reorder/schema.json
@@ -1,4 +1,5 @@
{
+ "$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"users": {
@@ -22,10 +23,8 @@
"minimum": 0
}
},
- "required": [
- "firstname"
- ]
+ "required": ["firstname"]
}
}
}
-}
\ No newline at end of file
+}
diff --git a/example/src/examples/list-with-details-restrict/schema.json b/example/src/examples/list-with-details-restrict/schema.json
index 9c536700..4e6c5184 100644
--- a/example/src/examples/list-with-details-restrict/schema.json
+++ b/example/src/examples/list-with-details-restrict/schema.json
@@ -1,4 +1,5 @@
{
+ "$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"users": {
@@ -22,12 +23,10 @@
"minimum": 0
}
},
- "required": [
- "firstname"
- ]
+ "required": ["firstname"]
},
"minItems": 1,
"maxItems": 5
}
}
-}
\ No newline at end of file
+}
diff --git a/example/src/examples/list-with-details/schema.json b/example/src/examples/list-with-details/schema.json
index 2714669b..8448b800 100644
--- a/example/src/examples/list-with-details/schema.json
+++ b/example/src/examples/list-with-details/schema.json
@@ -1,4 +1,5 @@
{
+ "$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"users": {
@@ -22,10 +23,8 @@
"minimum": 0
}
},
- "required": [
- "firstname"
- ]
+ "required": ["firstname"]
}
}
}
-}
\ No newline at end of file
+}
diff --git a/example/src/examples/login/schema.json b/example/src/examples/login/schema.json
index 7368bee5..acd6b6ed 100644
--- a/example/src/examples/login/schema.json
+++ b/example/src/examples/login/schema.json
@@ -1,4 +1,5 @@
{
+ "$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"username": {
@@ -11,8 +12,5 @@
"description": "Login password"
}
},
- "required": [
- "username",
- "password"
- ]
-}
\ No newline at end of file
+ "required": ["username", "password"]
+}
diff --git a/example/src/examples/main/schema.json b/example/src/examples/main/schema.json
index 8d4f6bcd..82f4e4ea 100644
--- a/example/src/examples/main/schema.json
+++ b/example/src/examples/main/schema.json
@@ -1,8 +1,7 @@
{
+ "$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
- "required": [
- "age"
- ],
+ "required": ["age"],
"properties": {
"firstName": {
"type": "string",
@@ -21,11 +20,7 @@
},
"gender": {
"type": "string",
- "enum": [
- "Male",
- "Female",
- "Undisclosed"
- ]
+ "enum": ["Male", "Female", "Undisclosed"]
},
"height": {
"type": "number"
@@ -58,4 +53,4 @@
}
}
}
-}
\ No newline at end of file
+}
diff --git a/example/src/examples/multi-enum/schema.json b/example/src/examples/multi-enum/schema.json
index d4277792..c2e5ebe0 100644
--- a/example/src/examples/multi-enum/schema.json
+++ b/example/src/examples/multi-enum/schema.json
@@ -1,4 +1,5 @@
{
+ "$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"oneOfMultiEnum": {
@@ -26,12 +27,8 @@
"uniqueItems": true,
"items": {
"type": "string",
- "enum": [
- "foo",
- "bar",
- "foobar"
- ]
+ "enum": ["foo", "bar", "foobar"]
}
}
}
-}
\ No newline at end of file
+}
diff --git a/example/src/examples/nested-array-restrict/schema.json b/example/src/examples/nested-array-restrict/schema.json
index f087dce6..f9c79f44 100644
--- a/example/src/examples/nested-array-restrict/schema.json
+++ b/example/src/examples/nested-array-restrict/schema.json
@@ -1,4 +1,5 @@
{
+ "$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"exampleArray": {
@@ -21,4 +22,4 @@
"maxItems": 5
}
}
-}
\ No newline at end of file
+}
diff --git a/example/src/examples/nested-array-with-reorder/schema.json b/example/src/examples/nested-array-with-reorder/schema.json
index 17220f04..fefff772 100644
--- a/example/src/examples/nested-array-with-reorder/schema.json
+++ b/example/src/examples/nested-array-with-reorder/schema.json
@@ -1,4 +1,5 @@
{
+ "$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"exampleArray": {
@@ -15,9 +16,7 @@
}
}
},
- "required":[
- "name"
- ]
+ "required": ["name"]
}
}
}
diff --git a/example/src/examples/nested-array/schema.json b/example/src/examples/nested-array/schema.json
index 82eab10f..fd663b3d 100644
--- a/example/src/examples/nested-array/schema.json
+++ b/example/src/examples/nested-array/schema.json
@@ -1,4 +1,5 @@
{
+ "$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"exampleArray": {
diff --git a/example/src/examples/nested-layout/schema.json b/example/src/examples/nested-layout/schema.json
index 215f8fd8..963d4bf6 100644
--- a/example/src/examples/nested-layout/schema.json
+++ b/example/src/examples/nested-layout/schema.json
@@ -1,4 +1,5 @@
{
+ "$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"name": {
@@ -15,14 +16,7 @@
},
"nationality": {
"type": "string",
- "enum": [
- "DE",
- "IT",
- "JP",
- "US",
- "RU",
- "Other"
- ]
+ "enum": ["DE", "IT", "JP", "US", "RU", "Other"]
},
"personalData": {
"type": "object",
@@ -41,10 +35,7 @@
"default": 7
}
},
- "required": [
- "age",
- "height"
- ]
+ "required": ["age", "height"]
},
"occupation": {
"type": "string"
@@ -54,8 +45,5 @@
"maxLength": 5
}
},
- "required": [
- "occupation",
- "nationality"
- ]
-}
\ No newline at end of file
+ "required": ["occupation", "nationality"]
+}
diff --git a/example/src/examples/no-ui-schema/schema.json b/example/src/examples/no-ui-schema/schema.json
index 6dbc016e..542db3fb 100644
--- a/example/src/examples/no-ui-schema/schema.json
+++ b/example/src/examples/no-ui-schema/schema.json
@@ -1,4 +1,5 @@
{
+ "$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"name": {
@@ -18,20 +19,12 @@
}
},
"additionalProperties": true,
- "required": [
- "age"
- ]
+ "required": ["age"]
},
"postalCode": {
"type": "string"
}
},
"additionalProperties": true,
- "required": [
- "name",
- "vegetarian",
- "birthDate",
- "personalData",
- "postalCode"
- ]
-}
\ No newline at end of file
+ "required": ["name", "vegetarian", "birthDate", "personalData", "postalCode"]
+}
diff --git a/example/src/examples/object/schema.json b/example/src/examples/object/schema.json
index 980dc09f..b3614988 100644
--- a/example/src/examples/object/schema.json
+++ b/example/src/examples/object/schema.json
@@ -15,11 +15,7 @@
"type": "string"
}
},
- "required": [
- "street_address",
- "city",
- "state"
- ]
+ "required": ["street_address", "city", "state"]
},
"user": {
"type": "object",
@@ -31,10 +27,7 @@
"type": "string"
}
},
- "required": [
- "name",
- "mail"
- ]
+ "required": ["name", "mail"]
}
}
-}
\ No newline at end of file
+}
diff --git a/example/src/examples/oneOf/schema.json b/example/src/examples/oneOf/schema.json
index 6b96db35..9c06e516 100644
--- a/example/src/examples/oneOf/schema.json
+++ b/example/src/examples/oneOf/schema.json
@@ -1,4 +1,5 @@
{
+ "$schema": "http://json-schema.org/draft-07/schema#",
"definitions": {
"address": {
"type": "object",
@@ -14,11 +15,7 @@
"type": "string"
}
},
- "required": [
- "street_address",
- "city",
- "state"
- ]
+ "required": ["street_address", "city", "state"]
},
"user": {
"type": "object",
@@ -31,10 +28,7 @@
"type": "string"
}
},
- "required": [
- "name",
- "mail"
- ]
+ "required": ["name", "mail"]
}
},
"type": "object",
@@ -50,4 +44,4 @@
]
}
}
-}
\ No newline at end of file
+}
diff --git a/example/src/examples/radio-group/schema.json b/example/src/examples/radio-group/schema.json
index 63ad5224..0c3b3fe7 100644
--- a/example/src/examples/radio-group/schema.json
+++ b/example/src/examples/radio-group/schema.json
@@ -1,13 +1,10 @@
{
+ "$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"exampleRadioEnum": {
"type": "string",
- "enum": [
- "One",
- "Two",
- "Three"
- ]
+ "enum": ["One", "Two", "Three"]
},
"exampleRadioOneOfEnum": {
"type": "string",
@@ -27,4 +24,4 @@
]
}
}
-}
\ No newline at end of file
+}
diff --git a/example/src/examples/radio/schema.json b/example/src/examples/radio/schema.json
index e111e18d..81d6262c 100644
--- a/example/src/examples/radio/schema.json
+++ b/example/src/examples/radio/schema.json
@@ -1,4 +1,5 @@
{
+ "$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"exampleRadioEnum": {
diff --git a/example/src/examples/rule/schema.json b/example/src/examples/rule/schema.json
index ec821735..653c58c7 100644
--- a/example/src/examples/rule/schema.json
+++ b/example/src/examples/rule/schema.json
@@ -1,4 +1,5 @@
{
+ "$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"name": {
@@ -9,22 +10,14 @@
},
"kindOfDead": {
"type": "string",
- "enum": [
- "Zombie",
- "Vampire",
- "Ghoul"
- ]
+ "enum": ["Zombie", "Vampire", "Ghoul"]
},
"vegetables": {
"type": "boolean"
},
"kindOfVegetables": {
"type": "string",
- "enum": [
- "All",
- "Some",
- "Only potatoes"
- ]
+ "enum": ["All", "Some", "Only potatoes"]
}
}
-}
\ No newline at end of file
+}
diff --git a/example/src/examples/time/schema.json b/example/src/examples/time/schema.json
index e80ec773..a20befc5 100644
--- a/example/src/examples/time/schema.json
+++ b/example/src/examples/time/schema.json
@@ -1,4 +1,5 @@
{
+ "$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"time": {
diff --git a/example/src/examples/vertical-layout/schema.json b/example/src/examples/vertical-layout/schema.json
index 215f8fd8..963d4bf6 100644
--- a/example/src/examples/vertical-layout/schema.json
+++ b/example/src/examples/vertical-layout/schema.json
@@ -1,4 +1,5 @@
{
+ "$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"name": {
@@ -15,14 +16,7 @@
},
"nationality": {
"type": "string",
- "enum": [
- "DE",
- "IT",
- "JP",
- "US",
- "RU",
- "Other"
- ]
+ "enum": ["DE", "IT", "JP", "US", "RU", "Other"]
},
"personalData": {
"type": "object",
@@ -41,10 +35,7 @@
"default": 7
}
},
- "required": [
- "age",
- "height"
- ]
+ "required": ["age", "height"]
},
"occupation": {
"type": "string"
@@ -54,8 +45,5 @@
"maxLength": 5
}
},
- "required": [
- "occupation",
- "nationality"
- ]
-}
\ No newline at end of file
+ "required": ["occupation", "nationality"]
+}
diff --git a/vue2-vuetify/src/controls/FileRenderer.vue b/vue2-vuetify/src/controls/FileRenderer.vue
new file mode 100644
index 00000000..3bda6871
--- /dev/null
+++ b/vue2-vuetify/src/controls/FileRenderer.vue
@@ -0,0 +1,415 @@
+
+
+
+
+
+
+
+
+ {{ standby }}
+
+ $close
+
+
+
+ {{ Math.ceil(progressValue) }}%
+
+
+
+
+
+
+
+
diff --git a/vue2-vuetify/src/controls/index.ts b/vue2-vuetify/src/controls/index.ts
index b610731f..9c129a1d 100644
--- a/vue2-vuetify/src/controls/index.ts
+++ b/vue2-vuetify/src/controls/index.ts
@@ -19,6 +19,7 @@ export { default as SliderControlRenderer } from './SliderControlRenderer.vue';
export { default as StringControlRenderer } from './StringControlRenderer.vue';
export { default as StringMaskControlRenderer } from './StringMaskControlRenderer.vue';
export { default as TimeControlRenderer } from './TimeControlRenderer.vue';
+export { default as FileRenderer } from './FileRenderer.vue';
import { entry as anyOfStringOrEnumControlRendererEntry } from './AnyOfStringOrEnumControlRenderer.vue';
import { entry as booleanControlRendererEntry } from './BooleanControlRenderer.vue';
@@ -37,6 +38,7 @@ import { entry as sliderControlRendererEntry } from './SliderControlRenderer.vue
import { entry as stringControlRendererEntry } from './StringControlRenderer.vue';
import { entry as stringMaskControlRendererEntry } from './StringMaskControlRenderer.vue';
import { entry as timeControlRendererEntry } from './TimeControlRenderer.vue';
+import { entry as fileRendererEntry } from './FileRenderer.vue';
export const controlRenderers = [
anyOfStringOrEnumControlRendererEntry,
@@ -56,4 +58,5 @@ export const controlRenderers = [
stringControlRendererEntry,
stringMaskControlRendererEntry,
timeControlRendererEntry,
+ fileRendererEntry,
];