Azure / api-management-developer-portal

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

Developer Portal: response schema for built-in types shows incorrect, autogenerated name #2342

Closed nweseloh closed 3 months ago

nweseloh commented 7 months ago

Bug description

A clear and concise description of the bug.

Reproduction steps

  1. import an OpenAPI operation like this (abbreviated):
paths:
/countries:
    get:
      responses:
        '200':
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Country'

components:
  schemas:
    Country:
      type: object
      properties:
        code:
          type: string
  1. select the operation in the developer portal
  2. see that the response type has a weird auto-generated name "CountriesGet200ApplicationJsonResponse": image

This happens for all response types that are built-in OpenAPI types, e.g.:

Expected behavior

The response type should be "Country[]", similar to an operation that returns a single custom schema object.

Is your portal managed or self-hosted?

Managed

malincrist commented 7 months ago

Hello @nweseloh , this issue doesn't seem to be specific to developer portal. Please contact Azure support for assistance.

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