Skip to content

oproto/lambda-openapi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Oproto Lambda OpenAPI

Oproto Lambda OpenAPI

Build Status NuGet License: MIT Sponsor

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

The library targets netstandard2.0 for maximum compatibility.

Installation

Install the NuGet package in your AWS Lambda project:

dotnet add package Oproto.Lambda.OpenApi

Quick Start

  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

About

Oproto Lambda OpenAPI is developed and maintained by Oproto Inc, a company building modern SaaS solutions for small business finance and accounting.

Related Projects

Links

Maintainer

❤️ Support the Project

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!

Contributing

We welcome contributions! Please see our Contributing Guide for details.

Security

To report a security vulnerability, please see our Security Policy.

License

This project is licensed under the MIT License - see the LICENSE file for details.


Built with ❤️ for the .NET and AWS communities

About

OpenAPI generation tooling for AWS Lambda Annotations

Resources

License

Contributing

Security policy

Stars

Watchers

Forks

Sponsor this project

  •  

Packages

No packages published

Languages