Skip to content

Add support for tags  #65

Open
Open

Description

@samishal1998

Tags are very helpful in APIs that have alot of endpoints
https://swagger.io/docs/specification/grouping-operations-with-tags/

Activity

  1. wesleytodd commented on Jan 16, 2025

    @wesleytodd
    Owner

    PR Welcome!

  2. Megapixel99 commented on Feb 7, 2025

    @Megapixel99
    Collaborator

    Looked into this a little bit and it seems to be an issue with SwaggerUI and not Express OpenAPI (see: swagger-api/swagger-ui#5653). Using tags as an array of strings does not lead to any issues, but using tags as an array of objects results in a tag which looks like:
    Image
    even though the JSON schema provided for tags (shown below) matches the example provided in: https://swagger.io/docs/specification/v3_0/grouping-operations-with-tags/

    "tags": [
      {
        "name": "users",
        "description": "Users Desc",
        "externalDocs": {
          "url": "http://not-a-real-url.com/user-desc"
        }
      }
    ]
    

    I added tests locally to confirm the tags are being passed properly which I can make a PR for if desired, but they seem to be passed to the schema without any modifications to the user's definition on this line:

    const operation = Object.assign({}, schema)
    so I am unsure if a test is actually needed...

  3. added 2 commits that reference this issue on Apr 18, 2025
    c2806a6
    dfc0ef4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    good first issue

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions