event-catalog / generator-openapi

OpenAPI generator for EventCatalog
Other
5 stars 1 forks source link

fix(plugin): throw an explicit error message if service id is missing #20

Closed XaaXaaX closed 2 months ago

XaaXaaX commented 2 months ago

Motivation

When integrating multiple specs some services are event producers some event consumers , some send commands some receive commands.

Given the above explanation, in reality, a command contract is owned by the receiving service but sent by the upstream service, in the other side an event contract is owned by the producer service but received by the downstream service.

When integrating multiple specs, if the generator finds a received event already created by the event owner spec, it will overwrite it. If that event version is already versioned (not latest ) by owner service, the SDK throws an error.

Service A > Sends Event A1 > Sends  EventA2
Service B > Receives Event A1

The variety of situations makes it hard to find a convention to automate only based on asyncapi spec.

The PR introduces a declarative way to skip external message creation or modifications using asyncapi extensions x-eventcatalog-visibility.

changeset-bot[bot] commented 2 months ago

⚠️ No Changeset found

Latest commit: 321b5eac3a79c1093017317bd9d500d66e047d96

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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