Skip to content

Commit

Permalink
fix: json schema validation
Browse files Browse the repository at this point in the history
  • Loading branch information
shanejonas committed Mar 30, 2020
1 parent a9bf61b commit 4d49cc5
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/helpers/openrpcDocumentToJSONRPCSchema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,11 @@ const openrpcDocumentToJSONRPCSchema = (openrpcDocument: OpenrpcDocument) => {
},
method: {
type: "string",
description: "Method Name",
oneOf: openrpcDocument && openrpcDocument.methods && openrpcDocument.methods.map((method) => {
return {
const: method.name,
description: method.description || method.summary,
markdownDescription: method.description || method.summary,
description: method.summary,
};
}),
},
Expand Down Expand Up @@ -71,7 +70,7 @@ const openrpcDocumentToJSONRPCSchema = (openrpcDocument: OpenrpcDocument) => {
body: example.params && example.params.map((ex: ExampleObject) => ex.value),
};
}) : [],
items: method.params.map((param: any) => {
items: method.params && method.params.map((param: any) => {
return {
...param.schema,
markdownDescription: param.description || param.summary,
Expand Down

0 comments on commit 4d49cc5

Please sign in to comment.