Skip to content

Commit

Permalink
Merge branch 'main' into python-oauth-sdk-generator
Browse files Browse the repository at this point in the history
  • Loading branch information
manisha1997 authored Jul 9, 2024
2 parents 3be30f4 + 81057f9 commit 76858c1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,9 @@ public ApiResourceBuilder updateResponseModel(Resolver<CodegenProperty> 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<CodegenModel> responseModel = Utility.getModel(allModels, modelName, recordKey, codegenOperation);
if (responseModel.isEmpty()) {
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 76858c1

Please sign in to comment.