Introduce --simple-output CLI argument#751
Conversation
WalkthroughAdds a new CLI flag --simple-output and integrates a dual output mode into GenerateCommand: plain text vs. rich Spectre.Console UI. Updates validation, headers/banners, diagnostics, and file generation summaries to respect the new mode. Documentation is updated across README, docs, and contributor guidance. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor U as User
participant CLI as GenerateCommand
participant V as OpenAPI Validator
participant G as Refit Generator
participant Out as Console Output
U->>CLI: refitter ./openapi.json [--simple-output]
CLI->>CLI: Parse Settings (SimpleOutput)
alt SimpleOutput = true
CLI->>Out: Plain header lines
else
CLI->>Out: Rich ASCII banner/panel
end
CLI->>V: Validate(spec)
alt Validation OK
V-->>CLI: Diagnostics (warnings/info)
CLI->>Out: Mode-aware warnings/info
CLI->>G: Generate interfaces/files
G-->>CLI: Results (files, stats)
alt SimpleOutput
CLI->>Out: Plain stats and per-file summary
CLI->>Out: Plain success + duration
CLI->>Out: Simple donation banner (if !NoBanner)
else
CLI->>Out: Tables/panels for stats and files
CLI->>Out: Success panel + performance
CLI->>Out: Rich donation banner (if !NoBanner)
end
else Validation Failed
V-->>CLI: Errors
alt SimpleOutput
CLI->>Out: Plain failure message + diagnostics
else
CLI->>Out: Panels with errors/diagnostics
end
end
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Possibly related PRs
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing touches
🧪 Generate unit tests
Tip 👮 Agentic pre-merge checks are now available in preview!Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.
Please see the documentation for more information. Example: reviews:
pre_merge_checks:
custom_checks:
- name: "Undocumented Breaking Changes"
mode: "warning"
instructions: |
Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).Please share your feedback with us on this Discord post. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Pull Request Overview
This pull request introduces a new --simple-output CLI option to Refitter that generates plain-text console output without rich formatting, colors, ASCII art, tables, or emojis. This is particularly valuable for integration with IDEs and build tools that don't support rich terminal formatting.
Key changes include:
- Added the
--simple-outputcommand-line option with corresponding logic throughout the CLI - Updated all output paths to provide both rich (Spectre.Console) and simple (plain text) formatting modes
- Enhanced documentation to describe the new option and its use cases
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| src/Refitter/Settings.cs | Added SimpleOutput property with CommandOption attribute |
| src/Refitter/GenerateCommand.cs | Implemented dual output modes throughout all CLI interactions |
| docs/docfx_project/articles/cli-tool.md | Added --simple-output to CLI documentation examples and options |
| README.md | Added --simple-output to examples and comprehensive documentation section |
| .github/copilot-instructions.md | Updated development guidelines with recent CLI options and UI information |
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #751 +/- ##
==========================================
+ Coverage 95.47% 98.52% +3.05%
==========================================
Files 60 60
Lines 2982 2918 -64
==========================================
+ Hits 2847 2875 +28
+ Misses 102 4 -98
- Partials 33 39 +6
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (2)
src/Refitter/GenerateCommand.cs (2)
88-96: Bug: Overwrites OpenApiPath from .refitter with null when CLI arg not provided.If the user relies on
openApiPathinside the settings file, this line nulls it and breaks generation/validation.- refitGeneratorSettings = Serializer.Deserialize<RefitGeneratorSettings>(json); - refitGeneratorSettings.OpenApiPath = settings.OpenApiPath!; + refitGeneratorSettings = Serializer.Deserialize<RefitGeneratorSettings>(json); + // Only override when CLI argument is explicitly provided + if (!string.IsNullOrWhiteSpace(settings.OpenApiPath)) + { + refitGeneratorSettings.OpenApiPath = settings.OpenApiPath!; + }Optional: resolve relative paths in the .refitter file against its directory.
+ var baseDir = Path.GetDirectoryName(settings.SettingsFilePath) ?? string.Empty; + if (!string.IsNullOrWhiteSpace(refitGeneratorSettings.OpenApiPath) && + !Path.IsPathRooted(refitGeneratorSettings.OpenApiPath)) + { + refitGeneratorSettings.OpenApiPath = Path.GetFullPath(Path.Combine(baseDir, refitGeneratorSettings.OpenApiPath)); + }
108-127: Remove emojis from --simple-output outputConsole.WriteLine at src/Refitter/GenerateCommand.cs:111 prints "
⚠️ "; ensure simple-output mode emits a plain-text warning instead.
🧹 Nitpick comments (6)
docs/docfx_project/articles/cli-tool.md (2)
87-87: Unify wording across docs/README/Settings.Consider aligning this description with Settings.cs and README to a single canonical sentence to avoid drift. Suggest: “Generate simple, plain-text console output without ASCII art, tables, emojis, or ANSI color/markup (suitable for IDE output windows).”
- --simple-output Generate output with no color, no formatting, no emojis, and no banners suitable for terminal or IDE output + --simple-output Generate simple, plain‑text console output without ASCII art, tables, emojis, or ANSI color/markup (suitable for IDE output windows)
139-141: System requirements inconsistent with README.README states “.NET 8.0 or .NET 9.0” while this doc says “.NET 8.0”. Update for consistency.
-.NET 8.0 +.NET 8.0 or .NET 9.0README.md (1)
151-172: Great section; add one sentence tying to garbled output issue.Explicitly call out that this mode avoids ANSI and non-ASCII causing “mangled/unreadable” output (issue #750).
This mode generates plain text output without: @@ - Tables and panels + +This helps avoid “mangled” or unreadable characters in environments that strip or misinterpret ANSI/Unicode (see issue #750)..github/copilot-instructions.md (3)
140-146: Clarify when to add to RefitGeneratorSettings.UI-only flags (like --simple-output) don’t need Core settings; tighten guidance.
-1. Add new property to `src/Refitter/Settings.cs` with `[CommandOption("--option-name")]` attribute -2. Update `CreateRefitGeneratorSettings()` method in `src/Refitter/GenerateCommand.cs` to map the setting -3. Add corresponding property to `src/Refitter.Core/Settings/RefitGeneratorSettings.cs` +1. Add new property to `src/Refitter/Settings.cs` with `[CommandOption("--option-name")]` attribute +2. Update `CreateRefitGeneratorSettings()` in `src/Refitter/GenerateCommand.cs` to map the setting when the generator needs it +3. Add a corresponding property to `src/Refitter.Core/Settings/RefitGeneratorSettings.cs` only if the generator logic requires it (do NOT add UI-only flags) 4. Implement logic in `src/Refitter.Core/RefitInterfaceGenerator.cs` or related generator classes 5. Add unit tests in `src/Refitter.Tests/Examples/` following the established pattern -6. Update README.md documentation with the new option +6. Update README.md and docs (`docs/docfx_project/articles/cli-tool.md`) with the new option
147-153: Add --simple-output to “Recent CLI Options Added.”- `--no-banner`: Hide donation banner in CLI output +- `--simple-output`: Produce plain-text output without colors/ASCII art/emojis/tables
167-173: Document simple output behavior here to guide contributors.- CLI uses **Spectre.Console** for rich terminal output with colors, tables, and panels - ASCII art banner is displayed on startup (can be disabled with `--no-banner`) - Progress indicators and formatted tables show generation status and file information - Error handling includes styled panels and structured exception display - Support key display for troubleshooting (disabled when `--no-logging` is used) + - When `--simple-output` is set, never write ANSI markup, colors, emojis, or box-drawing characters; use Console.WriteLine only
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (5)
.github/copilot-instructions.md(2 hunks)README.md(3 hunks)docs/docfx_project/articles/cli-tool.md(2 hunks)src/Refitter/GenerateCommand.cs(12 hunks)src/Refitter/Settings.cs(1 hunks)
🧰 Additional context used
📓 Path-based instructions (5)
README.md
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Update README.md when adding new CLI options or features
Files:
README.md
**/*.cs
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
**/*.cs: Follow existing C# coding conventions defined in .editorconfig
Use PascalCase for public members and camelCase for parameters and local variables
Use meaningful variable and method names
Keep methods focused with single responsibility
Files:
src/Refitter/Settings.cssrc/Refitter/GenerateCommand.cs
src/{Refitter,Refitter.Core,Refitter.SourceGenerator,Refitter.MSBuild}/**/*.cs
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Include XML documentation for public APIs
Files:
src/Refitter/Settings.cssrc/Refitter/GenerateCommand.cs
docs/**
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Validate that every documented command actually works before adding it to documentation or instructions
Files:
docs/docfx_project/articles/cli-tool.md
src/Refitter/GenerateCommand.cs
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
When adding a new CLI option, update GenerateCommand.cs with new command-line arguments
Files:
src/Refitter/GenerateCommand.cs
🧠 Learnings (8)
📓 Common learnings
Learnt from: CR
PR: christianhelle/refitter#0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-08-13T18:27:12.292Z
Learning: Applies to README.md : Update README.md when adding new CLI options or features
📚 Learning: 2025-08-13T18:27:12.292Z
Learnt from: CR
PR: christianhelle/refitter#0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-08-13T18:27:12.292Z
Learning: Applies to README.md : Update README.md when adding new CLI options or features
Applied to files:
README.mddocs/docfx_project/articles/cli-tool.md.github/copilot-instructions.md
📚 Learning: 2025-08-13T18:27:12.292Z
Learnt from: CR
PR: christianhelle/refitter#0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-08-13T18:27:12.292Z
Learning: Applies to src/Refitter.Core/RefitInterfaceGenerator.cs : When adding a new CLI option, implement the generation logic in RefitInterfaceGenerator
Applied to files:
README.md.github/copilot-instructions.md
📚 Learning: 2025-08-13T18:27:12.292Z
Learnt from: CR
PR: christianhelle/refitter#0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-08-13T18:27:12.292Z
Learning: Applies to src/Refitter.Core/Settings/RefitGeneratorSettings.cs : When adding a new CLI option, add a corresponding property to RefitGeneratorSettings
Applied to files:
src/Refitter/Settings.cs.github/copilot-instructions.md
📚 Learning: 2025-08-13T18:27:12.292Z
Learnt from: CR
PR: christianhelle/refitter#0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-08-13T18:27:12.292Z
Learning: Applies to src/Refitter/GenerateCommand.cs : When adding a new CLI option, update GenerateCommand.cs with new command-line arguments
Applied to files:
.github/copilot-instructions.md
📚 Learning: 2025-08-13T18:27:12.292Z
Learnt from: CR
PR: christianhelle/refitter#0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-08-13T18:27:12.292Z
Learning: Applies to src/Refitter.Tests/Examples/**/*.cs : When adding a new CLI option, add unit tests under Refitter.Tests/Examples
Applied to files:
.github/copilot-instructions.md
📚 Learning: 2025-08-13T18:27:12.292Z
Learnt from: CR
PR: christianhelle/refitter#0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-08-13T18:27:12.292Z
Learning: For CLI changes, test with a real OpenAPI specification to ensure generation works
Applied to files:
.github/copilot-instructions.md
📚 Learning: 2025-08-13T18:27:12.292Z
Learnt from: CR
PR: christianhelle/refitter#0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-08-13T18:27:12.292Z
Learning: Applies to src/{Refitter.Tests,Refitter.SourceGenerator.Tests}/**/*.cs : All new code must include unit tests following the Refitter.Tests.Examples pattern (xUnit [Fact], assertions, and compile check)
Applied to files:
.github/copilot-instructions.md
🧬 Code graph analysis (1)
src/Refitter/GenerateCommand.cs (4)
src/Refitter/Validation/OpenApiValidationException.cs (2)
OpenApiValidationException(3-13)OpenApiValidationException(7-12)src/Refitter/Analytics.cs (1)
Task(105-126)src/Refitter/Validation/OpenApiValidator.cs (2)
Task(8-19)OpenApiValidator(6-20)src/Refitter/Settings.cs (1)
Settings(7-256)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (5)
- GitHub Check: script
- GitHub Check: 👌 Verify build
- GitHub Check: 👌 Verify build
- GitHub Check: 👌 Verify build
- GitHub Check: Analyze (csharp)
🔇 Additional comments (7)
README.md (2)
64-64: Example addition looks good.
107-107: Option entry looks good; matches CLI.src/Refitter/GenerateCommand.cs (4)
48-64: Header branching looks good; no ANSI/ASCII when simple.
131-152: Success summary branching looks good.
320-333: Progress indication: OK.Spinner preserved in rich mode; plain message in simple mode.
657-763: Validation output handles both modes well.Good split: plain text list vs Spectre table.
docs/docfx_project/articles/cli-tool.md (1)
43-43: Example addition looks good — manual end-to-end verification requireddotnet not available in the sandbox (dotnet: command not found). Run the following locally to verify the CLI help shows --simple-output and generation works with a sample spec:
#!/bin/bash set -euo pipefail # Check help includes --simple-output dotnet run --project src/Refitter --configuration Release --framework net9.0 -- --help | rg -n -- '--simple-output' # Find a bundled OpenAPI sample and run generation with simple output spec="$(fd -a -t f -g 'SwaggerPetstore*.json' src/Refitter.Tests/Resources || true | head -n1)" if [[ -z "${spec}" ]]; then echo "No sample spec found; please provide one." >&2 exit 1 fi dotnet run --project src/Refitter --configuration Release --framework net9.0 -- "${spec}" --output ./_tmp.cs --simple-output | rg -nP '[^\x00-\x7F]' && { echo "Non-ASCII char found in simple output" >&2; exit 2; } || true
Updated [refitter](https://github.com/christianhelle/refitter) from 1.4.0 to 1.7.0. <details> <summary>Release notes</summary> _Sourced from [refitter's releases](https://github.com/christianhelle/refitter/releases)._ ## 1.7.0 ## What's Changed * Fix Multipart file array support by @christianhelle in christianhelle/refitter#784 * Add option to remove `[JsonConverter(typeof(JsonStringEnumConverter))]` from generated contracts by @christianhelle in christianhelle/refitter#786 * Improve OpenAPI Description handling by @christianhelle in christianhelle/refitter#787 * Update Smoke Tests workflow trigger by @christianhelle in christianhelle/refitter#791 * Add support for customizing the default Integer format by @christianhelle in christianhelle/refitter#792 * NSwag v14.6.2 by @christianhelle in christianhelle/refitter#800 ## New Contributors: - @christophdebaene - @7amou3 - @HGCollier **Full Changelog**: christianhelle/refitter@1.6.5...1.7.0 ## 1.6.5 ## What's Changed * Do not remove colon from url paths, verify they're not present in operation names by @eoma-knowit in christianhelle/refitter#765 * Add ability to skip-validation + simplify Unicode logging by @david-pw in christianhelle/refitter#767 * Use NSwag's built-in System.Text.Json polymorphic serialization by @0xced in christianhelle/refitter#772 ## New Contributors * @eoma-knowit made their first contribution in christianhelle/refitter#765 * @david-pw made their first contribution in christianhelle/refitter#767 * @0xced made their first contribution in christianhelle/refitter#772 **Full Changelog**: christianhelle/refitter@1.6.4...1.6.5 ## 1.6.4 ## What's Changed * Fix SonarCloud maintainability issues - eliminate code duplication and improve code quality in christianhelle/refitter#753 * Update --operation-name-template implementation to replace all {operationName} instances with Execute by @christianhelle in christianhelle/refitter#759 **Full Changelog**: christianhelle/refitter@1.6.3...1.6.4 ## 1.6.3 ## What's Changed * Fix MSBuild task so that the generated code is included in the compilation by @christianhelle in christianhelle/refitter#745 * Add support for systems running only .NET 9.0 (without .NET 8.0) in Refitter.MSBuild by @christianhelle in christianhelle/refitter#746 * Introduce --simple-output CLI argument by @christianhelle in christianhelle/refitter#751 **Full Changelog**: christianhelle/refitter@1.6.2...1.6.3 ## 1.6.2 ## What's Changed * docs: add @SWarnberg as a contributor for bug by @allcontributors[bot] in christianhelle/refitter#714 * docs: add @lilinus as a contributor for bug by @allcontributors[bot] in christianhelle/refitter#717 * Fix missing namespace import by @christianhelle in christianhelle/refitter#718 * Fix match path on cmd prompt by @christianhelle in christianhelle/refitter#719 * Fix table alignments in CLI Output by @christianhelle in christianhelle/refitter#720 * NSwag v14.5.0 by @renovate[bot] in christianhelle/refitter#722 * Add comprehensive GitHub Copilot instructions for Refitter repository by @Copilot in christianhelle/refitter#725 * Bump actions/checkout from 4 to 5 by @dependabot[bot] in christianhelle/refitter#727 * chore(deps): update dependency polly to 8.6.2 by @renovate[bot] in christianhelle/refitter#716 * chore(deps): update dependency microsoft.extensions.http.resilience to 9.8.0 by @renovate[bot] in christianhelle/refitter#728 * ASCII Art Title by @christianhelle in christianhelle/refitter#729 **Full Changelog**: christianhelle/refitter@1.6.1...1.6.2 ## 1.6.1 ## What's Changed * Update dependency Refitter.SourceGenerator to 1.6.0 by @renovate in christianhelle/refitter#704 * Add console output screenshots to documentation by @christianhelle in christianhelle/refitter#705 * docs: add @sb-chericks as a contributor for ideas, and bug by @allcontributors in christianhelle/refitter#707 * chore(deps): update dependency xunit.runner.visualstudio to 3.1.1 by @renovate in christianhelle/refitter#708 * Ensure that Refit interfaces have a XML docs by @christianhelle in christianhelle/refitter#709 **Full Changelog**: christianhelle/refitter@1.6.0...1.6.1 ## 1.6.0 **Implemented enhancements:** - fix missing schema for dictionary keys [\#697](christianhelle/refitter#697) @kirides - Fancy CLI output using Spectre Console [\#695](christianhelle/refitter#695) @christianhelle **Fixed bugs:** - \[Bug\] Refitter generates invalid \[Range\] attribute for decimal properties starting from v1.5.2 [\#668](christianhelle/refitter#668) @tommieemeli - Generates Content-Type: multipart/form-data Header which breaks Multipart uploads [\#654](christianhelle/refitter#654) @dbhjoh @jaroslaw-dutka **Closed issues:** - Improve documentation [\#700](christianhelle/refitter#700) **Merged pull requests:** - Update dependency Polly to 8.6.1 [\#703](christianhelle/refitter#703) ([renovate[bot]](https://github.com/apps/renovate)) - Update dependency Swashbuckle.AspNetCore to v9 [\#702](christianhelle/refitter#702) ([renovate[bot]](https://github.com/apps/renovate)) - Fix typos and grammar issues in documentation [\#701](christianhelle/refitter#701) ([Copilot](https://github.com/apps/copilot-swe-agent)) - Update dotnet monorepo [\#699](christianhelle/refitter#699) ([renovate[bot]](https://github.com/apps/renovate)) - Update dependency Polly to 8.6.0 [\#698](christianhelle/refitter#698) ([renovate[bot]](https://github.com/apps/renovate)) - Update dependency Refitter.SourceGenerator to 1.5.6 [\#696](christianhelle/refitter#696) ([renovate[bot]](https://github.com/apps/renovate)) - Update dependency Microsoft.NET.Test.Sdk to 17.14.1 [\#692](christianhelle/refitter#692) ([renovate[bot]](https://github.com/apps/renovate)) - Update dependency Swashbuckle.AspNetCore to 8.1.4 [\#691](christianhelle/refitter#691) ([renovate[bot]](https://github.com/apps/renovate)) See [Full Changelog](christianhelle/refitter@1.5.6...1.6.0) ## 1.5.6 ## What's Changed * Use fully qualified type name in Class template by @velvolue in christianhelle/refitter#686 * Add .NET 9.0 to Target Frameworks by @christianhelle in christianhelle/refitter#690 * Do not add both [Multipart] and "Content-Type: multipart/form-data" by @jaroslaw-dutka in christianhelle/refitter#693 ## Merged pull requests * chore(deps): update dependency refitter.sourcegenerator to 1.5.5 by @renovate in christianhelle/refitter#671 * docs: add MrScottyTay as a contributor for bug by @allcontributors in christianhelle/refitter#673 * chore(deps): update dotnet monorepo by @renovate in christianhelle/refitter#674 * chore(deps): update dependency microsoft.build.utilities.core to 17.14.7 by @renovate in christianhelle/refitter#675 * chore(deps): update dependency microsoft.build.utilities.core to 17.14.8 by @renovate in christianhelle/refitter#676 * chore(deps): update dependency microsoft.net.test.sdk to 17.14.0 by @renovate in christianhelle/refitter#680 * Add Contribution Guidelines by @copilot-swe-agent in christianhelle/refitter#679 * chore(deps): update dependency swashbuckle.aspnetcore to 8.1.2 by @renovate in christianhelle/refitter#682 * docs: add velvolue as a contributor for bug by @allcontributors in christianhelle/refitter#687 * Use fully qualified type name in Class template by @velvolue in christianhelle/refitter#686 * Resolve build warnings and add TreatWarningsAsErrors by @copilot-swe-agent in christianhelle/refitter#689 * Add .NET 9.0 to Target Frameworks by @christianhelle in christianhelle/refitter#690 * Do not add both [Multipart] and "Content-Type: multipart/form-data" by @jaroslaw-dutka in christianhelle/refitter#693 **Full Changelog**: christianhelle/refitter@1.5.5...1.5.6 ## 1.5.5 ## What's Changed - Using CollectionFormats other than Multi [\#640](christianhelle/refitter#640) (@ebarnard) - Add collection format option to CLI tool documentation [\#664](christianhelle/refitter#664) (@christianhelle) - Made Security Header Parameters safe for C\# when unsafe characters are present [\#663](christianhelle/refitter#663) (@AragornHL) ## Merged pull requests: - chore\(deps\): update dependency xunit.runner.visualstudio to 3.1.0 [\#670](christianhelle/refitter#670) ([renovate[bot]](https://github.com/apps/renovate)) - docs: add tommieemeli as a contributor for bug [\#669](christianhelle/refitter#669) ([allcontributors[bot]](https://github.com/apps/allcontributors)) - Update nswag monorepo to 14.4.0 [\#665](christianhelle/refitter#665) ([renovate[bot]](https://github.com/apps/renovate)) - chore\(deps\): update dependency refitter.sourcegenerator to 1.5.4 [\#662](christianhelle/refitter#662) ([renovate[bot]](https://github.com/apps/renovate)) **Full Changelog**: christianhelle/refitter@1.5.4...1.5.5 ## 1.5.4 ## What's Changed - Adding security schemes to the api interface generator [\#106](christianhelle/refitter#106) - Response type handling to only use 2XX range [\#661](christianhelle/refitter#661) ([christianhelle](https://github.com/christianhelle)) - Add support for 2XX and Default Response Objects [\#660](christianhelle/refitter#660) ([christianhelle](https://github.com/christianhelle)) - Add Header Parameters for Security Schemes [\#653](christianhelle/refitter#653) ([AragornHL](https://github.com/AragornHL)) ## Merged Pull Requests: * chore(deps): update dependency refitter.sourcegenerator to 1.5.3 by @renovate in christianhelle/refitter#645 * chore(deps): update dependency swashbuckle.aspnetcore to 8.1.0 by @renovate in christianhelle/refitter#646 * chore(deps): update dependency exceptionless to 6.1.0 by @renovate in christianhelle/refitter#647 * chore(deps): update dependency spectre.console.cli to 0.50.0 by @renovate in christianhelle/refitter#649 * chore(deps): update dotnet monorepo to 9.0.4 by @renovate in christianhelle/refitter#648 * chore(deps): update dependency microsoft.extensions.http.resilience to 9.4.0 by @renovate in christianhelle/refitter#650 * chore(deps): update dependency swashbuckle.aspnetcore to 8.1.1 by @renovate in christianhelle/refitter#651 * Add Header Parameters for Security Schemes by @AragornHL in christianhelle/refitter#653 * docs: add @AragornHL as a contributor for code by @allcontributors in christianhelle/refitter#655 * docs: add @kmfd3s as a contributor for code by @allcontributors in christianhelle/refitter#656 * Update smoke tests to generate authentication headers by @christianhelle in christianhelle/refitter#657 * docs: add @pfeigl as a contributor for bug by @allcontributors in christianhelle/refitter#659 * Add support for 2XX and Default Response Objects by @christianhelle in christianhelle/refitter#660 * Response type handling to only use 2XX range by @christianhelle in christianhelle/refitter#661 ## New Contributors * @AragornHL made their first contribution in christianhelle/refitter#653 **Full Changelog**: christianhelle/refitter@1.5.3...1.5.4 ## 1.5.3 **Implemented enhancements:** - Naming properties problem [\#641](christianhelle/refitter#641) - Allow comments in .refitter Configuration [\#631](christianhelle/refitter#631) - NSwag v14.3.0 [\#644](christianhelle/refitter#644) ([renovate[bot]](https://github.com/apps/renovate)) - Convert properties with underscores to PascalCase [\#643](christianhelle/refitter#643) ([christianhelle](https://github.com/christianhelle)) - Add support for deserializing JSON with comments and update tests [\#637](christianhelle/refitter#637) ([sebastian-wachsmuth](https://github.com/sebastian-wachsmuth)) - Temporary fix for Source Generator when running in Visual Studio [\#634](christianhelle/refitter#634) ([christianhelle](https://github.com/christianhelle)) - JSON Schema generator for documentation [\#623](christianhelle/refitter#623) ([christianhelle](https://github.com/christianhelle)) - Fix missing Content-Type \[Headers\] [\#619](christianhelle/refitter#619) ([christianhelle](https://github.com/christianhelle)) - Fix invalid characters in generated XML docs [\#607](christianhelle/refitter#607) ([christianhelle](https://github.com/christianhelle)) - Add support for custom DateTimeFormat [\#604](christianhelle/refitter#604) ([christianhelle](https://github.com/christianhelle)) - Fix ISO date format handling when dateFormat is defined in settings file [\#603](christianhelle/refitter#603) ([christianhelle](https://github.com/christianhelle)) **Fixed bugs:** - Doesn't add Content-Type request header when body is plain JSON string [\#617](christianhelle/refitter#617) - Broken xml doc when swagger descriptions contains "\<" or "\>" characters [\#605](christianhelle/refitter#605) - date-time parameters are encoded as date when iso8601 is used [\#599](christianhelle/refitter#599) **Closed issues:** - OpenAPI Schema and Authorization Attributes [\#629](christianhelle/refitter#629) **Merged pull requests:** - docs: add @lowern1ght as a contributor for bug [\#642](christianhelle/refitter#642) ([allcontributors[bot]](https://github.com/apps/allcontributors)) - docs: add @qrzychu as a contributor for bug [\#639](christianhelle/refitter#639) ([allcontributors[bot]](https://github.com/apps/allcontributors)) - docs: add @sebastian-wachsmuth as a contributor for code [\#638](christianhelle/refitter#638) ([allcontributors[bot]](https://github.com/apps/allcontributors)) - Update dependency Swashbuckle.AspNetCore to v8 [\#633](christianhelle/refitter#633) ([renovate[bot]](https://github.com/apps/renovate)) - Update dotnet monorepo [\#630](christianhelle/refitter#630) ([renovate[bot]](https://github.com/apps/renovate)) - Update dependency Atc.Test to 1.1.18 [\#628](christianhelle/refitter#628) ([renovate[bot]](https://github.com/apps/renovate)) - Update dependency Swashbuckle.AspNetCore to 7.3.1 [\#626](christianhelle/refitter#626) ([renovate[bot]](https://github.com/apps/renovate)) - Update dependency Swashbuckle.AspNetCore to 7.3.0 [\#624](christianhelle/refitter#624) ([renovate[bot]](https://github.com/apps/renovate)) - chore\(deps\): update dependency fluentassertions to 7.2.0 [\#622](christianhelle/refitter#622) ([renovate[bot]](https://github.com/apps/renovate)) - chore\(deps\): update dependency apizr.integrations.fusillade to 6.4.2 [\#621](christianhelle/refitter#621) ([renovate[bot]](https://github.com/apps/renovate)) - docs: add @Metziell as a contributor for bug [\#620](christianhelle/refitter#620) ([allcontributors[bot]](https://github.com/apps/allcontributors)) - docs: add @Fargekritt as a contributor for bug [\#618](christianhelle/refitter#618) ([allcontributors[bot]](https://github.com/apps/allcontributors)) - chore\(deps\): update dependency apizr.integrations.automapper to 6.4.2 [\#616](christianhelle/refitter#616) ([renovate[bot]](https://github.com/apps/renovate)) - chore\(deps\): update dependency apizr.extensions.microsoft.caching to 6.4.2 [\#615](christianhelle/refitter#615) ([renovate[bot]](https://github.com/apps/renovate)) - chore\(deps\): update dependency microsoft.applicationinsights.windowsserver to 2.23.0 [\#614](christianhelle/refitter#614) ([renovate[bot]](https://github.com/apps/renovate)) - chore\(deps\): update dependency microsoft.build.utilities.core to 17.13.9 [\#612](christianhelle/refitter#612) ([renovate[bot]](https://github.com/apps/renovate)) - chore\(deps\): update dotnet monorepo [\#611](christianhelle/refitter#611) ([renovate[bot]](https://github.com/apps/renovate)) - chore\(deps\): update dependency microsoft.net.test.sdk to 17.13.0 [\#610](christianhelle/refitter#610) ([renovate[bot]](https://github.com/apps/renovate)) - chore\(deps\): update dependency xunit.runner.visualstudio to 3.0.2 [\#609](christianhelle/refitter#609) ([renovate[bot]](https://github.com/apps/renovate)) - chore\(deps\): update dependency polly to 8.5.2 [\#608](christianhelle/refitter#608) ([renovate[bot]](https://github.com/apps/renovate)) - docs: add @wocasella as a contributor for bug [\#606](christianhelle/refitter#606) ([allcontributors[bot]](https://github.com/apps/allcontributors)) - chore\(deps\): update dependency refitter.sourcegenerator to 1.5.2 [\#602](christianhelle/refitter#602) ([renovate[bot]](https://github.com/apps/renovate)) - chore\(deps\): update dependency atc.test to 1.1.17 [\#592](christianhelle/refitter#592) ([renovate[bot]](https://github.com/apps/renovate)) - chore\(deps\): update dependency h.generators.extensions to 1.24.2 [\#581](christianhelle/refitter#581) ([renovate[bot]](https://github.com/apps/renovate)) ... (truncated) ## 1.5.2 ## Implemented enhancements: - Fix date formatting for date-time types christianhelle/refitter#600 - Proper support for multipart form christianhelle/refitter#595 ## Fixed bugs: - date-time parameters are encoded as date when iso8601 is used christianhelle/refitter#599 - \[FromForm\] parameter on minimal api doesn't get generated on Interface christianhelle/refitter#515 ## Merged pull requests: * chore(deps): update dependency coverlet.collector to 6.0.4 by @renovate in christianhelle/refitter#594 * Proper support for multipart form by @jaroslaw-dutka in christianhelle/refitter#595 * docs: add jaroslaw-dutka as a contributor for code by @allcontributors in christianhelle/refitter#596 * chore(deps): update dependency refitter.sourcegenerator to 1.5.0 by @renovate in christianhelle/refitter#593 * Remove dependency on System.Text.Json by @christianhelle in christianhelle/refitter#597 * chore(deps): update dependency refitter.sourcegenerator to 1.5.1 by @renovate in christianhelle/refitter#598 * docs: add maksionkin as a contributor for bug by @allcontributors in christianhelle/refitter#601 * Fix date formatting for date-time types by @christianhelle in christianhelle/refitter#600 ## New Contributors * @jaroslaw-dutka made their first contribution in christianhelle/refitter#595 * @maksionkin reported their first issue in christianhelle/refitter#599 **Full Changelog**: christianhelle/refitter@1.5.0...1.5.2 ## 1.5.0 ## Implemented enhancements: - Fix incorrect error message shown due to Spectre.Console parsing [\#585](christianhelle/refitter#585) ([christianhelle](https://github.com/christianhelle)) - Return null when object subtype is not found [\#577](christianhelle/refitter#577) ([velvolue](https://github.com/velvolue)) - Discard unused union types/inheritance types via config [\#575](christianhelle/refitter#575) ([kirides](https://github.com/kirides)) - Show Deserializaton Errors from Source Generator [\#572](christianhelle/refitter#572) ([christianhelle](https://github.com/christianhelle)) - Limit Exceptionless telemetry [\#564](christianhelle/refitter#564) ([christianhelle](https://github.com/christianhelle)) - Added simple logic to make most identifier strings valid [\#562](christianhelle/refitter#562) ([Fargekritt](https://github.com/Fargekritt)) - Fix -v|--version CLI tool argument [\#561](christianhelle/refitter#561) ([christianhelle](https://github.com/christianhelle)) - Less strict OpenAPI Validation rules [\#558](christianhelle/refitter#558) ([christianhelle](https://github.com/christianhelle)) - Added support for custom date format [\#554](christianhelle/refitter#554) ([Fargekritt](https://github.com/Fargekritt)) - Add support for disabling telemetry in MSBuild task [\#550](christianhelle/refitter#550) ([christianhelle](https://github.com/christianhelle)) - MSBuild Custom Task [\#548](christianhelle/refitter#548) ([christianhelle](https://github.com/christianhelle)) - Generate IDisposable Refit Interfaces [\#543](christianhelle/refitter#543) ([christianhelle](https://github.com/christianhelle)) - Clients implementing IDisposable interface [\#541](christianhelle/refitter#541) ([shubinp](https://github.com/shubinp)) - \[Apizr\] Deprecated Optional package removed from code & doc [\#539](christianhelle/refitter#539) ([JeremyBP](https://github.com/JeremyBP)) - Add PropertyNameGenerator as an optional Parameter [\#516](christianhelle/refitter#516) - NSwag v14.2.0 [\#532](christianhelle/refitter#532) ([renovate[bot]](https://github.com/apps/renovate)) - added options for a custom Name Generators [\#517](christianhelle/refitter#517) ([fsamiec](https://github.com/fsamiec)) ## Fixed bugs: - "Error: Could not find color or style 'System.String'." [\#583](christianhelle/refitter#583) - Source generator errors are hidden [\#568](christianhelle/refitter#568) - Refitter -v not showing version number [\#560](christianhelle/refitter#560) - Not so nice behavior when generating client with trim-unused-schema [\#557](christianhelle/refitter#557) - Two almost identical routes that fail at validation. [\#551](christianhelle/refitter#551) - Code Generator creates unsafe interface method names [\#360](christianhelle/refitter#360) ## Closed issues: - How to use in class library? [\#534](christianhelle/refitter#534) - \[ISSUE\]\[1.2.1-preview.54\] Some impediments using CLI version. Is not enough for my needs? [\#450](christianhelle/refitter#450) ## Merged Pull Requests * chore(deps): update dependency refitter.sourcegenerator to 1.4.0 by @renovate in christianhelle/refitter#513 * chore(deps): update dependency swashbuckle.aspnetcore to 6.9.0 by @renovate in christianhelle/refitter#514 * added options for a custom Name Generators by @fsamiec in christianhelle/refitter#517 * docs: add fsamiec as a contributor for code by @allcontributors in christianhelle/refitter#518 * chore(deps): update refit monorepo to v8 (major) by @renovate in christianhelle/refitter#519 * docs: add fabioloreggian as a contributor for bug by @allcontributors in christianhelle/refitter#521 * chore(deps): update dependency fluentassertions to 6.12.2 by @renovate in christianhelle/refitter#523 * chore(deps): update dependency polly to 8.5.0 by @renovate in christianhelle/refitter#525 * chore(deps): update dependency swashbuckle.aspnetcore to v7 by @renovate in christianhelle/refitter#526 * chore(deps): update dependency h.generators.extensions to 1.24.0 by @renovate in christianhelle/refitter#528 * chore(deps): update dotnet monorepo to v9 (major) by @renovate in christianhelle/refitter#527 * NSwag v14.2.0 by @renovate in christianhelle/refitter#532 * chore(deps): update dependency microsoft.net.test.sdk to 17.12.0 by @renovate in christianhelle/refitter#531 * chore(deps): update dependency refitter.sourcegenerator to 1.4.1 by @renovate in christianhelle/refitter#533 * docs: add geometrikal as a contributor for bug by @allcontributors in christianhelle/refitter#535 ... (truncated) Commits viewable in [compare view](christianhelle/refitter@1.4.0...1.7.0). </details> [](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>


This pull request adds a new
--simple-outputCLI option to Refitter, enabling plain-text console output without colors, ASCII art, tables, or emojis. This is especially useful for integration with IDEs and build tools that do not support rich terminal formatting. The implementation includes updates to documentation, command-line help, and the CLI's output logic to support this new mode across all relevant user interactions.Key changes include:
New Feature: Simple Output Mode
--simple-outputCLI option to generate plain, unformatted console output, bypassing Spectre.Console features for improved compatibility with IDEs and limited consoles. This affects banners, progress indicators, file summaries, error handling, and support messages. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11]Documentation Updates
README.mdand CLI documentation to describe the--simple-outputoption, its use cases, and sample output. Also added the option to the command-line help and examples. [1] [2] [3] [4] [5]Developer and Contribution Guide Improvements
.github/copilot-instructions.mdto reflect the new CLI option, update the workflow for adding options, and list recent CLI options for easier onboarding. Also documented new and existing CI/CD workflows. [1] [2]Internal Refactoring
settingsparameter where needed (e.g., validation and warning display), ensuring correct output mode is respected throughout the codebase. [1] [2]Overall, these changes improve the usability of the Refitter CLI in diverse environments and clarify the process for contributing new options.
This fixes #750
Example output with the
--simple-outputflagSummary by CodeRabbit
New Features
Documentation