diff --git a/README.md b/README.md index 1d850926c..4140a6c6e 100644 --- a/README.md +++ b/README.md @@ -140,6 +140,12 @@ refitter [path to OpenAPI spec file] --namespace "[Your.Namespace.Of.Choice.Gene This will generate a file called `Output.cs` which contains the Refit interface and contract classes generated using [NSwag](https://github.com/RicoSuter/NSwag) +### CLI Tool Output Example + +Here's what the console output looks like when running the Refitter CLI tool: + +![Console Output](images/console-output.png) + ## Source Generator Refitter is available as a C# Source Generator that uses the [Refitter.Core](https://github.com/christianhelle/refitter/tree/main/src/Refitter.Core) library for generating a REST API Client using the [Refit](https://github.com/reactiveui/refit) library. Refitter can generate the Refit interface from OpenAPI specifications. Refitter could format the generated Refit interface to be managed by [Apizr](https://www.apizr.net) and generate some registration helpers too. diff --git a/docs/docfx_project/articles/cli-tool.md b/docs/docfx_project/articles/cli-tool.md index 6ffaeb1d7..a01c9c926 100644 --- a/docs/docfx_project/articles/cli-tool.md +++ b/docs/docfx_project/articles/cli-tool.md @@ -112,10 +112,17 @@ OPTIONS: Replaces NSwag JsonInheritanceConverter attributes with System.Text.Json JsonPolymorphicAttributes. To have the native support of inheritance (de)serialization and fallback to base types when payloads with (yet) unknown types are offered by newer versions of an API - See https://learn.microsoft.com/en-us/dotnet/standard/serialization/system-text-json/polymorphism for more information - --disposable Generate refit clients that implement IDisposable + See https://learn.microsoft.com/en-us/dotnet/standard/serialization/system-text-json/polymorphism for more information --disposable Generate refit clients that implement IDisposable ``` +## CLI Tool Output Example + +Here's what the console output looks like when running the Refitter CLI tool: + +![Console Output](https://raw.githubusercontent.com/christianhelle/refitter/refs/heads/main/images/console-output.png) + +## Basic Usage + To generate code from an OpenAPI specifications file, run the following: ```shell diff --git a/docs/docfx_project/articles/examples.md b/docs/docfx_project/articles/examples.md index ab16d226e..d04a603dd 100644 --- a/docs/docfx_project/articles/examples.md +++ b/docs/docfx_project/articles/examples.md @@ -8,6 +8,10 @@ Here's an example generated output from the [Swagger Petstore example](https://p $ refitter ./openapi.json --namespace "Your.Namespace.Of.Choice.GeneratedCode" ``` +**Console Output** + +![Console Output](https://raw.githubusercontent.com/christianhelle/refitter/refs/heads/main/images/console-output.png) + **Source Generator ***.refitter*** file** ```json diff --git a/src/Refitter/README.md b/src/Refitter/README.md index 7e5c41c0f..a1f60e0c7 100644 --- a/src/Refitter/README.md +++ b/src/Refitter/README.md @@ -109,10 +109,15 @@ OPTIONS: Replaces NSwag JsonInheritanceConverter attributes with System.Text.Json JsonPolymorphicAttributes. To have the native support of inheritance (de)serialization and fallback to base types when payloads with (yet) unknown types are offered by newer versions of an API - See https://learn.microsoft.com/en-us/dotnet/standard/serialization/system-text-json/polymorphism for more information - --disposable Generate refit clients that implement IDisposable + See https://learn.microsoft.com/en-us/dotnet/standard/serialization/system-text-json/polymorphism for more information --disposable Generate refit clients that implement IDisposable ``` +## CLI Tool Output Example + +Here's what the console output looks like when running the Refitter CLI tool: + +![Console Output](https://raw.githubusercontent.com/christianhelle/refitter/refs/heads/main/images/console-output.png) + ### .Refitter File format The following is an example `.refitter` file