forked from loafle/openapi-generator-original
[cpp-pistache] removed model namespace when unused for operations (#775)
* Remove using model namespace when model is unused * Add comments to clarify introduction of hasModelImport at API/operations level instead of operation/vendorExtensions level.
This commit is contained in:
parent
010b469914
commit
6a00b2a802
@ -246,11 +246,13 @@ public class CppPistacheServerCodegen extends AbstractCppCodegen {
|
||||
}
|
||||
op.vendorExtensions.put("x-codegen-pistache-consumesJson", consumeJson);
|
||||
op.vendorExtensions.put("x-codegen-pistache-isParsingSupported", isParsingSupported);
|
||||
|
||||
// Check if any one of the operations needs a model, then at API file level, at least one model has to be included.
|
||||
for(String hdr : op.imports) {
|
||||
if(importMapping.containsKey(hdr)) {
|
||||
continue;
|
||||
}
|
||||
additionalProperties.put("hasModelImport", true);
|
||||
operations.put("hasModelImport", true);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user