how to interpret body in bodyRoot #4815
Labels
compiler:core
Issues for @typespec/compiler
docs
Improvements or additions to documentation
needs-area
triaged:core
Milestone
Playground Link
In this tsp
is the body parameter Test or an anonymous model with a property named body whose type is Test?
the openapi3 emitter result shows the former
but the type graph shows the later?
it's a real case https://github.com/Azure/azure-rest-api-specs/blob/ca4b71ab0e3bb7e4c44b44bf4d84d9c51f7b8264/specification/workloads/Workloads.SAPVirtualInstance.Management/SAPCentralServerInstance.tsp#L61, and seems quite common as azure operation template uses bodyRoot here
https://github.com/Azure/typespec-azure/blob/main/packages/typespec-azure-resource-manager/lib/operations.tsp#L502
According to #2868 (comment) it feels like the former is correct?
The text was updated successfully, but these errors were encountered: