Azure / Azure/azure-cli

Create OpenAPI v2/v3 and OpenAPI v1 schemas in API Management

Open
#29,714 1 comment 0 reactions 0 assignees View on GitHub
act-observability-squad API Management Auto-Assign customer-reported Service Attention
Dominant language
Python
Stars
4.6k
Forks
3.5k
Avg merge
3d 2h
Merged PRs (30d)
60

Description

**Related command**
az apim api schema create

**Is your feature request related to a problem? Please describe.**
the CLI does not support creation of API Management schema types OpenAPI v2/v3 or OpenAPI v1, although the SDK does support it

**Describe the solution you'd like**
Add ability to pass in "components" and "definitions" through the CLI to the SDK. Currently only "value" is passed through:

https://github.com/Azure/azure-cli/blob/a7c0f5f2993491281a3cafcb0d3c539f106fd998/src/azure-cli/azure/cli/command_modules/apim/custom.py#L231

https://github.com/Azure/azure-sdk-for-python/blob/0572be4d9f7f4c980b9098c9899245a9d5492649/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/_models_py3.py#L18011

The API Management supports three types of schemas: OpenAPI v2/v3, OpenAPI v1, and non-OpenAPI schemas
https://learn.microsoft.com/en-us/azure/templates/microsoft.apimanagement/service/apis/schemas?pivots=deployment-language-arm-template#schemadocumentproperties

**Describe alternatives you've considered**

**Additional context**

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.