All Projects → zijianhuang → Webapiclientgen

zijianhuang / Webapiclientgen

Licence: mit
Strongly Typed Client API Generators generate strongly typed client APIs in C# .NET and in TypeScript for jQuery and Angular 2+ from ASP.NET Web API and .NET Core Web API

Programming Languages

typescript
32286 projects
csharp
926 projects

Projects that are alternatives of or similar to Webapiclientgen

openapiclientgen
Generate C# and TypeScript client codes from Open API / Swagger definitions
Stars: ✭ 31 (-76.87%)
Mutual labels:  aurelia, web-api, axios, fetch-api
Bootstrap
Open Source JS plugins
Stars: ✭ 13 (-90.3%)
Mutual labels:  jquery, angular2, angular4
Dbwebapi
(Migrated from CodePlex) DbWebApi is a .Net library that implement an entirely generic Web API (RESTful) for HTTP clients to call database (Oracle & SQL Server) stored procedures or functions in a managed way out-of-the-box without any configuration or coding.
Stars: ✭ 84 (-37.31%)
Mutual labels:  restful, webapi, asp-net
Ps Webapi
(Migrated from CodePlex) Let PowerShell Script serve or command-line process as WebAPI. PSWebApi is a simple library for building ASP.NET Web APIs (RESTful Services) by PowerShell Scripts or batch/executable files out of the box.
Stars: ✭ 24 (-82.09%)
Mutual labels:  restful, webapi, asp-net
Jeeplatform
一款企业信息化开发基础平台,拟集成OA(办公自动化)、CMS(内容管理系统)等企业系统的通用业务功能 JeePlatform项目是一款以SpringBoot为核心框架,集ORM框架Mybatis,Web层框架SpringMVC和多种开源组件框架而成的一款通用基础平台,代码已经捐赠给开源中国社区
Stars: ✭ 1,285 (+858.96%)
Mutual labels:  restful, ajax, jquery
Nukeviet
NukeViet CMS is multi Content Management System. NukeViet CMS is the 1st open source content management system in Vietnam. NukeViet was awarded the Vietnam Talent 2011, the Ministry of Education and Training Vietnam officially encouraged to use.
Stars: ✭ 113 (-15.67%)
Mutual labels:  ajax, jquery
Vue Api Request
Control your API calls by using an amazing component which supports axios and vue-resource
Stars: ✭ 116 (-13.43%)
Mutual labels:  axios, ajax
Ngx Openlayers
Angular2+ components for Openlayers 4.x
Stars: ✭ 131 (-2.24%)
Mutual labels:  angular2, angular4
Ng Simple Slideshow
A simple, responsive slideshow for Angular 4+.
Stars: ✭ 119 (-11.19%)
Mutual labels:  angular2, angular4
Ng Packaged
An Angular library packaged by ng-packagr
Stars: ✭ 109 (-18.66%)
Mutual labels:  angular2, angular4
Django Crud Ajax Login Register Fileupload
Django Crud, Django Crud Application, Django ajax CRUD,Django Boilerplate application, Django Register, Django Login,Django fileupload, CRUD, Bootstrap, AJAX, sample App
Stars: ✭ 118 (-11.94%)
Mutual labels:  ajax, jquery
Ng2 Smart Table
Angular Smart Data Table component
Stars: ✭ 1,590 (+1086.57%)
Mutual labels:  angular2, angular4
Fileuploader
Beautiful and powerful HTML file uploading tool. A jQuery, PHP and Node.js plugin that transforms the standard input into a revolutionary and fancy field on your page.
Stars: ✭ 111 (-17.16%)
Mutual labels:  ajax, jquery
Aspnetcore Angular Universal
ASP.NET Core & Angular Universal advanced starter - PWA w/ server-side rendering for SEO, Bootstrap, i18n internationalization, TypeScript, unit testing, WebAPI REST setup, SignalR, Swagger docs, and more! By @TrilonIO
Stars: ✭ 1,455 (+985.82%)
Mutual labels:  angular2, angular4
Fusebox Angular Universal Starter
Angular Universal seed project featuring Server-Side Rendering, @fuse-box bundling, material, firebase, Jest, Nightmare, and more
Stars: ✭ 132 (-1.49%)
Mutual labels:  angular2, angular4
Webapiclient
An open source project based on the HttpClient. You only need to define the c# interface and modify the related features to invoke the client library of the remote http interface asynchronously.
Stars: ✭ 1,618 (+1107.46%)
Mutual labels:  restful, webapi
Rebirth Ng
rebirth-ng is a ui framework for Angular & bootstrap.
Stars: ✭ 118 (-11.94%)
Mutual labels:  angular2, angular4
Angular2 Spring
Angular 2+ and Spring Integration
Stars: ✭ 133 (-0.75%)
Mutual labels:  angular2, angular4
Ng Gapi
ng-gapi a Google api module for Angular 6+
Stars: ✭ 126 (-5.97%)
Mutual labels:  angular2, angular4
Oblog
An Auto Rendering 🔽 Blogging System Based on MarkDown & Vue.js | 自动渲染装载 MarkDown 内容的博客系统
Stars: ✭ 133 (-0.75%)
Mutual labels:  axios, jquery

Strongly Typed Client API Generators generate strongly typed client API in C# codes and TypeScript codes. You may then provide or publish either the generated source codes or the compiled client API libraries to other developers for developing client programs.

This project delivers these products:

  1. Code generator for strongly typed client API in C# supporting .NET and Xamarin.Forms.
  2. Code generators for strongly typed client API in TypeScript for jQuery, Angular 2, Aurelia, Axios and Fetch API.
  3. TypeScript CodeDOM, a CodeDOM component for TypeScript, derived from CodeDOM of .NET Framework.
  4. POCO2TS.exe, a command line program that generates TypeScript interfaces from POCO classes.
  5. Fonlow.Poco2Ts, a component that generates TypeScript interfaces from POCO classes.

Packages

Hints:

  • OpenApiClientGen based on key components of WebApiClientGen is a spin-off for generating client API codes in C# and TypeScript according to a definition file of Swagger/Open API Specification.

Remarks:

  • The development had started in year 2015 supporting .NET Framework, then .NET Core 2. And Tag "LastCore31" is to mark the last snapshot supporting .NET Framework 4.6.2 and .NET Core 3.1.
  • Starting from 2021-02-10, the development will support only .NET 5 and onward.
  • Wiki contents about .NET Framework will be kept in foreseeable future.

Key Features

  1. Client API codes generated are directly mapped from the Web API controller methods, .NET primitive types and POCO classes. This is similar to what svcutil.exe in WCF has offered.
  2. Doc comments of controller methods and POCO classes are copied.

Key Benefits

  1. WebApiClientGen is seamlessly integrated with ASP.NET Web API with very little steps/overheads to setup, maintain and synchronize between Web API and client APIs, during RAD or Agile Software Development.
  2. Support all .NET primitive types including decimal.
  3. Support DataTime, DataTimeOffset, Array, Tuple, Dynamic Object, Dictionary and KeyValuePair
  4. Strongly typed generated codes are subject to design time type checking and compile time type checking.
  5. Provide high level of abstraction, shielding application developers from repetitive technical details of RESTful practices and traditional AJAX calls.
  6. Rich meta info including doc comments make IDE intellisense more helpful, so application developers have less need of reading separated API documents.

Examples (to be adjusted)

  1. POCO classes
  2. Web API
  3. Generated client API C# codes
  4. Client codes using the generated library in C#
  5. Generated client data models and API in TypeScript for jQuery, for Angular 2, for Aurelia and for Axios
  6. Client codes using the generated library in TypeScript

Remarks:

  1. JavaScript codes compiled from generated TypeScript codes could be used in JS applications, however, obviously no type info will be available, while application programmers may still enjoy intellisense and abstraction from AJAX details.
  2. React and Vue.js applications typically use Axios for HTTP requests. Currently babel does not support namespaces. So you may not do React TSX programming with generated TypeScript codes. However, this may be changed in near future because of this pull request.

Downloads

  1. Strongly Typed Client API Generators for ASP.NET Core Web API.
  2. TypeScript CodeDOM
  3. Fonlow.Poco2TS

Plugins for TypeScript/JavaScript Frameworks/Libraries

  1. jQuery and HttpClient helper library
  2. Angular 6+
  3. AXIOS
  4. Aurelia
  5. Fetch API

Concepts

  1. Web API vendors / developers should provide client API libraries to developers of client programs, as Google and Amazon etc. would do in order to make the RESTful Web API reach wider consumers (internal and external) efficiently.
  2. To client developers, classic function prototypes like ReturnType DoSomething(Type1 t1, Type2 t2 ...) is the API function, and the rest is the technical implementation details of transportations: TCP/IP, HTTP, SOAP, resource-oriented, CRUD-based URIs, RESTful, XML and JSON etc. The function prototype and a piece of API document should be good enough for calling the API function.
  3. The better you have separation of concerns in your Web API design, the more you will benefit from the components of this project in order to deliver business values sooner, with less handcrafted codes , less repetitive tasks and less chances of human mistakes.

Prerequisites

Server side:

  1. .NET 5

.NET client side:

  1. .NET Framework 4.5.2, or Universal Windows, or Mono.Android, or Xamarin.iOS, or .NET Core 2.0/2.1/3 and .NET 5
  2. ASP.NET Web API 2.2 Client Libraries
  3. Json.NET of Newtonsoft for Content-Type application/json
  4. Microsoft Build Tools 2015

TypeScript client side:

  1. TypeScript compiler
  2. jQuery
  3. Angular 2-9
  4. Aurelia
  5. Axios
  6. Fetch API

For more details, please check WIKI, and codeproject.com articles at:

  1. Generate C# .NET Client API for ASP.NET Web API
  2. Generate TypeScript Client API for ASP.NET Web API
  3. ASP.NET Web API, Angular2, TypeScript and WebApiClientGen
  4. Generate C# Client API for ASP.NET Core Web API

Demo Applications

The Demo applications in this repository are mainly for testing WebApiClientGen during development. And there are other demo applications in the following repositories, demostrating how real world applications could utilize WebApiClientGen:

  1. WebApiClientGen Examples
  2. .NET Core Demo
  3. WebApiClientGen vs Swagger

These demo applications are actively maintained and kept up-to-date with the latest frameworks. If you are still staying with some older frameworks like Angular 4 or 5 or .NET Core 2.0, you may navigate to respective tags of the repositories and checkout.

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].