All Projects → joukevandermaas → saule

joukevandermaas / saule

Licence: MIT license
JSON API library for ASP.Net Web API 2.

Programming Languages

C#
18002 projects
powershell
5483 projects

Projects that are alternatives of or similar to saule

fire
An idiomatic micro-framework for building Ember.js compatible APIs with Go.
Stars: ✭ 56 (-24.32%)
Mutual labels:  ember, json-api
ember-sort-filter-table
A sortable/searchable table addon for ember cli
Stars: ✭ 13 (-82.43%)
Mutual labels:  ember, ember-data
Jsonapidotnetcore
JSON:API Framework for ASP.NET Core
Stars: ✭ 465 (+528.38%)
Mutual labels:  json-api, webapi
Data
A data persistence library for Ember.js.
Stars: ✭ 2,998 (+3951.35%)
Mutual labels:  ember, ember-data
ember-airtable
Boilerplate for quickly prototyping apps with Airtable, Node & Ember
Stars: ✭ 21 (-71.62%)
Mutual labels:  ember, ember-data
ember-data-contentful
Ember Data adapter for contentful.com
Stars: ✭ 33 (-55.41%)
Mutual labels:  ember, ember-data
november-cli
❄️ Generate a Node.js API for your Ember.js app
Stars: ✭ 51 (-31.08%)
Mutual labels:  ember, ember-data
ByteScout-SDK-SourceCode
ALL source code samples for ByteScout SDKs and Web API API products.
Stars: ✭ 24 (-67.57%)
Mutual labels:  asp, webapi
WebApiToTypeScript
A tool for code generating TypeScript endpoints for your ASP.NET Web API controllers
Stars: ✭ 26 (-64.86%)
Mutual labels:  webapi, webapi-2
api
_api is an autogenerated CRUD API built on LowDB and ExpressJS.
Stars: ✭ 73 (-1.35%)
Mutual labels:  json-api
framboise
Framboise is a fuzzer for in-depth testing of WebAPIs.
Stars: ✭ 21 (-71.62%)
Mutual labels:  webapi
GPONMonitor
GPON Monitoring tool for Dasan Networks GPON OLTs
Stars: ✭ 26 (-64.86%)
Mutual labels:  webapi
ember-yeti-table
Yeti Table
Stars: ✭ 56 (-24.32%)
Mutual labels:  ember
jscrambler
Monorepo of Jscrambler's Javascript Client and Integrations
Stars: ✭ 118 (+59.46%)
Mutual labels:  ember
aspnet-core-web-api-using-odata
Demo application of my speech 'Add OData Support to Your Asp.Net Core Web Api' at Dotnet Konf İstanbul. http://dotnetkonf.com/
Stars: ✭ 28 (-62.16%)
Mutual labels:  webapi
crud-json-api
Build advanced JSON API Servers with almost no code.
Stars: ✭ 47 (-36.49%)
Mutual labels:  json-api
ember-cli-concat
An Ember addon that enables you to concatinate Ember CLI's app and vendor files into a single JS file and a single CSS file
Stars: ✭ 31 (-58.11%)
Mutual labels:  ember
TraceHub
Centralized and distributed logging for Web applications and services, extending System.Diagnostics and Essential.Diagnostics, providing structured tracing and logging withou needing to change 1 line of your application codes
Stars: ✭ 22 (-70.27%)
Mutual labels:  webapi
ember-content-loader
Easy, customizable content placeholders / skeletons screens
Stars: ✭ 41 (-44.59%)
Mutual labels:  ember
CRUD.ASPCore.Reactjs.WebAPI.EF
CRUD Operations in ASP.NET Core application using React.js , Web API and Entity Framework core DB first approach with the help of VS 2017.
Stars: ✭ 80 (+8.11%)
Mutual labels:  webapi

Saule

Build status

Saule is a JSON API (version 1.0) library for ASP.Net Web API 2. Install Saule using NuGet:

Install-Package saule

Visit the documentation website

To use Saule, you must define resources that contain the information about your domain:

public class PersonResource : ApiResource
{
    public PersonResource()
    {
        Attribute("FirstName");
        Attribute("LastName");
        Attribute("Age");

        BelongsTo<CompanyResource>("Job");
        HasMany<PersonResource>("Friends");
    }
}
public class CompanyResource : ApiResource
{
    public CompanyResource()
    {
        Attribute("Name");
        Attribute("NumberOfEmployees");
    }
}

You can then use these to serialize any class into Json Api (as long as your class has properties with the same names as in your model):

public class PersonController : ApiController
{
    [HttpGet]
    [ReturnsResource(typeof(PersonResource))]
    [Route("people/{id}")]
    public JohnSmith GetPerson(string id)
    {
        return new JohnSmith();
    }
}
GET http://example.com/people/123

{
  "data": {
    "type": "person",
    "id": "123",
    "attributes": {
      "first-name": "John",
      "last-name": "Smith",
      "age": 34
    },
    "relationships": {
      "job": {
        "links": {
          "self": "http://example.com/people/123/relationships/job/",
          "related": "http://example.com/people/123/job/"
        },
        "data": {
          "type": "company",
          "id": "456"
        }
      },
      "friends": {
        "links": {
          "self": "http://example.com/people/123/relationships/friends/",
          "related": "http://example.com/people/123/friends/"
        },
        "data": [
          {
            "type": "person",
            "id": "789"
          }
        ]
      }
    }
  },
  "included": [
    {
      "type": "company",
      "id": "456",
      "attributes": {
        "name": "Awesome, Inc.",
        "number-of-employees": 24
      }
    },
    {
      "type": "person",
      "id": "789",
      "attributes": {
        "first-name": "Sara",
        "last-name": "Jones",
        "age": 38
      }
    }
  ],
  "links": {
    "self": "http://example.com/people/123"
  }
}

Deserialization works just like in normal Web API; you don't need to do anything special to make this work.

Creating a new release

Follow the steps below to create a new release:

  1. Create a branch called release-v<version> (e.g. release-v1.5)
  2. Increase the version number in appveyor.yml in master
  3. Push both changes and wait for the build
  4. Copy the release notes into the release description on Github
  5. Publish the new release
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].