Skip to content

When we getResource we need to actually verify/check the resource type #2102

@boyney123

Description

@boyney123

Migrated from event-catalog/sdk#173

I tried this:

When we getEvents, getServices (etc) the code under the hood calls getResource which is a generic function, that searchs the codebase for a file with the id of X.

Regardless of the type.

This means sometimes when you call to get a service named MyTest and you happened to have a channel with the same name MyTest the SDK could return channels rather than services when you call getService.

Related to event-catalog/generators#116

This happened:

Above

I expected this:

No response

Is there a workaround?

No response

Anything else?

No response

EventCatalog Version

No response

Node.js Version

No response

Platform(s)

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    sdkIssues related to @eventcatalog/sdk package

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions