We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 544dbfd commit 5ffc1f2Copy full SHA for 5ffc1f2
1 file changed
starter/api/rest/src/view/cli/openapi/generate.ts
@@ -34,10 +34,10 @@ export const run = async (argv: any): Promise<void> => {
34
Object.keys(pathSpec).forEach(method => {
35
if (pathSpec[method]?.operationId) {
36
const operationResponses = pathSpec[method].responses ?? {}
37
- const successStatus =
38
- Object.keys(operationResponses).find(status =>
39
- status.startsWith('2')
40
- ) ?? '200'
+ const responseCodes = Object.keys(operationResponses)
+ const successStatus = responseCodes.find(s => s.startsWith('2'))
+ ?? responseCodes.find(s => s.startsWith('3'))
+ ?? '200';
41
42
acc[pathSpec[method].operationId] = {
43
method,
0 commit comments