Skip to content

MobileTeleSystems/ApiCodeGenerator.OpenApi.Refit

Repository files navigation

NuGet Version GitHub License Codacy coverage

The ApiCodeGenerator extension module implements code generation for the Refit library.

Installation

  1. Add the ApiCodeGenerator.OpenApi.Refit and Refit packages to your project.
  2. Add a document describing the API (in json or yaml format) and a corresponding nswag file with the same name (format description).
  3. In the nswag file, select the OpenApiToRefitClient generator.
  4. Rebuild the project.

Now, an interface with the name specified in the nswag file (by default, it matches the document file name) will be available in the project.

You can read more about other generation settings in the ApiCodeGenerator project description.