Skip to content
This repository was archived by the owner on Feb 23, 2024. It is now read-only.

Commit 8a98c1b

Browse files
authored
Merge pull request #82 from miaojiang/Ready19
added new demo files
2 parents 6f124da + 784ee97 commit 8a98c1b

File tree

8 files changed

+809
-12
lines changed

8 files changed

+809
-12
lines changed

example/demo/Extracted/contosoapim-dev-apis-template.json

Lines changed: 587 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
3+
"contentVersion": "1.0.0.0",
4+
"parameters": {
5+
"ApimServiceName": {
6+
"type": "string"
7+
}
8+
},
9+
"resources": [
10+
{
11+
"name": "[concat(parameters('ApimServiceName'), '/versionset')]",
12+
"type": "Microsoft.ApiManagement/service/api-version-sets",
13+
"apiVersion": "2018-01-01",
14+
"properties": {
15+
"description": "a description",
16+
"versionQueryName": "versionQuery",
17+
"displayName": "myAPIVersionSet",
18+
"versioningScheme": "Query"
19+
}
20+
}
21+
]
22+
}

example/demo/Input/valid.yml

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,34 @@
11
version: 0.0.1 # Required
2-
apimServiceName: ContosoApim # Required, must match name of an apim service deployed in the specified resource group
2+
apimServiceName: contosoapim-dev # Required, must match name of an apim service deployed in the specified resource group
33
apiVersionSet: # Optional
4+
id: myVersionSetID
45
displayName: myAPIVersionSet
56
description: a description
67
versioningScheme: Query
78
versionQueryName: versionQuery
89
versionHeaderName: versionHeader
910
api:
1011
name: myAPI # Required
11-
openApiSpec: /Users/miaojiang/Work/APIM-Demo/DevOps-Demo/Input/swaggerPetstore.json # Required, can be url or local file
12+
openApiSpec: /Users/miaojiang/Work/azure-api-management-devops-example/example/demo/Input/swaggerPetstore.json # Required, can be url or local file
1213
#openApiSpec: https://petstore.swagger.io/v2/swagger.json
13-
policy: /Users/miaojiang/Work/APIM-Demo/DevOps-Demo/Input/apiPolicyHeaders.xml # Optional, can be url or local file
14+
policy: /Users/miaojiang/Work/azure-api-management-devops-example/example/demo/Input/apiPolicyHeaders.xml # Optional, can be url or local file
1415
suffix: myAPIPet # Required
1516
apiVersion: v1 # Optional
1617
apiVersionDescription: My first version # Optional
18+
apiVersionSetId: myVersionSetID
1719
revision: 1 # Optional
1820
revisionDescription: My first revision # Optional
1921
operations: # Optional
2022
addPet: # Must match the operationId property of a path's operations
21-
policy: /Users/miaojiang/Work/APIM-Demo/DevOps-Demo/Input/operationRateLimit.xml # Optional, can be url or local file
23+
policy: /Users/miaojiang/Work/azure-api-management-devops-example/example/demo/Input/operationRateLimit.xml # Optional, can be url or local file
2224
deletePet: # Must match the operationId property of a path's operations
23-
policy: /Users/miaojiang/Work/APIM-Demo/DevOps-Demo/Input/operationRateLimit.xml # Optional, can be url or local file
25+
policy: /Users/miaojiang/Work/azure-api-management-devops-example/example/demo/Input/operationRateLimit.xml # Optional, can be url or local file
2426
authenticationSettings: # Optional
2527
subscriptionKeyRequired: false
2628
#oAuth2:
2729
# authorizationServerId: apimgmtaad
2830
# scope: scope
2931
products: starter # Optional, adds api to the specified products
30-
outputLocation: /Users/miaojiang/Work/APIM-Demo/DevOps-Demo/Output/ # Required, folder the creator will write the templates to
32+
outputLocation: /Users/miaojiang/Work/azure-api-management-devops-example/example/demo/Output # Required, folder the creator will write the templates to
3133
linked: true # Optional
32-
linkedTemplatesBaseUrl : https://raw.githubusercontent.com/miaojiang/APIM-Demo/master/DevOps-Demo/Output/ # Required if 'linked' property is set to true
34+
linkedTemplatesBaseUrl : https://raw.githubusercontent.com/miaojiang/azure-api-management-devops-example/Ready19/example/demo/Output/ # Required if 'linked' property is set to true
Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,32 @@
1-
{"$schema":"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#","contentVersion":"1.0.0.0","parameters":{"ApimServiceName":{"type":"string"}},"resources":[{"properties":{"authenticationSettings":{"subscriptionKeyRequired":false},"apiRevision":"1","apiVersion":"v1","apiRevisionDescription":"My first revision","apiVersionDescription":"My first version","apiVersionSetId":"[resourceId('Microsoft.ApiManagement/service/api-version-sets', parameters('ApimServiceName'), 'versionset')]","displayName":"myAPI","path":"myAPIPet","protocols":["http"]},"name":"[concat(parameters('ApimServiceName'), '/myAPI')]","type":"Microsoft.ApiManagement/service/apis","apiVersion":"2018-01-01","dependsOn":[]}]}
1+
{
2+
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
3+
"contentVersion": "1.0.0.0",
4+
"parameters": {
5+
"ApimServiceName": {
6+
"type": "string"
7+
}
8+
},
9+
"resources": [
10+
{
11+
"properties": {
12+
"authenticationSettings": {
13+
"subscriptionKeyRequired": false
14+
},
15+
"apiRevision": "1",
16+
"apiVersion": "v1",
17+
"apiRevisionDescription": "My first revision",
18+
"apiVersionDescription": "My first version",
19+
"apiVersionSetId": "[resourceId('Microsoft.ApiManagement/service/api-version-sets', parameters('ApimServiceName'), 'myVersionSetID')]",
20+
"displayName": "myAPI",
21+
"path": "myAPIPet",
22+
"protocols": [
23+
"http"
24+
]
25+
},
26+
"name": "[concat(parameters('ApimServiceName'), '/myAPI')]",
27+
"type": "Microsoft.ApiManagement/service/apis",
28+
"apiVersion": "2018-01-01",
29+
"dependsOn": []
30+
}
31+
]
32+
}
Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,13 @@
1-
{"$schema":"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#","contentVersion":"1.0.0.0","parameters":{"ApimServiceName":{"value":"ContosoApim"},"LinkedTemplatesBaseUrl":{"value":"https://raw.githubusercontent.com/miaojiang/APIM-Demo/master/DevOps-Demo/Output/"}},"resources":[]}
1+
{
2+
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
3+
"contentVersion": "1.0.0.0",
4+
"parameters": {
5+
"ApimServiceName": {
6+
"value": "contosoapim-dev"
7+
},
8+
"LinkedTemplatesBaseUrl": {
9+
"value": "https://raw.githubusercontent.com/miaojiang/azure-api-management-devops-example/Ready19/example/demo/Output/"
10+
}
11+
},
12+
"resources": []
13+
}
Lines changed: 78 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,78 @@
1-
{"$schema":"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#","contentVersion":"1.0.0.0","parameters":{"ApimServiceName":{"type":"string","metadata":{"description":"Name of the API Management"}},"LinkedTemplatesBaseUrl":{"type":"string","metadata":{"description":"Base URL of the repository"}}},"resources":[{"properties":{"mode":"Incremental","templateLink":{"uri":"[concat(parameters('LinkedTemplatesBaseUrl'), '/versionset.template.json')]","contentVersion":"1.0.0.0"},"parameters":{"ApimServiceName":{"value":"[parameters('ApimServiceName')]"}}},"name":"versionSetTemplate","type":"Microsoft.Resources/deployments","apiVersion":"2018-01-01","dependsOn":[]},{"properties":{"mode":"Incremental","templateLink":{"uri":"[concat(parameters('LinkedTemplatesBaseUrl'), '/initialAPI.template.json')]","contentVersion":"1.0.0.0"},"parameters":{"ApimServiceName":{"value":"[parameters('ApimServiceName')]"}}},"name":"initialAPITemplate","type":"Microsoft.Resources/deployments","apiVersion":"2018-01-01","dependsOn":["[resourceId('Microsoft.Resources/deployments', 'versionSetTemplate')]"]},{"properties":{"mode":"Incremental","templateLink":{"uri":"[concat(parameters('LinkedTemplatesBaseUrl'), '/subsequentAPI.template.json')]","contentVersion":"1.0.0.0"},"parameters":{"ApimServiceName":{"value":"[parameters('ApimServiceName')]"}}},"name":"subsequentAPITemplate","type":"Microsoft.Resources/deployments","apiVersion":"2018-01-01","dependsOn":["[resourceId('Microsoft.Resources/deployments', 'initialAPITemplate')]"]}]}
1+
{
2+
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
3+
"contentVersion": "1.0.0.0",
4+
"parameters": {
5+
"ApimServiceName": {
6+
"type": "string",
7+
"metadata": {
8+
"description": "Name of the API Management"
9+
}
10+
},
11+
"LinkedTemplatesBaseUrl": {
12+
"type": "string",
13+
"metadata": {
14+
"description": "Base URL of the repository"
15+
}
16+
}
17+
},
18+
"resources": [
19+
{
20+
"properties": {
21+
"mode": "Incremental",
22+
"templateLink": {
23+
"uri": "[concat(parameters('LinkedTemplatesBaseUrl'), '/versionset.template.json')]",
24+
"contentVersion": "1.0.0.0"
25+
},
26+
"parameters": {
27+
"ApimServiceName": {
28+
"value": "[parameters('ApimServiceName')]"
29+
}
30+
}
31+
},
32+
"name": "versionSetTemplate",
33+
"type": "Microsoft.Resources/deployments",
34+
"apiVersion": "2018-01-01",
35+
"dependsOn": []
36+
},
37+
{
38+
"properties": {
39+
"mode": "Incremental",
40+
"templateLink": {
41+
"uri": "[concat(parameters('LinkedTemplatesBaseUrl'), '/initialAPI.template.json')]",
42+
"contentVersion": "1.0.0.0"
43+
},
44+
"parameters": {
45+
"ApimServiceName": {
46+
"value": "[parameters('ApimServiceName')]"
47+
}
48+
}
49+
},
50+
"name": "initialAPITemplate",
51+
"type": "Microsoft.Resources/deployments",
52+
"apiVersion": "2018-01-01",
53+
"dependsOn": [
54+
"[resourceId('Microsoft.Resources/deployments', 'versionSetTemplate')]"
55+
]
56+
},
57+
{
58+
"properties": {
59+
"mode": "Incremental",
60+
"templateLink": {
61+
"uri": "[concat(parameters('LinkedTemplatesBaseUrl'), '/subsequentAPI.template.json')]",
62+
"contentVersion": "1.0.0.0"
63+
},
64+
"parameters": {
65+
"ApimServiceName": {
66+
"value": "[parameters('ApimServiceName')]"
67+
}
68+
}
69+
},
70+
"name": "subsequentAPITemplate",
71+
"type": "Microsoft.Resources/deployments",
72+
"apiVersion": "2018-01-01",
73+
"dependsOn": [
74+
"[resourceId('Microsoft.Resources/deployments', 'initialAPITemplate')]"
75+
]
76+
}
77+
]
78+
}

0 commit comments

Comments
 (0)