Skip to content

@param javadoc for record classes (JEP 395) are not recognized #2131

Closed
@averak

Description

@averak

Describe the bug

  • I want to use java record classes (JEP 395) for schema.
  • I use therapi-runtime-javadoc for generate OAS3 description field, but @param javadoc is not recognized.
    • If I use normal class, @param javadoc is recognized, but record classes aren't recognized.

To Reproduce
Steps to reproduce the behavior:

  • What version of spring-boot you are using?
    • 3.0.1
  • What modules and versions of springdoc-openapi are you using?
    • org.springdoc:springdoc-openapi-starter-webmvc-ui:2.0.2
    • org.springdoc:springdoc-openapi-starter-common:2.0.2
    • com.github.therapi:therapi-runtime-javadoc:0.15.0
    • com.github.therapi:therapi-runtime-javadoc-scribe:0.15.0
  • What is the actual and the expected result using OpenAPI Description (yml or json)?
    • json
  • Provide with a sample code (HelloController) or Test that reproduces the problem

The code below does not work as expected.

/**
 * User
 *
 * @param name name 
 */
public record User(@Schema(requiredMode = Schema.RequiredMode.REQUIRED) name) {}

The code below works as expected.

public class User {
    /**
     * name
     */
    @Schema(requiredMode = Schema.RequiredMode.REQUIRED)
    name;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions