Skip to content
14 changes: 4 additions & 10 deletions example/src/examples/allOf/schema.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"definitions": {
"address": {
"type": "object",
Expand All @@ -14,11 +15,7 @@
"type": "string"
}
},
"required": [
"street_address",
"city",
"state"
]
"required": ["street_address", "city", "state"]
},
"user": {
"type": "object",
Expand All @@ -31,10 +28,7 @@
"type": "string"
}
},
"required": [
"name",
"mail"
]
"required": ["name", "mail"]
}
},
"type": "object",
Expand All @@ -50,4 +44,4 @@
]
}
}
}
}
8 changes: 3 additions & 5 deletions example/src/examples/anyOf-simple/schema.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"foo": {
Expand All @@ -7,12 +8,9 @@
"type": "string"
},
{
"enum": [
"foo",
"bar"
]
"enum": ["foo", "bar"]
}
]
}
}
}
}
14 changes: 4 additions & 10 deletions example/src/examples/anyOf/schema.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"definitions": {
"address": {
"type": "object",
Expand All @@ -14,11 +15,7 @@
"type": "string"
}
},
"required": [
"street_address",
"city",
"state"
]
"required": ["street_address", "city", "state"]
},
"user": {
"type": "object",
Expand All @@ -31,10 +28,7 @@
"type": "string"
}
},
"required": [
"name",
"mail"
]
"required": ["name", "mail"]
}
},
"type": "object",
Expand All @@ -50,4 +44,4 @@
]
}
}
}
}
8 changes: 3 additions & 5 deletions example/src/examples/array-restrict/schema.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"comments": {
Expand All @@ -16,15 +17,12 @@
},
"enum": {
"type": "string",
"enum": [
"foo",
"bar"
]
"enum": ["foo", "bar"]
}
}
},
"minItems": 1,
"maxItems": 5
}
}
}
}
8 changes: 3 additions & 5 deletions example/src/examples/array-with-reorder/schema.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"comments": {
Expand All @@ -16,13 +17,10 @@
},
"enum": {
"type": "string",
"enum": [
"foo",
"bar"
]
"enum": ["foo", "bar"]
}
}
}
}
}
}
}
8 changes: 3 additions & 5 deletions example/src/examples/array/schema.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"comments": {
Expand All @@ -16,13 +17,10 @@
},
"enum": {
"type": "string",
"enum": [
"foo",
"bar"
]
"enum": ["foo", "bar"]
}
}
}
}
}
}
}
1 change: 1 addition & 0 deletions example/src/examples/basic/schema.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"name": {
Expand Down
12 changes: 3 additions & 9 deletions example/src/examples/categorization-stepper-nav/schema.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"firstName": {
Expand All @@ -21,14 +22,7 @@
},
"nationality": {
"type": "string",
"enum": [
"DE",
"IT",
"JP",
"US",
"RU",
"Other"
]
"enum": ["DE", "IT", "JP", "US", "RU", "Other"]
},
"provideAddress": {
"type": "boolean"
Expand Down Expand Up @@ -74,4 +68,4 @@
}
}
}
}
}
12 changes: 3 additions & 9 deletions example/src/examples/categorization-stepper/schema.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"firstName": {
Expand All @@ -21,14 +22,7 @@
},
"nationality": {
"type": "string",
"enum": [
"DE",
"IT",
"JP",
"US",
"RU",
"Other"
]
"enum": ["DE", "IT", "JP", "US", "RU", "Other"]
},
"provideAddress": {
"type": "boolean"
Expand Down Expand Up @@ -74,4 +68,4 @@
}
}
}
}
}
12 changes: 3 additions & 9 deletions example/src/examples/categorization/schema.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"firstName": {
Expand All @@ -21,14 +22,7 @@
},
"nationality": {
"type": "string",
"enum": [
"DE",
"IT",
"JP",
"US",
"RU",
"Other"
]
"enum": ["DE", "IT", "JP", "US", "RU", "Other"]
},
"provideAddress": {
"type": "boolean"
Expand Down Expand Up @@ -74,4 +68,4 @@
}
}
}
}
}
1 change: 1 addition & 0 deletions example/src/examples/control-options/schema.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"multilineString": {
Expand Down
9 changes: 3 additions & 6 deletions example/src/examples/control/schema.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"string": {
Expand Down Expand Up @@ -27,11 +28,7 @@
},
"enum": {
"type": "string",
"enum": [
"One",
"Two",
"Three"
]
"enum": ["One", "Two", "Three"]
}
}
}
}
1 change: 1 addition & 0 deletions example/src/examples/custom-renderer/schema.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"exampleArray": {
Expand Down
1 change: 1 addition & 0 deletions example/src/examples/date/schema.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"date": {
Expand Down
1 change: 1 addition & 0 deletions example/src/examples/datetime/schema.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"dateTime": {
Expand Down
8 changes: 3 additions & 5 deletions example/src/examples/enum-in-array/schema.json
Original file line number Diff line number Diff line change
@@ -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",
Expand All @@ -29,4 +27,4 @@
}
}
}
}
}
13 changes: 4 additions & 9 deletions example/src/examples/enum/schema.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down Expand Up @@ -50,4 +45,4 @@
]
}
}
}
}
1 change: 1 addition & 0 deletions example/src/examples/file/data.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
16 changes: 16 additions & 0 deletions example/src/examples/file/i18n.json
Original file line number Diff line number Diff line change
@@ -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"
}
}
}
12 changes: 12 additions & 0 deletions example/src/examples/file/index.ts
Original file line number Diff line number Diff line change
@@ -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 };
Loading