olivierlsc / swagger-express-ts

Generate and serve swagger.json
MIT License
147 stars 60 forks source link

Duplicate values in tags section when multiple controllers are annotated with the same "name" value #49

Closed craigdrabiktxmq closed 3 years ago

craigdrabiktxmq commented 5 years ago

Duplicate values in the tags section of the generated Swagger JSON results when multiple controllers have been annotated with an @ApiPath annotation that has the same "name" property:

@ApiPath({ path: "/a-operations", name: "Operations" })

@controller("/api/a-operations") export class ContollerA implements interfaces.Controller { ... }

@ApiPath({ path: "/b-operations", name: "Operations" })

@controller("/api/b-operations") export class ContollerB implements interfaces.Controller { ... } This results in the generated swagger having two entries for "Operations" under tags:

tags:

I have submitted PR#48 to patch this issue.