Skip to content

docs: Document removal of Hash inheritance from response models#458

Merged
gjtorikian merged 1 commit intonext-majorfrom
devin/1776551249-v7-migration-to-h
Apr 18, 2026
Merged

docs: Document removal of Hash inheritance from response models#458
gjtorikian merged 1 commit intonext-majorfrom
devin/1776551249-v7-migration-to-h

Conversation

@devin-ai-integration
Copy link
Copy Markdown
Contributor

Description

Adds a "Response models no longer inherit from Hash" section to docs/V7_MIGRATION_GUIDE.md explaining the behavioral differences between v6's DeprecatedHashWrapper < Hash models and v7's HashProvider-based models.

Covers:

  • is_a?(Hash) is now false for response models.
  • to_hash is removed; use to_h.
  • to_h now returns a real Hash (v6 returned a JSON string).
  • user[:attr] Hash-style access is removed; use the accessor (user.attr).
  • Guidance for **splat / Hash#merge call sites that relied on the implicit to_hash coercion contract.

Closes the documentation half of #316. The v7 code change that removed the Hash inheritance is already on this branch via #457.

Documentation

Does this require changes to the WorkOS Docs? E.g. the API Reference or code snippets need updates.

[ ] No

Link to Devin session: https://app.devin.ai/sessions/f4878ca282304edc9d70b5846ecdad79

Adds a "Response models no longer inherit from `Hash`" section to the
v7 migration guide, explaining the behavioral differences between v6's
`DeprecatedHashWrapper < Hash` models and v7's `HashProvider`-based
models. Closes the documentation half of #316.

Co-Authored-By: garen.torikian <garen.torikian@workos.com>
@devin-ai-integration
Copy link
Copy Markdown
Contributor Author

Original prompt from garen.torikian

SYSTEM:
=== BEGIN THREAD HISTORY ===
Devin AI (U08G1NMS6AV): New Assistant Thread

Devin (U08G1NMS6AV): Hi! I'm Devin. How can I help you today?

<most_recent_message>
Garen Torikian (U0A6717PLA1): can you please read <#457> and judge it on code cleanliness and DRY? it's changed since the last time you saw it. is it idiomatic Ruby? is everything correctly documented? how might it compare to some other popular SDKs like the ones from Stripe? write your results out to a markdown file with an actionable tasklist which i can feed to another LLM
</most_recent_message>
=== END THREAD HISTORY ===

Thread URL: https://work-os.slack.com/archives/D0ATJ0JCJQH/p1776529725213339?thread_ts=1776529725.213339&amp;cid=D0ATJ0JCJQH

The latest message is the one right above that tagged you. The <most_recent_message> is the message that you should use to guide your goals + task for this session, and you should use the rest of the slack thread as context.

@devin-ai-integration devin-ai-integration bot requested a review from a team as a code owner April 18, 2026 22:27
@devin-ai-integration
Copy link
Copy Markdown
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

@devin-ai-integration devin-ai-integration bot requested a review from a team as a code owner April 18, 2026 22:27
@devin-ai-integration devin-ai-integration bot requested review from dandorman and removed request for a team April 18, 2026 22:27
@devin-ai-integration devin-ai-integration bot changed the title Document removal of Hash inheritance from response models docs: Document removal of Hash inheritance from response models Apr 18, 2026
@gjtorikian gjtorikian merged commit cb872c5 into next-major Apr 18, 2026
7 of 8 checks passed
@gjtorikian gjtorikian deleted the devin/1776551249-v7-migration-to-h branch April 18, 2026 22:28
@greptile-apps
Copy link
Copy Markdown

greptile-apps bot commented Apr 18, 2026

Greptile Summary

This PR adds a "Response models no longer inherit from Hash" section to docs/V7_MIGRATION_GUIDE.md, documenting the behavioral differences between v6's DeprecatedHashWrapper < Hash and v7's HashProvider-based models. The content is accurate, well-structured, and covers all the impacted call sites (bracket access, to_hash, to_h, to_json, splat coercion, and is_a?(Hash) checks).

Confidence Score: 5/5

Documentation-only change with accurate content — safe to merge.

The PR is a single documentation file change. The described v6/v7 behavioral differences are technically accurate, all relevant migration paths are covered, and no code is modified.

No files require special attention.

Important Files Changed

Filename Overview
docs/V7_MIGRATION_GUIDE.md Adds "Response models no longer inherit from Hash" section documenting the v6→v7 behavioral changes for to_h, to_hash, Hash-style bracket access, and splat coercion.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[Response Model Instance] --> B{v6 DeprecatedHashWrapper < Hash}
    A --> C{v7 include HashProvider}

    B --> B1["is_a?(Hash) → true"]
    B --> B2["to_hash → self (DirectoryUser)"]
    B --> B3["to_h → JSON string"]
    B --> B4["user[:id] → value (with deprecation warning)"]
    B --> B5["**splat / Hash#merge → implicit to_hash coercion"]

    C --> C1["is_a?(Hash) → false"]
    C --> C2["to_hash → NoMethodError"]
    C --> C3["to_h → real Hash"]
    C --> C4["user[:id] → NoMethodError"]
    C --> C5["**user.to_h / merge(user.to_h) → explicit conversion needed"]
    C --> C6["to_json → JSON string"]
Loading

Reviews (1): Last reviewed commit: "Document removal of Hash inheritance fro..." | Re-trigger Greptile

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

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant