Skip to content

Commit 71f8078

Browse files
committed
renamed operation parameters class
1 parent a2859a3 commit 71f8078

File tree

3 files changed

+18
-18
lines changed

3 files changed

+18
-18
lines changed

src/main/java/io/swagger/codegen/v3/generators/DefaultCodegenConfig.java

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2117,7 +2117,7 @@ public CodegenOperation fromOperation(String path, String httpMethod, Operation
21172117
}
21182118

21192119
List<Parameter> parameters = operation.getParameters();
2120-
final OpenAPIParameters openAPIParameters = new OpenAPIParameters();
2120+
final OperationParameters operationParameters = new OperationParameters();
21212121

21222122
RequestBody body = operation.getRequestBody();
21232123
if (body != null) {
@@ -2178,20 +2178,20 @@ public CodegenOperation fromOperation(String path, String httpMethod, Operation
21782178
}
21792179
// todo: this segment is only to support the "older" template design. it should be removed once all templates are updated with the new {{#contents}} tag.
21802180
formParameter.getVendorExtensions().put(CodegenConstants.IS_FORM_PARAM_EXT_NAME, Boolean.TRUE);
2181-
openAPIParameters.addFormParam(formParameter.copy());
2181+
operationParameters.addFormParam(formParameter.copy());
21822182
if (body.getRequired() != null && body.getRequired()) {
2183-
openAPIParameters.addRequiredParam(formParameter.copy());
2183+
operationParameters.addRequiredParam(formParameter.copy());
21842184
}
2185-
openAPIParameters.addAllParams(formParameter);
2185+
operationParameters.addAllParams(formParameter);
21862186
}
2187-
openAPIParameters.addCodegenContents(codegenContent);
2187+
operationParameters.addCodegenContents(codegenContent);
21882188
}
21892189
} else {
21902190
CodegenParameter bodyParam = fromRequestBody(body, schemaName, schema, schemas, imports);
2191-
openAPIParameters.setBodyParam(bodyParam);
2191+
operationParameters.setBodyParam(bodyParam);
21922192
if (foundSchemas.isEmpty()) {
2193-
openAPIParameters.addBodyParams(bodyParam.copy());
2194-
openAPIParameters.addAllParams(bodyParam);
2193+
operationParameters.addBodyParams(bodyParam.copy());
2194+
operationParameters.addAllParams(bodyParam);
21952195
} else {
21962196
boolean alreadyAdded = false;
21972197
for (Schema usedSchema : foundSchemas) {
@@ -2204,7 +2204,7 @@ public CodegenOperation fromOperation(String path, String httpMethod, Operation
22042204
}
22052205
}
22062206
foundSchemas.add(schema);
2207-
openAPIParameters.addCodegenContents(codegenContent);
2207+
operationParameters.addCodegenContents(codegenContent);
22082208
}
22092209
}
22102210
}
@@ -2215,24 +2215,24 @@ public CodegenOperation fromOperation(String path, String httpMethod, Operation
22152215
param = getParameterFromRef(param.get$ref(), openAPI);
22162216
}
22172217
CodegenParameter codegenParameter = fromParameter(param, imports);
2218-
openAPIParameters.addParameters(param, codegenParameter);
2218+
operationParameters.addParameters(param, codegenParameter);
22192219
}
22202220
}
22212221

22222222
addOperationImports(codegenOperation, imports);
22232223

2224-
codegenOperation.bodyParam = openAPIParameters.getBodyParam();
2224+
codegenOperation.bodyParam = operationParameters.getBodyParam();
22252225
codegenOperation.httpMethod = httpMethod.toUpperCase();
22262226

22272227
// move "required" parameters in front of "optional" parameters
22282228
if (sortParamsByRequiredFlag) {
2229-
openAPIParameters.sortRequiredAllParams();
2229+
operationParameters.sortRequiredAllParams();
22302230
}
22312231

2232-
openAPIParameters.addHasMore(codegenOperation);
2232+
operationParameters.addHasMore(codegenOperation);
22332233
codegenOperation.externalDocs = operation.getExternalDocs();
22342234

2235-
configuresParameterForMediaType(codegenOperation, openAPIParameters.getCodegenContents());
2235+
configuresParameterForMediaType(codegenOperation, operationParameters.getCodegenContents());
22362236
// legacy support
22372237
codegenOperation.nickname = codegenOperation.operationId;
22382238

@@ -4331,7 +4331,7 @@ protected void configuresParameterForMediaType(CodegenOperation codegenOperation
43314331
}
43324332
}
43334333
);
4334-
OpenAPIParameters.addHasMore(content.getParameters());
4334+
OperationParameters.addHasMore(content.getParameters());
43354335
}
43364336
codegenOperation.getContents().addAll(codegenContents);
43374337
}

src/main/java/io/swagger/codegen/v3/generators/OpenAPIParameters.java renamed to src/main/java/io/swagger/codegen/v3/generators/OperationParameters.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
import java.util.Collections;
1515
import java.util.List;
1616

17-
public class OpenAPIParameters {
17+
public class OperationParameters {
1818

1919
private CodegenParameter bodyParam = null;
2020
private List<CodegenParameter> allParams = new ArrayList<>();

src/main/java/io/swagger/codegen/v3/generators/nodejs/NodeJSServerCodegen.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
import com.google.common.collect.ArrayListMultimap;
1111
import com.google.common.collect.Lists;
1212
import com.google.common.collect.Multimap;
13-
import io.swagger.codegen.v3.generators.OpenAPIParameters;
13+
import io.swagger.codegen.v3.generators.OperationParameters;
1414
import io.swagger.codegen.v3.utils.URLPathUtil;
1515
import io.swagger.v3.oas.models.OpenAPI;
1616
import io.swagger.v3.oas.models.Operation;
@@ -453,7 +453,7 @@ protected void configuresParameterForMediaType(CodegenOperation codegenOperation
453453
addParameters(content, codegenOperation.cookieParams);
454454
}
455455
for (CodegenContent content : codegenContents) {
456-
OpenAPIParameters.addHasMore(content.getParameters());
456+
OperationParameters.addHasMore(content.getParameters());
457457
}
458458
codegenOperation.getContents().addAll(codegenContents);
459459
}

0 commit comments

Comments
 (0)