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

Add "namespace" flag in Python emitter, and refactor "package-name" #5661

Open
3 tasks done
lmazuel opened this issue Jan 17, 2025 · 0 comments
Open
3 tasks done

Add "namespace" flag in Python emitter, and refactor "package-name" #5661

lmazuel opened this issue Jan 17, 2025 · 0 comments
Labels
emitter:client:python Issue for the Python client emitter: @typespec/http-client-python

Comments

@lmazuel
Copy link
Member

lmazuel commented Jan 17, 2025

Clear and concise description of the problem

Some update about namespaces, after involving Jeffrey in the mix, the current strategy is that:

  • If "clientNamespace" is defined, follow it
  • Else if "namespace" is defined in tspconfig.yaml, follow it
  • Else (no conf), assume the client namespace is the same as TypeSpec namespace

This doesn't require a behavior change between Azure or unbranded, it just happens that in the Azure spec repo, "namespace" or "clientNamespace" is required (at least one).

For Python in practical terms, it means adding "namespace", and update the "package-name" behavior to be infered if "namespace" is provided. For instance, if "namespace" is "azure.foo", we should auto-infer that "package-name" is "azure-foo" unless "package-name" has been specificed explicitly

Checklist

  • Follow our Code of Conduct
  • Read the docs.
  • Check that there isn't already an issue that request the same feature to avoid creating a duplicate.
@lmazuel lmazuel added the emitter:client:python Issue for the Python client emitter: @typespec/http-client-python label Jan 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
emitter:client:python Issue for the Python client emitter: @typespec/http-client-python
Projects
None yet
Development

No branches or pull requests

1 participant