springdoc-openapi icon indicating copy to clipboard operation
springdoc-openapi copied to clipboard

ParameterObject doesn't work with Groovy class

Open AndrewNorgrenTR opened this issue 5 years ago • 1 comments

Describe the bug When using the @ParameterObject annotation with a Groovy class, it gets stuck stuck in an infinite loop in this method: private static Stream extractFrom(Class clazz, String fieldNamePrefix)

It looks like the ReflectionUtils to get the class fields isn't working right with Groovy classes

To Reproduce Steps to reproduce the behavior: -Spring Boot 2.3.4

  • springdoc-openapi-ui:1.5.8

AndrewNorgrenTR avatar May 10 '21 22:05 AndrewNorgrenTR

@AndrewNorgrenTR,

Your description is not enough.

static {
	SpringDocUtils.getConfig().addSimpleTypesForParameterObject(YourGroovyType.class);
}

Please read the section Using GitHub Issues, and make sure you provide the all the listed information.

If you are reporting a bug, please help to speed up problem diagnosis by providing as much information as possible:

  • You need to describe your context (the title of an issue is not enough)
  • What version of spring-boot you are using?
  • What modules and versions of springdoc-openapi are you using?
  • What are the actual and the expected result using OpenAPI Description (yml or json)?
  • Provide a Minimal, Reproducible Example - with HelloController that reproduces the problem

This ticket will be now closed. And can be reopened if the relevant information are provided.

bnasslahsen avatar May 13 '21 18:05 bnasslahsen