We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ad86915 commit d28d9bdCopy full SHA for d28d9bd
config/test.json
@@ -3,6 +3,11 @@
3
"logging": {
4
"level": "warn"
5
},
6
+ "routing": {
7
+ "openapi": {
8
+ "validateResponses": true
9
+ }
10
+ },
11
"server": {
12
"port": 0
13
}
src/openapi.ts
@@ -114,5 +114,10 @@ export async function openApi<
114
115
};
116
117
- return OpenApiValidator.middleware(_.defaultsDeep(defaultOptions, openApiOptions || {}));
+ const { routing } = app.locals.config;
118
+ const combinedOptions = {
119
+ ...(typeof routing.openapi === 'object' ? routing.openapi : {}),
120
+ ...openApiOptions,
121
+ };
122
+ return OpenApiValidator.middleware(_.defaultsDeep(defaultOptions, combinedOptions));
123
0 commit comments