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]: anonymous model in HttpPart template does not have a generated name #1483

Open
4 tasks done
tadelesh opened this issue Sep 5, 2024 · 0 comments · Fixed by #1491
Open
4 tasks done

[Bug]: anonymous model in HttpPart template does not have a generated name #1483

tadelesh opened this issue Sep 5, 2024 · 0 comments · Fixed by #1491
Assignees
Labels
bug Something isn't working lib:tcgc Issues for @azure-tools/typespec-client-generator-core library

Comments

@tadelesh
Copy link
Member

tadelesh commented Sep 5, 2024

Describe the bug

See test here:


The model in the HttpPart template could not be found when generate naming.

In addition, in order to prevent any models without generated name, we should add a test in afterEach to check all the models in context.models and context.enums have names.

Reproduction

As description.

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.
@tadelesh tadelesh added bug Something isn't working lib:tcgc Issues for @azure-tools/typespec-client-generator-core library labels Sep 5, 2024
msyyc added a commit that referenced this issue Sep 13, 2024
)

fix #1483
The PR contains:
- Bug fix for empty name of anonymous model wrapped by `HttpPart`
- add `afterEach` in test to make sure the `sdkPackage.models/enums`
must have non-empty name.

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Wei Hu <[email protected]>
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
Development

Successfully merging a pull request may close this issue.

2 participants