Skip to content

[Bug]: Discrepancy in api-version parameter optionality when multi-client #3928

@antkmsft

Description

@antkmsft

Describe the bug

As per Azure/typespec-rust#849, after upgrading to tcgc 0.65.0, for multi-client Spector tests, tcgc now tells us that api-version client parameter is optional. But when it comes to operation, that same parameter is given to us by tcgc as not optional. Parameter is .onClient == true, and there is never a default value.

I think the fact that the api-version parameter is reported as optional on the client is a bug.

Before 0.65.0, api-version always had .optional == false - be it among the client params or the operation params.

Reproduction

Here are the related tsps:

Checklist

  • Follow our Code of Conduct
  • Check that this issue is about the Azure libraries for typespec. For bug in the typespec language or core libraries file it in the TypeSpec repo
  • Check that there isn't already an issue that request the same bug to avoid creating a duplicate.
  • The provided reproduction is a minimal reproducible example of the bug.

Metadata

Metadata

Assignees

Labels

bugSomething isn't workinglib:tcgcIssues for @azure-tools/typespec-client-generator-core library

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions