Azure / Azure/api-management-developer-portal
Query parameter examples still not supported
- Dominant language
- TypeScript
- Stars
- 545
- Forks
- 360
- PR merge metrics
- No merged PRs in 30d
Description
## 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:
```json
"parameters": [{
"name": "page",
"in": "query",
"description": "Format - int32. The pagee number.",
"schema": {
"type": "integer",
"format": "int32",
"example": 2
}
}]
```
or this:
```json
"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:

Looks to be solved with, but doesn't show:
https://github.com/Azure/api-management-developer-portal/issues/610
https://github.com/Azure/api-management-developer-portal/issues/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](https://github.com/Azure/api-management-developer-portal/releases/tag/2.26.0)
## Environment
- Operating system: Windows
- Browser: Edge
- Version: Latest
Contributor guide
No contributing guide indexed for this repository
Research direction
Reproduce the issue in the self-hosted developer portal at release 2.26.0 using the OpenAPI query-parameter examples shown in the report. Start by tracing how the operation main page and Try-it window render query parameters; done means schema-level and parameter-level examples display in one or both expected locations.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure, openapi, typescript
- Domain
- api, frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100