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"
}-
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.
- Natural URL paths e.g.
-
Powerful. Provides querying capabilities that combine database queries and application code.
- Calculate an
agefield fromBirthDatein your queries. - Set a
namefield by splitting intoFirstNameandLastNamebefore saving. - Raise events on a message bus using dependency injection.
- Calculate an
-
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
Linkheaders in pagination responses. - Configure
PUTorPATCHstrategy for partial updates. - Allow
camelCaseorsnake_caseconventions in your responses.
- Include HTTP
You can read more in the documentation, jump straight into the tutorials or check out the samples.
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.EntityFrameworkCore2Prerelease packages are available from the MyGet feed.
See the Installation section for more detailed setup information.
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 © 2017-2019 Connell Watkins
Firestorm is licensed under MIT. Refer to LICENSE.txt for detailed information.