daveshanley / vacuum

vacuum is the worlds fastest OpenAPI 3, OpenAPI 2 / Swagger linter and quality analysis tool. Built in go, it tears through API specs faster than you can think. vacuum is compatible with Spectral rulesets and generates compatible reports.
https://quobix.com/vacuum
MIT License
488 stars 39 forks source link

Vacuum to warn of duplicate paths #473

Open nichwall opened 3 months ago

nichwall commented 3 months ago

Vacuum does not warn of duplicate paths. When using the bundle option, if the path is defined multiple times only the first one is kept.

For example, if the spec had something like the following, no warning is given when linting that duplicate paths exist, and the bundle option just drops one of the paths.

path:
  /api/endpoint/{id}:
    get:
      ...
  /api/endpoint/{id}:
    post:
      ...

Adding the ability to recognize the duplicate paths during bundle would be great, but giving a warning would be sufficient (for both linting and bundling).

LasneF commented 3 months ago

Looks a nice feature ! will be usefull in combination of a merge tool