v0.7.5
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.5
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 OpenAPI specification validation and error/warning/stats reporting
- Supports generating route, query, header, and body request parameters
- Generate code at build 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
--settings-file
CLI tool argument to use a .refitter format file and override all other arguments--skip-validation
CLI tool argument to ignore all validation errors and attempt to generate code anyway--match-path
CLI tool argument to only include Paths that match the provided regular expression. May be set multiple times--tag
CLI tool argument to only include Endpoints that contain this tag. May be set multiple times and result in OR'ed evaluation
What's Changed
- Feature: Filtering of endpoints and tags by @kirides in #132
- Update docs with new --tag and --match-path features by @christianhelle in #134
- Fix issue when downloading an OpenAPI spec from a URL that returns a GZIP stream by @christianhelle in #136
- Show help text if no arguments are passed by @christianhelle in #140
- Introduce OpenAPI validation by @christianhelle in #141
- Fix #142 by changing includeTags filtering and restoring collection snapshots by @kirides in #143
Full Changelog: 0.7.3...0.7.5