From 53aa293dbcb2ef226442c9b4b22a96ddb9db3a7d Mon Sep 17 00:00:00 2001 From: Christian Helle Date: Wed, 18 Jun 2025 22:40:21 +0200 Subject: [PATCH 1/5] Add console output screenshot to main README --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) 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. From 27e14f0548c5e8f54f5cb291b0937a89060779b8 Mon Sep 17 00:00:00 2001 From: Christian Helle Date: Wed, 18 Jun 2025 22:40:49 +0200 Subject: [PATCH 2/5] Add console output screenshot to CLI README --- src/Refitter/README.md | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/Refitter/README.md b/src/Refitter/README.md index 7e5c41c0f..8b3014bb9 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](../../images/console-output.png) + ### .Refitter File format The following is an example `.refitter` file From f4a49072a36b252730cb29358dcf0c53be750cbd Mon Sep 17 00:00:00 2001 From: Christian Helle Date: Wed, 18 Jun 2025 23:12:46 +0200 Subject: [PATCH 3/5] Add console output screenshot to docs CLI article --- docs/docfx_project/articles/cli-tool.md | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/docs/docfx_project/articles/cli-tool.md b/docs/docfx_project/articles/cli-tool.md index 6ffaeb1d7..0664d0437 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](../../../images/console-output.png) + +## Basic Usage + To generate code from an OpenAPI specifications file, run the following: ```shell From e45cdf807bbfeffb623c839883f257559348b9db Mon Sep 17 00:00:00 2001 From: Christian Helle Date: Wed, 18 Jun 2025 23:19:31 +0200 Subject: [PATCH 4/5] Add console output screenshot to examples --- docs/docfx_project/articles/examples.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/docfx_project/articles/examples.md b/docs/docfx_project/articles/examples.md index ab16d226e..d9b856aab 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](../../../images/console-output.png) + **Source Generator ***.refitter*** file** ```json From 45cf7963e5094af68fc8e34293799d156e684980 Mon Sep 17 00:00:00 2001 From: Christian Helle Date: Wed, 18 Jun 2025 23:48:00 +0200 Subject: [PATCH 5/5] Use Github permalink to console-output.png --- docs/docfx_project/articles/cli-tool.md | 2 +- docs/docfx_project/articles/examples.md | 2 +- src/Refitter/README.md | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/docfx_project/articles/cli-tool.md b/docs/docfx_project/articles/cli-tool.md index 0664d0437..a01c9c926 100644 --- a/docs/docfx_project/articles/cli-tool.md +++ b/docs/docfx_project/articles/cli-tool.md @@ -119,7 +119,7 @@ OPTIONS: Here's what the console output looks like when running the Refitter CLI tool: -![Console Output](../../../images/console-output.png) +![Console Output](https://raw.githubusercontent.com/christianhelle/refitter/refs/heads/main/images/console-output.png) ## Basic Usage diff --git a/docs/docfx_project/articles/examples.md b/docs/docfx_project/articles/examples.md index d9b856aab..d04a603dd 100644 --- a/docs/docfx_project/articles/examples.md +++ b/docs/docfx_project/articles/examples.md @@ -10,7 +10,7 @@ $ refitter ./openapi.json --namespace "Your.Namespace.Of.Choice.GeneratedCode" **Console Output** -![Console Output](../../../images/console-output.png) +![Console Output](https://raw.githubusercontent.com/christianhelle/refitter/refs/heads/main/images/console-output.png) **Source Generator ***.refitter*** file** diff --git a/src/Refitter/README.md b/src/Refitter/README.md index 8b3014bb9..a1f60e0c7 100644 --- a/src/Refitter/README.md +++ b/src/Refitter/README.md @@ -116,7 +116,7 @@ OPTIONS: Here's what the console output looks like when running the Refitter CLI tool: -![Console Output](../../images/console-output.png) +![Console Output](https://raw.githubusercontent.com/christianhelle/refitter/refs/heads/main/images/console-output.png) ### .Refitter File format