Skip to content

feat(ruby): use the primary error message as the error's message - #8348

Merged
Vincent Biret (baywet) merged 1 commit into
microsoft:mainfrom
andreaTP:feat/ruby-primary-error-message
Oct 7, 2026
Merged

Vincent Biret (baywet) merged 1 commit into
microsoft:mainfrom
andreaTP:feat/ruby-primary-error-message

Conversation

@andreaTP

Copy link
Copy Markdown
Contributor

Copilot AI balanced review requested due to automatic review settings October 7, 2026 08:30
@andreaTP
Andrea Peruffo (andreaTP) requested a review from a team as a code owner October 7, 2026 08:30

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.

Copilot review overview

🟢 Approval recommended

The implementation is focused, consistent with existing language behavior, and adequately covered by unit and integration tests.

Review effort: Balanced
Findings: None

What changed in this PR

Adds Ruby support for returning the OpenAPI primary error message through an error’s message method.

Changes:

  • Adds Ruby error-message override generation.
  • Adds unit and integration coverage for direct, nested, and absent primary messages.
  • Documents the behavior.
File Description
src/​Kiota.Builder/​Refiners/​RubyRefiner.cs Adds primary-message properties to Ruby errors.
src/​Kiota.Builder/​Writers/​Ruby/​CodePropertyWriter.cs Generates the Ruby message override.
tests/​Kiota.Builder.Tests/​Refiners/​RubyLanguageRefinerTests.cs Tests message-property collision handling.
tests/​Kiota.Builder.Tests/​Writers/​Ruby/​CodePropertyWriterTests.cs Tests generated message methods.
tests/​Kiota.Builder.IntegrationTests/​InheritingErrors.yaml Adds a nested primary-message error schema.
it/​ruby/​spec/​basic/​integration_test_basic.rb Verifies the runtime exception message.
CHANGELOG.md Documents the Ruby behavior.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@baywet Vincent Biret (baywet) left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for the contribution!

@baywet
Vincent Biret (baywet) added this pull request to the merge queue Oct 7, 2026
Merged via the queue into microsoft:main with commit 5b0249f Oct 7, 2026
341 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

generation - Ruby - support for primary error message

3 participants