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

http-client-java, namespace from client.tsp #5051

Conversation

weidongxu-microsoft
Copy link
Contributor

@weidongxu-microsoft weidongxu-microsoft commented Nov 11, 2024

link Azure/autorest.java#2968

current limitation:

  • operation group be in same package of client
  • subclient be in same package of client

mostly this due to the fact that ctor of the client is package private, so it won't work if client and its builder or client of accessor method are in different packages


At this PR, unbranded would still have .models in package for models. We can tweak this later (by setting modelsSubPackage in JavaSetting to empty, when unbranded).


tested and it be backward compatible, if namespace is provided in emitter option
https://github.com/Azure/azure-sdk-for-java/pull/43055/files

@microsoft-github-policy-service microsoft-github-policy-service bot added the emitter:client:java Issue for the Java client emitter: @typespec/http-client-java label Nov 11, 2024
@weidongxu-microsoft weidongxu-microsoft changed the title http-client-java, namespace http-client-java, namespace from client.tsp Nov 11, 2024
@azure-sdk
Copy link
Collaborator

No changes needing a change description found.

@azure-sdk
Copy link
Collaborator

You can try these changes here

🛝 Playground 🌐 Website 📚 Next docs

@weidongxu-microsoft weidongxu-microsoft force-pushed the http-client-java_namespace branch 3 times, most recently from e2b6d23 to 7fe1493 Compare November 11, 2024 10:26
Copy link
Member

@haolingdong-msft haolingdong-msft left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall looks good to me.

@weidongxu-microsoft
Copy link
Contributor Author

Locally tested the migration for openai to @clientNamespace. No diff.
Azure/azure-rest-api-specs#31643 (specs PR would fail before we released new typespec-java)

@weidongxu-microsoft weidongxu-microsoft added this pull request to the merge queue Nov 22, 2024
Merged via the queue into microsoft:main with commit 2e1c857 Nov 22, 2024
25 checks passed
@weidongxu-microsoft weidongxu-microsoft deleted the http-client-java_namespace branch November 22, 2024 05:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
emitter:client:java Issue for the Java client emitter: @typespec/http-client-java
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants