mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2026-03-22 22:59:05 +00:00
fix casting issue with ModelImpl in Haskell
This commit is contained in:
@@ -471,6 +471,11 @@ public class HaskellServantCodegen extends DefaultCodegen implements CodegenConf
|
||||
|
||||
// Create newtypes for things with non-object types
|
||||
String dataOrNewtype = "data";
|
||||
// check if it's a ModelImpl before casting
|
||||
if (!(mod instanceof ModelImpl)) {
|
||||
return model;
|
||||
}
|
||||
|
||||
String modelType = ((ModelImpl) mod).getType();
|
||||
if(modelType != "object" && typeMapping.containsKey(modelType)) {
|
||||
String newtype = typeMapping.get(modelType);
|
||||
|
||||
Reference in New Issue
Block a user