I have a schema named 'ResponseEntity'. The model class gets generated with the same name.
This conflicts with the ResponseEntiy class of Springframework and gives an error
error: a type with the same simple name is already defined by the single-type-import of ResponseEntity
import org.springframework.http.ResponseEntity;
API File:
default ResponseEntity myClass() {
// code
return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
}
Here, the func return-type ResponseEntity is from org.springframework.http.ResponseEntity
whereas the Generic type(one in the <>) ResponseEntity is my model class.
Discarded approaches:
- I do not want to use importmappings to create an external model and map it to the ResponseEntity model. This will create issues on changing the swagger schema.
- I cannot add Suffix/Prefix to all the generated models.
Is there a way such that?
- I can add Suffix/Prefix to only that particular generated model.
- Any workaround to never let the class 'org.springframework.http.ResponseEntity' be imported. I will add this in the ResponseEntity method of api.mustache class as a prefix.
I have a schema named 'ResponseEntity'. The model class gets generated with the same name.
This conflicts with the ResponseEntiy class of Springframework and gives an error
error: a type with the same simple name is already defined by the single-type-import of ResponseEntity
import org.springframework.http.ResponseEntity;
API File:
default ResponseEntity myClass() {
// code
return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
}
Here, the func return-type ResponseEntity is from org.springframework.http.ResponseEntity
whereas the Generic type(one in the <>) ResponseEntity is my model class.
Discarded approaches:
Is there a way such that?