Skip to content

Commit

Permalink
[typescript-fetch] Fix map API return type (#5995)
Browse files Browse the repository at this point in the history
Fix APIs that return a map.
  • Loading branch information
haraldF authored Apr 22, 2020
1 parent b431d65 commit 00ffcea
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,12 @@ export class {{classname}} extends runtime.BaseAPI {
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map({{returnBaseType}}FromJSON));
{{/isListContainer}}
{{^isListContainer}}
{{#isMapContainer}}
return new runtime.JSONApiResponse(response, (jsonValue) => runtime.mapValues(jsonValue, {{returnBaseType}}FromJSON));
{{/isMapContainer}}
{{^isMapContainer}}
return new runtime.JSONApiResponse(response, (jsonValue) => {{returnBaseType}}FromJSON(jsonValue));
{{/isMapContainer}}
{{/isListContainer}}
{{/returnTypeIsPrimitive}}
{{/isResponseFile}}
Expand Down

0 comments on commit 00ffcea

Please sign in to comment.