TCDev.APIGenerator
0.5.0-WeAreDevs
See the version list below for details.
dotnet add package TCDev.APIGenerator --version 0.5.0-WeAreDevs
NuGet\Install-Package TCDev.APIGenerator -Version 0.5.0-WeAreDevs
<PackageReference Include="TCDev.APIGenerator" Version="0.5.0-WeAreDevs" />
paket add TCDev.APIGenerator --version 0.5.0-WeAreDevs
#r "nuget: TCDev.APIGenerator, 0.5.0-WeAreDevs"
// Install TCDev.APIGenerator as a Cake Addin #addin nuget:?package=TCDev.APIGenerator&version=0.5.0-WeAreDevs&prerelease // Install TCDev.APIGenerator as a Cake Tool #tool nuget:?package=TCDev.APIGenerator&version=0.5.0-WeAreDevs&prerelease
Getting Started | Samples | Walkthrough Video
Turn your models into fully working APIs in minutes
<a href="https://tcdev.gitbook.io/"><img src="https://img.shields.io/badge/Docs-0.0.9-orange"></a> <a href="https://twitter.com/intent/follow?screen_name=timcadenbach"><img src="https://img.shields.io/badge/Twitter-follow-blue"></a> <a href="https://www.github.com/sponsors/deejaytc"><img src="https://img.shields.io/github/sponsors/deejaytc?label=Lovely%20Sponsors" /> </a>
Build & Nuget Status
Version | Build | Nuget | |
---|---|---|---|
Main | <img src="https://img.shields.io/github/workflow/status/DeeJayTC/net-dynamic-api/.NET/main?label=Main"> | 0.1.3 | |
VNext | <img src="https://img.shields.io/github/workflow/status/DeeJayTC/net-dynamic-api/.NET/vnext?label=vnext"> | 0.1.2-alpha-6ffff |
About
The API Generator automatically generates a fully working CRUD Microservice from just your Model (C# Classes) or a JSON Definition. Everything from routes, database handling, migrations, openapi spec, OData etc is working magically out of the box! You just write your model and get a fully working CRUD api with filtering, sorting, selectable fields and everything else OData and classic REST offers.
By using the API Generator, this little code snippet is already a working CRUD API
/// <summary>
/// This is the minimal sample, yes this is a working api ;)
/// </summary>
[Api("/minimal")]
public class MinimalSample : IObjectBase<int>
{
public int Id { get; set; }
public string Name { get; set; }
public int Value { get; set; }
}
Heres another sample:
[Api("/people", ApiMethodsToGenerate.All )]
public class Person : Trackable,
IObjectBase<Guid>,
IBeforeUpdate<Person>, // Before Update Hook
IBeforeDelete<Person>, // BeforeDelete Hook
{
public string Name { get; set; }
public DateTime Date { get; set; }
public string Description { get; set; }
public int Age { get; set; }
public Guid Id { get; set; }
}
And this is also the FULL code for a working API using the JSON mode:
[
{
"name": "Car",
"route": "/cars",
"caching": true,
"cacheLiveTime": 1000,
"events": "POST,PUT,DELETE",
"idType": "int",
"Fields": [
{
"name": "Name",
"type": "String",
"maxLength": "200",
"nullable": false
}
]
}
]
Getting Started & Docoumentation
Read this for a more detailed guide → https://www.tcdev.de/tcdev-api-generator-getting-started Or just follow these steps:
- Install the package
dotnet add package TCDev.ApiGenerator --prerelease
after the package is installed add this to your program.cs (or startup.cs)
// Add API Generator and load data
builder.Services.AddApiGeneratorServices(builder.Configuration, Assembly.GetExecutingAssembly());
Documentation → https://tcdev.gitbook.io/
Samples
https://github.com/DeeJayTC/net-dynamic-api/tree/main/sample
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
-
net6.0
- Microsoft.AspNetCore.Authentication.JwtBearer (>= 6.0.2)
- Microsoft.AspNetCore.Http (>= 2.2.2)
- Microsoft.AspNetCore.Mvc.NewtonsoftJson (>= 6.0.2)
- Microsoft.CodeAnalysis.Common (>= 4.0.1)
- Microsoft.CodeAnalysis.CSharp (>= 4.0.1)
- Microsoft.EntityFrameworkCore (>= 6.0.4)
- Microsoft.Identity.Client (>= 4.41.0)
- Microsoft.Identity.Web (>= 1.23.0)
- Microsoft.VisualStudio.Azure.Containers.Tools.Targets (>= 1.14.0)
- Newtonsoft.Json (>= 13.0.1)
- Swashbuckle.AspNetCore (>= 6.2.3)
- TCDev.APIGenerator.Data (>= 0.5.0-WDWC-DEMO)
- TCDev.APIGenerator.Schema (>= 0.5.0-WDWC-DEMO)
NuGet packages (6)
Showing the top 5 NuGet packages that depend on TCDev.APIGenerator:
Package | Downloads |
---|---|
TCDev.APIGenerator.OData
Adds OData Support to the API Generator |
|
TCDev.APIGenerator.Data.SQL
Adds necessary functionality to use MS SQL Server and Azure SQL Instances with the API Generator. |
|
TCDev.APIGenerator.Data.SQLite
Adds necessary functionality to use SQLLite with the API Generator. Rasepi greates fully working CRUD Apis from just models |
|
TCDev.APIGenerator.Data.Postgres
Adds necessary functionality to use Postgres databases with the API Generator. Rasepi greates fully working CRUD Apis from just models |
|
TCDev.APIGenerator.RabbitMQ
Package adds RabbitMQ events to the APIs. Creates fully working CRUD Apis from just models |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
0.7.1-RC1 | 626 | 10/16/2022 |
0.7.0 | 1,319 | 11/8/2022 |
0.7.0-RC1 | 662 | 7/25/2022 |
0.6.0 | 1,420 | 6/24/2022 |
0.6.0-RC2 | 706 | 6/24/2022 |
0.6.0-RC1 | 585 | 6/24/2022 |
0.5.0-WeAreDevs | 572 | 6/12/2022 |
0.5.0-WDWC-DEMO-ODATA | 559 | 6/12/2022 |
0.5.0-WDWC-DEMO | 616 | 6/11/2022 |
0.5.0-WDWC | 595 | 6/11/2022 |
0.5.0-alpha-1 | 632 | 6/10/2022 |
0.1.5 | 845 | 5/6/2022 |
0.1.4 | 820 | 4/16/2022 |
0.1.3 | 784 | 4/16/2022 |
0.1.2 | 791 | 4/15/2022 |
0.1.2-alpha-6ffff | 561 | 4/16/2022 |
0.1.2-alpha-4a262d | 515 | 4/16/2022 |
0.1.1-alpha | 518 | 3/29/2022 |
0.1.0-alpha-4a262d | 534 | 4/8/2022 |
0.1.0-alpha-3f152c | 568 | 4/7/2022 |
0.1.0-alpha | 581 | 3/29/2022 |
0.0.9-alpha | 554 | 3/29/2022 |
0.0.8-alpha | 555 | 3/29/2022 |
0.0.7-alpha | 538 | 3/26/2022 |
0.0.6-alpha | 550 | 3/26/2022 |
0.0.5-alpha | 601 | 3/26/2022 |
0.0.4-alpha | 553 | 3/25/2022 |