How can we improve Azure API Management?

ARM API Management: Create versioned API with swagger

Hi, If create a new api NOT providing information regarding a swagger file , the API is correctly created as versioned.
If, in the arm below, I remove serviceUrl and add contentFormat and contentValue
the API is not created as versioned.

If I create the API without swagger (so it's created as versioned) and then I rerun the arm template providing the swagger the api remain versioned and the swagger is updated.

{
"$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"location": {
"type": "string",
"defaultValue": "[resourceGroup().location]",
"metadata": {
"description": "Location for all resources."
}
}
},
"variables": {
"apiManagementServiceName": "xxxx"
},
"resources": [
{
"name": "[concat('xxxx', '/', 'PetStoreVersionSet')]",
"type": "Microsoft.ApiManagement/service/api-version-sets",
"apiVersion": "2017-03-01",
"properties": {
"displayName": "PetStore Name",
"description": "PetStore Description",
"versioningScheme": "Segment"
}
},
{
"dependsOn": [
"[resourceId('Microsoft.ApiManagement/service/api-version-sets', 'xxxx', 'PetStoreVersionSet')]"
],
"apiVersion": "2017-03-01",
"type": "Microsoft.ApiManagement/service/apis",
"name": "xxxx/PetStoreSwaggerImportExample",
"properties": {
"displayName": "name",
"apiRevision": "1",
"description": "description",
"serviceUrl": "https://www.google.com",
//"contentFormat": "swagger-link-json",
//"contentValue": "http://petstore.swagger.io/v2/swagger.json",
"path": "petstore",
"protocols": [
"https"
],
"isCurrent": true,
"apiVersion": "v1",
"apiVersionName": "v1 Name",
"apiVersionDescription": "apiVersionDescription",
"apiVersionSetId": "[concat('/','api-version-sets', '/', 'PetStoreVersionSet')]"
}
}
]
}

26 votes
Vote
Sign in
(thinking…)
Sign in with: Microsoft
Signed in as (Sign out)
You have left! (?) (thinking…)
enrico sabbadin shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

1 comment

Sign in
(thinking…)
Sign in with: Microsoft
Signed in as (Sign out)
Submitting...
  • Robert de Veen commented  ·   ·  Flag as inappropriate

    Would be a great idea. Two OpenAPI definitions files, with two version of the API should be created with one versionset in API Management. Can't do this right now.

Feedback and Knowledge Base