GuiStracini.SDKBuilder

🚧 ⚙️ A SDK framework that helps create a .NET SDK project for API wrappers/clients


Project maintained by guibranco Hosted on GitHub Pages — Theme by mattgraham

GuiStracini.SDKBuilder

An SDK framework designed to streamline the creation of C# SDKs for consuming generic REST APIs.

GuiStracini.SDKBuilder logo

GitHub license Time tracker


🚀 CI/CD Status

Build Status Last Commit Tests Coverage Code Smells LoC
Build status GitHub last commit AppVeyor tests (branch) Coverage Code Smells Lines of Code

🛠️ Code Quality

DeepSource

Codacy Grade Codacy Coverage

Codecov CodeFactor


📦 Installation

GitHub Releases

GitHub last release
GitHub downloads

Download the latest version from the Release Page.

NuGet Package

Package Version Downloads
GuiStracini.SDKBuilder NuGet Version NuGet Downloads

📖 Overview

GuiStracini.SDKBuilder simplifies SDK development for REST APIs using WebAPI2 conventions. It provides a ServiceFactory class that implements the IServiceFactory interface, including methods for Get, Post, Put, Delete, Head, and Upload operations.

The library leverages self-convention and custom attributes to generate intelligent endpoints and handle API requests efficiently.

🏗 Using IServiceFactory, IRequestBase, and IResponseBase

🔧 IServiceFactory Example:

IServiceFactory serviceFactory = new ServiceFactory();
var response = serviceFactory.Get<MyResponseType>("/api/resource");

📤 IRequestBase Example:

public class MyRequest : IRequestBase {
    public string Property { get; set; }
}

📥 IResponseBase Example:

public class MyResponse : IResponseBase {
    public string Result { get; set; }
}

🏗️ Creating a New SDK

To build a new SDK, you need:

🔒 Note: Currently, the package supports Basic Authorization (via HTTP headers or JWT). OAuth/OAuth2 is not natively supported, but you can extend it. Contributions via PR are welcome!


📝 License

This project is licensed under the MIT License. See the LICENSE file for details.


📬 Contact & Contributions

If you have suggestions, bug reports, or feature requests, feel free to open an issue or submit a PR.

Happy coding! 🚀