Fixed the issue that required for body is not set (#1301)
This commit is contained in:
Родитель
6a8ef4641b
Коммит
882e8e2a42
|
@ -342,6 +342,7 @@ export /* @internal */ class Inferrer {
|
|||
if (body && body.schema) {
|
||||
op.details.default.hasBody = true;
|
||||
op.parameters.push(new IParameter(bodyParameterName, body.schema, {
|
||||
required: body.required,
|
||||
details: {
|
||||
default: {
|
||||
description: body.schema.language.default.description,
|
||||
|
@ -357,6 +358,7 @@ export /* @internal */ class Inferrer {
|
|||
const opExpanded = await this.addCommandOperation(`${vname}Expanded`, parameters, operation, variant, state, preOperations, commandType);
|
||||
opExpanded.details.default.dropBodyParameter = true;
|
||||
opExpanded.parameters.push(new IParameter(`${bodyParameterName}Body`, body.schema, {
|
||||
required: body.required,
|
||||
details: {
|
||||
default: {
|
||||
description: body.schema.language.default.description,
|
||||
|
|
Загрузка…
Ссылка в новой задаче