Skip to content

[Bug]: unexpected versioning behavior in http-client-csharp emitter #8060

Description

Describe the bug

The client emitter respects @added decorators at the property level, but seems to ignore them at the model level.

Reproduction

Given this TypeSpec:

@added(Versions.v2)
model AlsoAddedInV2 {}

model Foo {
  name: string;

  @added(Versions.v2)
  addedInV2: string;
}

running the http-client-csharp emitter with api-version: v1 will output a Foo class without the addedInV2 property, but will also output a AlsoAddedInV2 class.

Checklist

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

bugSomething isn't workingemitter:client:csharpIssue for the C# client emitter: @typespec/http-client-csharp

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions