Skip to content

fix(cli): tweak required argument names and styles + validate CLI documentation drift - #45

Merged
dotkas merged 9 commits into
developfrom
dotkas/better-tui-ux
Jul 21, 2026
Merged

fix(cli): tweak required argument names and styles + validate CLI documentation drift#45
dotkas merged 9 commits into
developfrom
dotkas/better-tui-ux

Conversation

@dotkas

@dotkas dotkas commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI review requested due to automatic review settings July 21, 2026 11:57
@dotkas dotkas changed the title fix(cli): smaller TUI improvements feat(cli): ensure ssot for documented examples of CLI usage + small TUI tweaks Jul 21, 2026
@dotkas dotkas changed the title feat(cli): ensure ssot for documented examples of CLI usage + small TUI tweaks fix(cli): ensure ssot for documented examples of CLI usage + small TUI tweaks Jul 21, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the oapi-codegen CLI flag naming and propagates the new, consistent invocation style across user-facing docs, examples, and the project Makefile, while also aligning the embedded --help examples and a console hint with the renamed flags.

Changes:

  • Rename CLI args/flags to --config-file / --output-file and update the positional arg name to spec_file.
  • Update all documented CLI examples (README, docs, Makefile, example README, --help examples) to use “options first, spec file last”.
  • Adjust the “no output destination” console hint to reference --output-file.

Reviewed changes

Copilot reviewed 15 out of 16 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
README.md Updates Quickstart and design-differences bullet to use --config-file / --output-file.
Makefile Updates generate-example commands to the new flag names and consistent argument ordering.
examples/bookstore/README.md Adds a dedicated example README documenting the regenerated commands with the new flags.
docs/design.md Updates the design doc’s “explicit invocation” section to the new flag names.
docs/configuration.md Updates CLI synopsis and flag descriptions to the new names (one placeholder inconsistency noted).
crates/oapi-codegen/src/main.rs Renames CLI struct fields/flags and updates the embedded --help examples accordingly.
crates/oapi-codegen/src/console.rs Updates the “no output destination” hint to reference --output-file.
.github/copilot-instructions.md Adds a pinned guideline documenting the “options first, spec last” CLI example convention.

Comment thread docs/configuration.md Outdated
Copilot AI review requested due to automatic review settings July 21, 2026 11:59

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 15 out of 16 changed files in this pull request and generated 1 comment.

Comments suppressed due to low confidence (1)

docs/configuration.md:6

  • The CLI synopsis placeholder uses <spec.yaml> but the argument description below uses <spec-file>. Using one placeholder consistently makes it clearer that this is a positional argument name rather than a literal filename.
oapi-codegen --config-file <cfg.yaml> [--output-file <out.rs>] <spec.yaml>

Comment thread crates/oapi-codegen/tests/example_commands.rs Outdated
Copilot AI review requested due to automatic review settings July 21, 2026 12:20

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 15 out of 16 changed files in this pull request and generated 1 comment.

Comments suppressed due to low confidence (1)

crates/oapi-codegen/tests/example_commands.rs:170

  • The temporary workspace directory is only removed at the end of the loop body. If any documented command fails (assert/panic), the test will unwind before the explicit remove_dir_all, leaving the copied workspace behind in the OS temp dir and potentially accumulating over time in CI.
        let workspace = std::env::temp_dir().join(format!("oapi-codegen-docs-{}-{offset}", std::process::id()));
        copy_dir(&example.dir, &workspace);

Comment thread crates/oapi-codegen/tests/example_commands.rs Outdated
Copilot AI review requested due to automatic review settings July 21, 2026 19:52

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 15 out of 16 changed files in this pull request and generated 1 comment.

Comment thread crates/oapi-codegen/tests/example_commands.rs Outdated
Copilot AI review requested due to automatic review settings July 21, 2026 20:00

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 15 out of 16 changed files in this pull request and generated no new comments.

@dotkas dotkas changed the title fix(cli): ensure ssot for documented examples of CLI usage + small TUI tweaks fix(cli): tweak required argument names and styles Jul 21, 2026
Copilot AI review requested due to automatic review settings July 21, 2026 20:28
@dotkas dotkas changed the title fix(cli): tweak required argument names and styles fix(cli): tweak required argument names and styles + validate CLI documentation drift Jul 21, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 14 out of 15 changed files in this pull request and generated no new comments.

Copilot AI review requested due to automatic review settings July 21, 2026 20:31

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 14 out of 15 changed files in this pull request and generated 3 comments.

Comment thread docs/configuration.md Outdated
Comment thread docs/configuration.md Outdated
Comment thread Makefile Outdated
Copilot AI review requested due to automatic review settings July 21, 2026 20:55

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 14 out of 15 changed files in this pull request and generated 1 comment.

Comment thread docs/configuration.md Outdated
Copilot AI review requested due to automatic review settings July 21, 2026 21:00
@dotkas
dotkas force-pushed the dotkas/better-tui-ux branch from 2a315ea to c85d6ff Compare July 21, 2026 21:00

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 14 out of 15 changed files in this pull request and generated 1 comment.

Comment thread crates/oapi-codegen/tests/cli_docs.rs
@dotkas
dotkas force-pushed the dotkas/better-tui-ux branch from c85d6ff to 2b5e0d2 Compare July 21, 2026 21:16
Copilot AI review requested due to automatic review settings July 21, 2026 21:16

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 14 out of 15 changed files in this pull request and generated 1 comment.

Comment thread crates/oapi-codegen/src/cli.rs Outdated
Copilot AI review requested due to automatic review settings July 21, 2026 21:47
@dotkas
dotkas force-pushed the dotkas/better-tui-ux branch from 2b5e0d2 to 5fcfd4e Compare July 21, 2026 21:47
@dotkas
dotkas enabled auto-merge (squash) July 21, 2026 21:48
@dotkas
dotkas merged commit 0019c0e into develop Jul 21, 2026
7 checks passed
@dotkas
dotkas deleted the dotkas/better-tui-ux branch July 21, 2026 21:48
@alchemax-housekeeper

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 1.0.0-dev.6 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 14 out of 15 changed files in this pull request and generated no new comments.

@alchemax-housekeeper

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 1.0.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants