Repository navigation
v0.7.3
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.3Features
- 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 build time using rosyln C# source generator Refitter.SourceGenerator
--no-auto-generated-headerCLI tool argument to skip prefixing output file with header--interface-onlyCLI tool argument to skip contract type generation--use-api-responseCLI Tool argument to returnIApiResponse<T>instead ofTask<T>--internalCLI tool argument to generate types with theinternalaccessibility modifier--cancellation-tokensCLI tool argument to generate the Refit interface with CancellationTokens--no-operation-headersCLI tool argument to skip generating[Header]parameters--no-loggingCLI tool argument to disable error logging and feature usage tracking--use-iso-date-formatCLI tool argument to explicitly format date query string parameters in ISO standard date format using delimiters (2023-06-15)--multiple-interfacesCLI tool argument to generate a Refit interface for each endpoint. May be one ofByEndpoint, ByTag--settings-fileCLI tool argument to use a .refitter format file and override all other arguments
What's Changed
- Remove source generator from docs and builds by @christianhelle in #101
- Source Generator Hack - Write to disk instead of the syntax tree by @christianhelle in #102
- Enable SonarCloud by @christianhelle in #103
- Restore source generator in docs and builds by @christianhelle in #104
- Resolve SonarCloud detected code smells by @christianhelle in #105
- docs: add @guillaumeserale as a contributor for bug by @allcontributors in #109
- docs: add @Roflincopter as a contributor for ideas by @allcontributors in #110
- Add Accept Request Header by @guillaumeserale in #108
- Fix issue where [Headers("Accept")] is always generated by @christianhelle in #111
- Bump NSwag.CodeGeneration.CSharp from 13.19.0 to 13.20.0 by @dependabot in #113
- Bump NSwag.Core.Yaml from 13.19.0 to 13.20.0 by @dependabot in #112
- Bump Microsoft.NET.Test.Sdk from 17.7.0 to 17.7.1 by @dependabot in #115
- Bump H.Generators.Extensions from 1.15.1 to 1.16.0 by @dependabot in #114
- Update docs regarding accept headers by @christianhelle in #116
- Bump Microsoft.CodeAnalysis.CSharp from 4.6.0 to 4.7.0 by @dependabot in #117
- Fix duplicate Accept headers by @christianhelle in #119
- Add Codecov workflow and badge by @christianhelle in #120
- docs: add yadanilov19 as a contributor for ideas by @allcontributors in #122
- Exclude from generated code from code coverage by @christianhelle in #123
- Fix parameters' casing in openAPI document are not honoured in Refit interface methods by @christianhelle in #125
- Bump FluentAssertions from 6.11.0 to 6.12.0 by @dependabot in #126
- Add support for using .refitter file from CLI by @christianhelle in #127
- Improve local smoke tests and introduce dev containers support by @christianhelle in #128
- Fix incorrect assembly and file version by @christianhelle in #129
Full Changelog: 0.7.2...0.7.3