Azure / api-management-developer-portal

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

Developer Portal: OAS Schema property limitations not visible #2488

Closed Malakatta closed 2 months ago

Malakatta commented 4 months ago

Bug description

OAS Schema for properties supports minimum and maximum for property lengths (https://swagger.io/specification/#:~:text=%3A%20100%2C-,%22maximum%22%3A%20600,-%7D ) , those are not visible at all in the developer portal.

Reproduction steps

  1. Create a swagger.json with properties including the minimum and maximum values for the properties, in example:

    ...
        "properties": {
          "id": {
            "type": "string",
            "description": "Invoice id",
            "format": "uuid",
            "example": "00000000-0000-0000-0000-000000000000",
            "x-faker": "random.uuid"
          },
          "rowVersion": {
            "type": "string",
            "description": "Version",
            "format": "byte",
            "nullable": true,
            "example": "ABCDEFG==",
            "x-faker": "random.number"
          },
          "organizationNumber": {
            "maximum": 2147483647,
            "minimum": 0,
            "type": "integer",
            "description": "##### customer number",
            "format": "int32",
            "example": 1234567
          },
          "number": {
            "maximum": 2147483647,
            "minimum": 0,
            "type": "integer",
            "description": "Invoice number.",
            "format": "int32",
            "example": 444333
          },
    ...
  2. Import the the swagger.json as new API

  3. Check the table view of the new properties image

Expected behavior

The limitations of different properties for client's is quite important and should be shown in the developer portal.

Is your portal managed or self-hosted?

Managed

Additional notes

Also noticed that the table view does not show example values in all table's even the option to show the example is enabled

sthirthala commented 2 months ago

For managed portal, I request you to please create Azure support ticket.

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