Skip to content

codacy-badger/Firestorm

 
 

Repository files navigation

Firestorm

Build status codecov MyGet NuGet

Firestorm is a REST API framework for .NET. The aim is to provide a neat and easy ways to write standardised APIs with more of the leg-work taken care of.

Using Stems to describe your API

public class CharactersStem : Stem<Character>
{
    [Get, Identifier]
    public static Expression Id => Expression(p => p.Id);

    [Get]
    public static Expression Name => Expression(p => p.FirstName + " " + p.LastName);
}

Exposes RESTful endpoints

GET /characters/123

{
    "id": 123,
    "name": "Eddard Stark"
}

Features

  1. Clean. Lets you write neat and concise code to describe your API and exposes lightweight, human-readable responses.

    • Natural URL paths e.g. /characters/123/birthplace/name.
    • To-the-point querystrings e.g. ?status=alive&sort=name+asc&page=2.
    • Uncluttered responses without extra metadata.
  2. Powerful. Provides querying capabilities that combine database queries and application code.

    • Calculate an age field from BirthDate in your queries.
    • Set a name field by splitting into FirstName and LastName before saving.
    • Raise events on a message bus using dependency injection.
  3. Configurable. Customise your conventions, response structure, verb strategies to suit your API needs. Integrate with your web host, ORM and IoC to fit nicely in your solution.

    • Include HTTP Link headers in pagination responses.
    • Configure PUT or PATCH strategy for partial updates.
    • Allow camelCase or snake_case conventions in your responses.

You can read more in the documentation, jump straight into the tutorials or check out the samples.

Install

Firestorm is available from the GitHub repository and as NuGet Packages.

PM> Install-Package Firestorm.Endpoints
PM> Install-Package Firestorm.Stems
PM> Install-Package Firestorm.AspNetCore2
PM> Install-Package Firestorm.EntityFrameworkCore2

Prerelease packages are available from the MyGet feed.

See the Installation section for more detailed setup information.

About

Firestorm is a bit of an experiment that grew into something I feel other developers could use. It was never a clearly defined project, but I decided to set some milestones and make it my first open-source project.

It's still in active development. There are a lot of features I want to add!

Copyright

Copyright © 2017-2019 Connell Watkins

License

Firestorm is licensed under MIT. Refer to LICENSE.txt for detailed information.

About

REST API framework so hot it sustains its own wind system

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C# 99.7%
  • PowerShell 0.3%