-
Notifications
You must be signed in to change notification settings - Fork 6k
Description
Swagger doc tools like e.g. springfox usually generate the operationId
from code using the method name with a suffix (in springfox that's <method-name>Using<HTTP-verb>
, e.g. myMethodUsingPost
), in order to avoid name clashes due to multiple methods with the same name but different signatures.
That has a weird consequence if you generate a server from an existing swagger spec : the spec provided by the running server itself is different in that every operationId
has been suffixed with Using<HTTP-verb>
. In Springfox the only way to avoid this suffixing is to provide a nickname in the @ApiOperation
annotation. And here comes the catch: since the code is generated, I do not want to edit that. So it would be nice, if the generator would add a nickname attribute to the annotation.
One could argue that this is a problem in springfox, but I guess other tools/language will have the same problem. Or is there any other workaround on that?