Skip to content
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,11 @@ public CodegenProperty fromProperty(String name, Schema p) {

@Override
public Map<String, Object> postProcessModels(Map<String, Object> objs) {
// The superclass determines the list of required golang imports. The actual list of imports
// depends on which types are used, some of which are changed in the code below (but then preserved
// and used through x-basetype in templates). So super.postProcessModels
// must be invoked at the beginning of this method.
objs = super.postProcessModels(objs);

List<Map<String, Object>> models = (List<Map<String, Object>>) objs.get("models");
for (Map<String, Object> m : models) {
Expand All @@ -162,6 +167,7 @@ public Map<String, Object> postProcessModels(Map<String, Object> objs) {
}

for (CodegenProperty param : model.vars) {
param.vendorExtensions.put("x-basetype", param.dataType);
if (!param.isNullable || param.isMapContainer || param.isListContainer) {
continue;
}
Expand All @@ -178,11 +184,6 @@ public Map<String, Object> postProcessModels(Map<String, Object> objs) {
}
}
}

// The superclass determines the list of required golang imports. The actual list of imports
// depends on which types are used, which is done in the code above. So super.postProcessModels
// must be invoked at the end of this method.
objs = super.postProcessModels(objs);
return objs;
}

Expand Down
Loading