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

Commit 6a7005d

Browse files
authored
Fix demo to test creator (#334)
* Fix demo to test creator * Fix error message casing typo
1 parent e92a60b commit 6a7005d

File tree

3 files changed

+17
-9
lines changed

3 files changed

+17
-9
lines changed

example/demo/Input/valid.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ apiVersionSet: # Optional
77
versioningScheme: Query
88
versionQueryName: versionQuery
99
versionHeaderName: versionHeader
10-
api:
10+
apis:
1111
- name: myAPI # Required
12-
openApiSpec: /Users/miaojiang/Work/azure-api-management-devops-example/example/demo/Input/swaggerPetstore.json # Required, can be url or local file
12+
openApiSpec: ./Input/swaggerPetstore.json # Required, can be url or local file
1313
#openApiSpec: https://petstore.swagger.io/v2/swagger.json
14-
policy: /Users/miaojiang/Work/azure-api-management-devops-example/example/demo/Input/apiPolicyHeaders.xml # Optional, can be url or local file
14+
policy: ./Input/apiPolicyHeaders.xml # Optional, can be url or local file
1515
suffix: myAPIPet # Required
1616
apiVersion: v1 # Optional
1717
apiVersionDescription: My first version # Optional
@@ -20,15 +20,15 @@ api:
2020
revisionDescription: My first revision # Optional
2121
operations: # Optional
2222
addPet: # Must match the operationId property of a path's operations
23-
policy: /Users/miaojiang/Work/azure-api-management-devops-example/example/demo/Input/operationRateLimit.xml # Optional, can be url or local file
23+
policy: ./Input/operationRateLimit.xml # Optional, can be url or local file
2424
deletePet: # Must match the operationId property of a path's operations
25-
policy: /Users/miaojiang/Work/azure-api-management-devops-example/example/demo/Input/operationRateLimit.xml # Optional, can be url or local file
25+
policy: ./Input/operationRateLimit.xml # Optional, can be url or local file
2626
authenticationSettings: # Optional
2727
subscriptionKeyRequired: false
2828
#oAuth2:
2929
# authorizationServerId: apimgmtaad
3030
# scope: scope
3131
products: starter # Optional, adds api to the specified products
32-
outputLocation: /Users/miaojiang/Work/azure-api-management-devops-example/example/demo/Output # Required, folder the creator will write the templates to
33-
linked: true # Optional
34-
linkedTemplatesBaseUrl : https://raw.githubusercontent.com/miaojiang/azure-api-management-devops-example/MVP/example/demo/Output # Required if 'linked' property is set to true
32+
outputLocation: ./Output # Required, folder the creator will write the templates to
33+
# linked: true # Optional
34+
# linkedTemplatesBaseUrl : https://raw.githubusercontent.com/miaojiang/azure-api-management-devops-example/MVP/example/demo/Output # Required if 'linked' property is set to true

example/demo/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Creator example
2+
3+
In order to run the creator on this example:
4+
5+
```bash
6+
mkdir Output
7+
dotnet run --project ../../src/APIM_ARMTemplate/apimtemplate create --configFile Input/valid.yml
8+
```

src/APIM_ARMTemplate/apimtemplate/Extractor/Models/ExtractorConfiguration.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public void Validate()
4343
if (string.IsNullOrEmpty(sourceApimName)) throw new ArgumentException("Missing parameter <sourceApimName>.");
4444
if (string.IsNullOrEmpty(destinationApimName)) throw new ArgumentException("Missing parameter <destinationApimName>.");
4545
if (string.IsNullOrEmpty(resourceGroup)) throw new ArgumentException("Missing parameter <resourceGroup>.");
46-
if (string.IsNullOrEmpty(fileFolder)) throw new ArgumentException("Missing parameter <filefolder>.");
46+
if (string.IsNullOrEmpty(fileFolder)) throw new ArgumentException("Missing parameter <fileFolder>.");
4747

4848
bool shouldSplitAPIs = splitAPIs != null && splitAPIs.Equals("true");
4949
bool hasVersionSetName = apiVersionSetName != null;

0 commit comments

Comments
 (0)