Skip to content

Commit aed6a06

Browse files
authored
code clean up for go server, jaxrs generator (#16126)
1 parent 178b8a7 commit aed6a06

File tree

2 files changed

+0
-50
lines changed

2 files changed

+0
-50
lines changed

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

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -457,29 +457,4 @@ public void setOutputAsLibrary(Boolean outputAsLibrary) {
457457
this.outputAsLibrary = outputAsLibrary;
458458
}
459459

460-
@Override
461-
protected void updateModelForObject(CodegenModel m, Schema schema) {
462-
/**
463-
* we have a custom version of this function so we only set isMap to true if
464-
* ModelUtils.isMapSchema
465-
* In other generators, isMap is true for all type object schemas
466-
*/
467-
if (schema.getProperties() != null || schema.getRequired() != null && !(schema instanceof ComposedSchema)) {
468-
// passing null to allProperties and allRequired as there's no parent
469-
addVars(m, unaliasPropertySchema(schema.getProperties()), schema.getRequired(), null, null);
470-
}
471-
if (ModelUtils.isMapSchema(schema)) {
472-
// an object or anyType composed schema that has additionalProperties set
473-
addAdditionPropertiesToCodeGenModel(m, schema);
474-
} else {
475-
m.setIsMap(false);
476-
if (ModelUtils.isFreeFormObject(schema)) {
477-
// non-composed object type with no properties + additionalProperties
478-
// additionalProperties must be null, ObjectSchema, or empty Schema
479-
addAdditionPropertiesToCodeGenModel(m, schema);
480-
}
481-
}
482-
// process 'additionalProperties'
483-
setAddProps(schema, m);
484-
}
485460
}

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

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -353,29 +353,4 @@ public void setUseAbstractionForFiles(boolean useAbstractionForFiles) {
353353
this.useAbstractionForFiles = useAbstractionForFiles;
354354
}
355355

356-
@Override
357-
protected void updateModelForObject(CodegenModel m, Schema schema) {
358-
/**
359-
* we have a custom version of this function so we only set isMap to true if
360-
* ModelUtils.isMapSchema
361-
* In other generators, isMap is true for all type object schemas
362-
*/
363-
if (schema.getProperties() != null || schema.getRequired() != null && !(schema instanceof ComposedSchema)) {
364-
// passing null to allProperties and allRequired as there's no parent
365-
addVars(m, unaliasPropertySchema(schema.getProperties()), schema.getRequired(), null, null);
366-
}
367-
if (ModelUtils.isMapSchema(schema)) {
368-
// an object or anyType composed schema that has additionalProperties set
369-
addAdditionPropertiesToCodeGenModel(m, schema);
370-
} else {
371-
m.setIsMap(false);
372-
if (ModelUtils.isFreeFormObject(schema)) {
373-
// non-composed object type with no properties + additionalProperties
374-
// additionalProperties must be null, ObjectSchema, or empty Schema
375-
addAdditionPropertiesToCodeGenModel(m, schema);
376-
}
377-
}
378-
// process 'additionalProperties'
379-
setAddProps(schema, m);
380-
}
381356
}

0 commit comments

Comments
 (0)