event-catalog / event-catalog/generators

OpenAPI: generator adds prefix to name property of message

Open
#241 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
15
Forks
16
Avg merge
25m
Merged PRs (30d)
4

Description

### I tried this:

I configured the generator to add a prefix using the new extension from 7.4.5 to prefix the **id** of the message to avoid conflicts because of identical operation ids in different OpenAPI spec files. I used the service id as prefix (through prefixWithServiceId) and an explicit prefix. The issue occurs in both cases.

### This happened:

The prefix was added to the id (which is what I expected), but in addition it was also added to the name of the message, which makes the prefix visible in the catalog treeview and pages, which is undesired. In addition, I got numerous orphaned messages which didn't exist before I added the prefix.

### I expected this:

I expected the prefix in front of the **id**, not the **name** property of the message. For the AsyncAPI plugin this is working correctly.

### Is there a workaround?

None than removing the prefix configuration entirely and accepting the aliasing of messages because of identical operation ids.

### Anything else?

I think it's important to mention that this works correctly for the AsyncAPI plugin.

### EventCatalog Version

"@eventcatalog/core": "^2.61.3", "@eventcatalog/generator-asyncapi": "^4.5.3", "@eventcatalog/generator-openapi": "^7.4.5"

### Node.js Version

23.11

### Platform(s)

Windows

### 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.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.