TypeSpec C#: @@include can't override inherited @@internal #3519
Labels
customer-reported
Issues that are reported by GitHub users external to the Azure organization.
DPG/RLC v2.0 GA
DPG
needs-team-attention
Workflow: This issue needs attention from Azure service team or SDK team
Not-GA-Required
v3
Version 3 of AutoRest C# generator.
We're using the
@internal
decorator (applied in aclient.tsp
file via@@
) to hide a long-running operation route from the public surface of our client libraries, as we'd like to wrap the presentation of it with custom code.This works well and produces the desired effect of directing the emission of the C# method and its response model hierarchy to be
internal
instead ofpublic
. It also applies to the options model used for the operation -- and that's the one thing we'd still like to retain in the public surface for reuse.We tried to use the
@include
decorator for the options model in conjunction with the@internal
used on the route that consumes that options model, but it unfortunately doesn't appear that@include
can override the serialization change effected by@internal
.Issue/request: conditionalize model emission visibility to retain
public
if@include
is used, even if the parsing hierarchy has been made@internal
.Example client.tsp body (where
@internal
works, but@include
doesn't take effect in .NET):Edit: adding link for our original impacted .tsp:
This is intended to make the long-running operations internal while still preserving the public visibility of the options and response payload models involved (as those are then wrapped in a custom implementation).
The text was updated successfully, but these errors were encountered: