use JSONSchema7 instead of JSONSchema4

This commit is contained in:
Yanzhen Yu 2021-07-26 14:43:47 +08:00
parent f2ec51c866
commit cad320dd1b
3 changed files with 8 additions and 8 deletions

View File

@ -1,4 +1,4 @@
import { JSONSchema4 } from "json-schema";
import { JSONSchema7 } from "json-schema";
import { parseVersion } from "./version";
import { Metadata } from "./metadata";
import { MethodSchema } from "./method";
@ -14,9 +14,9 @@ export type Component = {
};
type ComponentSpec = {
properties: Array<JSONSchema4 & { name: string }>;
properties: Array<JSONSchema7 & { name: string }>;
acceptTraits: TraitSchema[];
state: JSONSchema4;
state: JSONSchema7;
methods: MethodSchema[];
};

View File

@ -1,6 +1,6 @@
import { JSONSchema4 } from "json-schema";
import { JSONSchema7 } from "json-schema";
export type MethodSchema = {
name: string;
parameters?: JSONSchema4;
parameters?: JSONSchema7;
};

View File

@ -1,4 +1,4 @@
import { JSONSchema4 } from "json-schema";
import { JSONSchema7 } from "json-schema";
import { Metadata } from "./metadata";
import { MethodSchema } from "./method";
import { parseVersion, Version } from "./version";
@ -13,8 +13,8 @@ export type Trait = {
};
type TraitSpec = {
properties: Array<JSONSchema4 & { name: string }>;
state: JSONSchema4;
properties: Array<JSONSchema7 & { name: string }>;
state: JSONSchema7;
methods: MethodSchema[];
};