mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-07-06 15:40:54 +00:00
add defensive null check
This commit is contained in:
parent
0a8fb1e532
commit
ae4b4979a7
@ -423,10 +423,12 @@ public class DefaultGenerator extends AbstractGenerator implements Generator {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//need to propagate path level down to the operation
|
//need to propagate path level down to the operation
|
||||||
for (Parameter parameter : path.getParameters()) {
|
if(path.getParameters() != null) {
|
||||||
//skip propagation if a parameter with the same name is already defined at the operation level
|
for (Parameter parameter : path.getParameters()) {
|
||||||
if (!operationParameters.contains(generateParameterId(parameter))) {
|
//skip propagation if a parameter with the same name is already defined at the operation level
|
||||||
operation.addParameter(parameter);
|
if (!operationParameters.contains(generateParameterId(parameter))) {
|
||||||
|
operation.addParameter(parameter);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user