Repository navigation
v0.8.0
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.8.0Features
- 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-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. This may be eitherByEndpointorByTag--settings-fileCLI tool argument to use a .refitter format file and override all other arguments--skip-validationCLI tool argument to ignore all validation errors and attempt to generate code anyway--match-pathCLI tool argument to only include Paths that match the provided regular expression. May be set multiple times--tagCLI tool argument to only include Endpoints that contain this tag. May be set multiple times and result in OR'ed evaluation--optional-nullable-parametersCLI tool argument to make non-required query parameters to optional parameters in Refit interface--operation-name-templateCLI tool argument to append a prefix or suffix to the{operationName}template
What's Changed
- Add
matchPathoption in example .refitter file in README by @christianhelle in #146 - Skip default values when collecting feature usages for Analytics by @christianhelle in #145
- Fix documentation regarding
--settings-fileusage by @christianhelle in #152 - Disable support keys if
--no-loggingis specified by @christianhelle in #153 - Mark deprecated operations by @angelofb in #154
- Update docs with details about --no-deprecated-operations by @christianhelle in #155
- Speed up local smoke tests by @christianhelle in #156
- Generate Refit interfaces as partial by @christianhelle in #162
- Optional OpenAPI Path in CLI arguments by @christianhelle in #160
- Introduce
--operation-name-templatecommand line argument by @angelofb in #164 - Add support for optional parameters via the
--optional-nullable-parametersCLI argument by @christianhelle in #163 - Update .refitter file format documentation by @christianhelle in #169
- Resolved issues reported by @Ekkeir , @waylonmtz , @vinaymadupathi
Full Changelog: 0.7.5...0.8.0