A .NET source generator that automatically creates OpenAPI specifications from AWS Lambda functions decorated with Lambda Annotations.
- 🚀 Source Generator: Compile-time OpenAPI spec generation
- 🏷️ Attribute-Based: Simple attribute decoration for API documentation
- 🔧 MSBuild Integration: Seamless integration with your build process
- 📝 AWS Lambda Support: Designed specifically for Lambda Annotations
- 🎯 Type-Safe: Leverages C# type system for accurate schemas
- ⚡ AOT Compatible: Works with Native AOT compilation
- .NET 6.0 or later (compatible with .NET 6, 7, 8, 9, 10+)
- AWS Lambda Annotations package
- Install the package:
dotnet add package Oproto.Lambda.OpenApi- Decorate your Lambda functions with OpenAPI attributes:
using Oproto.Lambda.OpenApi.Attributes;
[LambdaFunction]
[OpenApiOperation("GetUser", "Retrieves user information")]
[OpenApiTag("Users")]
public async Task<APIGatewayProxyResponse> GetUser(
[FromRoute] string userId,
[FromQuery] bool includeDetails = false)
{
// Your implementation
}- Build your project - the OpenAPI spec will be generated automatically as
openapi.json
MIT License - see LICENSE for details.
Built with ❤️ by Oproto Inc for the .NET and AWS communities