Skip to content

Latest commit

 

History

History
69 lines (48 loc) · 2.36 KB

File metadata and controls

69 lines (48 loc) · 2.36 KB

Oproto Lambda OpenAPI

Oproto Lambda OpenAPI

A .NET source generator that automatically creates OpenAPI specifications from AWS Lambda functions decorated with Lambda Annotations.

Features

  • 🚀 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

Requirements

Quick Start

  1. Install the package:
dotnet add package Oproto.Lambda.OpenApi
  1. 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
}
  1. Build your project - the OpenAPI spec will be generated automatically as openapi.json

Documentation

Links

License

MIT License - see LICENSE for details.


Built with ❤️ by Oproto Inc for the .NET and AWS communities