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

Http Operations Using Same Path All Expand/Contract Together #5096

Closed
pauljmartin16 opened this issue Dec 20, 2018 · 3 comments
Closed

Http Operations Using Same Path All Expand/Contract Together #5096

pauljmartin16 opened this issue Dec 20, 2018 · 3 comments

Comments

@pauljmartin16
Copy link

Q&A (please complete the following information)

  • OS: Windows
  • Browser: Chrome
  • Version: latest - 71.0.3578.98
  • Method of installation: npm, problem is also in the online Swagger Editor
  • Swagger-UI version: [e.g. 3.10.0]
  • Swagger/OpenAPI version: npm v3.19.3 + Latest Swagger Editor

Content & configuration

testDoc.txt

Describe the bug you're encountering

in the attached document there's both a GET and a PUT that use the path "/api/v1/subdomain/go/User/Detail". If the user clicks to expand or close the document then both GET and POST branches open/close together

To reproduce...

Steps to reproduce the behavior:

  1. Import the doc into the Online Swagger Editor
  2. Click on the path of the first item - /api/v1/subdomain/go/User/Detail
  3. Observe that the top 2 items have both expanded together

Expected behavior

should only open the clicked item

Screenshots

none

Additional context or thoughts

@shockey
Copy link
Contributor

shockey commented Dec 21, 2018

Hi @PJM16!

You're seeing this because your definition is invalid - both the GET and POST operations in question have the same operationId (TestAppGO_GetUseResponse), which is not allowed by the OpenAPI Specification:

operationId: Unique string used to identify the operation. The id MUST be unique among all operations described in the API.

Swagger Editor reports this as an error as well. You have some other fatal errors in your definition, you may want to load your definition into Swagger Editor and try to resolve them.

Hope this helps!

@monstrege
Copy link

I do experience the same problem.
I found out the problem. Here it is:

Example with those 2 urls:
get /api/detailledTransactions/metadata
get /api/detailledTransactions/{id}

Will both result in the same id:
id="operations-DetailledTransaction-Get"

Compared to those 2 urls that will results in 2 differents Ids.
get /api/transactions -> id="operations-Transaction-Get"
get /api/transactions/{id}/source/objects -> id="operations-Transaction-GetSourceObjects"

@shockey
Copy link
Contributor

shockey commented Mar 19, 2019

Closing due to inactivity.

This is simply to keep our issue tracker clean - feel free to comment if there are any further thoughts or concerns, and we'll be happy to reopen this issue.

@shockey shockey closed this as completed Mar 19, 2019
@lock lock bot locked and limited conversation to collaborators Mar 21, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants