vscode-apimanagement icon indicating copy to clipboard operation
vscode-apimanagement copied to clipboard

Can't use extension when minimum api version is enforced

Open JamesOaDatacom opened this issue 2 years ago • 4 comments

Does this occur consistently? Yes

  1. Create an APIM instance in the portal - but default, under Managment API blade, on the Managment API settings tab, "Enforce minimum API version" is false. At this point the extension is working correctly (can edit policy etc)
  2. Set "Enforce minimum API version" = true (wait for Apim to update ...)
  3. Retest - expect you to see the issue.

image

Action: azureApiManagement.showApiPolicy Error type: Error Error Message: API version query parameter is not specified or was specified incorrectly. Supported versions: 2021-08-01,2021-12-01-preview,2022-04-01-preview,2022-08-01,2022-09-01-preview,2023-03-01-preview,2023-05-01-preview,2023-09-01-preview Example query param format: api-version=SupportedVersion

Version: 1.0.8 OS: win32 OS Release: 10.0.22631 Product: Visual Studio Code Product Version: 1.85.1 Language: en

Call Stack
ApiPolicyEditor.<anonymous> extension.bundle.js:16:392980
rejected extension.bundle.js:16:392126

JamesOaDatacom avatar Dec 17 '23 22:12 JamesOaDatacom

It seems like the extension is using the old version of the management API.

verschaevesiebe avatar Jan 10 '24 16:01 verschaevesiebe

I got the same issue (originally reported it in #345 before I saw this issue) and after lots of struggle getting the source code up and running locally I realize that this project is so old and not updated so it uses old @azure/arm-apimanagement package that simply doesn't support higher versions than 2019-12-01 (that's hardcoded in the @azure/[email protected] which is in use). In addition to the hardcoding there, it's also hardcoded in the sources of this project as well.

So both needs to be fixed, but since 6.0.0 and to current version of the @azure/arm-apimanagement package there is a lot of breaking changes that needs to be dealt with, so it is a bigger job to fix than just simply change the apimApiVersion in constants.ts since dependencies needs to be updated.

So, simply put: This plugin does NOT until it is fixed support API Management Services that is configured using the recommended best practices.

dozer75 avatar Feb 22 '24 21:02 dozer75

+1 same issue for us.

gourmetsicilian avatar Apr 03 '24 06:04 gourmetsicilian

Hitting the same issue on three of our four APIMs.

Seeing "Error: API version query parameter is not specified or was specified incorrectly. Supported versions: 2021-08-01,2021-12-01-preview,2022-04-01-preview,2022-08-01,2022-09-01-preview,2023-03-01-preview,2023-05-01-preview,2023-05-01-preview,2023-09-01-preview,2024-06-01-preview. Example query param format: api-version=SupportedVersion.

mmpayi avatar Aug 20 '24 22:08 mmpayi