Skip to content

Add support for Response body generation in Compile time generation #44150

Merged
samvaity merged 13 commits intoAzure:mainfrom
samvaity:response-body-generation
Feb 21, 2025
Merged

Add support for Response body generation in Compile time generation #44150
samvaity merged 13 commits intoAzure:mainfrom
samvaity:response-body-generation

Conversation

@samvaity
Copy link
Member

@samvaity samvaity commented Feb 11, 2025

Key Changes

  • Support for All ResponseBodyModes: This PR now includes support for all ResponseBodyModes (IGNORE, BUFFER, STREAM, DESERIALIZE).
  • Optional RequestOptions: If RequestOptions are provided in the Service interface, they will be used instead of the default from httpRequest.getRequestOptions().
  • Convenience Overloads: Added convenience methods in the Service interface, identified by the suffix "Convenience" and default modifier. Updated the generation to not generate for these methods as they have a provided default implementation that uses the corresponding *Response overload getValue().
  • HttpRequest Updates: The HttpRequest class now uses setter methods instead of constructor arguments.
  • HttpClientTests Cloning: Cloned HttpClientTests to transition from using RestProxy to using the Impl instance for service calls [As we go].
  • ContentType: Removed ContentType usages as we don't need to update and release new versions whenever a new content type is added. Made internal in clientcore.
  • Get Defaut ResponseBodyMode: Added a util method to retrieve the ResponseBodyMode from RequestOptions or use the default ResponseBodyMode.BUFFER.

Closes : #44038, #44150
Latest generated TestInterfaceClientServiceImpl

@samvaity samvaity self-assigned this Feb 11, 2025
@azure-sdk
Copy link
Collaborator

azure-sdk commented Feb 11, 2025

API change check

API changes are not detected in this pull request.

@samvaity samvaity force-pushed the response-body-generation branch 3 times, most recently from 37f9e4b to 4550b7c Compare February 14, 2025 00:05
@samvaity samvaity force-pushed the response-body-generation branch from fb19e65 to ac80e23 Compare February 19, 2025 00:56
@samvaity samvaity force-pushed the response-body-generation branch from ac80e23 to 42d2588 Compare February 19, 2025 01:12
@samvaity samvaity force-pushed the response-body-generation branch from 0f71636 to 79aae01 Compare February 19, 2025 18:56
@samvaity samvaity marked this pull request as ready for review February 19, 2025 18:56
@samvaity samvaity requested a review from billwert as a code owner February 19, 2025 19:22
@samvaity samvaity force-pushed the response-body-generation branch from 5d707f8 to eaba80e Compare February 20, 2025 22:45
@samvaity samvaity force-pushed the response-body-generation branch from 48e4f6b to 9dd7a58 Compare February 21, 2025 01:04
@samvaity samvaity merged commit 4b62e7f into Azure:main Feb 21, 2025
91 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement response body deserialization in annotation-processor

3 participants