Skip to content

feat(generators): support generating services into subdomain paths#366

Merged
boyney123 merged 1 commit intomainfrom
feat/support-subdomain-service-paths
Mar 20, 2026
Merged

feat(generators): support generating services into subdomain paths#366
boyney123 merged 1 commit intomainfrom
feat/support-subdomain-service-paths

Conversation

@boyney123
Copy link
Contributor

Summary

  • All 9 generators updated to use getResourcePath instead of hardcoded domain paths, enabling nested subdomain paths like domains/Buyer/subdomains/Agency/services/MyService
  • SDK updated to 2.18.2 across all generator packages (includes subdomain path preservation fix)
  • Subdomain test added to every generator

What This PR Does

All generators previously hardcoded service paths as domains/{id}/services/{serviceId}, which meant services could only be generated at the top-level domain. This updates all generators to dynamically resolve domain locations using getResourcePath from the SDK.

How It Works

  1. After domain management runs, the generator calls getResourcePath(catalogDir, domainId, domainVersion) to find where the domain actually lives on disk
  2. If found (e.g. at domains/Buyer/subdomains/Agency), the service path is constructed relative to that location
  3. If not found (new domain), falls back to the previous domains/{id} behavior for backward compatibility

Breaking Changes

None. Existing catalogs with top-level domains continue to work unchanged.

Test plan

  • Subdomain test added and passing for all 9 generators
  • All existing tests continue to pass

Depends on SDK 2.18.2 (event-catalog/eventcatalog#2359, event-catalog/eventcatalog#2361)

🤖 Generated with Claude Code

All generators now use getResourcePath to resolve the actual domain
location on disk instead of hardcoding domains/{id}/services. This
enables nested subdomain paths like
domains/Buyer/subdomains/Agency/services/MyService.

Updated SDK to 2.18.2 which preserves subdomain paths when adding
resources to domains.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@changeset-bot
Copy link

changeset-bot bot commented Mar 20, 2026

🦋 Changeset detected

Latest commit: e87d4a3

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 9 packages
Name Type
@eventcatalog/generator-openapi Minor
@eventcatalog/generator-asyncapi Minor
@eventcatalog/generator-eventbridge Minor
@eventcatalog/generator-aws-glue Minor
@eventcatalog/generator-azure-schema-registry Minor
@eventcatalog/generator-apicurio Major
@eventcatalog/generator-github Minor
@eventcatalog/generator-confluent-schema-registry Minor
@eventcatalog/generator-graphql Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@boyney123 boyney123 merged commit d0b6f39 into main Mar 20, 2026
6 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