Skip to content

Apicurio: Using groupId when generating events #324

@Ferumdriel

Description

@Ferumdriel

Use Case

Apicurio groups artifacts by their groupId - there can be multiple artifacts sharing name, each different and stored in different group.

Apicurio Generator generates all events as a flat structure, resulting in events being merged/overwriting each other, if their names collide.

Let's say Team A pushes all their events to apicurio under group "TeamA":

  • account-register
  • account-delete
  • app-login
  • 20 more of events

And teamB under group "TeamB":

  • account-register
  • customer-visit
  • 50 more of events

When Event Catalog pulls all schemas, all events land in the root directory of events.

account-register name will collide and both schemas will land in the same account-register directory. If their versions will be equal, one will overwrite the other.

I just sent v1.0.0 and v2.0.0 from TeamA and v1.5.0 and v2.5.0 from TeamB - they ended up as 4 versions within "account-register" event, without distinction which one belongs to which group.

Proposed Solution

For Apicurio generator, move events to their corresponding group directory.

ApicurioAPI.SearchArtifacts endpoint link already returns groupId for each returned artifact.

Current implementation of generator already has this attribute available:
ArtifactSearchResults.Artifact.groupId link

Implementation Notes

No response

Community Notes

  • Please vote by adding a 👍 reaction to the issue to help us prioritize.
  • If you are interested to work on this issue, please leave a comment.
  • If this issue is labeled needs-discussion, it means the spec has not been finalized yet. Please reach out in the EventCatalog Discord.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions