[codegen/dotnet] Don't append Result to mixed output type names (#5321)

This commit is contained in:
Mikhail Shilkov 2020-09-15 09:33:41 +02:00 committed by GitHub
parent bbf403ba85
commit 3a16cf55f0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1473,14 +1473,20 @@ func generateModuleContextMap(tool string, pkg *schema.Package, info CSharpPacka
mod.functions = append(mod.functions, f)
if f.Inputs != nil {
visitObjectTypes(f.Inputs, func(t *schema.ObjectType) {
getModFromToken(t.Token).details(t).inputType = true
getModFromToken(t.Token).details(t).functionType = true
details := getModFromToken(t.Token).details(t)
if !details.inputType {
details.inputType = true
details.functionType = true
}
})
}
if f.Outputs != nil {
visitObjectTypes(f.Outputs, func(t *schema.ObjectType) {
getModFromToken(t.Token).details(t).outputType = true
getModFromToken(t.Token).details(t).functionType = true
details := getModFromToken(t.Token).details(t)
if !details.outputType {
details.outputType = true
details.functionType = true
}
})
}
}