Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
[typescript-fetch] Fix map API return type
Fix APIs that return a map.
  • Loading branch information
haraldF committed Apr 21, 2020
commit eb50fa417a8adde47efa10ff3f5cbf618bb4eedb
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