Skip to content

v0.5.1

Compare
Choose a tag to compare
@christianhelle christianhelle released this 02 May 06:17
· 2169 commits to main since this release
640fd9e

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.5.1

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
  • --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 return IApiResponse<T> instead of Task<T>
  • --internal CLI tool argument to generate types with the internal 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

What's new

  • Fix missing support for Query Parameters in #6
  • Fix path parameters in parent by @kgamecarter in #7
  • Fix missing multipart/form-data parameters by @distantcam in #9
  • Add support for kebab-string-casing parameters in #11
  • Various name encoding fixes, fix multiline descriptions by @neoGeneva in #12
  • Add support for generating IApiResponse as return types in #14
  • Add support for both local files and URL by @yrki in #15
  • Charge Target Framework to .NET 6.0 (LTS) in #18
  • Add support for generating 'internal' types in #21
  • Add support for using Cancellation Tokens in #23
  • Add injecting header parameters by @guillaumeserale in #24
  • Add --no-operation-headers CLI tool argument by @christianhelle in #25

Contributors

Full Changelog: 0.1.3-alpha...0.5.1