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
The library targets netstandard2.0 for maximum compatibility.
Install the NuGet package in your AWS Lambda project:
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
Oproto Lambda OpenAPI is developed and maintained by Oproto Inc, a company building modern SaaS solutions for small business finance and accounting.
- Dan Guisinger - danguisinger.com
Oproto maintains this library as part of a broader open-source ecosystem for building high-quality AWS-native .NET applications. If Lambda OpenAPI (or any Oproto library) saves you time or helps your team ship features faster, please consider supporting ongoing development.
Your support helps:
- Fund continued maintenance of the Oproto Lambda ecosystem
- Keep libraries AOT-compatible and aligned with new AWS features
- Improve documentation, samples, and test coverage
- Sustain long-term open-source availability
You can support the project in one of two ways:
👉 GitHub Sponsors — Recurring support for those who want to help sustain long-term development.
👉 Buy Me a Coffee — A simple, one-time "thanks" for helping you ship faster.
Every bit of support helps keep the project healthy, actively maintained, and open for the community. Thank you!
We welcome contributions! Please see our Contributing Guide for details.
To report a security vulnerability, please see our Security Policy.
This project is licensed under the MIT License - see the LICENSE file for details.
Built with ❤️ for the .NET and AWS communities