File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ import isUrl = require("is-url");
3
3
import refParser from "json-schema-ref-parser" ;
4
4
import fetch from "node-fetch" ;
5
5
import { getValidationErrors } from "./get-validation-errors" ;
6
+ import { types } from "@open-rpc/meta-schema" ;
6
7
7
8
const cwd = process . cwd ( ) ;
8
9
@@ -31,7 +32,7 @@ const readSchemaFromFile = async (schema: string) => {
31
32
}
32
33
} ;
33
34
34
- export async function parse ( schema ?: string ) {
35
+ export async function parse ( schema ?: string ) : Promise < types . OpenRPC > {
35
36
let parsedSchema ;
36
37
37
38
if ( schema === undefined ) {
@@ -52,7 +53,7 @@ export async function parse(schema?: string) {
52
53
}
53
54
54
55
try {
55
- return await refParser . dereference ( parsedSchema ) ;
56
+ return await refParser . dereference ( parsedSchema ) as types . OpenRPC ;
56
57
} catch ( e ) {
57
58
throw new Error ( `The json schema provided cannot be dereferenced. Received Error: \n ${ e . message } ` ) ;
58
59
}
You can’t perform that action at this time.
0 commit comments