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

Commit 494827f

Browse files
committed
add all creator classes to new namespace
1 parent 748ca54 commit 494827f

File tree

15 files changed

+43
-85
lines changed

15 files changed

+43
-85
lines changed

src/APIM_ARMTemplate/apimtemplate.test/Creator/FileHandlerTests/FileWriterTests.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
using Xunit;
33
using Newtonsoft.Json.Linq;
44
using System;
5+
using Microsoft.Azure.Management.ApiManagement.ArmTemplates.Creator;
56

67
namespace Microsoft.Azure.Management.ApiManagement.ArmTemplates
78
{

src/APIM_ARMTemplate/apimtemplate/Commands/Create.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
using McMaster.Extensions.CommandLineUtils;
22
using Colors.Net;
33
using System;
4-
using System.Collections.Generic;
4+
using Microsoft.Azure.Management.ApiManagement.ArmTemplates.Creator;
55

66
namespace Microsoft.Azure.Management.ApiManagement.ArmTemplates
77
{
Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,31 @@
1-
version: 0.0.1
2-
apimServiceName: testapimlucas
3-
apiVersionSet:
1+
version: 0.0.1 # Required
2+
apimServiceName: testapimlucas # Required, must match name of an apim service deployed in the specified resource group
3+
apiVersionSet: # Optional
44
displayName: myAPIVersionSet
55
description: a description
66
versioningScheme: Query
77
versionQueryName: versionQuery
88
versionHeaderName: versionHeader
99
api:
10-
name: myAPI
11-
openApiSpec: C:\Users\lucashh\Desktop\Projects\APIM-ARM\azure-api-management-devops-example\src\APIM_ARMTemplate\apimtemplate\Creator\ExampleFiles\OpenApiSpecs\swaggerPetstore.json
12-
policy: C:\Users\lucashh\Desktop\Projects\APIM-ARM\azure-api-management-devops-example\src\APIM_ARMTemplate\apimtemplate\Creator\ExampleFiles\XMLPolicies\apiPolicyHeaders.xml
13-
suffix: conf
14-
apiVersion: v1
15-
apiVersionDescription: My first version
16-
revision: 1
17-
revisionDescription: My first revision
18-
operations:
19-
addPet:
20-
policy: C:\Users\lucashh\Desktop\Projects\APIM-ARM\azure-api-management-devops-example\src\APIM_ARMTemplate\apimtemplate\Creator\ExampleFiles\XMLPolicies\operationRateLimit.xml
21-
deletePet:
22-
policy: C:\Users\lucashh\Desktop\Projects\APIM-ARM\azure-api-management-devops-example\src\APIM_ARMTemplate\apimtemplate\Creator\ExampleFiles\XMLPolicies\operationRateLimit.xml
23-
authenticationSettings:
10+
name: myAPI # Required
11+
openApiSpec: C:\Users\lucashh\Desktop\Projects\APIM-ARM\azure-api-management-devops-example\src\APIM_ARMTemplate\apimtemplate\Creator\ExampleFiles\OpenApiSpecs\swaggerPetstore.json # Required, can be url or local file
12+
policy: C:\Users\lucashh\Desktop\Projects\APIM-ARM\azure-api-management-devops-example\src\APIM_ARMTemplate\apimtemplate\Creator\ExampleFiles\XMLPolicies\apiPolicyHeaders.xml # Optional, can be url or local file
13+
suffix: conf # Required
14+
apiVersion: v1 # Optional
15+
apiVersionDescription: My first version # Optional
16+
revision: 1 # Optional
17+
revisionDescription: My first revision # Optional
18+
operations: # Optional
19+
addPet: # Must match the operationId property of a path's operations
20+
policy: C:\Users\lucashh\Desktop\Projects\APIM-ARM\azure-api-management-devops-example\src\APIM_ARMTemplate\apimtemplate\Creator\ExampleFiles\XMLPolicies\operationRateLimit.xml # Optional, can be url or local file
21+
deletePet: # Must match the operationId property of a path's operations
22+
policy: C:\Users\lucashh\Desktop\Projects\APIM-ARM\azure-api-management-devops-example\src\APIM_ARMTemplate\apimtemplate\Creator\ExampleFiles\XMLPolicies\operationRateLimit.xml # Optional, can be url or local file
23+
authenticationSettings: # Optional
2424
subscriptionKeyRequired: false
2525
oAuth2:
2626
authorizationServerId: serverId
2727
scope: scope
28-
products: starter, platinum
29-
outputLocation: C:\Users\lucashh\Desktop\Projects\APIM-ARM\GeneratedTemplates
30-
linked: false
31-
linkedTemplatesBaseUrl : https://lucasyamlblob.blob.core.windows.net/yaml
28+
products: starter, platinum # Optional, adds api to the specified products
29+
outputLocation: C:\Users\lucashh\Desktop\Projects\APIM-ARM\GeneratedTemplates # Required, folder the creator will write the templates to
30+
linked: true # Optional
31+
linkedTemplatesBaseUrl : https://lucasyamlblob.blob.core.windows.net/yaml # Required if 'linked' property is set to true

src/APIM_ARMTemplate/apimtemplate/Creator/FileHandlers/FileReader.cs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,11 @@
11
using Newtonsoft.Json;
2-
using Newtonsoft.Json.Linq;
32
using System;
4-
using System.Collections.Generic;
53
using System.IO;
6-
using System.Linq;
74
using System.Net.Http;
85
using System.Threading.Tasks;
9-
using YamlDotNet.RepresentationModel;
106
using YamlDotNet.Serialization;
117

12-
namespace Microsoft.Azure.Management.ApiManagement.ArmTemplates
8+
namespace Microsoft.Azure.Management.ApiManagement.ArmTemplates.Creator
139
{
1410
public class FileReader
1511
{

src/APIM_ARMTemplate/apimtemplate/Creator/FileHandlers/FileWriter.cs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
using Newtonsoft.Json;
2-
using Newtonsoft.Json.Linq;
32
using System.IO;
4-
using System.Collections.Generic;
5-
using System;
63

7-
namespace Microsoft.Azure.Management.ApiManagement.ArmTemplates
4+
namespace Microsoft.Azure.Management.ApiManagement.ArmTemplates.Creator
85
{
96
public class FileWriter
107
{

src/APIM_ARMTemplate/apimtemplate/Creator/FileHandlers/OpenAPISpecReader.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,11 @@
33
using Newtonsoft.Json;
44
using Newtonsoft.Json.Linq;
55
using System;
6-
using System.Collections.Generic;
76
using System.IO;
87
using System.Net.Http;
9-
using System.Text;
108
using System.Threading.Tasks;
119

12-
namespace Microsoft.Azure.Management.ApiManagement.ArmTemplates
10+
namespace Microsoft.Azure.Management.ApiManagement.ArmTemplates.Creator
1311
{
1412
public class OpenAPISpecReader
1513
{

src/APIM_ARMTemplate/apimtemplate/Creator/Models/CreatorConfiguration.cs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
1-
using System;
2-
using System.Collections.Generic;
3-
using System.Text;
1+
using System.Collections.Generic;
42

5-
namespace Microsoft.Azure.Management.ApiManagement.ArmTemplates
3+
namespace Microsoft.Azure.Management.ApiManagement.ArmTemplates.Creator
64
{
75
public class CLICreatorArguments
86
{

src/APIM_ARMTemplate/apimtemplate/Creator/Models/CreatorFileNames.cs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
1-
using System;
2-
using System.Collections.Generic;
3-
using System.Text;
4-
5-
namespace Microsoft.Azure.Management.ApiManagement.ArmTemplates
1+

2+
namespace Microsoft.Azure.Management.ApiManagement.ArmTemplates.Creator
63
{
74
public class CreatorFileNames
85
{

src/APIM_ARMTemplate/apimtemplate/Creator/TemplateCreators/APITemplateCreator.cs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
1-
using System.IO;
2-
using System.Collections.Generic;
3-
using System.Net.Http;
1+
using System.Collections.Generic;
42
using System.Threading.Tasks;
5-
using System.Linq;
63
using Newtonsoft.Json;
74
using Microsoft.OpenApi.Models;
85

9-
namespace Microsoft.Azure.Management.ApiManagement.ArmTemplates
6+
namespace Microsoft.Azure.Management.ApiManagement.ArmTemplates.Creator
107
{
118
public class APITemplateCreator
129
{

src/APIM_ARMTemplate/apimtemplate/Creator/TemplateCreators/APIVersionSetTemplateCreator.cs

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,6 @@
1-
using System.IO;
2-
using System.Collections.Generic;
3-
using System.Net.Http;
4-
using System.Threading.Tasks;
5-
using System.Linq;
6-
using Newtonsoft.Json;
1+
using System.Collections.Generic;
72

8-
namespace Microsoft.Azure.Management.ApiManagement.ArmTemplates
3+
namespace Microsoft.Azure.Management.ApiManagement.ArmTemplates.Creator
94
{
105
public class APIVersionSetTemplateCreator
116
{

0 commit comments

Comments
 (0)