Skip to content

Commit 1e79241

Browse files
committed
fix: adjust parameter sorting to move required parameters to the end for better handling
1 parent 2ac365c commit 1e79241

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

packages/parser/src/parses/method.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,9 @@ export function parseMethodParameters({ method, parameters, path }: PathMethod,
7979
})
8080
}
8181

82+
// fix: for path required parameters, move to the end
83+
config.parameters.sort(a => (a.required ? -1 : 1))
84+
8285
return config
8386
}
8487

0 commit comments

Comments
 (0)