{"repo":"christianhelle/refitter","free":true,"listed":false,"github":"https://github.com/christianhelle/refitter","clone":"git clone https://github.com/christianhelle/refitter.git","description":"Generate Refit interfaces and contracts from OpenAPI (Swagger) specifications","language":"C#","stars":415,"topics":["openapi","refit","rest","swagger","openapi3","csharp-sourcegenerator"],"license":"MIT","category":"api-integrations-sdks","readme_excerpt":"Refitter Refitter is a tool for generating a C# REST API Client using the Refit library. Refitter can generate the Refit interface and contracts from OpenAPI specifications. Refitter could format the generated Refit interface to be managed by Apizr (v6+) and generate some registration helpers too. Upgrading to v2.0.0? Review the Breaking Changes (v2.0.0) guide. Source-generator projects may now need an explicit Refit reference, and the OpenAPI parser upgrade should be treated as a regenerate-review-test migration step rather than a fully proven behavioral no-op. Refitter comes in 3 forms: - A .NET CLI Tool distributed via nuget.org that outputs a single C# file on disk - An MSBuild Task via the Refitter.MSBuild package that integrates seamlessly into your build pipeline and automatically generates code at build time based on .refitter files within the project directory - A C# Source Generator via the Refitter.SourceGenerator package that generates code on compile time based on a .refitter within the project directory CLI Tool Installation The tool is packaged as a .NET Tool and is published to nuget.org. You can install the latest version of this tool like this: Alternatively, you can use the Docker image: Or run it directly: Usage To generate code from an OpenAPI specifications file, run the following: This will generate a file called Output.cs which contains the Refit interface and contract classes generated using NSwag CLI Tool Output Example Here's what the console output","default_branch":null,"files":null,"tree":[],"storefront":"/r/christianhelle","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/christianhelle/refitter/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}