Skip to content

Commit b250777

Browse files
authored
fix (DefaultGenerator): Handle "$ref" parameter reference to identify parameter ID (#20239) (#20240)
1 parent f406f78 commit b250777

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultGenerator.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1619,7 +1619,7 @@ private void processOperation(String resourcePath, String httpMethod, Operation
16191619
}
16201620

16211621
private static String generateParameterId(Parameter parameter) {
1622-
return parameter.getName() + ":" + parameter.getIn();
1622+
return null == parameter.get$ref() ? parameter.getName() + ":" + parameter.getIn() : parameter.get$ref() ;
16231623
}
16241624

16251625
private OperationsMap processOperations(CodegenConfig config, String tag, List<CodegenOperation> ops, List<ModelMap> allModels) {

0 commit comments

Comments
 (0)