fix: prevent double-stringification of AsyncAPI string in archiver service (#2026) - #2134
fix: prevent double-stringification of AsyncAPI string in archiver service (#2026)#2134useye wants to merge 1 commit into
Conversation
|
|
|
This pull request has been automatically marked as stale because it has not had recent activity 😴 It will be closed in 120 days if no further activity occurs. To unstale this pull request, add a comment with detailed explanation. There can be many reasons why some specific pull request has no activity. The most probable cause is lack of time, not lack of interest. AsyncAPI Initiative is a Linux Foundation project not owned by a single for-profit company. It is a community-driven initiative ruled under open governance model. Let us figure out together how to push this pull request forward. Connect with us through one of many communication channels we established here. Thank you for your patience ❤️ |



Summary
In
src/domains/services/archiver.service.ts, theappendAsyncAPIDocumentmethod always calledJSON.stringify(asyncapi)even whenasyncapiwas already a string. This caused valid AsyncAPI YAML/JSON strings to be double-serialized, resulting in invalid documents in the generated zip archive.Fix
Changed
appendAsyncAPIDocumentto only stringify when the input is an object:Also updated the method signature to accept
string | objectinstead of juststring.Related Issue
Fixes #2026