https://openjdk.org/jeps/467, currently targeted at Java 23, will add support for writing documentation comments using Markdown. The JEP describes some additions to the API that may affect our annotation processor:

We introduce a new type of tree node, RawTextTree, which contains uninterpreted text, together with a new tree-node kind, DocTree.Kind.MARKDOWN, which indicates Markdown content in a RawTextTree. We add corresponding new visitRawText methods to DocTreeVisitor and its subtypes, DocTreeScanner and DocTreePathScanner.

While some exploratory work may be worthwhile, this is largely blocked until the changes to JavaDoc have been finalised.

Comment From: wilkinsona

We may need to consider https://github.com/spring-projects/spring-boot/issues/11698 as part of this.

Comment From: mhalbritter

https://openjdk.org/jeps/467 will land in Java 23.

Comment From: mhalbritter

@ConfigurationProperties(prefix = "my")
public class MyProperties {
    /// This is a comment in markdown.
    private String name;

    public String getName() {
        return this.name;
    }

    public void setName(String name) {
        this.name = name;
    }
}

will generate this JSON (tested with Boot 3.3.5):

{
  "groups": [
    {
      "name": "my",
      "type": "com.example.sb_40562.MyProperties",
      "sourceType": "com.example.sb_40562.MyProperties"
    }
  ],
  "properties": [
    {
      "name": "my.name",
      "type": "java.lang.String",
      "description": "This is a comment in markdown.",
      "sourceType": "com.example.sb_40562.MyProperties"
    }
  ],
  "hints": []
}

So basic support is there, because javax.lang.model.util.Elements#getDocComment learned to read Markdown comments.