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

Cannot view APIs in the extension in Visual Studio Code. #345

Closed
dozer75 opened this issue Feb 21, 2024 · 2 comments
Closed

Cannot view APIs in the extension in Visual Studio Code. #345

dozer75 opened this issue Feb 21, 2024 · 2 comments

Comments

@dozer75
Copy link

dozer75 commented Feb 21, 2024

Does this occur consistently? Yes
Repro steps:

  1. Installed a API Management using the following Bicep script:
param name string

param appiId string
param appiConnectionString string
param appiName string
param hostname string
param managedIdentityId string
param publisherEmail string
param publisherName string
param sslCert string
param sslClientId string
param sslKeyVault string

resource apim 'Microsoft.ApiManagement/service@2022-08-01' = {
  name: name
  location: 'westeurope'
  sku: {
    name: 'Developer'
    capacity: 1
  }
  identity: {
    type: 'SystemAssigned, UserAssigned'
    userAssignedIdentities: {
      '${managedIdentityId}': {}
    }
  }
  properties: {
    apiVersionConstraint: {
      minApiVersion: '2021-08-01'
    }
    virtualNetworkType: 'None'
    publisherEmail: publisherEmail
    publisherName: publisherName
    publicNetworkAccess: 'Disabled'
    hostnameConfigurations: [
      {
        certificateSource: 'KeyVault'
        hostName: hostname
        identityClientId: sslClientId
        keyVaultId: 'https://${sslKeyVault}${az.environment().suffixes.keyvaultDns}/secrets/${sslCert}'
        type: 'Proxy'
      }
    ]
    customProperties: {
      'Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2': 'True'
    }
  }

  resource appiLogger 'loggers' = {
    name: appiName
    properties: {
      loggerType: 'applicationInsights'
      description: 'Default logging to Application Insights.'
      resourceId: appiId
      credentials: {
        connectionString: appiConnectionString
      }
    }
  }
}
  1. In the Azure API Management extension, expand the APIs section of the created API Managment Service and the following error occurs.
Action: azureApiManagement.addApiFilter
Error type: MissingOrIncorrectVersionParameter
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: linux
OS Release: 5.15.133.1-microsoft-standard-WSL2
Product: Visual Studio Code
Product Version: 1.86.2
Language: en

Call Stack
new RestError extension.bundle.js:16:65674
extension.bundle.js:16:329000
@dozer75
Copy link
Author

dozer75 commented Feb 21, 2024

Found that the extension uses export APIM version 2019-12-01 (constants.ts) which isn't supported if you upgrade the version of your API management according to recommendations from API management installation. This needs to be updated or be configurable.

@dozer75
Copy link
Author

dozer75 commented Feb 22, 2024

Found that #343 is the same issue, closing this.

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