Repository navigation
fix: enum and composed type reading, expose error status and headers - #171
Merged
Vincent Biret (baywet) merged 5 commits intoOct 1, 2026
Merged
Conversation
- date, time, date-time, duration and guid readers return nil unless the node is a string - collection readers return nil unless the node is an array - get_child_node returns nil unless the node is an object
Contributor
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The runtime fixes are consistent with existing contracts and include focused regression coverage.
Review effort: Balanced
Findings: None
What changed in this PR
Fixes Ruby runtime handling for composed types, wire-valued enums, and HTTP error metadata.
Changes:
- Makes JSON readers shape-safe and resolves enums by wire value.
- Deserializes shared intersection fields into every member.
- Exposes response status and headers through
ApiError.
| File | Description |
|---|---|
components/serialization/json/spec/json_reader_shape_spec.rb |
Tests shape-safe readers. |
components/serialization/json/spec/json_enum_spec.rb |
Tests wire-valued enum parsing. |
components/serialization/json/spec/json_enum_collection_writer_spec.rb |
Tests wire-value serialization. |
components/serialization/json/lib/microsoft_kiota_serialization_json/json_parse_node.rb |
Adds shape guards and enum value lookup. |
components/http/spec/microsoft_kiota_faraday/faraday_request_adapter_spec.rb |
Tests error response metadata. |
components/http/lib/microsoft_kiota_faraday/faraday_request_adapter.rb |
Attaches response metadata to API errors. |
components/abstractions/spec/parse_node_helper_spec.rb |
Tests shared intersection fields. |
components/abstractions/lib/microsoft_kiota_abstractions/serialization/parse_node_helper.rb |
Composes duplicate field handlers. |
components/abstractions/lib/microsoft_kiota_abstractions/api_error.rb |
Adds response metadata accessors. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Vincent Biret (baywet)
approved these changes
Oct 1, 2026
Vincent Biret (baywet)
left a comment
Member
There was a problem hiding this comment.
Thank you for making the changes!
Contributor
Author
|
Thanks Vincent Biret (@baywet) ! Can we have a release with those changes? |
Member
|
its already on the way #164 |
Contributor
Author
|
Amazing! Thanks! |
This was referenced Oct 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Runtime side of microsoft/kiota#7956 (Open Payments with Kiota Ruby). One commit per change:
incoming-paymentread as nil), keeping the key fallbacks for older clients.get_child_node. Broken composed types across Stripe, GitHub and Notion: 204 to 6.ApiErrorexposesresponse_status_codeandresponse_headers. Closes generation - Expose Response Headers in API exception/error [Ruby] #65, closes generation - Ruby - Add ResponseStatusCode to API error/exception #70.Verified with every component's specs, RuboCop, and Kiota's 19-description Ruby IT matrix against both current Kiota main and the pending generator fixes.