Skip to content

[java][restclient] move @Deprecated annotation to public methods - #24378

Merged
wing328 merged 1 commit into
OpenAPITools:masterfrom
flabbamann:restclient-deprecated
Jul 21, 2026
Merged

wing328 merged 1 commit into
OpenAPITools:masterfrom
flabbamann:restclient-deprecated

Conversation

@flabbamann

@flabbamann flabbamann commented Jul 21, 2026 •

Copy link
Copy Markdown
Contributor

PR checklist

  • Read the contribution guidelines.
  • Run the following to build the project and update samples:
    ./mvnw clean package || exit
    ./bin/generate-samples.sh ./bin/configs/*.yaml || exit
    ./bin/utils/export_docs_generators.sh || exit
    
    (For Windows users, please run the script in WSL)
    Commit all changed files.
    This is important, as CI jobs will verify all generator outputs of your HEAD commit as it would merge with master.
    These must match the expectations made by your contribution.
    You may regenerate an individual generator by passing the relevant config(s) as an argument to the script, for example ./bin/generate-samples.sh bin/configs/java*.
    IMPORTANT: Do NOT purge/delete any folders/files (e.g. tests) when regenerating the samples as manually written tests may be removed.
  • If your PR is targeting a particular programming language, @mention the technical committee members, so they are more likely to review the pull request.

Move the @Deprecated annotation in generated restclient API classes to the public methods.

Fixes #24377


Summary by cubic

Moved @Deprecated and Javadoc @deprecated from the private request helper to the public API methods in the Java restclient generator so users see warnings on public calls. Fixes #24377.

  • Bug Fixes
    • Updated Java/libraries/restclient/api.mustache to annotate public {{operationId}}, {{operationId}}WithHttpInfo, and {{operationId}}WithResponseSpec; removed from {{operationId}}RequestCreation.
    • Regenerated Petstore samples to reflect the new annotations.

Written for commit 0ea24ff. Summary will update on new commits.

Review in cubic

@flabbamann
flabbamann force-pushed the restclient-deprecated branch from 0cd2e2d to 0ea24ff Compare July 21, 2026 13:26
@wing328
wing328 merged commit 1d1e5d3 into OpenAPITools:master Jul 21, 2026
110 checks passed
@wing328

wing328 commented Jul 21, 2026

Copy link
Copy Markdown
Member

thanks for the PR, which looks good to me

@flabbamann

Copy link
Copy Markdown
Contributor Author

@wing328 thanks for merging. You might want to move this to the 7.25.0 milestone 😉.

@wing328 wing328 modified the milestones: 7.24.0, 7.25.0 Jul 22, 2026
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.

[BUG][Java][RestClient] public Deprecated API-Methods should be annotated

2 participants