Skip to content

refactor(java): remove codemodel dependency while preserving classes (WIP) - #12089

Draft
Timothee Guerin (timotheeguerin) wants to merge 1 commit into
microsoft:mainfrom
timotheeguerin:java-local-code-model-classes
Draft

Timothee Guerin (timotheeguerin) wants to merge 1 commit into
microsoft:mainfrom
timotheeguerin:java-local-code-model-classes

Conversation

@timotheeguerin

Copy link
Copy Markdown
Member

The Java TypeSpec emitter depends on @autorest/codemodel for its intermediate model, bringing in @azure-tools/codegen and js-yaml as well. It only needs the model classes consumed by the Java generator.

This WIP removes those dependencies by owning the required classes and initialization helpers locally. Existing property declarations, doc comments, constructors, methods, and instanceof checks are preserved. Changes to existing emitter code are primarily import substitutions plus removal of unused source tracking; the Java backend and YAML contract are unchanged.

Alternative to #12088, based independently on main. This version keeps the class-based design rather than converting the model to interfaces and factories.

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 Sep 30, 2026
ancestors.delete(source);
}
} else {
output[key] = value;
@github-actions

Copy link
Copy Markdown
Contributor

All changed packages have been documented.

  • ✅ @typespec/http-client-java
Show changes

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

Replace the AutoRest codemodel dependency with locally owned model classes, preserving the Java generator's input contract.

@azure-sdk-automation

Copy link
Copy Markdown

You can try these changes here

🛝 Playground 🌐 Website 🛝 VSCode Extension

This branch has not been deployed

No deployments
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.

2 participants