Example:
This is the first definition:
/**
* @swagger
* /a/b/items:
* get:
* description: Get all the items
* responses:
* 200:
* Returns an array of items
*/
This is the 2nd definition:
/**
* @swagger
* /a/b/items:
* get:
* description: Get items by ids
* parameters:
* - name: ids
* in: query
* required: true
* schema:
* $ref: '#/definitions/itemIds'
*
* responses:
* 200:
* description: Returns an array of items, given the itemIds
*/
It is clear that, the difference here lies in the request structure. Note that, for the second definition, I wanna pass the parameter ids in query.
The first definition is a simple get request without any path parameters or query parameters.
The second definition is a get request with same base path but with query params.
When I define these two in succession, the second definition over writes the first one and the Swagger UI shows the second one only.
It's highly desirable to have these two definitions as unique ones.
Any solutions/thoughts/ways to accomplish the uniqueness?
Changing the apis to support documentation is simply a "No go"!
Any help will be much appreciated. Thanks in advance!