Skip to content

refactor(http-client-java): consolidate TypeSpec mappers into base mappers#11077

Open
XiaofeiCao wants to merge 2 commits into
microsoft:mainfrom
XiaofeiCao:autorest_cleanup_mapper
Open

refactor(http-client-java): consolidate TypeSpec mappers into base mappers#11077
XiaofeiCao wants to merge 2 commits into
microsoft:mainfrom
XiaofeiCao:autorest_cleanup_mapper

Conversation

@XiaofeiCao

@XiaofeiCao XiaofeiCao commented Jun 24, 2026

Copy link
Copy Markdown
Member

Summary

Simplifies the mapper class hierarchy in the Java client generator (@typespec/http-client-java) by consolidating the TypeSpec-specific mappers into the shared base mappers, now that the generator targets the TypeSpec path.
The old autorest path won't work properly after this change, and autorest is deprecated anyways.

Major changes

  • Merge the TypeSpec* mappers (ClientMapper, ServiceClientMapper, PrimitiveMapper, ProxyParameterMapper) into their shared base classes.
  • Consolidate the Fluent-flavor mappers under http-client-generator-mgmt.
  • Replace the redundant TypeSpec*MapperFactory wrappers with the base flavor factories, keeping a single dedicated AzureDataPlaneMapperFactory / AzureDataPlaneMethodGroupMapper for the azure data-plane flavor.

Out of scope

  • The JSON-RPC plugin infrastructure and the NewPlugin subclasses are intentionally left unchanged to stay aligned with downstream autorest.java.

Validation

…ppers

Merge the TypeSpec-specific mappers into the shared base mappers and relocate the remaining flavor mappers/factories for a simpler, more consistent hierarchy. No change to generated output.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@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 Jun 24, 2026
@github-actions

Copy link
Copy Markdown
Contributor

All changed packages have been documented.

  • @typespec/http-client-java
Show changes

@typespec/http-client-java - internal ✏️

Simplify the mapper class hierarchy by consolidating the TypeSpec-specific mappers into,> the shared base mappers.

…ackage

Relocate TypeSpecFluentNamer next to TypeSpecFluentPlugin and remove the leftover single-class fluent subpackage. Pure move, no behavior change.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@azure-sdk-automation

azure-sdk-automation Bot commented Jun 24, 2026

Copy link
Copy Markdown

You can try these changes here

🛝 Playground 🌐 Website 🛝 VSCode Extension

@XiaofeiCao XiaofeiCao marked this pull request as ready for review June 24, 2026 09:17

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This file will be consolidated after JSONRPC is removed.

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.

[http-client-java] cleanup unnecessary Mapper(Factory)s

1 participant