Open sasavilic opened 11 months ago
I am having the same issue, when I use the responseWrapper in conjunction with the delegate pattern, the API generated does not add the default implementation and make the controller generate this error
method does not override or implement a method from a supertype.
Seems like the default is not added because of this conditional, so the controller layer is force to implemented the method but those method are not autogenerated to be compliant .
<configuration>
<generatorName>spring</generatorName>
<inputSpec>${project.basedir}/../agents-service-protocol/src/main/resources/openapi/xxxx-service.oas3.yaml</inputSpec>
<apiPackage>com.twilio.agents.service.server.api</apiPackage>
<modelPackage>com.twilio.agents.service.server.dtos</modelPackage>
<openapiNormalizer>REF_AS_PARENT_IN_ALLOF=true,REMOVE_ANYOF_ONEOF_AND_KEEP_PROPERTIES_ONLY=true,SIMPLIFY_ANYOF_STRING_AND_ENUM_STRING=true,SIMPLIFY_BOOLEAN_ENUM=true</openapiNormalizer>
<supportingFilesToGenerate>ApiUtil.java</supportingFilesToGenerate>
<configOptions>
<sourceFolder>src/java/main</sourceFolder>
<oas3>true</oas3>
<dateLibrary>java8</dateLibrary>
<useSpringBoot3>true</useSpringBoot3>
<useJakartaEeValidation>true</useJakartaEeValidation>
<useSpringController>true</useSpringController>
<useBeanValidation>true</useBeanValidation>
<performBeanValidation>true</performBeanValidation>
<requestMappingMode>api_interface</requestMappingMode>
<useOptional>true</useOptional>
<handleApiException>true</handleApiException>
<openApiNullable>true</openApiNullable>
<skipDefaultInterface>false</skipDefaultInterface>
<responseWrapper>CompletableFuture</responseWrapper>
<useResponseEntity>true</useResponseEntity>
<useTags>true</useTags>
<modelPropertyNaming>original</modelPropertyNaming>
<delegatePattern>true</delegatePattern>
<generatedConstructorWithRequiredArgsOnly>true</generatedConstructorWithRequiredArgsOnly>
<additionalModelTypeAnnotations>@lombok.Data @lombok.Builder(setterPrefix = "with") @lombok.AllArgsConstructor</additionalModelTypeAnnotations>
</configOptions>
<typeMappings>
<typeMapping>OffsetDateTime=java.time.ZonedDateTime</typeMapping>
</typeMappings>
</configuration>
Bug Report Checklist
Description
openapi-generator version
OpenAPI declaration file content or url
Generation Details
Maven configuration
Steps to reproduce
Expected result:
Related issues/PRs
Suggest a fix