Azure / typespec-azure

About TypeSpec Azure Libraries
https://azure.github.io/typespec-azure/
MIT License
11 stars 37 forks source link

[Bug]: Body models for spread scenarios should be marked internal #1414

Open m-nash opened 3 weeks ago

m-nash commented 3 weeks ago

Describe the bug

Right now if you have a model like this

model Foo {
  x: int;
  @header y: string;
}

and you use this in an operation like this

op method(...Foo) : Foo;

We end up with a model FooRequest which only has the body param x which is fine but this type would never be used on the public api surface and therefore should default to access of internal. Today it comes through as public.

Reproduction

See above

Checklist

tadelesh commented 3 weeks ago

it should have internal access, see the test here.