You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 2, 2023. It is now read-only.
According to the specification the operationId must be unique within the whole API. Currently the operationId is derived from the method name only and will thus result in duplicates if the API has multiple annotated Java methods with the same name:
I have seen other implementations where a number suffix will be used (e.g. foo and foo_1). In the Maven plugin there is a configuration parameter with which the format can be defined. E.g. <operationIdFormat>{{className}}_{{methodName}}_{{httpMethod}}</operationIdFormat>.
The text was updated successfully, but these errors were encountered:
@knutwannheden I agree this does make sense. Just for future reference, this default is applied in JaxrsReader#parseMethod and SpringMvcReader#parseMethod, so should be an easy update.
Any updates on this issue so far? We too are facing similar duplidate operationIds issues. It would be really useful to be able to configure the format like we do in the maven plugin
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
It appears that this plugin has the same problem the Maven plugin had a while back: kongchen/swagger-maven-plugin#377.
According to the specification the
operationId
must be unique within the whole API. Currently theoperationId
is derived from the method name only and will thus result in duplicates if the API has multiple annotated Java methods with the same name:swagger-gradle-plugin/plugin/src/main/groovy/com/benjaminsproule/swagger/gradleplugin/reader/JaxrsReader.groovy
Line 258 in 3e274f3
I have seen other implementations where a number suffix will be used (e.g.
foo
andfoo_1
). In the Maven plugin there is a configuration parameter with which the format can be defined. E.g.<operationIdFormat>{{className}}_{{methodName}}_{{httpMethod}}</operationIdFormat>
.The text was updated successfully, but these errors were encountered: