Open fearlessfara opened 4 years ago
As I see this feature is released in 6.5.0 with useResponseEntity
flag for spring
generator. It's still missing for kotlin-spring
generator (don't know if I should create a new issue).
+ 1 It would be nice to have useResponseEntity
flag for kotlin-spring
generator as well.
+1 working on my first Kotlin project, I'm surprised to find kotlin-spring
does not support this flag.
I might switch to the spring
generator as I don't like to "pollute" my code with ResponseEntity
.
I've managed to generate the interfaces from a .yaml open-api descriptor file, but, as in the question title, I'd love to change the response type of those interfaces from ResponseEntity to my own types. Basically instead of the interface having this signature:
ResponseEntity<Void> clearCache();
for a method that is implemented basically this way:public void clearCache(){ //do something}
I'd want the generated interface to be as simply asvoid clearCache();
Same thing for my own defined classes, instead ofResponseEntity<MyBook> getBook(String ISBN);
I want it to just use MyBook as return type, so it should look something likeMyBook getBook(String ISBN);
I think this could be a really useful feature for the future of this openapi-generator plugin, currently I haven't managed to get it do what I'm looking for but I think here on the community with this issue (which was suggested me to create it by @wing328 ) I'll find a solution to it!