Azure / api-management-developer-portal

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

DevPortal - API Version dropdown mismatch between API in two different environments #2288

Closed christophmantsch3302 closed 6 months ago

christophmantsch3302 commented 1 year ago

Bug description

If you click on one specific API in the API gallery to see its operatios and usability, there is a dropdown menu for each API on the right side directly next to the API name. We have one API that is included in both environments with identical API settings. In one environment we can see a dropdown menu next to the API name with the String "Original", but in the other environment there is no dropdown menu at all shown despite of the identical API settings. In both environments the value of the API setting "Version Identifier" is empty. In the following pictures you will see that there is a dropdown menu for the API shwon in one environment, but no dropdown at all for the other environment.

API settings and dropdown visualization in environment 1:

image

image

API settings and dropdown visualization in environment 2:

image

image

  1. Why is there a dropdown menu for the API in environment 1 and no dropdown menu for the same API in environment 2 despite of exactly the same API settings?

  2. How does the String "Original" in the dropdown menu of environment 1 arises? Is this a default value that will be awarded in the dropdown menu if the variable "Version identifier" of the API version settings is Null/Empty? If yes: Why does the API in environment 2 not have a dropdown menu with the value "Original"?

  3. Why is the attribute Version Identifier no obligatory field by creating a new API?

  4. Is it possible to create an own default value (for example "1") if the value for Version Identifier is empty to guarantee uniformity in our portal?

Expected behavior

The goal is to visualize a dropdown menu next to the APIName that shows a list of all API versions with numbers (not with the String "Original"). The newest API version of one API should have the highest number. There must be the possibility to navigate between the different versions of one API by using this dropdown menu.

Is your portal managed or self-hosted?

Managed

malincrist commented 1 year ago

Hello @christophmantsch3302 ,

  1. It looks to be related to this issue #2287 (which was fixed and will be shipped with the next release). This would mean that you have more than 100 APIs in environment 2 and the request to GET the versions is not returning the selected API with version "Original". Could you please check if this is the case? If not, could you please share the instance name to apimportalfeedback@microsoft.com to investigate it further?
  2. yes, the string "Original" is the default, in case there is no Version identifier (as you can see here: https://github.com/Azure/api-management-developer-portal/blob/7d46bedb0ba96c35f22c4e99491e0119379cc96e/src/components/apis/details-of-api/ko/runtime/api-details.ts#L86C4-L86C74)
  3. It is not mandatory as versioning an API is not mandatory. You can create an API and decide to version it only later. And when you create a first version over an existing API, the API up until that point is considered "Original", and doesn't have any version identifier initially (as we cannot predict the versioning scheme that customers will choose)
  4. If you navigate to the "Original" API in Azure portal, you can edit the version identifier to match your portal versioning scheme. image


Also, when you create a new API, you have the option to create it already versioned, meaning that the initial version will be whatever you specify in the Version Identifier field (instead of the "Original"):

image
mrcarlosdev commented 6 months ago

This issue is related to managed developer portal. We advise you to create a Azure support request to get assistance on this issue. Please refer to the below link to create a new Azure support request, Please select Problem Type = "Developer Portal" in the request to route it appropriately.

https://learn.microsoft.com/en-us/azure/azure-portal/supportability/how-to-create-azure-support-request