Skip to content

OpenAPI: Java controller methods with identical URL paths but different HTTP signatures #343

Answered by jbee
cjmamo asked this question in Specs & RFCs
Discussion options

You must be logged in to vote

We had a huddle discussion on this, quick summary:

  • existing merge into one Endpoint object is scarped
  • if there is more than one Endpoint for a path, the paths are made unique by putting the Endpoint under a new path in the api.getEndpoints() map where each gets their Endpoint.name appended after the #. For example /foo becomes /foo#<name1>, /foo#<name2>, ...
  • we assume operationId (method name) is always unique, if not the method is renamed
  • non unique endpoint method name should be found by the validation test so it is impossible to introduce them
  • a new annotation can be used to manually define the Endpoint.name, method name is the default/fallback
  • new annotation is defined with others in O…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by cjmamo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment