event-catalog / event-catalog/generators

Generator removes the already existing old versions content

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

Description

### I tried this:

Using both asyncapi and openapi generators leads to unintentional behaviors
Using asyncapi generator generates the version 1 and 2 of service "Service A"
Using openapi generator for only version 2 of same service "Service A"

### This happened:

The Asyncapi generator generates both service versions , Version 2 as latest and version 1 as versioned
When openapi generator executed it removes all contents of service A v1.0.0 except the specfile

### I expected this:

The generator must detect the corresponding version and extend it without touching the other versions being the latest or previous ones.

### Is there a workaround?

Check if the exact version exists and verify if its newer than latest or not
Add a new api method in SDk to allow adding service as a versioned one directly and if version is
The generator will create a version in versioned folder if the current service version is lower than latest
Screenshot 2024-10-20 at 00 36 53

### Anything else?
TWO SCREENSHOTS RPRESENTING THE PROBLEM

During OpenApi generation
Screenshot 2024-10-20 at 17 06 06

After openapi spec generation ends with success
Screenshot 2024-10-20 at 17 06 31

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

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.