event-catalog / generator-asyncapi

AsyncAPI generator for EventCatalog
https://www.eventcatalog.dev/docs/development/integrations/async-api/intro
Other
9 stars 4 forks source link

fix(plugin): throw explicit error message on service id not provided #58

Closed XaaXaaX closed 2 weeks ago

XaaXaaX commented 1 month ago

Motivation The fix resolve the technical exception while the consumers forget to add the mandatory service id while upgrading to version 2.0.0

changeset-bot[bot] commented 1 month ago

⚠️ No Changeset found

Latest commit: 8fcc88e30df1341778f9b8a777abfef5c8d1641d

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

boyney123 commented 1 month ago

Wonder if Zod can help here at all? Any thoughts?

XaaXaaX commented 1 month ago

Wonder if Zod can help here at all? Any thoughts?

@boyney123 Yes for sure , i can tackle it now or do it as later release what do you think?

boyney123 commented 1 month ago

Yeah be curious to see what it looks like now if you want?

XaaXaaX commented 1 month ago

Yeah be curious to see what it looks like now if you want?

i will put it in place

XaaXaaX commented 1 month ago

I love this

Screenshot 2024-10-04 at 21 06 03

can we rely on zod default messages or need a more customized message?

The pull request for validation using Zod https://github.com/event-catalog/generator-asyncapi/pull/66 TBH, i prefer simplicity than adding complexity , it seems more verbose to me than a simple validation mechanism

@boyney123 what do you think ?

boyney123 commented 2 weeks ago

Thank you for looking into this @XaaXaaX . I merged #66 I think the ability to add new validation in future through schema stuff you added is fine and good. Thanks for raising and also fixing!