mirror of
https://github.com/valitydev/openapi-generator.git
synced 2024-11-07 19:08:52 +00:00
do not map UUID as model in java (#5026)
This commit is contained in:
parent
2b9b0f31dc
commit
0ce6c7e3a8
@ -811,6 +811,7 @@ public class DefaultCodegen {
|
||||
typeMapping.put("ByteArray", "byte[]");
|
||||
typeMapping.put("binary", "byte[]");
|
||||
typeMapping.put("file", "File");
|
||||
typeMapping.put("UUID", "UUID");
|
||||
|
||||
|
||||
instantiationTypes = new HashMap<String, String>();
|
||||
|
@ -317,6 +317,7 @@ public abstract class AbstractJavaCodegen extends DefaultCodegen implements Code
|
||||
typeMapping.put("array", "java.util.List");
|
||||
typeMapping.put("map", "java.util.Map");
|
||||
typeMapping.put("DateTime", "java.util.Date");
|
||||
typeMapping.put("UUID", "java.util.UUID");
|
||||
typeMapping.remove("List");
|
||||
importMapping.remove("Date");
|
||||
importMapping.remove("Map");
|
||||
@ -326,6 +327,7 @@ public abstract class AbstractJavaCodegen extends DefaultCodegen implements Code
|
||||
importMapping.remove("List");
|
||||
importMapping.remove("Set");
|
||||
importMapping.remove("DateTime");
|
||||
importMapping.remove("UUID");
|
||||
instantiationTypes.put("array", "java.util.ArrayList");
|
||||
instantiationTypes.put("map", "java.util.HashMap");
|
||||
}
|
||||
|
@ -19,7 +19,7 @@ public class JavaClientCodegen extends AbstractJavaCodegen
|
||||
{
|
||||
static final String MEDIA_TYPE = "mediaType";
|
||||
|
||||
@SuppressWarnings("hiding")
|
||||
@SuppressWarnings("hiding")
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(JavaClientCodegen.class);
|
||||
|
||||
public static final String USE_RX_JAVA = "useRxJava";
|
||||
@ -102,9 +102,9 @@ public class JavaClientCodegen extends AbstractJavaCodegen
|
||||
if (additionalProperties.containsKey(USE_RX_JAVA2)) {
|
||||
this.setUseRxJava2(Boolean.valueOf(additionalProperties.get(USE_RX_JAVA2).toString()));
|
||||
}
|
||||
if (!useRxJava && !useRxJava2) {
|
||||
additionalProperties.put(DO_NOT_USE_RX, true);
|
||||
}
|
||||
if (!useRxJava && !useRxJava2) {
|
||||
additionalProperties.put(DO_NOT_USE_RX, true);
|
||||
}
|
||||
if (additionalProperties.containsKey(USE_PLAY24_WS)) {
|
||||
this.setUsePlay24WS(Boolean.valueOf(additionalProperties.get(USE_PLAY24_WS).toString()));
|
||||
}
|
||||
@ -250,7 +250,7 @@ public class JavaClientCodegen extends AbstractJavaCodegen
|
||||
|
||||
if ( isMultipartType(operation.consumes) ) {
|
||||
operation.isMultipart = Boolean.TRUE;
|
||||
}
|
||||
}
|
||||
else {
|
||||
operation.prioritizedContentTypes = prioritizeContentTypes(operation.consumes);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user