forked from loafle/openapi-generator-original
temp fix
This commit is contained in:
@@ -2201,9 +2201,9 @@ public class DefaultCodegen implements CodegenConfig {
|
||||
// get the schema/model name from $ref
|
||||
String schemaName = ModelUtils.getSimpleRef(unaliasSchema.get$ref());
|
||||
if (StringUtils.isNotEmpty(schemaName)) {
|
||||
if (importMapping.containsKey(schemaName)) {
|
||||
/*if (importMapping.containsKey(schemaName)) {
|
||||
return schemaName;
|
||||
}
|
||||
}*/
|
||||
return getAlias(schemaName);
|
||||
} else {
|
||||
LOGGER.warn("Error obtaining the datatype from ref: {}. Default to 'object'", unaliasSchema.get$ref());
|
||||
|
||||
@@ -1206,10 +1206,10 @@ public class ModelUtils {
|
||||
|
||||
if (schema != null && StringUtils.isNotEmpty(schema.get$ref())) {
|
||||
String simpleRef = ModelUtils.getSimpleRef(schema.get$ref());
|
||||
if (importMappings.containsKey(simpleRef)) {
|
||||
LOGGER.debug("Schema unaliasing of {} omitted because aliased class is to be mapped to {}", simpleRef, importMappings.get(simpleRef));
|
||||
/*if (importMappings.containsKey(simpleRef)) {
|
||||
LOGGER.info("Schema unaliasing of {} omitted because aliased class is to be mapped to {}", simpleRef, importMappings.get(simpleRef));
|
||||
return schema;
|
||||
}
|
||||
}*/
|
||||
Schema ref = allSchemas.get(simpleRef);
|
||||
if (ref == null) {
|
||||
once(LOGGER).warn("{} is not defined", schema.get$ref());
|
||||
|
||||
Reference in New Issue
Block a user