For a project I'm working on, I need to define an entire Azure APIM in Bicep. Now I want to define the request/response definitions for the developer portal, see the attached screenhot.
I've tried looking through the Azure documentation but found nothing to define these using Bicep. I have also tried exporting the APIM to ARM JSON, converting it to Bicep using az bicep decompile --file template.json
, and reverse-engineering the definitions but the contents of the field Schema
aren't included in the export output.
Does anyone know how to define the definitions in Bicep?
CodePudding user response:
First define an schema sub-resource as defined here: https://learn.microsoft.com/en-us/azure/templates/microsoft.apimanagement/service/apis/schemas then use the schema’s resourceID in operations’ schemaId property.