Skip to content
This repository has been archived by the owner on Mar 9, 2023. It is now read-only.

Commit

Permalink
fix: swap schema
Browse files Browse the repository at this point in the history
  • Loading branch information
wtrocki committed Sep 10, 2020
1 parent 68e571f commit 12d16b9
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 91 deletions.
8 changes: 4 additions & 4 deletions examples/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
"private": true,
"root": true,
"scripts": {
"build": "parcel build index.html",
"start": "parcel serve index.html"
"build": "parcel build --no-cache index.html",
"start": "parcel serve --no-cache index.html"
},
"dependencies": {
"@patternfly/react-core": "4.45.1",
"@patternfly/react-icons": "4.7.2",
"ajv": "6.10.2",
"react": "^16.13.1",
"react-dom": "16.9.0",
"react": "16.13.1",
"react-dom": "16.13.1",
"react-scripts": "3.1.1",
"simpl-schema": "1.5.7",
"uniforms": "3.0.0-rc.3",
Expand Down
132 changes: 47 additions & 85 deletions examples/schema/json-schema.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,106 +14,68 @@ function createValidator(schema) {
}

const schema = {
'phases': [
'complete',
'release'
],
'properties': {
'traveller': {
'properties': {
'address': {
'properties': {
'city': {
'type': 'string'
},
'country': {
'type': 'string'
},
'street': {
'type': 'string'
},
'zipCode': {
'type': 'string'
}
},
'type': 'object'
type: 'object',
properties: {
flight: {
type: 'object',
properties: {
flightNumber: {
type: 'string'
},
'email': {
'format': 'email',
'type': 'string'
seat: {
type: 'string'
},
'firstName': {
'type': 'string'
gate: {
type: 'string'
},
'lastName': {
'type': 'string'
departure: {
type: 'string',
format: 'date-time'
},
'nationality': {
'type': 'string'
arrival: {
type: 'string',
format: 'date-time'
}
},
'required': [
'firstName',
'lastName'
],
'type': 'object'
disabled: true
},
'trip': {
'properties': {
'begin': {
'format': 'date-time',
'type': 'string'
},
'city': {
'type': 'string'
hotel: {
type: 'object',
properties: {
name: {
type: 'string'
},
'country': {
'type': 'string'
},
'end': {
'format': 'date-time',
'type': 'string'
},
'visaRequired': {
'type': 'boolean'
}
},
'type': 'object',
'uniforms': {
'disabled': true
}
},
'visaApplication': {
'properties': {
'city': {
'type': 'string'
},
'country': {
'type': 'string'
},
'duration': {
'type': 'integer'
},
'firstName': {
'type': 'string'
address: {
type: 'object',
properties: {
street: {
type: 'string'
},
city: {
type: 'string'
},
zipCode: {
type: 'string'
},
country: {
type: 'string'
}
}
},
'lastName': {
'type': 'string'
phone: {
type: 'string'
},
'nationality': {
'type': 'string'
bookingNumber: {
type: 'string'
},
'passportNumber': {
'type': 'string'
room: {
type: 'string'
}
},
'type': 'object',
'uniforms': {
'disabled': true
}
disabled: true
}
},
'type': 'object'
phases: ['complete', 'release']
};

const schemaValidator = createValidator(schema);
Expand Down
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
{
"name": "uniforms-patternfly",
"version": "4.0.0",
"version": "4.0.1-dev.1",
"description": "Patternfly forms for uniforms",
"repository": "git@github.com:aerogear/uniforms-patternfly.git",
"author": "Gianluca <gzuccare@redhat.com>",
"license": "Apache-2.0",
"license": "Apache-2.0",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"scripts": {
"build": "tsc --build --incremental",
"buildProd": "tsc --build",
"watch": "tsc --watch --incremental",
"clean": "rimraf dist coverage tsconfig.tsbuildinfo && tsc",
"coverage": "jest --coverage",
"lint": "eslint --ext js,ts,tsx src",
Expand Down

0 comments on commit 12d16b9

Please sign in to comment.