diff --git a/src/main/java/com/twilio/oai/api/CsharpApiResourceBuilder.java b/src/main/java/com/twilio/oai/api/CsharpApiResourceBuilder.java index aef54ceba..5163292bd 100644 --- a/src/main/java/com/twilio/oai/api/CsharpApiResourceBuilder.java +++ b/src/main/java/com/twilio/oai/api/CsharpApiResourceBuilder.java @@ -171,6 +171,9 @@ public ApiResourceBuilder updateResponseModel(Resolver codegenP codegenOperationList.forEach(codegenOperation -> { codegenOperation.responses.forEach(response -> { String modelName = response.dataType; + if (response.dataType != null && response.dataType.startsWith(EnumConstants.CsharpDataTypes.LIST.getValue())){ + modelName = response.baseType; + } Optional responseModel = Utility.getModel(allModels, modelName, recordKey, codegenOperation); if (responseModel.isEmpty()) { return; diff --git a/src/main/java/com/twilio/oai/resolver/LanguagePropertyResolver.java b/src/main/java/com/twilio/oai/resolver/LanguagePropertyResolver.java index 2ddea50dd..28020f6b9 100644 --- a/src/main/java/com/twilio/oai/resolver/LanguagePropertyResolver.java +++ b/src/main/java/com/twilio/oai/resolver/LanguagePropertyResolver.java @@ -35,9 +35,10 @@ public CodegenProperty resolve(CodegenProperty codegenProperty, ApiResourceBuild protected void resolveProperties(CodegenProperty codegenProperty, ApiResourceBuilder apiResourceBuilder) { mapper - .properties() - .getString(codegenProperty.dataFormat) - .ifPresent(dataType -> codegenProperty.dataType = dataType); + .properties() + .getString(codegenProperty.dataFormat) + .or(() -> mapper.properties().getString(codegenProperty.dataType)) + .ifPresent(dataType -> codegenProperty.dataType = dataType); } protected void resolveSerialize(CodegenProperty codegenProperty) {