Skip to content

Commit b2030c3

Browse files
authored
Merge pull request #1260 from aws/normj/annotations-move-namespace
Breaking Change: Move all APIGateway attributes to a their own namespace
2 parents e78caae + df57c94 commit b2030c3

27 files changed

+59
-41
lines changed

Libraries/src/Amazon.Lambda.Annotations.SourceGenerator/Models/Attributes/AttributeModelBuilder.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
using System;
2+
using Amazon.Lambda.Annotations.APIGateway;
23
using Microsoft.CodeAnalysis;
34

45
namespace Amazon.Lambda.Annotations.SourceGenerator.Models.Attributes

Libraries/src/Amazon.Lambda.Annotations.SourceGenerator/Models/Attributes/FromHeaderAttributeBuilder.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
using Amazon.Lambda.Annotations.APIGateway;
12
using Microsoft.CodeAnalysis;
23

34
namespace Amazon.Lambda.Annotations.SourceGenerator.Models.Attributes

Libraries/src/Amazon.Lambda.Annotations.SourceGenerator/Models/Attributes/FromQueryAttributeBuilder.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
using Amazon.Lambda.Annotations.APIGateway;
12
using Microsoft.CodeAnalysis;
23

34
namespace Amazon.Lambda.Annotations.SourceGenerator.Models.Attributes

Libraries/src/Amazon.Lambda.Annotations.SourceGenerator/Models/Attributes/FromRouteAttributeBuilder.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
using Amazon.Lambda.Annotations.APIGateway;
12
using Microsoft.CodeAnalysis;
23

34
namespace Amazon.Lambda.Annotations.SourceGenerator.Models.Attributes

Libraries/src/Amazon.Lambda.Annotations.SourceGenerator/Models/Attributes/HttpApiAttributeBuilder.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
using System;
22
using System.Linq;
3+
using Amazon.Lambda.Annotations.APIGateway;
34
using Microsoft.CodeAnalysis;
45

56
namespace Amazon.Lambda.Annotations.SourceGenerator.Models.Attributes

Libraries/src/Amazon.Lambda.Annotations.SourceGenerator/Models/Attributes/RestApiAttributeBuilder.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
using System;
2+
using Amazon.Lambda.Annotations.APIGateway;
23
using Microsoft.CodeAnalysis;
34

45
namespace Amazon.Lambda.Annotations.SourceGenerator.Models.Attributes

Libraries/src/Amazon.Lambda.Annotations.SourceGenerator/Models/Attributes/TemplateParametersExtension.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
using Amazon.Lambda.Annotations.APIGateway;
12
using System;
23
using System.Collections.Generic;
34
using System.Linq;

Libraries/src/Amazon.Lambda.Annotations.SourceGenerator/Models/GeneratedMethodModelBuilder.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
using System;
22
using System.Collections.Generic;
33
using System.Linq;
4-
using Amazon.Lambda.Annotations;
4+
using Amazon.Lambda.Annotations.APIGateway;
55
using Amazon.Lambda.Annotations.SourceGenerator.Extensions;
66
using Microsoft.CodeAnalysis;
77

Libraries/src/Amazon.Lambda.Annotations.SourceGenerator/Templates/LambdaFunctionTemplate.cs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -264,8 +264,8 @@ public virtual string TransformText()
264264

265265
return p.Name;
266266
}));
267-
var restApiAttribute = _model.LambdaMethod.Attributes.FirstOrDefault(att => att.Type.FullName == TypeFullNames.RestApiAttribute) as AttributeModel<RestApiAttribute>;
268-
var httpApiAttribute = _model.LambdaMethod.Attributes.FirstOrDefault(att => att.Type.FullName == TypeFullNames.HttpApiAttribute) as AttributeModel<HttpApiAttribute>;
267+
var restApiAttribute = _model.LambdaMethod.Attributes.FirstOrDefault(att => att.Type.FullName == TypeFullNames.RestApiAttribute) as AttributeModel<Amazon.Lambda.Annotations.APIGateway.RestApiAttribute>;
268+
var httpApiAttribute = _model.LambdaMethod.Attributes.FirstOrDefault(att => att.Type.FullName == TypeFullNames.HttpApiAttribute) as AttributeModel<Amazon.Lambda.Annotations.APIGateway.HttpApiAttribute>;
269269

270270
if (restApiAttribute != null && httpApiAttribute != null)
271271
{
@@ -326,7 +326,7 @@ public virtual string TransformText()
326326
}
327327
else if (parameter.Attributes.Any(att => att.Type.FullName == TypeFullNames.FromQueryAttribute))
328328
{
329-
var fromQueryAttribute = parameter.Attributes.First(att => att.Type.FullName == TypeFullNames.FromQueryAttribute) as AttributeModel<FromQueryAttribute>;
329+
var fromQueryAttribute = parameter.Attributes.First(att => att.Type.FullName == TypeFullNames.FromQueryAttribute) as AttributeModel<Amazon.Lambda.Annotations.APIGateway.FromQueryAttribute>;
330330

331331
// Use parameter name as key, if Name has not specified explicitly in the attribute definition.
332332
var parameterKey = fromQueryAttribute?.Data?.Name ?? parameter.Name;
@@ -362,14 +362,14 @@ public virtual string TransformText()
362362
// Therefore, it is required to split the string to convert to an enumerable
363363
// and convert individual item to target data type.
364364
var commaSplit = "";
365-
if (httpApiAttribute?.Data.Version == HttpApiVersion.V2)
365+
if (httpApiAttribute?.Data.Version == Amazon.Lambda.Annotations.APIGateway.HttpApiVersion.V2)
366366
{
367367
commaSplit = @".Split("","")";
368368
}
369369

370370
// HTTP API V1 and Rest API, multiple values for the same parameter are provided
371371
// dedicated dictionary of string key and list value.
372-
if (restApiAttribute != null || httpApiAttribute?.Data.Version == HttpApiVersion.V1)
372+
if (restApiAttribute != null || httpApiAttribute?.Data.Version == Amazon.Lambda.Annotations.APIGateway.HttpApiVersion.V1)
373373
{
374374
queryStringParameters = "MultiValueQueryStringParameters";
375375
}
@@ -553,7 +553,7 @@ public virtual string TransformText()
553553
{
554554
var fromHeaderAttribute =
555555
parameter.Attributes.First(att => att.Type.FullName == TypeFullNames.FromHeaderAttribute) as
556-
AttributeModel<FromHeaderAttribute>;
556+
AttributeModel<Amazon.Lambda.Annotations.APIGateway.FromHeaderAttribute>;
557557

558558
// Use parameter name as key, if Name has not specified explicitly in the attribute definition.
559559
var headerKey = fromHeaderAttribute?.Data?.Name ?? parameter.Name;
@@ -589,14 +589,14 @@ public virtual string TransformText()
589589
// Therefore, it is required to split the string to convert to an enumerable
590590
// and convert individual item to target data type.
591591
var commaSplit = "";
592-
if (httpApiAttribute?.Data.Version == HttpApiVersion.V2)
592+
if (httpApiAttribute?.Data.Version == Amazon.Lambda.Annotations.APIGateway.HttpApiVersion.V2)
593593
{
594594
commaSplit = @".Split("","")";
595595
}
596596

597597
// HTTP API V1 and Rest API, multiple values for the same header are provided
598598
// dedicated dictionary of string key and list value.
599-
if (restApiAttribute != null || httpApiAttribute?.Data.Version == HttpApiVersion.V1)
599+
if (restApiAttribute != null || httpApiAttribute?.Data.Version == Amazon.Lambda.Annotations.APIGateway.HttpApiVersion.V1)
600600
{
601601
headers = "MultiValueHeaders";
602602
}
@@ -847,7 +847,7 @@ public virtual string TransformText()
847847
}
848848
else if (parameter.Attributes.Any(att => att.Type.FullName == TypeFullNames.FromRouteAttribute) || routeParameters.Contains(parameter.Name))
849849
{
850-
var fromRouteAttribute = parameter.Attributes?.FirstOrDefault(att => att.Type.FullName == TypeFullNames.FromRouteAttribute) as AttributeModel<FromRouteAttribute>;
850+
var fromRouteAttribute = parameter.Attributes?.FirstOrDefault(att => att.Type.FullName == TypeFullNames.FromRouteAttribute) as AttributeModel<Amazon.Lambda.Annotations.APIGateway.FromRouteAttribute>;
851851

852852
// Use parameter name as key, if Name has not specified explicitly in the attribute definition.
853853
var routeKey = fromRouteAttribute?.Data?.Name ?? parameter.Name;

Libraries/src/Amazon.Lambda.Annotations.SourceGenerator/Templates/LambdaFunctionTemplate.tt

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,8 @@ namespace <#= _model.LambdaMethod.ContainingNamespace #>
9797

9898
return p.Name;
9999
}));
100-
var restApiAttribute = _model.LambdaMethod.Attributes.FirstOrDefault(att => att.Type.FullName == TypeFullNames.RestApiAttribute) as AttributeModel<RestApiAttribute>;
101-
var httpApiAttribute = _model.LambdaMethod.Attributes.FirstOrDefault(att => att.Type.FullName == TypeFullNames.HttpApiAttribute) as AttributeModel<HttpApiAttribute>;
100+
var restApiAttribute = _model.LambdaMethod.Attributes.FirstOrDefault(att => att.Type.FullName == TypeFullNames.RestApiAttribute) as AttributeModel<Amazon.Lambda.Annotations.APIGateway.RestApiAttribute>;
101+
var httpApiAttribute = _model.LambdaMethod.Attributes.FirstOrDefault(att => att.Type.FullName == TypeFullNames.HttpApiAttribute) as AttributeModel<Amazon.Lambda.Annotations.APIGateway.HttpApiAttribute>;
102102

103103
if (restApiAttribute != null && httpApiAttribute != null)
104104
{
@@ -136,7 +136,7 @@ namespace <#= _model.LambdaMethod.ContainingNamespace #>
136136
}
137137
else if (parameter.Attributes.Any(att => att.Type.FullName == TypeFullNames.FromQueryAttribute))
138138
{
139-
var fromQueryAttribute = parameter.Attributes.First(att => att.Type.FullName == TypeFullNames.FromQueryAttribute) as AttributeModel<FromQueryAttribute>;
139+
var fromQueryAttribute = parameter.Attributes.First(att => att.Type.FullName == TypeFullNames.FromQueryAttribute) as AttributeModel<Amazon.Lambda.Annotations.APIGateway.FromQueryAttribute>;
140140

141141
// Use parameter name as key, if Name has not specified explicitly in the attribute definition.
142142
var parameterKey = fromQueryAttribute?.Data?.Name ?? parameter.Name;
@@ -153,14 +153,14 @@ namespace <#= _model.LambdaMethod.ContainingNamespace #>
153153
// Therefore, it is required to split the string to convert to an enumerable
154154
// and convert individual item to target data type.
155155
var commaSplit = "";
156-
if (httpApiAttribute?.Data.Version == HttpApiVersion.V2)
156+
if (httpApiAttribute?.Data.Version == Amazon.Lambda.Annotations.APIGateway.HttpApiVersion.V2)
157157
{
158158
commaSplit = @".Split("","")";
159159
}
160160

161161
// HTTP API V1 and Rest API, multiple values for the same parameter are provided
162162
// dedicated dictionary of string key and list value.
163-
if (restApiAttribute != null || httpApiAttribute?.Data.Version == HttpApiVersion.V1)
163+
if (restApiAttribute != null || httpApiAttribute?.Data.Version == Amazon.Lambda.Annotations.APIGateway.HttpApiVersion.V1)
164164
{
165165
queryStringParameters = "MultiValueQueryStringParameters";
166166
}
@@ -217,7 +217,7 @@ namespace <#= _model.LambdaMethod.ContainingNamespace #>
217217
{
218218
var fromHeaderAttribute =
219219
parameter.Attributes.First(att => att.Type.FullName == TypeFullNames.FromHeaderAttribute) as
220-
AttributeModel<FromHeaderAttribute>;
220+
AttributeModel<Amazon.Lambda.Annotations.APIGateway.FromHeaderAttribute>;
221221

222222
// Use parameter name as key, if Name has not specified explicitly in the attribute definition.
223223
var headerKey = fromHeaderAttribute?.Data?.Name ?? parameter.Name;
@@ -234,14 +234,14 @@ namespace <#= _model.LambdaMethod.ContainingNamespace #>
234234
// Therefore, it is required to split the string to convert to an enumerable
235235
// and convert individual item to target data type.
236236
var commaSplit = "";
237-
if (httpApiAttribute?.Data.Version == HttpApiVersion.V2)
237+
if (httpApiAttribute?.Data.Version == Amazon.Lambda.Annotations.APIGateway.HttpApiVersion.V2)
238238
{
239239
commaSplit = @".Split("","")";
240240
}
241241

242242
// HTTP API V1 and Rest API, multiple values for the same header are provided
243243
// dedicated dictionary of string key and list value.
244-
if (restApiAttribute != null || httpApiAttribute?.Data.Version == HttpApiVersion.V1)
244+
if (restApiAttribute != null || httpApiAttribute?.Data.Version == Amazon.Lambda.Annotations.APIGateway.HttpApiVersion.V1)
245245
{
246246
headers = "MultiValueHeaders";
247247
}
@@ -321,7 +321,7 @@ namespace <#= _model.LambdaMethod.ContainingNamespace #>
321321
}
322322
else if (parameter.Attributes.Any(att => att.Type.FullName == TypeFullNames.FromRouteAttribute) || routeParameters.Contains(parameter.Name))
323323
{
324-
var fromRouteAttribute = parameter.Attributes?.FirstOrDefault(att => att.Type.FullName == TypeFullNames.FromRouteAttribute) as AttributeModel<FromRouteAttribute>;
324+
var fromRouteAttribute = parameter.Attributes?.FirstOrDefault(att => att.Type.FullName == TypeFullNames.FromRouteAttribute) as AttributeModel<Amazon.Lambda.Annotations.APIGateway.FromRouteAttribute>;
325325

326326
// Use parameter name as key, if Name has not specified explicitly in the attribute definition.
327327
var routeKey = fromRouteAttribute?.Data?.Name ?? parameter.Name;

Libraries/src/Amazon.Lambda.Annotations.SourceGenerator/TypeFullNames.cs

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,24 +7,27 @@ namespace Amazon.Lambda.Annotations.SourceGenerator
77
/// </summary>
88
public static class TypeFullNames
99
{
10-
public const string RestApiAttribute = "Amazon.Lambda.Annotations.RestApiAttribute";
11-
public const string HttpApiAttribute = "Amazon.Lambda.Annotations.HttpApiAttribute";
10+
public const string IEnumerable = "System.Collections.IEnumerable";
11+
public const string Task1 = "System.Threading.Tasks.Task`1";
12+
public const string Task = "System.Threading.Tasks.Task";
13+
public const string MemoryStream = "System.IO.MemoryStream";
14+
15+
public const string ILambdaContext = "Amazon.Lambda.Core.ILambdaContext";
1216
public const string APIGatewayProxyRequest = "Amazon.Lambda.APIGatewayEvents.APIGatewayProxyRequest";
1317
public const string APIGatewayProxyResponse = "Amazon.Lambda.APIGatewayEvents.APIGatewayProxyResponse";
1418
public const string APIGatewayHttpApiV2ProxyRequest = "Amazon.Lambda.APIGatewayEvents.APIGatewayHttpApiV2ProxyRequest";
1519
public const string APIGatewayHttpApiV2ProxyResponse = "Amazon.Lambda.APIGatewayEvents.APIGatewayHttpApiV2ProxyResponse";
16-
public const string MemoryStream = "System.IO.MemoryStream";
17-
public const string HttpApiVersion = "Amazon.Lambda.Annotations.HttpApiVersion";
20+
1821
public const string LambdaFunctionAttribute = "Amazon.Lambda.Annotations.LambdaFunctionAttribute";
19-
public const string FromQueryAttribute = "Amazon.Lambda.Annotations.FromQueryAttribute";
20-
public const string FromHeaderAttribute = "Amazon.Lambda.Annotations.FromHeaderAttribute";
21-
public const string FromBodyAttribute = "Amazon.Lambda.Annotations.FromBodyAttribute";
22-
public const string FromRouteAttribute = "Amazon.Lambda.Annotations.FromRouteAttribute";
2322
public const string FromServiceAttribute = "Amazon.Lambda.Annotations.FromServicesAttribute";
24-
public const string ILambdaContext = "Amazon.Lambda.Core.ILambdaContext";
25-
public const string IEnumerable = "System.Collections.IEnumerable";
26-
public const string Task1 = "System.Threading.Tasks.Task`1";
27-
public const string Task = "System.Threading.Tasks.Task";
23+
24+
public const string HttpApiVersion = "Amazon.Lambda.Annotations.APIGateway.HttpApiVersion";
25+
public const string RestApiAttribute = "Amazon.Lambda.Annotations.APIGateway.RestApiAttribute";
26+
public const string HttpApiAttribute = "Amazon.Lambda.Annotations.APIGateway.HttpApiAttribute";
27+
public const string FromQueryAttribute = "Amazon.Lambda.Annotations.APIGateway.FromQueryAttribute";
28+
public const string FromHeaderAttribute = "Amazon.Lambda.Annotations.APIGateway.FromHeaderAttribute";
29+
public const string FromBodyAttribute = "Amazon.Lambda.Annotations.APIGateway.FromBodyAttribute";
30+
public const string FromRouteAttribute = "Amazon.Lambda.Annotations.APIGateway.FromRouteAttribute";
2831

2932
public static HashSet<string> Requests = new HashSet<string>
3033
{

Libraries/src/Amazon.Lambda.Annotations.SourceGenerator/Validation/RouteParametersValidator.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
using System;
22
using System.Collections.Generic;
33
using System.Linq;
4+
using Amazon.Lambda.Annotations.APIGateway;
45
using Amazon.Lambda.Annotations.SourceGenerator.Models;
56
using Amazon.Lambda.Annotations.SourceGenerator.Models.Attributes;
67

Libraries/src/Amazon.Lambda.Annotations.SourceGenerator/Writers/CloudFormationJsonWriter.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
using System.Collections.Generic;
33
using System.ComponentModel;
44
using System.Linq;
5+
using Amazon.Lambda.Annotations.APIGateway;
56
using Amazon.Lambda.Annotations.SourceGenerator.Diagnostics;
67
using Amazon.Lambda.Annotations.SourceGenerator.FileIO;
78
using Amazon.Lambda.Annotations.SourceGenerator.Models;

Libraries/src/Amazon.Lambda.Annotations/FromBodyAttribute.cs renamed to Libraries/src/Amazon.Lambda.Annotations/APIGateway/FromBodyAttribute.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
using System;
22

3-
namespace Amazon.Lambda.Annotations
3+
namespace Amazon.Lambda.Annotations.APIGateway
44
{
55
[AttributeUsage(AttributeTargets.Parameter)]
66
public class FromBodyAttribute : Attribute

Libraries/src/Amazon.Lambda.Annotations/FromHeaderAttribute.cs renamed to Libraries/src/Amazon.Lambda.Annotations/APIGateway/FromHeaderAttribute.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
using System;
22

3-
namespace Amazon.Lambda.Annotations
3+
namespace Amazon.Lambda.Annotations.APIGateway
44
{
55
[AttributeUsage(AttributeTargets.Parameter)]
66
public class FromHeaderAttribute : Attribute, INamedAttribute

Libraries/src/Amazon.Lambda.Annotations/FromQueryAttribute.cs renamed to Libraries/src/Amazon.Lambda.Annotations/APIGateway/FromQueryAttribute.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
using System;
22

3-
namespace Amazon.Lambda.Annotations
3+
namespace Amazon.Lambda.Annotations.APIGateway
44
{
55
[AttributeUsage(AttributeTargets.Parameter)]
66
public class FromQueryAttribute : Attribute, INamedAttribute

Libraries/src/Amazon.Lambda.Annotations/FromRouteAttribute.cs renamed to Libraries/src/Amazon.Lambda.Annotations/APIGateway/FromRouteAttribute.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
using System;
22

3-
namespace Amazon.Lambda.Annotations
3+
namespace Amazon.Lambda.Annotations.APIGateway
44
{
55
[AttributeUsage(AttributeTargets.Parameter)]
66
public class FromRouteAttribute : Attribute, INamedAttribute

Libraries/src/Amazon.Lambda.Annotations/HttpApiAttribute.cs renamed to Libraries/src/Amazon.Lambda.Annotations/APIGateway/HttpApiAttribute.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
using System;
22

3-
namespace Amazon.Lambda.Annotations
3+
namespace Amazon.Lambda.Annotations.APIGateway
44
{
55
[AttributeUsage(AttributeTargets.Method)]
66
public class HttpApiAttribute : Attribute
77
{
88
public HttpApiVersion Version { get; set; } = HttpApiVersion.V2;
9-
public string Template { get; set; }
9+
public string Template { get; set; }
1010
public LambdaHttpMethod Method { get; set; }
1111

1212
public HttpApiAttribute(LambdaHttpMethod method, string template)

Libraries/src/Amazon.Lambda.Annotations/HttpApiVersion.cs renamed to Libraries/src/Amazon.Lambda.Annotations/APIGateway/HttpApiVersion.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
namespace Amazon.Lambda.Annotations
1+
namespace Amazon.Lambda.Annotations.APIGateway
22
{
33
public enum HttpApiVersion
44
{

Libraries/src/Amazon.Lambda.Annotations/LambdaHttpMethod.cs renamed to Libraries/src/Amazon.Lambda.Annotations/APIGateway/LambdaHttpMethod.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
namespace Amazon.Lambda.Annotations
1+
namespace Amazon.Lambda.Annotations.APIGateway
22
{
33
public enum LambdaHttpMethod
44
{

Libraries/src/Amazon.Lambda.Annotations/RestApiAttribute.cs renamed to Libraries/src/Amazon.Lambda.Annotations/APIGateway/RestApiAttribute.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
using System;
22

3-
namespace Amazon.Lambda.Annotations
3+
namespace Amazon.Lambda.Annotations.APIGateway
44
{
55
[AttributeUsage(AttributeTargets.Method)]
66
public class RestApiAttribute : Attribute
77
{
8-
public string Template { get; set; }
8+
public string Template { get; set; }
99
public LambdaHttpMethod Method { get; set; }
1010

1111
public RestApiAttribute(LambdaHttpMethod method, string template)

Libraries/test/Amazon.Lambda.Annotations.SourceGenerators.Tests/CSharpSourceGeneratorVerifier.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
using System;
22
using System.Collections.Immutable;
3+
using Amazon.Lambda.Annotations.APIGateway;
34
using Amazon.Lambda.APIGatewayEvents;
45
using Amazon.Lambda.Core;
56
using Amazon.Lambda.Serialization.SystemTextJson;

Libraries/test/Amazon.Lambda.Annotations.SourceGenerators.Tests/RouteParameterValidatorTests.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
using System;
22
using System.Collections.Generic;
3+
using Amazon.Lambda.Annotations.APIGateway;
34
using Amazon.Lambda.Annotations.SourceGenerator;
45
using Amazon.Lambda.Annotations.SourceGenerator.Models;
56
using Amazon.Lambda.Annotations.SourceGenerator.Models.Attributes;

Libraries/test/Amazon.Lambda.Annotations.SourceGenerators.Tests/WriterTests/CloudFormationJsonWriterTests.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
using System.Collections.Generic;
2+
using Amazon.Lambda.Annotations.APIGateway;
23
using Amazon.Lambda.Annotations.SourceGenerator.Diagnostics;
34
using Amazon.Lambda.Annotations.SourceGenerator.FileIO;
45
using Amazon.Lambda.Annotations.SourceGenerator.Models;

Libraries/test/TestServerlessApp/ComplexCalculator.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
using System.Text.Json;
66
using System.Threading;
77
using Amazon.Lambda.Annotations;
8+
using Amazon.Lambda.Annotations.APIGateway;
89
using Amazon.Lambda.APIGatewayEvents;
910
using Amazon.Lambda.Core;
1011

Libraries/test/TestServerlessApp/Greeter.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
using System.Text.Json;
44
using System.Threading.Tasks;
55
using Amazon.Lambda.Annotations;
6+
using Amazon.Lambda.Annotations.APIGateway;
67
using Amazon.Lambda.APIGatewayEvents;
78
using Amazon.Lambda.Core;
89

Libraries/test/TestServerlessApp/SimpleCalculator.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
using Amazon.Lambda.Core;
66
using Amazon.Lambda.APIGatewayEvents;
77
using Amazon.Lambda.Annotations;
8+
using Amazon.Lambda.Annotations.APIGateway;
89
using TestServerlessApp.Services;
910

1011
// Assembly attribute to enable the Lambda function's JSON input to be converted into a .NET class.

0 commit comments

Comments
 (0)