Skip to content

Commit 04a4527

Browse files
committed
preferredRequestBodyType option- Set default to 'first-listed"
1 parent fa60724 commit 04a4527

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

OPTIONS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,4 @@ enableOptionalParameters|boolean|-|true|Optional parameters aren't selected in t
2222
keepImplicitHeaders|boolean|-|false|Whether to keep implicit headers from the OpenAPI specification, which are removed by default.|CONVERSION|v2, v1
2323
includeDeprecated|boolean|-|true|Select whether to include deprecated operations, parameters, and properties in generated collection or not|CONVERSION, VALIDATION|v2, v1
2424
alwaysInheritAuthentication|boolean|-|false|Whether authentication details should be included on every request, or always inherited from the collection.|CONVERSION|v2, v1
25-
preferredRequestBodyType|enum|x-www-form-urlencoded, form-data, raw, first-listed|x-www-form-urlencoded|When there are multiple content-types defined in the request body of OpenAPI, the conversion selects the preferred option content-type as request body.If "first-listed" is set, the first content-type defined in the OpenAPI spec will be selected.|CONVERSION|v2, v1
25+
preferredRequestBodyType|enum|x-www-form-urlencoded, form-data, raw, first-listed|first-listed|When there are multiple content-types defined in the request body of OpenAPI, the conversion selects the preferred option content-type as request body.If "first-listed" is set, the first content-type defined in the OpenAPI spec will be selected.|CONVERSION|v2

lib/options.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -391,15 +391,15 @@ module.exports = {
391391
name: 'Select request body type',
392392
id: 'preferredRequestBodyType',
393393
type: 'enum',
394-
default: 'x-www-form-urlencoded',
394+
default: 'first-listed',
395395
availableOptions: ['x-www-form-urlencoded', 'form-data', 'raw', 'first-listed'],
396396
description: 'When there are multiple content-types defined in the request body of OpenAPI, the conversion ' +
397397
'selects the preferred option content-type as request body.If "first-listed" is set, the first ' +
398398
'content-type defined in the OpenAPI spec will be selected.',
399399
external: true,
400400
usage: ['CONVERSION'],
401401
supportedIn: [VERSION20, VERSION30, VERSION31],
402-
supportedModuleVersion: [MODULE_VERSION.V2, MODULE_VERSION.V1]
402+
supportedModuleVersion: [MODULE_VERSION.V2]
403403
}
404404
];
405405

test/system/structure.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ const optionIds = [
236236
}, preferredRequestBodyType: {
237237
name: 'Select request body type',
238238
type: 'enum',
239-
default: 'x-www-form-urlencoded',
239+
default: 'first-listed',
240240
availableOptions: ['x-www-form-urlencoded', 'form-data', 'raw', 'first-listed'],
241241
description: 'When there are multiple content-types defined in the request body of OpenAPI, the conversion ' +
242242
'selects the preferred option content-type as request body.If "first-listed" is set, the first ' +

0 commit comments

Comments
 (0)