Skip to content

Commit

Permalink
🐛 fix: making paramaters optional
Browse files Browse the repository at this point in the history
  • Loading branch information
iamrajjoshi committed Nov 9, 2024
1 parent e4a73d6 commit df73a94
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/build/open-api/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export type DeRefedOpenAPI = {
[key: string]: {
[key: string]: {
operationId: string;
parameters: Parameter[];
parameters: Parameter[] | undefined;
requestBody: {
content: {
'application/json': {
Expand Down
4 changes: 2 additions & 2 deletions src/build/resolveOpenAPI.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,10 +128,10 @@ async function apiCategoriesUncached(): Promise<APICategory[]> {
slug: slugify(apiData.operationId),
summary: apiData.summary,
descriptionMarkdown: apiData.description,
pathParameters: apiData.parameters.filter(
pathParameters: (apiData.parameters || []).filter(
p => p.in === 'path'
) as APIParameter[],
queryParameters: apiData.parameters.filter(
queryParameters: (apiData.parameters || []).filter(
p => p.in === 'query'
) as APIParameter[],
requestBodyContent: {
Expand Down

0 comments on commit df73a94

Please sign in to comment.