Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Query parameter examples still not supported #2470

Open
erwinkramer opened this issue Apr 22, 2024 · 0 comments
Open

Query parameter examples still not supported #2470

erwinkramer opened this issue Apr 22, 2024 · 0 comments

Comments

@erwinkramer
Copy link

erwinkramer commented Apr 22, 2024

Bug description

Query parameter examples are not displayed in the developer portal.

Reproduction steps

Go into an already imported API and edit the API in the Azure Portal with the OpenAPI specification (Json) editor. Create a query parameter that looks like this:

 "parameters": [{
        "name": "page",
        "in": "query",
        "description": "Format - int32. The pagee number.",
        "schema": {
            "type": "integer",
            "format": "int32",
            "example": 2
        }
    }]

or this:

 "parameters": [{
        "name": "page",
        "in": "query",
        "description": "Format - int32. The pagee number.",
        "schema": {
            "type": "integer",
            "format": "int32"
        },
       "example": 2
    }]

....or a variant with an examples array with one or two examples.

Not a single variant will actually display the example. I've only seen this working for HTTP POST examples on the body element.

In any case, if you export the definition on the API Management dev portal, it actually has the example(s) element with the right example values, so it stores and passes through just fine. Only thing left is for the dev portal to support this visually.

As a side note: On the Azure Portal, examples don't show up anywhere, there doesn't seem to be any view (apart from OpenAPI specification yaml/json view) that supports examples, only default values under the values column, this is fine, because with HTTP POST examples on the body element, it doesn't display on the Azure portal either, but it works in the API Management dev portal, so that shouldn't be an excuse:
image

Looks to be solved with, but doesn't show:
#610
#582

Expected behavior

Show the example on the dev portal operation main page, or in the dev portal try-it window, both won't show it.

Is your portal managed or self-hosted?

Self-hosted

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

2.26.0

Environment

  • Operating system: Windows
  • Browser: Edge
  • Version: Latest
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant