forked from loafle/openapi-generator-original
add defensive null check
This commit is contained in:
parent
0a8fb1e532
commit
ae4b4979a7
@ -423,12 +423,14 @@ public class DefaultGenerator extends AbstractGenerator implements Generator {
|
||||
}
|
||||
|
||||
//need to propagate path level down to the operation
|
||||
if(path.getParameters() != null) {
|
||||
for (Parameter parameter : path.getParameters()) {
|
||||
//skip propagation if a parameter with the same name is already defined at the operation level
|
||||
if (!operationParameters.contains(generateParameterId(parameter))) {
|
||||
operation.addParameter(parameter);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (String tag : tags) {
|
||||
CodegenOperation co = config.fromOperation(resourcePath, httpMethod, operation, swagger.getDefinitions());
|
||||
|
Loading…
x
Reference in New Issue
Block a user