Closed aburmeis closed 2 years ago
That is strange, the first example should work. There is logic to handle it.
There are to 2 integration tests that use it. ... the tests have a different focus though. So it is possible that the {package-name}
class get its used count from somewhere else.
I guess, I should create an explicit test for this case. Looking at it.
It seems the problem only exists if a suffix for model names is configured, sorry for confusion:
options:
model-name-suffix: Dto
map:
types:
- type: MyResultPage => org.springframework.data.domain.Page<{package-name}.model.MyResultDto>
yes, suffix wasn't handled.
Thanks for reporting :-)
Much more thanks for fixing!
released in io.openapiprocessor:openapi-processor-spring:2022.3
When you configure a type mapping in
openapi-mapping.yaml
using generics, the type reference is not counted and therefore the type will not be generated.I see it would be hard to find such a reference, so either it should be possible to use OpenApi type names as generics:
or having an option to force generation of types to be configured:
I don't know which would be the best solution (would prefer the openapi type in generics) but somehow this has to be fixed/possible.
I am using
openapi-processor-maven-plugin
version 2021.1 withopenapi-processor-spring
version 2022.2.