Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
arjunchhabra-invitae opened this issue Nov 17, 2021 · 0 comments
Closed
Labels
bug Something isn't working

Comments

@arjunchhabra-invitae
Copy link

arjunchhabra-invitae commented Nov 17, 2021

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

@bnasslahsen bnasslahsen added the bug Something isn't working label Jan 10, 2022
mpleine pushed a commit to mpleine/springdoc-openapi that referenced this issue May 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants