Hi,
I'm trying to create an API by importing an OpenAPI yaml file, already validated with https://editor.swagger.io/ but I'm received the following errors:
Code: ValidationError
*Message: URL template is invalid*
*Target: value[8].urlTemplate (ValidationError) URL template is invalid*
*Code: ValidationError*
*Message: URL template is invalid*
*Target: value[9].urlTemplate (ValidationError) URL template is invalid*
*Code: ValidationError*
*Message: URL template is invalid*
*Target: value[10].urlTemplate (ValidationError) URL template is invalid*
*Code: ValidationError*
*Message: URL template is invalid*
*Target: value[11].urlTemplate (ValidationError) All template parameters used in the UriTemplate must be defined in the Operation 'Container_SetMetadata', and vice-versa.*
*Code: ValidationError*
*Message: All template parameters used in the UriTemplate must be defined in the Operation 'Container_SetMetadata', and vice-versa.*
*Target: value[11] (ValidationError) URL template is invalid*
It seems additional requirements are checked for other the ones required by OpenAPI standard. Please see the here attached OpenAPI file I'm using: blob_openapi.yaml.txt
This is the az cli command I've ran:
APIMServiceName="My_APIM_Resopurce"
ResourceGroupName="My_Resource_Group"
APIId="azure-blob-storage"
APIPath="blob"
SpecificationFormat="OpenApi"
SpecificationPath="blob_openapi.yaml"
az apim api import --path $APIPath --resource-group $ResourceGroupName --service-name $APIMServiceName --api-id $APIId --specification-format $SpecificationFormat --specification-path $SpecificationPath
Thanks
Antonio