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 640b941 commit caf66c2Copy full SHA for caf66c2
packages/openapi-v3/src/decorators/request-body.decorator.ts
@@ -90,9 +90,11 @@ export function requestBody(requestBodySpec?: Partial<RequestBodyObject>) {
90
const paramTypes = (methodSig && methodSig.parameterTypes) || [];
91
92
let paramType = paramTypes[index];
93
- let schema = getSchemaForRequestBody(paramType);
+ let schema: SchemaObject;
94
requestBodySpec.content = _.mapValues(requestBodySpec.content, c => {
95
- c.schema = c.schema || schema;
+ if (!c.schema) {
96
+ c.schema = schema = schema || getSchemaForRequestBody(paramType);
97
+ }
98
return c;
99
});
100
0 commit comments