Closed weidongxu-microsoft closed 1 day ago
First, we may act upon 3 major items:
Consider putting all package/class name of generic core / azure core to a central place. Maybe ClassType
if possible, or somewhere deeper that ClassType
can refer.
Avoid having it in the wild like in current ProxyMethod
https://github.com/Azure/autorest.java/blob/8be668f79a7a6af1b05e6781dfab9acf77191182/javagen/src/main/java/com/azure/autorest/model/clientmodel/ProxyMethod.java#L392-L414
An alternative solution may via a post-process, which may include
com.azure.core
to generic coresend(HttpRequest) vs sendAsync(HttpRequest)
This would be a bit like the discarded OpenRewrite
solution. <-- since in long term, we targets generic core, post-process may not be very attractive and can be costly to maintain
And eventually, we may have a new meta-option as --generic
.
We may augment the --sync-methods
option to have the behavior of only generate sync method
We should have stream-style-serialization
as default.
We also may want to avoid ref to Jackson in generated code (azure-json may still use it, but we may want our code not using it explicitly).
@client
in client.tsp), instead of having a single client grouping everythingrelated issues and PRs
RequestOptions
get moved to impl package. There is nothing codegen can do without it.
KeyCredentialTrait
also removedHttpPipelineBuilder.build()
instead of HttpPipelineBuilder.createDefaultPipeline()
remain BinaryData.toObject(Class)
HttpTrait
, ConfigurationTrait
<-- remove for nowJsonSerializer
<-- design to be as default, so codegen do not need to initialize it?HttpPipelineBuilder.createDefaultPipeline()
<-- should be static?Current gap on generic-core
RestProxy.create
(also no SerializerAdapter
, but that only used for RestProxy
)BinaryData.fromObject
and BinaryData.toObject
-- convenience API need it to convert between model in Class and BinaryDataExpectedResponses
(I assume we need it? generic-core has UnexpectedResponseExceptionType
)ServiceVersion
PagedIterable
related classes (do we plan to support pageable in generic-core?)ReturnType
etc.RetryPolicy
seems now in com.generic.core.implementation.http.policy
ExpandableStringEnum
BinaryData
Context
Header
and Headers
$ mvn dependency:list
[INFO] Scanning for projects...
[INFO]
[INFO] -------------------------< com.generic:openai >-------------------------
[INFO] Building SDK for OpenAi 1.0.0-beta.1
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- maven-dependency-plugin:2.8:list (default-cli) @ openai ---
[INFO]
[INFO] The following files have been resolved:
[INFO] org.slf4j:slf4j-api:jar:1.7.36:compile
[INFO] com.generic:generic-core:jar:1.0.0-beta.1:compile
[INFO] com.generic:generic-json:jar:1.0.0-beta.1:compile
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.008 s
[INFO] Finished at: 2023-11-02T16:22:51+08:00
[INFO] ------------------------------------------------------------------------
$ find . -type f | xargs grep -iF azure
11/14
0.11.1 released for a bug fix.
OpenAI demo completed.
11/13
0.11.0 released. We should have OpenAI demo covered.
10/31
Sample SDK https://github.com/Azure/autorest.java/tree/openai/openai-in-typespec/openai-sdk
samvaity generic core https://github.com/samvaity/azure-sdk-for-java/tree/add-huc-client/sdk/generic-sdk-core
10/18
generic core feature branch https://github.com/Azure/azure-sdk-for-java/tree/feature/generic-sdk-core-2/sdk/generic-sdk-core
apiview https://apiview.dev/Assemblies/Review/ad330c0d401e45adb0fde58ac674c3cb#com.generic.core.util.serializer.JsonSerializer
local install
10/12, from Word file
9/xx (outdated)
Current information on core
So far this is a more "rename" solution.
On codegen