Skip to content

Comments are not picked up for fields in Typed data classes #1339

Closed
@arjunchhabra-invitae

Description

@arjunchhabra-invitae

Describe the bug

  • If you provide comments via KDoc (or even via the @field:Parameter(description="") workaround) for fields in a typed data class, they are not picked up in the generated documents
  • If you use the same data class without the Type parameters, the comments are picked up as expected

To Reproduce
Steps to reproduce the behavior:
What version of spring-boot you are using? 2.5.5
What modules and versions of springdoc-openapi are you using? 1.5.12

  • What is the actual and the expected result using OpenAPI Description (yml or json)? Expect comments to be picked up, actual is no comments are provided.
  • Provide with a sample code (HelloController) or Test that reproduces the problem: See attached zip. Run with ./gradlew bootRun and see the behavior when examining the "schema" of the responses.

Expected behavior

  • A clear and concise description of what you expected to happen. Fields in both typed and untyped data classes should have their comments picked up.

exampleProject.zip

image
image

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions