react-jsonschema-form uses AVJ5 which defaults to JSON Schema 6

This commit is contained in:
Nicholas Steicke
2018-02-22 09:57:11 +10:30
parent 425ca63a9e
commit 11ed09a5f3
2 changed files with 9 additions and 9 deletions
+7 -7
View File
@@ -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<HTMLElement> {
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<WidgetProps> | React.ComponentClass<WidgetProps>;
export interface FieldProps extends React.HTMLAttributes<HTMLElement> {
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;
@@ -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": [