Skip to content

Fix/multi domain generation#22

Merged
jkbennemann merged 2 commits into
mainfrom
fix/multi-domain-generation
Feb 13, 2026
Merged

Fix/multi domain generation#22
jkbennemann merged 2 commits into
mainfrom
fix/multi-domain-generation

Conversation

@jkbennemann

Copy link
Copy Markdown
Owner

Summary

  • Fix broken $ref references in secondary domain specs — ClassSchemaResolver cached resolved schemas
    as a singleton but its cache was never cleared between domain runs. When SchemaRegistry was reset for
    the next domain, nested $ref schemas pointed to components that were never re-registered. Added
    reset() to ClassSchemaResolver and call it alongside $registry->reset() in the generate command.
  • Fix route leaking into non-default documentation files — Routes without a #[DocumentationFile]
    attribute default to ['default']. The discovery filter included routes if they matched the requested
    file OR had 'default', causing all internal routes to appear in every spec. Removed the 'default'
    fallback so only explicitly assigned routes are included.

jakob.bennemann added 2 commits February 13, 2026 10:43
The ClassSchemaResolver singleton cache persisted across domain runs
while SchemaRegistry was reset between them. This caused nested $ref
schemas to point to components that were never re-registered in the
fresh registry, resulting in broken references in the second domain's
spec output.
Routes without a #[DocumentationFile] attribute default to ['default'].
The filter was including these in every documentation file because it
checked `docFiles contains requestedFile OR docFiles contains 'default'`.
This caused all internal routes to leak into non-default specs like the
public API documentation.
@jkbennemann jkbennemann merged commit 4ee40d9 into main Feb 13, 2026
8 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.

1 participant