Skip to content

Commit 7a00641

Browse files
committed
chore: remove annotations nuspec file
1 parent a7b44f7 commit 7a00641

File tree

90 files changed

+700
-641
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

90 files changed

+700
-641
lines changed

Libraries/Amazon.Lambda.Annotations.slnf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22
"solution": {
33
"path": "Libraries.sln",
44
"projects": [
5-
"src\\Amazon.Lambda.APIGatewayEvents\\Amazon.Lambda.APIGatewayEvents.csproj",
5+
"src\\Amazon.Lambda.Annotations.Models\\Amazon.Lambda.Annotations.Models.csproj",
66
"src\\Amazon.Lambda.Annotations.SourceGenerator\\Amazon.Lambda.Annotations.SourceGenerator.csproj",
7-
"src\\Amazon.Lambda.Annotations\\Amazon.Lambda.Annotations.csproj",
7+
"src\\Amazon.Lambda.APIGatewayEvents\\Amazon.Lambda.APIGatewayEvents.csproj",
88
"src\\Amazon.Lambda.Core\\Amazon.Lambda.Core.csproj",
99
"src\\Amazon.Lambda.RuntimeSupport\\Amazon.Lambda.RuntimeSupport.csproj",
10-
"src\\Amazon.Lambda.SQSEvents\\Amazon.Lambda.SQSEvents.csproj",
1110
"src\\Amazon.Lambda.Serialization.SystemTextJson\\Amazon.Lambda.Serialization.SystemTextJson.csproj",
11+
"src\\Amazon.Lambda.SQSEvents\\Amazon.Lambda.SQSEvents.csproj",
1212
"test\\Amazon.Lambda.Annotations.SourceGenerators.Tests\\Amazon.Lambda.Annotations.SourceGenerators.Tests.csproj",
1313
"test\\TestExecutableServerlessApp\\TestExecutableServerlessApp.csproj",
1414
"test\\TestServerlessApp.IntegrationTests\\TestServerlessApp.IntegrationTests.csproj",

Libraries/Libraries.sln

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@ Microsoft Visual Studio Solution File, Format Version 12.00
44
VisualStudioVersion = 17.0.31717.71
55
MinimumVisualStudioVersion = 10.0.40219.1
66
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{AAB54E74-20B1-42ED-BC3D-CE9F7BC7FD12}"
7-
ProjectSection(SolutionItems) = preProject
8-
src\Amazon.Lambda.Annotations.nuspec = src\Amazon.Lambda.Annotations.nuspec
9-
EndProjectSection
107
EndProject
118
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{A101C2F7-C63F-4FDE-94BB-DFA637EBEA44}"
129
ProjectSection(SolutionItems) = preProject
@@ -108,7 +105,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TestServerlessApp", "test\T
108105
EndProject
109106
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Amazon.Lambda.Annotations.SourceGenerators.Tests", "test\Amazon.Lambda.Annotations.SourceGenerators.Tests\Amazon.Lambda.Annotations.SourceGenerators.Tests.csproj", "{D76F2C74-3D7F-4DB3-BA1A-F2EA14749253}"
110107
EndProject
111-
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Amazon.Lambda.Annotations", "src\Amazon.Lambda.Annotations\Amazon.Lambda.Annotations.csproj", "{ADA9AF37-A8C1-47E6-BBBD-5C7E49C26C0E}"
108+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Amazon.Lambda.Annotations.Models", "src\Amazon.Lambda.Annotations.Models\Amazon.Lambda.Annotations.Models.csproj", "{ADA9AF37-A8C1-47E6-BBBD-5C7E49C26C0E}"
112109
EndProject
113110
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Amazon.Lambda.Annotations.SourceGenerator", "src\Amazon.Lambda.Annotations.SourceGenerator\Amazon.Lambda.Annotations.SourceGenerator.csproj", "{3C617909-D61F-4AA8-B11C-4C9ECC865D75}"
114111
EndProject

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ public class HttpApiAttribute : Attribute
2222
/// <inheritdoc cref="LambdaHttpMethod"/>
2323
public LambdaHttpMethod Method { get; set; }
2424

25+
/// <summary>
26+
/// Constructs a <see cref="HttpApiAttribute"/>
27+
/// </summary>
2528
public HttpApiAttribute(LambdaHttpMethod method, string template)
2629
{
2730
Template = template;

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,13 @@ namespace Amazon.Lambda.Annotations.APIGateway
66
/// </summary>
77
public enum HttpApiVersion
88
{
9+
/// <summary>
10+
/// API Gateway HTTP API V1
11+
/// </summary>
912
V1,
13+
/// <summary>
14+
/// API Gateway HTTP API V2
15+
/// </summary>
1016
V2
1117
}
1218
}
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
namespace Amazon.Lambda.Annotations.APIGateway
2+
{
3+
/// <summary>
4+
/// HTTP Method/Verb
5+
/// </summary>
6+
public enum LambdaHttpMethod
7+
{
8+
/// <summary>
9+
/// Any HTTP Method/Verb
10+
/// </summary>
11+
Any,
12+
/// <summary>
13+
/// GET HTTP Method/Verb
14+
/// </summary>
15+
Get,
16+
/// <summary>
17+
/// POST HTTP Method/Verb
18+
/// </summary>
19+
Post,
20+
/// <summary>
21+
/// PUT HTTP Method/Verb
22+
/// </summary>
23+
Put,
24+
/// <summary>
25+
/// PATCH HTTP Method/Verb
26+
/// </summary>
27+
Patch,
28+
/// <summary>
29+
/// HEAD HTTP Method/Verb
30+
/// </summary>
31+
Head,
32+
/// <summary>
33+
/// DELETE HTTP Method/Verb
34+
/// </summary>
35+
Delete,
36+
/// <summary>
37+
/// OPTIONS HTTP Method/Verb
38+
/// </summary>
39+
Options
40+
}
41+
}

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ public class RestApiAttribute : Attribute
1919
/// <inheritdoc cref="LambdaHttpMethod" />
2020
public LambdaHttpMethod Method { get; set; }
2121

22+
/// <summary>
23+
/// Constructs a <see cref="RestApiAttribute"/>
24+
/// </summary>
2225
public RestApiAttribute(LambdaHttpMethod method, string template)
2326
{
2427
Template = template;

Libraries/src/Amazon.Lambda.Annotations/Amazon.Lambda.Annotations.csproj renamed to Libraries/src/Amazon.Lambda.Annotations.Models/Amazon.Lambda.Annotations.Models.csproj

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<AssemblyVersion>1.5.2</AssemblyVersion>
4+
<RootNamespace>Amazon.Lambda.Annotations</RootNamespace>
55
<TargetFrameworks>netstandard2.0;net6.0;net8.0</TargetFrameworks>
66
<GenerateDocumentationFile>true</GenerateDocumentationFile>
77

88
<!--This assembly contains some internal methods that need to be accessed by the Amazon.Lambda.Annotations.SourceGenerator assembly.
99
Both these assemblies need to be strongly signed for the InternalsVisibleTo attribute to take effect.-->
1010
<AssemblyOriginatorKeyFile>..\..\..\buildtools\public.snk</AssemblyOriginatorKeyFile>
1111
<SignAssembly>true</SignAssembly>
12+
13+
<Version>1.5.3</Version>
1214
</PropertyGroup>
1315

1416
<PropertyGroup Condition="'$(TargetFramework)' == 'net8.0'">
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
namespace Amazon.Lambda.Annotations
2+
{
3+
/// <summary>
4+
/// Interface for a named attribute
5+
/// </summary>
6+
public interface INamedAttribute
7+
{
8+
/// <summary>
9+
/// Name of the attribute
10+
/// </summary>
11+
string Name { get; set; }
12+
}
13+
}

Libraries/src/Amazon.Lambda.Annotations/LambdaPackageType.cs renamed to Libraries/src/Amazon.Lambda.Annotations.Models/LambdaPackageType.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,13 @@
66
/// </summary>
77
public enum LambdaPackageType
88
{
9+
/// <summary>
10+
/// A Zip deployment package type
11+
/// </summary>
912
Zip=0,
13+
/// <summary>
14+
/// An Image deployment package type
15+
/// </summary>
1016
Image=1
1117
}
1218
}

Libraries/src/Amazon.Lambda.Annotations.SourceGenerator/Amazon.Lambda.Annotations.SourceGenerator.csproj

Lines changed: 41 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,50 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<AssemblyVersion>1.5.2</AssemblyVersion>
5-
<TargetFramework>netstandard2.0</TargetFramework>
6-
7-
<!--This assembly needs to access internal methods inside the Amazon.Lambda.Annotations assembly.
4+
<PackageId>Amazon.Lambda.Annotations</PackageId>
5+
<TargetFrameworks>netstandard2.0;net6.0;net8.0</TargetFrameworks>
6+
7+
<Authors>Amazon Web Services</Authors>
8+
<PackageTags>AWS Amazon Lambda</PackageTags>
9+
<Description>Annotations that can be added to Lambda projects to generate C# code and CloudFormation templates.</Description>
10+
<PackageProjectUrl>https://github.com/aws/aws-lambda-dotnet</PackageProjectUrl>
11+
<PackageIcon>images\icon.png</PackageIcon>
12+
<PackageReadmeFile>docs\README.md</PackageReadmeFile>
13+
14+
<!--This assembly needs to access internal methods inside the Amazon.Lambda.Annotations.Models assembly.
815
Both these assemblies need to be strongly signed for the InternalsVisibleTo attribute to take effect.-->
916
<AssemblyOriginatorKeyFile>..\..\..\buildtools\public.snk</AssemblyOriginatorKeyFile>
1017
<SignAssembly>true</SignAssembly>
1118

1219
<!-- This is required to allow copying all the dependencies to bin directory which can be copied after to nuget package based on nuspec -->
1320
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
21+
<IncludeBuildOutput>false</IncludeBuildOutput>
22+
23+
<Version>1.5.3</Version>
1424
</PropertyGroup>
1525

1626
<ItemGroup>
17-
<PackageReference Include="Microsoft.CodeAnalysis" Version="4.0.1" />
18-
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.0.1" />
19-
<PackageReference Include="System.CodeDom" Version="6.0.0" />
27+
<None Include="$(OutputPath)\netstandard2.0\Amazon.Lambda.Annotations.Models.dll" Pack="true" PackagePath="lib/netstandard2.0" Visible="false" />
28+
<None Include="$(OutputPath)\netstandard2.0\Amazon.Lambda.Annotations.Models.xml" Pack="true" PackagePath="lib/netstandard2.0" Visible="false" />
29+
<None Include="$(OutputPath)\net6.0\Amazon.Lambda.Annotations.Models.dll" Pack="true" PackagePath="lib/net6.0" Visible="false" />
30+
<None Include="$(OutputPath)\net6.0\Amazon.Lambda.Annotations.Models.xml" Pack="true" PackagePath="lib/net6.0" Visible="false" />
31+
<None Include="$(OutputPath)\net8.0\Amazon.Lambda.Annotations.Models.dll" Pack="true" PackagePath="lib/net8.0" Visible="false" />
32+
<None Include="$(OutputPath)\net8.0\Amazon.Lambda.Annotations.Models.xml" Pack="true" PackagePath="lib/net8.0" Visible="false" />
33+
34+
<None Include="$(OutputPath)\netstandard2.0\$(AssemblyName).dll" Pack="true" PackagePath="analyzers/dotnet/cs" Visible="false" />
35+
<None Include="$(OutputPath)\netstandard2.0\Amazon.Lambda.Annotations.Models.dll" Pack="true" PackagePath="analyzers/dotnet/cs" Visible="false" />
36+
<None Include="$(OutputPath)\netstandard2.0\Newtonsoft.Json.dll" Pack="true" PackagePath="analyzers/dotnet/cs" Visible="false" />
37+
<None Include="$(OutputPath)\netstandard2.0\YamlDotNet.dll" Pack="true" PackagePath="analyzers/dotnet/cs" Visible="false" />
38+
</ItemGroup>
39+
40+
<ItemGroup>
41+
<PackageReference Include="Microsoft.CodeAnalysis" Version="4.0.1" PrivateAssets="all" />
42+
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.0.1" PrivateAssets="all" />
43+
<PackageReference Include="System.CodeDom" Version="6.0.0" PrivateAssets="all" />
2044
</ItemGroup>
2145

2246
<ItemGroup>
23-
<!-- Generator dependencies, update Libraries/src/Amazon.Lambda.Annotations.nuspec whenever a new generator dependency is added. -->
47+
<PackageReference Include="Amazon.Lambda.Core" Version="2.1.0" />
2448
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" GeneratePathProperty="true" PrivateAssets="all" />
2549
<PackageReference Include="YamlDotNet" Version="12.0.0" GeneratePathProperty="true" PrivateAssets="all" />
2650
</ItemGroup>
@@ -37,7 +61,9 @@
3761
</Target>
3862

3963
<ItemGroup>
40-
<ProjectReference Include="..\Amazon.Lambda.Annotations\Amazon.Lambda.Annotations.csproj" OutputItemType="Analyzer" />
64+
<ProjectReference Include="..\Amazon.Lambda.Annotations.Models\Amazon.Lambda.Annotations.Models.csproj" OutputItemType="Analyzer">
65+
<ExcludeAssets>All</ExcludeAssets>
66+
</ProjectReference>
4167
</ItemGroup>
4268

4369
<ItemGroup>
@@ -109,4 +135,10 @@
109135
<AdditionalFiles Include="Diagnostics\AnalyzerReleases.Unshipped.md" />
110136
</ItemGroup>
111137

138+
<ItemGroup>
139+
<None Include="..\..\..\icon.png" Pack="true" PackagePath="images\icon.png" />
140+
<None Include=".\README.md" Pack="true" PackagePath="docs\README.md" />
141+
<None Include=".\THIRD_PARTY_LICENSES" Pack="true" PackagePath="" />
142+
</ItemGroup>
143+
112144
</Project>

Libraries/src/Amazon.Lambda.Annotations.SourceGenerator/Diagnostics/AnalyzerReleases.Shipped.md

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,45 +28,50 @@ AWSLambda0113 | AWSLambdaCSharpGenerator | Error | The GenerateMain global prope
2828
AWSLambda0114 | AWSLambdaCSharpGenerator | Error | The GenerateMain global property is set to true, but the project already contains a static Main method
2929

3030
## Release 1.0.0
31+
### New Rules
32+
3133
Rule ID | Category | Severity | Notes
3234
--------|----------|----------|-------
3335
AWSLambda0110 | AWSLambdaCSharpGenerator | Error | Invalid Parameter Attribute Name
3436

3537
## Release 0.13.4.0
38+
### New Rules
39+
3640
Rule ID | Category | Severity | Notes
3741
--------|----------|----------|-------
3842
AWSLambda0109 | AWSLambdaCSharpGenerator | Error | Unsupported Method Paramater Type
3943

4044
## Release 0.13.3.0
45+
### New Rules
46+
4147
Rule ID | Category | Severity | Notes
4248
--------|----------|----------|-------
4349
AWSLambda0108 | AWSLambdaCSharpGenerator | Error | Assembly attribute Amazon.Lambda.Core.LambdaSerializerAttribute is missing
4450

4551
## Release 0.13.1.0
46-
Rule ID | Category | Severity | Notes
47-
--------|----------|----------|-------
48-
AWSLambda0107 | AWSLambdaCSharpGenerator | Error | Unsupported error thrown during code generation
52+
### New Rules
4953

5054
Rule ID | Category | Severity | Notes
5155
--------|----------|----------|-------
52-
AWSLambda0106 | AWSLambdaCSharpGenerator | Error | Invalid CloudFormation resource name
56+
AWSLambda0107 | AWSLambdaCSharpGenerator | Error | Unsupported error thrown during code generation
5357

5458
## Release 0.13.0.0
59+
### New Rules
5560

5661
Rule ID | Category | Severity | Notes
5762
--------|----------|----------|-------
5863
AWSLambda0106 | AWSLambdaCSharpGenerator | Error | Invalid CloudFormation resource name
5964

6065

6166
## Release 0.11.0.0
67+
### New Rules
6268

6369
Rule ID | Category | Severity | Notes
6470
--------|----------|----------|-------
6571
AWSLambda0104 | AWSLambdaCSharpGenerator | Error | Missing reference to a required dependency
6672
AWSLambda0105 | AWSLambdaCSharpGenerator | Error | Invalid return type IHttpResult
6773

6874
## Release 0.4.2.0
69-
7075
### New Rules
7176

7277
Rule ID | Category | Severity | Notes

Libraries/src/Amazon.Lambda.Annotations.SourceGenerator/Extensions/StringExtensions.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
using System;
2+
using System.Reflection;
23

34
namespace Amazon.Lambda.Annotations.SourceGenerator.Extensions
45
{
@@ -12,6 +13,15 @@ public static string ToCamelCase(this string str)
1213
}
1314
return str;
1415
}
16+
17+
public static string ApplyReplacements(this string str)
18+
{
19+
Type generatorType = typeof(Generator);
20+
Assembly generatorAssembly = generatorType.Assembly;
21+
AssemblyName assemblyName = generatorAssembly.GetName();
22+
Version assemblyVersion = assemblyName.Version;
23+
return str.Replace("{ANNOTATIONS_ASSEMBLY_VERSION}", assemblyVersion?.ToString());
24+
}
1525
}
1626

1727
public static class ExceptionExtensions

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ private static LambdaFunctionModel Build(IMethodSymbol lambdaMethodSymbol, IMeth
3636
SerializerInfo = GetSerializerInfoAttribute(context, lambdaMethodSymbol),
3737
StartupType = configureMethodSymbol != null ? TypeModelBuilder.Build(configureMethodSymbol.ContainingType, context) : null,
3838
SourceGeneratorVersion = context.Compilation
39-
.ReferencedAssemblyNames.FirstOrDefault(x => string.Equals(x.Name, "Amazon.Lambda.Annotations"))
39+
.ReferencedAssemblyNames.FirstOrDefault(x => string.Equals(x.Name, "Amazon.Lambda.Annotations.Models"))
4040
?.Version.ToString(),
4141
IsExecutable = isExecutable,
4242
Runtime = runtime,

Libraries/src/Amazon.Lambda.Annotations.nuspec

Lines changed: 0 additions & 36 deletions
This file was deleted.

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

Lines changed: 0 additions & 17 deletions
This file was deleted.

Libraries/src/Amazon.Lambda.Annotations/INamedAttribute.cs

Lines changed: 0 additions & 7 deletions
This file was deleted.

0 commit comments

Comments
 (0)