v0.7.2
Installation
This is packaged as a .NET Tool and is published to nuget.org. You can install this specific version of this tool like this:
dotnet tool install --global Refitter --version 0.7.2
Features
- Generate single file containing Refit interface and contract types from an OpenAPI spec file
- Supports OpenAPI v2 and v3
- Supports OpenAPI specifications in JSON and YAML formats
- Supports generating route, query, header, and body request parameters
Generate code at compile time using rosyln C# source generator Refitter.SourceGenerator--no-auto-generated-header
CLI tool argument to skip prefixing output file with header--interface-only
CLI tool argument to skip contract type generation--use-api-response
CLI Tool argument to returnIApiResponse<T>
instead ofTask<T>
--internal
CLI tool argument to generate types with theinternal
accessibility modifier--cancellation-tokens
CLI tool argument to generate the Refit interface with CancellationTokens--no-operation-headers
CLI tool argument to skip generating[Header]
parameters--no-logging
CLI tool argument to disable error logging and feature usage tracking--use-iso-date-format
CLI tool argument to explicitly format date query string parameters in ISO standard date format using delimiters (2023-06-15)--multiple-interfaces
CLI tool argument to generate a Refit interface for each endpoint. May be one ofByEndpoint, ByTag
What's Changed
- Add support for generating multiple interfaces by @christianhelle in #93
- Rename source generator output to use .refitter file and replace extension with .g.cs by @christianhelle in #94
- docs: add kirides as a contributor for code by @allcontributors in #96
- Generate Multiple interfaces based on first Tag by @kirides in #95
- Small code cleanup in Generators by @kirides in #97
- Local smoke test bash script by @christianhelle in #98
- Bump Microsoft.NET.Test.Sdk from 17.6.3 to 17.7.0 by @dependabot in #99
New Contributors
Full Changelog: 0.7.0...0.7.2