refitter
christianhelle/refitter · Public GitHub repository
Generate Refit interfaces and contracts from OpenAPI (Swagger) specifications
Open the project to try its demo, view the repository, or save it to your collection. Repository and demo actions use RepoShelf’s sign-in flow.

About this project
Author-written excerpt from the project README.
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.
The MSBuild task offers several advantages over the Source Generator:
- 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
- Build-time Generation: Code is generated during the pre-build process, which ensures that the Refit source generator will work without needing to rebuild a second time.
- No Manual Commits: Generated files are created automatically during build, eliminating the need to commit generated code to source control
Requirements and intended audience
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.
Not recorded: account, external api key, paid service, self-hosting. Missing information does not mean there are no requirements.
Statements extracted from the author’s documentation · Checked 2026-10-20. Source: https://github.com/christianhelle/refitter/blob/main/README.md
Recorded maintenance information
Last recorded source update: 2026-11-03. Saved release: 2.3.0 · 2026-09-28. These dates do not guarantee ongoing maintenance.
- Technologies
- C#
- Licence
- MIT. Generally permits modification and commercial use, subject to the licence’s notices and conditions.
- Demo check
- A public page loaded on 2026-11-06. This does not test every feature.
Browse related categories
More projects to explore
awesome-selfhosted
awesome-selfhosted/awesome-selfhosted
A list of Free Software network services and web applications which can be hosted on your own servers
awesome-go
avelino/awesome-go
A curated list of awesome Go frameworks, libraries and software
NextChat
ChatGPTNextWeb/NextChat
✨ Zero-config AI chat assistant. No API key needed — sign up and instantly chat with GPT-5, Claude 4, Gemini 2.5, DeepSeek & 100+ top models. Pay-as-you-go saves you more. Available on Web, iOS, macOS, Android, Linux, Windows.
vue-element-admin
PanJiaChen/vue-element-admin
A magical vue admin https://panjiachen.github.io/vue-element-admin