Skip to content
This repository was archived by the owner on Dec 10, 2021. It is now read-only.

Commit 76fbd10

Browse files
committed
Include types for JSON schema
1 parent 6df0be3 commit 76fbd10

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
"@types/fs-extra": "^4.0.0",
4040
"@types/jest": "^20.0.2",
4141
"@types/js-yaml": "^3.5.31",
42+
"@types/json-schema": "^7.0.3",
4243
"@types/node": "^8.0.7",
4344
"@types/uuid": "^3.0.0",
4445
"changelog-verify": "^1.0.4",

src/types.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1+
import { JSONSchema7 } from 'json-schema';
12

23
export interface IModels {
34
name: string;
45
description: string;
56
contentType: string;
6-
schema: object | any[];
7+
schema: JSONSchema7;
78
examples: any[];
89
example: object;
910
}

yarn.lock

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,11 @@
4545
version "3.9.1"
4646
resolved "https://registry.yarnpkg.com/@types/js-yaml/-/js-yaml-3.9.1.tgz#2f3c142771bb345829ce690c5838760b6b9ba553"
4747

48+
"@types/json-schema@^7.0.3":
49+
version "7.0.3"
50+
resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.3.tgz#bdfd69d61e464dcc81b25159c270d75a73c1a636"
51+
integrity sha512-Il2DtDVRGDcqjDtE+rF8iqg1CArehSK84HZJCT7AMITlyXRBpuPhqGLDQMowraqqu1coEaimg4ZOqggt6L6L+A==
52+
4853
"@types/node@*", "@types/node@^8.0.7":
4954
version "8.0.25"
5055
resolved "https://registry.yarnpkg.com/@types/node/-/node-8.0.25.tgz#66ecaf4df93f5281b48427ee96fbcdfc4f0cdce1"

0 commit comments

Comments
 (0)