Azure / api-management-developer-portal

Developer portal provided by the Azure API Management service.
MIT License
478 stars 306 forks source link

Order of operations in the API specification file vs Azure Developer Portal API reference #2367

Open hemchander23 opened 5 months ago

hemchander23 commented 5 months ago

Bug description

The operations listed in the Azure Developer Portal - API Reference view is in a different order compared to the one in the API specification file.

For instance: This is how it looks in Swagger Editor with the same ordering of operations as they are in the spec. file. However once it is uploaded, it seems to change to a different one. My guess is that it is now based on the operation summary?

How it is in the spec file How it is rendered in the Developer Portal
Screenshot 2024-01-15 at 15 40 45 Screenshot 2024-01-15 at 15 40 31

Reproduction steps

  1. Go to APIM, upload the API from a spec. file (for instance: https://[petstore.swagger.io/v2/swagger.json](https://petstore.swagger.io/v2/swagger.json))
  2. Publish the API in the Azure developer portal
  3. Go to the Developer Portal and open the API reference view
  4. See the operations in different order than mentioned in the spec file (sorted by a particular field in the API spec)

Expected behavior

Maintain the ordering as specified in the API spec. file.

Is your portal managed or self-hosted?

Managed

Release tag or commit SHA (if using self-hosted version)

N.A

API Management service name

N.A

Environment

Additional questions:

malincrist commented 5 months ago

Hello @hemchander23 , the order of the API's operations is ordered by name (which is the summary field from the spec ) and this is by design. We currently don't have in plan to change this.

davewilksatkeyavi commented 4 months ago

I'm having this same problem too and would really like to change the order without having to alphabetize the summaries of each endpoint. I can kind of see why this might have been the design, to group List, Create, Update resources, but in practicality, those verbs don't match up with the actual functionality of many endpoints. It looks messy.

flyinbutrs commented 4 months ago

Just adding another voice here... this is a terrible way to sort things. Especially since my preference is to display the URL paths by default rather than the summaries. The sort order in that case looks even more random.

IMO, if you're defaulting to URL paths being displayed instead of summaries, it should at least sort by URL path in that case.