Skip to content

fix: auto response suffix - #73

Merged
dotkas merged 4 commits into
developfrom
dotkas/auto-response-suffix
Jul 27, 2026
Merged

fix: auto response suffix#73
dotkas merged 4 commits into
developfrom
dotkas/auto-response-suffix

Conversation

@dotkas

@dotkas dotkas commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI review requested due to automatic review settings July 24, 2026 15:36

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

Adjusts the TypeNameCollision remedy guidance for response-enum name clashes so the error message prioritizes the per-schema x-rust-name fix before the broader response-type-suffix option, and adds a regression assertion to keep that ordering stable.

Changes:

  • Reworded the response-enum collision hint to lead with x-rust-name and clarify response-type-suffix is a global rename.
  • Added a coverage test assertion to verify the hint mentions x-rust-name before response-type-suffix.
  • Updated inline documentation/comments to reflect the intended guidance ordering.

Reviewed changes

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

File Description
crates/oapi-codegen/tests/coverage.rs Adds an assertion ensuring the collision hint ordering prefers x-rust-name over response-type-suffix.
crates/oapi-codegen/src/lower/rename.rs Reorders and clarifies the hint text for response-enum name collisions to recommend x-rust-name first.

Comment thread crates/oapi-codegen/tests/coverage.rs Outdated
Copilot AI review requested due to automatic review settings July 24, 2026 15:41

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 3 out of 3 changed files in this pull request and generated 1 comment.

Comment thread crates/oapi-codegen/src/lower/rename.rs Outdated
Copilot AI review requested due to automatic review settings July 24, 2026 15:46

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 3 out of 3 changed files in this pull request and generated no new comments.

Comments suppressed due to low confidence (1)

crates/oapi-codegen/src/lower/rename.rs:255

  • The intra-doc link [Error::TypeNameCollision] likely doesn’t resolve in this module because Error isn’t in scope here (you import crate::error::Result, and Error is re-exported at the crate root). Using an explicit path avoids rustdoc broken-link warnings.
/// Return a [`Error::TypeNameCollision`] when `name` is already taken by an
/// emitted component model. `is_response` selects the remedy hint: for a
/// response-enum clash it leads with the surgical, per-schema `x-rust-name` fix
/// and offers the broad `response-type-suffix` as an alternative, since that
/// suffix renames *every* response enum, not just the colliding one.

Copilot AI review requested due to automatic review settings July 27, 2026 07:20
@dotkas
dotkas enabled auto-merge (squash) July 27, 2026 07:20
@dotkas
dotkas merged commit 4fe666a into develop Jul 27, 2026
7 checks passed
@dotkas
dotkas deleted the dotkas/auto-response-suffix branch July 27, 2026 07:21
@alchemax-housekeeper

Copy link
Copy Markdown
Contributor

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

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 3 out of 3 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