nelmio/NelmioApiDocBundle

[Feature]: Define "tags" list via attributes

Closed this issue · 1 comments

Description

We use vacuum to validate our api-docs.yaml and for our api to be valid, we need to manually add the tags in the nelmio_api_docs.yaml

nelmio_api_doc:
  documentation:
    tags:
      - name: Some Tag
        description: Description of said tag

These tags then get added to the end of the api-docs file. If we only define the tags within a controller attribute, the endpoints are still grouped by the tags but no tags list is added to the api-docs file.

#[OA\Get(
        operationId: 'uniqueEndpointId' ,
        description: 'Explanation for the endpoint in detail',
        summary: 'Explanation for the endpoint in short',
        tags: ['Some Tag'],
        ...
)]

My proposal now is to make the manual definition inside the nelmio_api_doc.yaml optional and always add the tags list to the api-docs file. That would be a nice to have that should not require too much of code change. And when somebody wants to add a description to the tags, the nelmio config would still be the correct place.

Additional context

No response

Oh, my bad. This is a feature request for the swagger-php bundle.