Skip to content

Conversation

@plantexchen
Copy link

This commit introduces the JSDoc @deprecated tag to API methods generated by the typescript-rxjs generator when the corresponding operation is marked as deprecated in the OpenAPI specification (deprecated: true).

The change aims to improve developer experience (DX) and code quality by providing immediate feedback on API usage.

Details

  • Behavior: If an operation includes deprecated: true in the spec, the @deprecated tag is inserted into the JSDoc block preceding the method signature in the generated api.service.ts file.
  • Benefit: IDEs like VS Code, WebStorm, or IntelliJ will correctly display a strike-through on the method name and surface deprecation warnings, encouraging developers to switch to newer alternatives.

Files Modified

  • modules/openapi-generator/src/main/resources/typescript-rxjs/apis.mustache
  • modules/openapi-generator/src/main/resources/typescript-rxjs/modelGeneric.mustache
  • modules/openapi-generator/src/main/resources/typescript-rxjs/modelAllOf.mustache
  • modules/openapi-generator/src/main/resources/typescript-rxjs/modelOneOf.mustache
  • modules/openapi-generator/src/main/resources/typescript-rxjs/modelEnum.mustache

@wing328
Copy link
Member

wing328 commented Nov 18, 2025

thanks for the pr

please follow step 3 to update the samples so that the CI can verify the change.

@wing328
Copy link
Member

wing328 commented Nov 18, 2025

CC @TiFu (2017/07) @taxpon (2017/07) @sebastianhaas (2017/07) @kenisteward (2017/07) @Vrolijkx (2017/09) @macjohnny (2018/01) @topce (2018/10) @akehir (2019/07) @petejohansonxo (2019/11) @amakhrov (2020/02) @davidgamero (2022/03) @mkusaka (2022/04) @joscha (2024/10)

@wing328 wing328 added this to the 7.18.0 milestone Nov 18, 2025
@plantexchen plantexchen force-pushed the feat/typescript-rxjs-deprecated-tag branch from 590f7f3 to 77f009a Compare November 19, 2025 10:43
@wing328
Copy link
Member

wing328 commented Nov 19, 2025

Thanks for the PR but your commit (as shown in the Commits tab) is not linked to your Github account, which means this PR won't count as your contribution in https://github.com/OpenAPITools/openapi-generator/graphs/contributors.

Let me know if you need help fixing it.

Ref: https://github.com/OpenAPITools/openapi-generator/wiki/FAQ#how-can-i-update-commits-that-are-not-linked-to-my-github-account

This commit introduces the JSDoc @deprecated tag to API operations in the typescript-rxjs generator when the operation is marked as deprecated in the OpenAPI specification.

This ensures that IDEs (like VS Code or WebStorm) correctly flag the method as deprecated, providing better developer experience and warning consumers about upcoming removals or changes.
@plantexchen plantexchen force-pushed the feat/typescript-rxjs-deprecated-tag branch from 77f009a to ecd6016 Compare November 19, 2025 11:22
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.

2 participants