Skip to content

Commit

Permalink
fix(transformer): prefer explicit config over auto-detected schema
Browse files Browse the repository at this point in the history
for example, prefer responses confgured in @ApiOperation instead of
what's detected from return type of the controller function

fixes: #1420
  • Loading branch information
tiholic committed Jul 15, 2021
1 parent 4740848 commit fcae735
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/swagger-transformer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ export class SwaggerTransformer {
);
return mapValues(keyByMethod, (route: any) => {
return {
...omit(route.root, ['method', 'path']),
...omit(route, 'root')
...omit(route.root, ['method', 'path']),
};
});
});
Expand Down

0 comments on commit fcae735

Please sign in to comment.