vojtechhabarta/typescript-generator

Convert javadoc anchor tags to tsdoc @link

tonjohn opened this issue ยท 0 comments

External links in Javadoc comments do not get converted to their TSdoc equivalent. This results in either having to author non-compliant Javadoc links that IntelliJ warns about or not having usable links in TSdocs which can be confusing.

Given:

/**
 * Represents a hamburger (food) ๐Ÿ”
 *
 * @see <a href=
 *      "https://en.wikipedia.org/wiki/Hamburger">Hamburger - Wikipedia</a>
 */
@Data
public class Hamburger {

	/**
	 * The name of the hamburger as it appears to customers
	 */
	private String name;

	/**
	 * The description of the hamburger
	 */
	private @Nullable String description;

	/**
	 * List of ingredients
	 */
	private ArrayList<String> ingredients;
}

image

Expected:

/**
 * Represents a hamburger (food) ๐Ÿ”
 * @see {@link https://en.wikipedia.org/wiki/Hamburger Hamburger - Wikipedia}
 */
interface Hamburger {
  readonly name: string;
  readonly description?: string;
  readonly ingredients: string[];
}

image

Actual:

/**
 * Represents a hamburger (food) ๐Ÿ”
 * @see <a href=
 *      "https://en.wikipedia.org/wiki/Hamburger">Hamburger - Wikipedia</a>
 */
interface Hamburger {
  readonly name: string;
  readonly description?: string;
  readonly ingredients: string[];
}

image