Skip to content

DeepSleep is an open source RESTful Api framework providing full support for RESTful interfaces written in C#. The base DeepSleep framework, where the majority of functionality lives is built on netstandard 2.0 for interoperability.

License

Notifications You must be signed in to change notification settings

mtnvencenzo/DeepSleep

Repository files navigation

DeepSleep

Build Status GitHub license Maintenance

View the documentation site for more detailed information.

DeepSleep Nuget Packages

Package Name Target Framework(s) Version
DeepSleep netstandard2.0 DeepSleep Nuget Package
DeepSleep.Web net5.0
netcoreapp3.1
netcoreapp2.1
DeepSleep.Web Nuget Package
DeepSleep.OpenApi netstandard2.0 DeepSleep.OpenApi Nuget Package

List of Features

  • Route Discovery - The process of the DeepSleep runtime identifing and enroling your API routes into registered endpoints. Support for automated creation of HEAD routes for registered GET endpoints.
    • Attribute Routing - The simplist and easiest to use form of discovery
      • Full support for routing and request configuration via method attributes.
    • Static Routing - Allows for pulling routing meta-data from external sources or defined methods handling route information and configuration
  • Request Pipeline - The core middleware tasked with processing API requests.
    • Authentication - Extensible middleware to enforce request authentication.
      • Create and plug in authentication components into the request pipeline eith globally or at an endpoint level.
      • Support for multiple authentication methods defined for endpoints.
      • Opt-in/Opt-out of authentication either globally or at an individual endpoint.
    • Authorization - Extensible middleware to enforce request authorization.
      • Create and plug in authorization components into the request pipeline eith globally or at an endpoint level.
      • Support for multiple authorization methods defined for endpoints.
      • Opt-in/Opt-out of authorization either globally or at an individual endpoint.
    • Cross Origin Resource Sharing (CORS) - Middleware to support CORS pre-flight and standard requests.
      • Customize allowable origins, exposable headers and allowable request headers.
      • Supports pre-flight and standard CORS requests.
    • Content Negotiation - Customizable support for media serializers to process inbound request and out going response bodies.
      • Built-in JSON media serializer using the System.Text.Json serializer. Create your own, or modifiy the existing serializer options.
      • Built-in XML media serializer.
      • Built-in form url encoded media serializer to accept application/x-www-form-urlencoded content-types.
      • Built in multipart/form-data medai serializer for request bodies.
    • Model Binding - Complex request uri and body object model support. Supports custom poco object binding for Uri and Body as well as simple binding for primitive/simple type method paramter binding.
    • 4xx-5xx Response Handling - Customizable support for standard 4xx and 5xx error responses. Global handler for standardized responses orb customize for more granular error responses.
    • Routing - Full featured request routing framework.
    • Validation - Common validation middleware for validating bound pcoc's, simple parameters and giving the ability to validate the full request with access to all request inputs.
    • Response Helpers - Helper methods/objects that allow for better control over the full HTTP response.
    • Localization - Middleware support for managing the request thread's culture and ui-culture based on the incoming request.
    • Request Logging - Global handler for logging the full HTTP request.
    • Exception Handling - Global handler for catching all unhandled exceptions.

Samples

Sample projects can be found in the $/samples directory

$/Samples.Simple.Api

This is a basic sample that illustrates a basic bootraping using all the default configurations. Includes a simple Hello World endpoint.

$/Samples.Mixed.Api

This is a basic sample that illustrates a basic bootraping using all the default configurations but also shows how to include/exclude routes to use with mixing DeepSleep apis along side Razor and/or Static files or SPA. Includes a simple Hello World endpoint.

About

DeepSleep is an open source RESTful Api framework providing full support for RESTful interfaces written in C#. The base DeepSleep framework, where the majority of functionality lives is built on netstandard 2.0 for interoperability.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages