I hit this issue as well. ( TMF638 v5 )
I solved this by making teh following change in the generated code :
public String getAtType() {
return atType.getValue() ;
}
However, I got stuck at a seemingly unrelated place :
private AtTypeEnum atType = GeographicLocation;
[ERROR] /home/sony/swaggertest/tt/src/main/java/org/openapitools/model/GeographicLocationFVO.java:[83,31] cannot find symbol
[ERROR] symbol: variable GeographicLocation
[ERROR] location: class org.openapitools.model.GeographicLocationFVO
Im still working on it
Note that, both the code generators I used to compile the yaml created spring boot 2.x ( swaggerhub.com and openapitools/openapi-generator-cli:latest ) and not spring 3.x
------------------------------
Sony Antony
TO BE VERIFIED
------------------------------
Original Message:
Sent: Feb 13, 2025 19:42
From: Dhiraj Sable
Subject: return type AtTypeEnum is not compatible with String
Hello Team,
I am using specifications defined in this yaml file Service Ordering Management API TMF641-v5.0,
I using springdoc-openapi-starter in spring-boot app to generate a clients of this specification. I was able to genrate the classes but when I compile it I am getting error as
m-forum/build/generated/src/main/java/org/openapitools/client/model/GeographicLocationFVO.java:174: error: getAtType() in GeographicLocationFVO cannot override getAtType() in PlaceFVO
public AtTypeEnum getAtType() {
^
return type AtTypeEnum is not compatible with String
tm-forum/build/generated/src/main/java/org/openapitools/client/model/GeographicLocation.java:174: error: getAtType() in GeographicLocation cannot override getAtType() in Place
public AtTypeEnum getAtType() {
^
return type AtTypeEnum is not compatible with String
I am using Java 17 and Spring 3 version for this. Can someone help me to resolve it ?
.
------------------------------
Dhiraj Sable
Cisco Systems
------------------------------