Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x-displayName & x-tagGroups cancel eachother out #1719

Closed
edorgeville opened this issue May 13, 2024 · 2 comments
Closed

x-displayName & x-tagGroups cancel eachother out #1719

edorgeville opened this issue May 13, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@edorgeville
Copy link

What happens?

I leverage the x-tagGroups feature (implemented in #1174) in the following spec:

openapi: 3.1.0
info:
  title: Tag groups example
x-tagGroups:
  - name: fruits
    tags:
      - fruitPrice
  - name: vegetables
    tags:
      - vegetablePrice
paths:
  '/fruit/price':
    get:
      tags:
        - fruitPrice
      summary: Get fruit price

  '/vegetable/price':
    get:
      tags:
        - vegetablePrice
      summary: Get vegatable price

gives the following result:
image

In order to show both the fruitPrice & vegetablePrice tags under the same price text, I tried using the x-displayName feature (implemented in #1373) in the following spec:

openapi: 3.1.0
info:
  title: Tag groups example
x-tagGroups:
  - name: fruits
    tags:
      - fruitPrice
  - name: vegetables
    tags:
      - vegetablePrice
tags:
  - name: fruitPrice
    x-displayName: price
  - name: vegetablePrice
    x-displayName: price
paths:
  '/fruit/price':
    get:
      tags:
        - fruitPrice
      summary: Get fruit price

  '/vegetable/price':
    get:
      tags:
        - vegetablePrice
      summary: Get vegatable price

What did you expect to happen?

I expected the result to look like this:
image

but instead got this:
image

How can we reproduce the issue?

x-tagGroups only:
https://sandbox.scalar.com/e/er3F8
x-tagGroups + x-displayName:
https://sandbox.scalar.com/e/HEDLL

Swagger/OpenAPI Example

https://sandbox.scalar.com/e/HEDLL

@edorgeville edorgeville added the bug Something isn't working label May 13, 2024
@hanspagel
Copy link
Member

What a great bug report! We’ll fix this swiftly.

@edorgeville
Copy link
Author

Solved in 1.22.38, thank you Hans!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants