Skip to content

Commit

Permalink
fix: params required by default
Browse files Browse the repository at this point in the history
fixes #281
  • Loading branch information
BelfordZ committed May 19, 2020
1 parent 7b0fc17 commit df2e924
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/typescript.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const getMethodTyping = (method: MethodObject): string => {

const params = (method.params as ContentDescriptorObject[]).map(
(param) => [
`${param.name}${param.required ? "" : "?"}: `,
`${param.name}${param.required || param.required === undefined ? "" : "?"}: `,
`${languageSafeName(ensureSchemaTitles(param.schema).title as string)}`,
].join(""),
).join(", ");
Expand Down

0 comments on commit df2e924

Please sign in to comment.