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

The type of properties in SdkModelType should be SdkBodyModelPropertyType[] since we could never get an instance of other types inside the array #796

Open
4 tasks done
Tracked by #835
ArcturusZhang opened this issue May 8, 2024 · 1 comment
Labels
lib:tcgc Issues for @azure-tools/typespec-client-generator-core library needs-area

Comments

@ArcturusZhang
Copy link
Member

Clear and concise description of the problem

SdkModelPropertyType is a union of "model property" and "operation parameter", but because the property in a model type (in SDK's perspective) could never be a parameter, therefore the type of properties in SdkModelType should be narrow down to SdkBodyModelPropertyType only

Checklist

  • Follow our Code of Conduct
  • Check that this issue is about the Azure libraries for typespec. For feature request in the typespec language or core libraries file it in the TypeSpec repo
  • Read the docs.
  • Check that there isn't already an issue that request the same feature to avoid creating a duplicate.
@tadelesh
Copy link
Member

tadelesh commented May 8, 2024

@iscai-msft currently, it seems the only place we could not use SdkBodyModelPropertyType is the response type of service method which will mix http header parameter and model property. imo, for service method, the http parameter should also be a model property. for service operation, it definitely should be http parameter since it has protocol concept. but i'm a little bit confused with current logic.

@markcowl markcowl added the lib:tcgc Issues for @azure-tools/typespec-client-generator-core library label May 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lib:tcgc Issues for @azure-tools/typespec-client-generator-core library needs-area
Projects
None yet
Development

No branches or pull requests

3 participants