OpenAPITools / OpenAPITools/openapi-generator

[Java][QUESTION] Placeholder JavaDoc 'deprecated' description?

Open
#23,270 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
26.8k
Forks
7.7k
PR merge metrics
PR metrics pending

Description

Whenever generating DTOs in Java, the generated JavaDocs will include @deprecated when it's marked as deprecated, like so:

/**
 * Example of a deprecated Enum
 *
 * @deprecated
 */
@Deprecated
public enum DeprecatedExampleEnum {

However, it will result in compilation warnings:

[EmptyBlockTag] A block tag (@param, @return, @throws, @deprecated) has an empty description. Block tags without descriptions don't add much value for future readers of the code; consider removing the tag entirely or adding a description. (see https://google.github.io/styleguide/javaguide.html#s7.1.3-javadoc-block-tags)

Question

Should there be some placeholder value? Unless... is there some vendor-extension to provide the deprecation details?

Simply adding a dot will resolve the warnings. Or perhaps "details missing". Thoughts?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the generated JavaDoc example and the EmptyBlockTag warning described in the issue. Determine whether deprecation details are available from the OpenAPI input or a vendor extension, then clarify the expected placeholder or metadata behavior. Done means the decision is documented and generated Java DTOs no longer produce the reported warning.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
documentation, tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.