forked from loafle/openapi-generator-original
Merge branch 'd0x-Ignore_Javatypes_On_ModelPre_and_Suffixes'
This commit is contained in:
commit
c4ccf49064
@ -1193,7 +1193,8 @@ public class DefaultCodegen {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Output the proper model name (capitalized)
|
* Output the proper model name (capitalized).
|
||||||
|
* In case the name belongs to the TypeSystem it won't be renamed.
|
||||||
*
|
*
|
||||||
* @param name the name of the model
|
* @param name the name of the model
|
||||||
* @return capitalized model name
|
* @return capitalized model name
|
||||||
|
@ -619,21 +619,16 @@ public abstract class AbstractJavaCodegen extends DefaultCodegen implements Code
|
|||||||
@Override
|
@Override
|
||||||
public String getSwaggerType(Property p) {
|
public String getSwaggerType(Property p) {
|
||||||
String swaggerType = super.getSwaggerType(p);
|
String swaggerType = super.getSwaggerType(p);
|
||||||
String type;
|
|
||||||
|
// don't apply renaming on types from the typeMapping
|
||||||
if (typeMapping.containsKey(swaggerType)) {
|
if (typeMapping.containsKey(swaggerType)) {
|
||||||
type = typeMapping.get(swaggerType);
|
return typeMapping.get(swaggerType);
|
||||||
if (languageSpecificPrimitives.contains(type) || type.indexOf(".") >= 0 ||
|
|
||||||
type.equals("Map") || type.equals("List") ||
|
|
||||||
type.equals("File") || type.equals("Date")) {
|
|
||||||
return type;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
type = swaggerType;
|
|
||||||
}
|
}
|
||||||
if (null == type) {
|
|
||||||
|
if (null == swaggerType) {
|
||||||
LOGGER.error("No Type defined for Property " + p);
|
LOGGER.error("No Type defined for Property " + p);
|
||||||
}
|
}
|
||||||
return toModelName(type);
|
return toModelName(swaggerType);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -389,7 +389,7 @@ Name | Type | Description | Notes
|
|||||||
------------- | ------------- | ------------- | -------------
|
------------- | ------------- | ------------- | -------------
|
||||||
**pet_id** | **int**| ID of pet to update |
|
**pet_id** | **int**| ID of pet to update |
|
||||||
**additional_metadata** | **string**| Additional data to pass to server | [optional]
|
**additional_metadata** | **string**| Additional data to pass to server | [optional]
|
||||||
**file** | **\SplFileObject**| file to upload | [optional]
|
**file** | **\SplFileObject****\SplFileObject**| file to upload | [optional]
|
||||||
|
|
||||||
### Return type
|
### Return type
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user