Azure / api-management-developer-portal

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

Developer Portal cannot handle large (BigInt / 19-digit) integers in json schema #2303

Closed hansolo-coder closed 3 months ago

hansolo-coder commented 9 months ago

Every bug report should have precise description and reproduction steps; console traces or source code references are appreciated.

For assistance requests, contact Azure support or submit a post on Stack Overflow. We don't provide support through GitHub Issues. Feature requests can be raised on the Azure Feedback Forum.

Bug description

We are creating an API in API Management using an OpenAPI v3 json document The OpenAPI contains a schema including this:

"Int64MaxValue": {
    "type": "integer",
    "minimum": 0,
    "maximum": 9223372036854775807
}

When viewing this in the Developer Portal OR downloading the OpenAPI again from the developer Portal, the definition has changed

"Int64MaxValue": {
    "maximum": 9223372036854776000,
    "minimum": 0,
    "type": "integer"
}

If we try to download the OpenAPI yaml version, it looks like:

Int64MaxValue:
  maximum: 9223372036854775800
  minimum: 0.0
  type: integer

The "maximum" numbers above are both different from the one imported. It looks like it cannot handle 64-bit integers in the schema definition

Reproduction steps

  1. Import OpenAPI spec into API Management
  2. Open Developer Portal
  3. Select the API "Demo BigInt Issue"
  4. Scroll down to definition of "InfoExchange"
  5. Click on the "Raw Schema View" instead of "Table View"
  6. The wrong maximum-value is shown.

Expected behavior

We expect the schema definition shown in the Developer Portal as well as exported from the Portal as OpenAPI, to have the same schemadefinition as we imported.

Is your portal managed or self-hosted?

Managed

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

API Management service name

It is developed for private customer. I will be happy to share the service name privately.

Environment

Additional context

Add any other context about the problem here, including screenshots. APIM_DemoBigintIssue_Issue APIM_DemoBigintIssue_OpenAPI.json.txt

hansolo-coder commented 9 months ago

Transfered to MS support case 2310110050003623

hansolo-coder commented 8 months ago

After first blaming it on javascript, latest update from MS support is:

_I can confirm that this is a known issue and it is currently a limitation in the way APIM imports some of the definitions. The only limitation of this issue is the way it is represented on the developer portal.

However, the workaround is to create a definition and put a sample to display on the developer portal according to the one you will like to display_

No mentioning of a plan to fix it.

hansolo-coder commented 7 months ago

Final response from Microsoft support, is that this occurs because of the javascript library used during import of the OpenAPI, and they deem it too risky to try to solve this issue.

mrcarlosdev commented 3 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