Skip to content

CenterEdge/Yardarm

Repository files navigation

Yardarm

Build NuGet Join the chat at https://gitter.im/CenterEdgeYardarm/community

Yardarm is an OpenAPI 3 SDK Generator for C#. It provides various tools that will generate an SDK for a valid OpenAPI specification.

Project Goals

  • Present a .NET SDK that uses modern .NET/C# paradigms
  • High performance, both for generating SDKs and SDK consumers
  • Highly extensible
  • Mitigate backward compatibility issues as new SDKs are generated from new versions of an OpenAPI specification

Features

  • Works with valid OpenAPI 3 specs, in JSON or YAML format
  • Many generation options
    • Command Line Application
    • Docker Image
    • In-code via library
    • .NET Global Tool
    • MSBuild SDK
  • Generates a SDK using modern C# patterns and practices as follows:
    • Asynchronous methods with cancellation tokens
    • Nullable reference types
    • Polymorphism
    • Interfaces with concrete implementations
    • XML documentation for IntelliSense
    • Portable PDBs with embedded source code
  • Fast SDK generation
    • Doesn't make C# files on disk and run MSBuild
    • Uses Roslyn to directly generate AST and compile in memory
  • Built-in NuGet support
    • Generate valid .nupkg files directly, with correct dependencies
    • Target multiple framework versions in one package automatically
    • Automatically restore packages required for compilation
  • Highly extensible SDK generation
    • Built around plugable extensions that add additional features or modify the C# code used for compilation
    • Includes out-of-the-box plugins for common scenarios
      • Newtonsoft.Json serialization/deserialization
      • System.Text.Json serialization/deserialization
      • Microsoft.Extensions.Http for dependency injection
  • Highly extensible SDK
    • Will allow the SDK consumer to extend the behaviors on the client side
    • Pluggable configuration for things like TLS and base urls
    • Add HttpMessageHandler instances to the HttpClient stack
    • Mockable API interfaces for unit testing

Consuming Yardarm SDKs

See the detailed documentation on consuming SDKs generated by Yardarm.

Generating Yardarm SDKs

See the detailed documentation on generating SDKs using Yardarm.

Contributing

Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.

Authors

See also the list of contributors who participated in this project.

License

This project is licensed under the Apache 2.0 License - see the LICENSE.md file for details