Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug][TCGC]: empty name when certain models are used as spread body #1150

Closed
4 tasks done
Tracked by #3994
archerzz opened this issue Jul 11, 2024 · 1 comment · Fixed by #1157
Closed
4 tasks done
Tracked by #3994

[Bug][TCGC]: empty name when certain models are used as spread body #1150

archerzz opened this issue Jul 11, 2024 · 1 comment · Fixed by #1157
Assignees
Labels
bug Something isn't working lib:tcgc Issues for @azure-tools/typespec-client-generator-core library

Comments

@archerzz
Copy link
Member

Describe the bug

Some models won't get a name when they are used as spread body.

Here is an example.

TCGC fails to give a name to CreateChatCompletionRequest:
image

Reproduction

Try to parse the definition in the link above.

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.
@archerzz archerzz added bug Something isn't working lib:tcgc Issues for @azure-tools/typespec-client-generator-core library labels Jul 11, 2024
@tadelesh tadelesh self-assigned this Jul 12, 2024
@tadelesh
Copy link
Member

the root cause is from findContextPath does not handle nested operation group:

for (const operationGroup of listOperationGroups(context, client)) {
.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working lib:tcgc Issues for @azure-tools/typespec-client-generator-core library
Projects
None yet
2 participants