From 11ed09a5f3a601cf979a919d4bf03e6e4c452bc4 Mon Sep 17 00:00:00 2001 From: Nicholas Steicke Date: Wed, 21 Feb 2018 15:41:15 +1030 Subject: [PATCH] react-jsonschema-form uses AVJ5 which defaults to JSON Schema 6 --- types/react-jsonschema-form/index.d.ts | 14 +++++++------- .../react-jsonschema-form-tests.tsx | 4 ++-- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/types/react-jsonschema-form/index.d.ts b/types/react-jsonschema-form/index.d.ts index 0a43e0f0c8..dec2ad0509 100644 --- a/types/react-jsonschema-form/index.d.ts +++ b/types/react-jsonschema-form/index.d.ts @@ -9,10 +9,10 @@ declare module "react-jsonschema-form" { import * as React from "react"; - import { JSONSchema4 } from "json-schema"; + import { JSONSchema6 } from "json-schema"; export interface FormProps { - schema: JSONSchema4; + schema: JSONSchema6; uiSchema?: UiSchema; formData?: any; formContext?: any; @@ -60,7 +60,7 @@ declare module "react-jsonschema-form" { export interface WidgetProps extends React.HTMLAttributes { id: string; - schema: JSONSchema4; + schema: JSONSchema6; value: any; required: boolean; disabled: boolean; @@ -74,7 +74,7 @@ declare module "react-jsonschema-form" { export type Widget = React.StatelessComponent | React.ComponentClass; export interface FieldProps extends React.HTMLAttributes { - schema: JSONSchema4; + schema: JSONSchema6; uiSchema: UiSchema; idSchema: IdSchema; formData: any; @@ -114,7 +114,7 @@ declare module "react-jsonschema-form" { disabled: boolean; displayLabel: boolean; fields: Field[]; - schema: JSONSchema4; + schema: JSONSchema6; uiSchema: UiSchema; formContext: any; } @@ -142,7 +142,7 @@ declare module "react-jsonschema-form" { onAddClick: (event: any) => (event: any) => void; readonly: boolean; required: boolean; - schema: JSONSchema4; + schema: JSONSchema6; uiSchema: UiSchema; title: string; formContext: any; @@ -161,7 +161,7 @@ declare module "react-jsonschema-form" { readonly: boolean; }[], required: boolean; - schema: JSONSchema4; + schema: JSONSchema6; uiSchema: UiSchema; idSchema: IdSchema; formData: any; diff --git a/types/react-jsonschema-form/react-jsonschema-form-tests.tsx b/types/react-jsonschema-form/react-jsonschema-form-tests.tsx index 2b4a7e0d67..519a642ebb 100644 --- a/types/react-jsonschema-form/react-jsonschema-form-tests.tsx +++ b/types/react-jsonschema-form/react-jsonschema-form-tests.tsx @@ -1,11 +1,11 @@ import * as React from "react"; import Form, { UiSchema } from "react-jsonschema-form"; -import { JSONSchema4 } from "json-schema"; +import { JSONSchema6 } from "json-schema"; // example taken from the react-jsonschema-form playground: // https://github.com/mozilla-services/react-jsonschema-form/blob/fedd830294417969d88e38fb9f6b3a85e6ad105e/playground/samples/simple.js -const schema: JSONSchema4 = { +const schema: JSONSchema6 = { "title": "A registration form", "type": "object", "required": [