Mandatory query parameters shown as template parameters when created from OpenAPI specification
See original GitHub issueBug description
Setting a required “Query” parameter in OpenAPI is getting set as “Template” parameter in Azure APIM.
Reproduction steps
- In the below OpenAPI sample,
id
has been marked as a required parameter in query : - On save of the OpenAPI spec, the mandatory query param is getting mapped to template param.
- The main issue is that if the end user doesn’t provide an
id
in this above example, they would get a 404 resource not found without any additional info instead of a 400 Bad Request.
Expected behavior
Mandatory query parameters in OpenAPI spec should be created as mandatory query parameters and not template parameters. This behavior is happening if the api is created manually using the “Add operation” (without from OpenAPI spec).
Is your portal managed or self-hosted?
Managed
Issue Analytics
- State:
- Created 2 years ago
- Comments:8 (3 by maintainers)
Top Results From Across the Web
Describing Parameters - Swagger
Query parameters can be primitive values, arrays and objects. OpenAPI 3.0 provides several ways to serialize objects and arrays in the query string....
Read more >Mandatory query parameters shown as template type #636
Setting a required "Query" parameter in OpenAPI is getting set as "Template" parameter. Detailed Info: In the below OpenAPI sample, id has been ......
Read more >APIM returning 404 when mandatory query parameter is not ...
It appears that when APIM imports an OpenAPI specification, it creates template parameters for any required query parameters (see ...
Read more >How to add query paramters to API definition in OpenAPI ...
With this video we will learn How to add query paramters to API definition in OpenAPI specification 3.0 (OAS) ?
Read more >Parameters and Payload of an Operation - GitHub Pages
OpenAPI provides two mechanisms to specify input data, parameters and request body (message payload). Parameters are typically used to identify a resource, ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@mikebudzynski
As far as I understood the bugfix should have been rolled out. But we still experience this issue in Azure Portal API Management. Please clarify if that bugfix really had effect on that issue.
@Kumar-Ashwin-Hubert, the fix will be included in the next API Management service release in June and we expect it to fully roll out in July. You can monitor this GitHub site for the release notes: https://aka.ms/apim/releases Apologies for the confusion.