microsoft / vscode-apimanagement

VS Code extension for Azure API Management.
MIT License
59 stars 38 forks source link

API version query parameter is not specified or was specified incorrectly #346

Open rshetty-ws opened 4 months ago

rshetty-ws commented 4 months ago

Does this occur consistently? Repro steps:

1. 2.

Action: azureApiManagement.showServicePolicy 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.19044 Product: Visual Studio Code Product Version: 1.86.2 Language: en

Call Stack ``` ServicePolicyEditor. extension.bundle.js:16:392980 rejected extension.bundle.js:16:392126 ```
larspehrsson commented 3 months ago

For a quick fix you can edit this file, ~/.vscode/extensions/ms-azuretools.vscode-apimanagement-1.0.8/dist/extension.bundle.js replace the two "2019-12-01" with "2021-08-01" and it should work. Hopefully one day MS will change the correct line, https://github.com/microsoft/vscode-apimanagement/blob/6e590a25b7cb5961f2c2bfb4306f5b1eab915d0d/src/constants.ts#L33