-
Notifications
You must be signed in to change notification settings - Fork 51
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
[tcgc] namespaces in TCGC #1604
Comments
Another option is making |
How about the namespace defined in
|
For 3 & 4, what's the user scenario? There are basically 2 ways to provide the relationship between the namespaces and their belonging entities (clients, models, etc):
|
link original customer ask: #1226 |
We had previously decided to move away from this because we didn't find it intuitive with how namespaces are set up. We believe we should continue with namespace solely as a |
3 is aimed to provide the hierarchy. |
the name should be the client name directly. tcgc will not do any magic to it. |
So, I assume when namespace refactor done, service would need to write @client(
{
name: "SecondClient",
service: FirstTest.Service,
}
)
@clientNamespace("<base_namespace>.SubNamespace")
namespace SecondClient {
} |
If possible, Java would like |
i talked with haoling last week, since it is a special logic for some languages to treat optional constant as enum, it's better to opt in a conversion directly in tcgc, then it will have generated name, usage, access, namespace accordingly. |
correct. but the problem here is all models' namespace (used by operation) will not be changed. |
Clear and concise description of the problem
As we start implementing "namespace is namespace" in our language emitters, TCGC plays an important role in helping emitters get the information they need to generate. At the same time, it is important that we are not breaking, both for ease of migration, and also because some languages (like javascript) don't really have a concept of "namespace" and won't be adopting this behavior the same way the other language emitters are.
As such, I propose a multi-part approach in getting TCGC to help with the "namespace is namespace" push.
.namespace
string onSdkClientType
s returns the correct namespace.namespace
string ontoSdkModelType
andSdkEnumType
, so we can generate these models in the correct space.getNamespaceToClients(sdkContext)
that returns a mapping of namespaces to clients in those namespaces.getNamespaceToModels(sdkContext)
that will return a mapping of namespaces to models in those namespacesChecklist
The text was updated successfully, but these errors were encountered: