Skip to content

docs: Fix stale @doNotGenerate inheritance example (#5002)#662

Merged
developerjamiu merged 2 commits into
serverpod:mainfrom
nicowalter256:fix-doNotGenerate-inheritance-docs
Jun 29, 2026
Merged

docs: Fix stale @doNotGenerate inheritance example (#5002)#662
developerjamiu merged 2 commits into
serverpod:mainfrom
nicowalter256:fix-doNotGenerate-inheritance-docs

Conversation

@nicowalter256

Copy link
Copy Markdown
Contributor

Fixes #5002

This PR:

  • Splits the section into "hiding a method declared on the class itself"
    (unaffected) and "hiding an inherited method" (only works if the parent
    is fully @doNotGenerate, not just abstract)
  • Updates the example to use a @doNotGenerate-annotated parent, which
    still works because no client class is generated for it and there's no
    abstract contract to satisfy
  • Adds a warning explaining why an abstract-only parent doesn't support
    this pattern, and that a normal concrete parent still exposes the
    "hidden" method via its own generated client

@developerjamiu developerjamiu changed the title docs: fix stale @doNotGenerate inheritance example (#5002) docs: Fix stale @doNotGenerate inheritance example (#5002) Jun 29, 2026
Comment thread docs/06-concepts/01-working-with-endpoints/02-endpoint-inheritance.md Outdated
@developerjamiu developerjamiu added the documentation Improvements or additions to documentation label Jun 29, 2026

@developerjamiu developerjamiu 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.

Thanks for the contribution. LGTM

@developerjamiu developerjamiu merged commit 66f2edf into serverpod:main Jun 29, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants