docs(dotnet): fix APIResponse.headers type (#14518)

This commit is contained in:
Max Schmitt 2022-05-31 17:46:03 +02:00 committed by GitHub
parent 582a18e4dc
commit 88ba9c2ff2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -773,7 +773,7 @@ function translateType(type, parent, generateNameCallback = t => t.name, optiona
// get the inner types of both templates, and if they're strings, it's a keyvaluepair string, string,
const keyType = translateType(type.templates[0], parent, generateNameCallback, false, isReturnType);
const valueType = translateType(type.templates[1], parent, generateNameCallback, false, isReturnType);
if (parent.name === 'Request' || parent.name === 'Response')
if (['Request', 'Response', 'APIResponse'].includes(parent.name))
return `Dictionary<${keyType}, ${valueType}>`;
return `IEnumerable<KeyValuePair<${keyType}, ${valueType}>>`;
}