Skip to content

http-client-java: remove legacy AutorestSettings and write Package api-version to CHANGELOG.md for Fluent Premium - #11433

Merged
weidongxu-microsoft merged 6 commits into
microsoft:mainfrom
weidongxu-microsoft:remove-autorest-settings
Jul 29, 2026
Merged

http-client-java: remove legacy AutorestSettings and write Package api-version to CHANGELOG.md for Fluent Premium#11433
weidongxu-microsoft merged 6 commits into
microsoft:mainfrom
weidongxu-microsoft:remove-autorest-settings

Conversation

@weidongxu-microsoft

@weidongxu-microsoft weidongxu-microsoft commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Summary

Two related changes to the http-client-java generator:

  1. Remove legacy AutoRest settings that are no longer used in the TypeSpec-only path.
  2. Write Package api-version to CHANGELOG.md for Fluent Premium, matching the existing Fluent Lite behavior.

Changes

Remove legacy AutoRest settings

  • Rename AutorestSettingsProjectSettings, retaining only output-folder (loaded via loadStringSetting).
  • Drop java-sdks-folder — it is never set by the TypeSpec plugins (always null), so its consumer branch in Project.findSdkFolder() is removed; the SDK folder is now solely deduced from output-folder.
  • Drop title — it had no consumer after removing SwaggerReadmeTemplate.
  • Remove SwaggerReadmeTemplate, JavaPackage.addSwaggerReadmeMarkdown, and the generateSwaggerMarkdown parameter of Javagen.writeToTemplates.
  • Rename tagDescriptionapiVersionDescription in FluentProject, keeping the apiVersionMap-based logic but dropping the legacy AutoRest tag branch.

CHANGELOG.md api-version for Fluent Premium

  • Extract FluentProject.apiVersionDescription(Map) static helper so the description can be produced without a full FluentProject.
  • Add Changelog.updateForVersion(String apiVersionDescription) overload that inserts/replaces a - Package api-version {...}. line in the top-most version section (idempotent; adds a blank line before a following heading).
  • Wire it into FluentGen for the Premium path: only when isSdkIntegration, an api-version is present, and an existing CHANGELOG.md is found (never creates one).

Validation

  • Generator compiles (mvn clean install) and is spotless-formatted.
  • ChangelogTests cover the insertion logic, including a real-world azure-resourcemanager-compute sample.

Rename AutorestSettings to ProjectSettings, retaining only output-folder.
Drop the unused java-sdks-folder and title options, SwaggerReadmeTemplate
generation, and the AutoRest tag based service description (management
service description now uses api-version, renamed to apiVersionDescription).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: e177a409-63c1-46e4-89d7-d501f1e36a7f
@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 Jul 29, 2026
@github-actions

github-actions Bot commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

All changed packages have been documented.

  • @typespec/http-client-java
Show changes

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

Add Package api-version annotation to CHANGELOG.md for Fluent Premium. When generating a Premium SDK with an existing CHANGELOG.md, the top-most version section gets a - Package api-version {...}. line reflecting the service api-version(s), matching the behavior already available for Fluent Lite.

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

Remove legacy AutoRest settings. AutorestSettings is renamed to ProjectSettings and only retains output-folder; the unused java-sdks-folder and title options, the SwaggerReadmeTemplate generation, and the AutoRest tag based service description are removed (management service description now uses the api-version instead).

…sionMap field

Remove the now-unused 'title' setting from TypeSpecFluentPlugin (and its
constructor param / caller), since nothing reads it after SwaggerReadmeTemplate
removal. Also remove the pre-existing write-only apiVersionMap field and
setApiVersionInTypeSpec setter in FluentProject.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: e177a409-63c1-46e4-89d7-d501f1e36a7f
@azure-sdk-automation

azure-sdk-automation Bot commented Jul 29, 2026

Copy link
Copy Markdown

You can try these changes here

🛝 Playground 🌐 Website 🛝 VSCode Extension

weidongxu-microsoft and others added 2 commits July 29, 2026 12:15
…t Premium

Extract FluentProject.apiVersionDescription(Map) as a static helper so the
api-version description can be computed without a full FluentProject. Add a
Changelog.updateForVersion(String apiVersionDescription) overload that inserts
(or replaces, idempotently) a '- Package api-version ...' bullet into the
top-most version section, keeping tidy blank lines. Extract isVersionSectionHeader
helper to remove duplicate section-header detection. Add ChangelogTests coverage
including a real-world sample.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: e177a409-63c1-46e4-89d7-d501f1e36a7f
… Fluent Premium

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: e177a409-63c1-46e4-89d7-d501f1e36a7f
@weidongxu-microsoft weidongxu-microsoft changed the title refactor(http-client-java): remove legacy AutorestSettings http-client-java: remove legacy AutorestSettings and write Package api-version to CHANGELOG.md for Fluent Premium Jul 29, 2026
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: e177a409-63c1-46e4-89d7-d501f1e36a7f
@weidongxu-microsoft

Copy link
Copy Markdown
Contributor Author

I am letting emitter write the Package api-version ... line, so we probably won't manually update CHANGELOG for premium as well.

…service spec

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: e177a409-63c1-46e4-89d7-d501f1e36a7f
@weidongxu-microsoft
weidongxu-microsoft added this pull request to the merge queue Jul 29, 2026
Merged via the queue into microsoft:main with commit 691d863 Jul 29, 2026
43 checks passed
@weidongxu-microsoft
weidongxu-microsoft deleted the remove-autorest-settings branch July 29, 2026 08:31
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 eng

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants