Yardarm is an OpenAPI 3 SDK Generator for C#. It provides various tools that will generate an SDK for a valid OpenAPI specification.
- Works with valid OpenAPI 3 specs, in JSON or YAML format
- Many generation options
- Command Line Application
- Docker Image
- In-code via library
- .NET Core Global Tool
- Support C# 9 Source Generators???
- Generates a SDK using modern C# patterns and practices as follows:
- Asynchronous methods with cancellation tokens
- Nullable reference types
- Interfaces with concrete implementations
- Should support mocking the implementations for consumers to write unit tests
- XML documentation for IntelliSense
- Portable PDB
- Dependency injection support via
Microsoft.Extensions.DependencyInjection.Abstractions
- Fast SDK generation
- Doesn't make C# files on disk and run MSBuild
- Uses Roslyn to compile directly in memory
- Built-in NuGet support
- Generate valid
.nupkg
files directly, with correct dependencies - Automatically restore packages required for compilation
- Generate valid
- Highly extensible SDK generation
- Built around plugable extensions that add additional features or modify the C# code used for compilation
- Will include some out-of-the-box plugins for common scenarios
Newtonsoft.Json
serialization/deserializationNodaTime
date/time properties
- 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 theHttpClient
stack
dotnet tool install --global Yardarm.CommandLine --version 0.1.0-alpha003
yardarm help generate
docker run -it centeredge/yardarm:release-0.1.0-alpha003
yardarm help generate
# Generate a DLL and related files, with Newtonsoft.Json support
yardarm generate -i my-spec.yaml -n MySpec -v 1.0.0 -o MySpec.dll --xml MySpec.xml --pdb MySpec.pdb -x Yardarm.NewtonsoftJson.dll
# Generate a NuGet package and symbols package, with Newtonsoft.Json support
yardarm generate -i my-spec.json -n MySpec -v 1.0.0 -nupkg MySpec.nupkg --snupkg MySpec.snupkg -x Yardarm.NewtonsoftJson.dll
Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.
- Brant Burnett - Initial work - BrantBurnett
See also the list of contributors who participated in this project.
This project is licensed under the Apache 2.0 License - see the LICENSE.md file for details