An Azure service that provides a hybrid, multi-cloud management platform for APIs.
Hello Edwin !
Thank you for posting on MS Learn Q&A.
You can answer like this:
According to the current REST documentation for 2024-05-01, the List By Api operation still describes properties.document.components, properties.document.definitions and properties.document.value as part of the schema contract response. The sample response also shows document being returned. https://learn.microsoft.com/en-us/rest/api/apimanagement/api-schema/list-by-api?view=rest-apimanagement-2024-05-01
However, if the actual runtime response only returns:
"properties": {
"contentType": "application/vnd.oai.openapi.components+json"
}
then the newer API version is not returning the schema payload even though the contract suggests it should.
A practical workaround is to use the Get Api schema endpoint per schema after listing the schema IDs:
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/schemas/{schemaId}?api-version=2024-05-01
So the recommended pattern would be to call List By Api to get schema IDs/names and for each schema you need to call Get Api Schema and if Get also omits document in 2024-05-01 then this should be raised as a product bug with Azure support.