I have a Swagger 1.2 doc.json and the following Java code which uses Swagger Parser to extract all the paths from this document. The problem is that the parser does not get
There are duplicate paths in your API definition, for example:
"path": "api/v2/nodes/{id}",
"description": "Get a node",
...
"path": "api/v2/nodes/{id}",
"description": "Get a virtual folder",
"path": "api/v2/nodes/actions",
"description": "Get actions for the selected node IDs",
...
"path": "api/v2/nodes/actions",
"description": "Get actions for the selected node IDs",
Duplicate paths are not allowed by the Swagger 1.2 Specification:
In the
apis
array, there MUST be only one API Object perpath
.
The parser simply ignores the duplicates.