-
Notifications
You must be signed in to change notification settings - Fork 284
Refactor ClientMethod to Support Immutable Builders and Enhance Polling & Paging Metadata #7015
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
Conversation
No changes needing a change description found. |
You can try these changes here
|
8ad1ea7
to
79c3e7f
Compare
c33c769
to
8019291
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This pull request may need to wait for @srnagar pull request if it is expected to be ready soon. Alternatively, the new structure of ClientMethodMapper
could be beneficial in terms of simplfying the ClientCoreClientMethodMapper
in his pr (if it is in initial scope). I'll let Srikanta decide which option works best based on his plan for that PR.
...c/main/java/com/microsoft/typespec/http/client/generator/core/mapper/ClientMethodMapper.java
Show resolved
Hide resolved
...c/main/java/com/microsoft/typespec/http/client/generator/core/mapper/ClientMethodMapper.java
Outdated
Show resolved
Hide resolved
...c/main/java/com/microsoft/typespec/http/client/generator/core/mapper/ClientMethodMapper.java
Show resolved
Hide resolved
...c/main/java/com/microsoft/typespec/http/client/generator/core/mapper/ClientMethodMapper.java
Show resolved
Hide resolved
...c/main/java/com/microsoft/typespec/http/client/generator/core/mapper/ClientMethodMapper.java
Show resolved
Hide resolved
...c/main/java/com/microsoft/typespec/http/client/generator/core/mapper/ClientMethodMapper.java
Show resolved
Hide resolved
...e/src/main/java/com/microsoft/typespec/http/client/generator/core/mapper/PagingMetadata.java
Show resolved
Hide resolved
...a/com/microsoft/typespec/http/client/generator/core/model/clientmodel/MethodPageDetails.java
Show resolved
Hide resolved
...a/com/microsoft/typespec/http/client/generator/core/model/clientmodel/MethodPageDetails.java
Show resolved
Hide resolved
.../java/com/microsoft/typespec/http/client/generator/mgmt/mapper/FluentClientMethodMapper.java
Show resolved
Hide resolved
...java/com/microsoft/typespec/http/client/generator/core/extension/plugin/PollingSettings.java
Show resolved
Hide resolved
...in/java/com/microsoft/typespec/http/client/generator/core/extension/plugin/JavaSettings.java
Outdated
Show resolved
Hide resolved
...c/main/java/com/microsoft/typespec/http/client/generator/core/mapper/ClientMethodMapper.java
Outdated
Show resolved
Hide resolved
…tadata for pagable oepration
…thod creator functions
…ds(..) and use it
…o a seperate function
…ther similar methods)
…work to extract fluent out of common client-method-mapper
…g pattern as ClientMethodMapper, naming consistency for all create-client-methods functions
…-client-method functions
…ncClientMethods, JavaDoc, var-names)
fd97b9c
to
afc912c
Compare
…g parameter should-hide-check (#7337) This PR has the following changes - 1. Taking advantages of refactoring done in [#7015](#7015) for `ClientMethodMapper` there by deleting the additional code we no longer needed. 2. Centralizing the derivation and lookup of paging parameters to `PagingMetadata` and `MethodPageDetails `. 3. Removing relaxed paging parameter lookup instead using common strict lookup in all places (azure, client-core etc..). The AutoRest CI run is [green](https://dev.azure.com/azure-sdk/internal/_build/results?buildId=4878954&view=results) with this PR's last commit [80bf3a9].
…g parameter should-hide-check (microsoft#7337) This PR has the following changes - 1. Taking advantages of refactoring done in [microsoft#7015](microsoft#7015) for `ClientMethodMapper` there by deleting the additional code we no longer needed. 2. Centralizing the derivation and lookup of paging parameters to `PagingMetadata` and `MethodPageDetails `. 3. Removing relaxed paging parameter lookup instead using common strict lookup in all places (azure, client-core etc..). The AutoRest CI run is [green](https://dev.azure.com/azure-sdk/internal/_build/results?buildId=4878954&view=results) with this PR's last commit [80bf3a9].
The PR introduces structural changes to the
ClientMethodMapper
- focusing on immutability, separation of concerns and consistency.ClientMethodMapper
now avoids passing mutable builders, reducing potential for dev errors and improving clarity by eliminating the need to save and restore builder states.JavaSettings::PollingDetails
has been replaced withPollingSettings
, which includes updated JavaDoc and improved readability.PagingMetadata
) and long-running operations (PollingMetadata
).PollingMetadata
processesPollingSettings
and TypeSpec LRO-Metadata and exposes an immutableMethodPollingDetails
view on demand. Similarly,PagingMetadata
processes TypeSpec paging information and presents an immutable MethodPagingDetails.PollingSettings
,PollingMetadata
, andMethodPollingDetails
have been renamed to use consistent names.ClientMethodsReturnDescription
properties.