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 55e5879 commit 39a0fa7Copy full SHA for 39a0fa7
src/requestCodegen/getContentType.ts
@@ -2,7 +2,13 @@ import { IRequestMethod } from '../swaggerInterfaces'
2
3
export function getContentType(reqProps: IRequestMethod, isV3: boolean) {
4
if (isV3) {
5
- return reqProps?.requestBody?.content['multipart/form-data'] ? 'multipart/form-data' : 'application/json'
+ if (reqProps?.requestBody?.content['multipart/form-data']) {
6
+ return 'multipart/form-data'
7
+ } else if (reqProps?.requestBody?.content['application/x-www-form-urlencoded']) {
8
+ return 'application/x-www-form-urlencoded'
9
+ } else {
10
+ return 'application/json'
11
+ }
12
}
13
14
return reqProps.consumes && reqProps.consumes.includes('multipart/form-data')
0 commit comments