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

ClientInitialization/ParamAlias Implementation #2972

Closed
Tracked by #1768
lmazuel opened this issue Oct 30, 2024 · 3 comments
Closed
Tracked by #1768

ClientInitialization/ParamAlias Implementation #2972

lmazuel opened this issue Oct 30, 2024 · 3 comments
Assignees
Labels

Comments

@lmazuel
Copy link
Member

lmazuel commented Oct 30, 2024

No description provided.

@weidongxu-microsoft
Copy link
Member

weidongxu-microsoft commented Nov 4, 2024

design

pending design in TCGC about access (we may ignore them for now, as basic cases won't need such complexity -- we can use an emitter option, till TCGC is fully ready)

github-merge-queue bot pushed a commit to microsoft/typespec that referenced this issue Nov 20, 2024
Link Azure/autorest.java#2972

Current limitation
- sub client need to be in same namespace of its parent.

Feature behind `enable-subclient` option (`false` means
client/operationGroup; `true` means all client, with client having
accessor to get subclient)

unbranded openai https://github.com/joseharriaga/openai-in-typespec

## Bug to be fixed in other PRs (relate to unbranded openai, but
unrelated to this feature -- moved to
#5047)
- #5026
- #5030
- #5028
- #5031

## Test

1. cadl-ranch PR Azure/cadl-ranch#727 (also
tried on test with more than 2 level subclient -- nested namespaces)
2. openai unbranded
https://github.com/joseharriaga/openai-in-typespec/compare/main...weidongxu-microsoft:java-sub-client?expand=1
([apiview](https://apiview.dev/Assemblies/Review/b974bacf316c495aa5c30ce0b7e07b1c/d1d7278c251d4805b189fd238714897d#com.openai.OpenAIClient))
3. Face API Azure/azure-sdk-for-java#42875
@weidongxu-microsoft
Copy link
Member

Impl completed. We don't have lot of test yet in cadl-ranch, and TCGC may refactor this feature too.

emitter option enable-subclient is usually required when service need to use @clientInitialization for subclient.

@weidongxu-microsoft
Copy link
Member

typespec-java 0.26.0
http-client-java 0.1.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants