ojoanalogo / nestjs-redoc

📘 ReDoc frontend for you NestJS swagger API documentation
MIT License
147 stars 55 forks source link

TagGroups `namespaces` #46

Open mat-twg opened 3 years ago

mat-twg commented 3 years ago

It would be nice to add namespaces at the group level, like this:

tagGroups:
      - name: 'User'
        tags:
          - 'Entity'
          - 'Reports'
      - name: 'Common'
        tags:
          - 'Reports'

And in decorators:

@ApiTags('User.Reports')
// ... some user reports controller

@ApiTags('Common.Reports')
// ... some common reports controller

But render without dots, like:

User
> Reports

Common
> Reports
joeferraro commented 2 years ago

I have a related need where I want the same tag label to be rendered under different groups. Being able to assign an id/label to a tag and reference the tag id in tagGroups would help:

@ApiTags('some-tag-id')
tagGroups: [
  {
    name: "General",
    tags: [
      {
        id: "some-tag-id",
        label: "My Tag Label"
      }
    ],
  },
]