Azure / Azure/azure-cli

`az apim import` does not set the description

Open
#20,812 5 comments 0 reactions 0 assignees View on GitHub
act-observability-squad API Management customer-reported question Service Attention
Dominant language
Python
Stars
4.6k
Forks
3.5k
Avg merge
3d 2h
Merged PRs (30d)
60

Description

### `az apim import` does not set the description

**Describe the bug**
Setting the Description property of an API in APIM does not work via Azure CLI.

**To Reproduce**
```bash
az apim api import -g MyRG -n my-apim `
--specification-format OpenApiJson `
--specification-url https://myservice.azurewebsites.net/api/specification.json `
--display-name 'My Service' `
--description 'Test description' `
--api-id MyService `
--api-type http `
--protocols https `
--service-url https://myservice.azurewebsites.net `
--subscription-required true `
--subscription-key-header-name my-key `
--subscription-key-query-param-name my-key `
--path '/myservice'
```

**Expected behavior**
The Description property of the API should be set.

**Environment summary**
```
 az --version
azure-cli 2.31.0

core 2.31.0
telemetry 1.0.6

Python location 'C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\python.exe'
Extensions directory 'C:\Users\mattg\.azure\cliextensions'

Python (Windows) 3.8.9 (tags/v3.8.9:a743f81, Apr 6 2021, 13:22:56) [MSC v.1928 32 bit (Intel)]

Legal docs and information: aka.ms/AzureCliLegal
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.