Skip to content

Miljankg/RadEndpoints

 
 

Repository files navigation

RadEndpoints

A lightweight API framework that embraces the power of Net Core Minimal APIs using a well-defined REPR Style (Request-Endpoint-Response) pattern. The framework aims to sprinkle syntactical sugar over Minimal Apis to facilitate a consistent endpoint building / testing / delivery workflow. A fast and easy developer experience is the #1 goal of this project.

While the framework appears to have strong opinions on endpoint structure on the surface, all of the helper/conveniences are virtually optional. Full Minimal Api functionality is preserved for more uncommon edge case or custom use case scenarios. As of now, this code is for experimental and educational purposes only.

Features:

Convenient Structured Endpoint Classes

  • Less noisy configuration than original minimal api endpoints
  • Override or extend endpoint abstractions to fit app specific conventions/contracts
  • Constructor dependency injection
  • Scoped lifetime
  • Built-in HttpContext
  • Built-in ILogger
  • Built-in IWebHostEnvironment
  • Built in Response Object
  • Built in Entity / Response Mapper (optional)
  • IResult/TypedResult helpers

Assembly Scanning for Automatic Configuration of

Integration Testing

  • WebApplicationFactory In-Memory Approach
  • Strongly typed "Routeless" Test Helpers very convenient test development, maintanence and durability
  • Clean and convenient response assertions for RadResponse / HttpResponse / ProblemDetails using FluentAssertions
  • Detailed exception messages so you dig less to find test issues.

Example Api

  • Lightweight api to demonstrate framework usage
  • Includes example endpoints and integration tests
  • Using feature based "vertical slice" style architecture (optional approach)

Coming Soon:

  • Open Telemetry Endpoint Filters (Logging, Metrics, Traces)
  • Unit test coverage for framework code
  • Project item and api project templates
  • CLI Tool w/Spectre.Console
  • Nuget package
  • Demo for Example API: observability infrastructure using Grafana / Prometheus / Zipkin / Kibana
  • Demo for Example API: Bogus oriented test mocking service
  • Demo Ephemeral Test Environment w/TestContainers
  • Documentation / How Tos

Credits

This framework pays humble tribute to the FastEndpoints as it borrows many syntactical and developer experience concepts from it. Unless you're dead set on using Minimal APIs, I would highly recommend taking a look at that superior project which is actively maintained by a large community of contributors.

About

Minimal API REPR Pattern Style Endpoint Framework

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • C# 93.9%
  • JavaScript 5.3%
  • Dockerfile 0.8%