AsyncAPI offers many different ways to reuse certain parts of the document like messages or schemas definitions or references to external files, not to even mention the traits. There is a need for a tool that can be plugged into any workflows and optimize documents that are generated from code, but not only.
Apache License 2.0
14
stars
9
forks
source link
[BUG] File Reading Method in the Example script is not appropriate #251
The example script uses relative paths (./examples/input.yaml and ./examples/output.yaml) to handle file reading and writing operations, it will fail if executed from different directories.
Expected behavior
The script should manage file paths using the __dirname variable to ensure consistent behaviour irrespective of the current execution directory. This will ensure correct file referencing at all times.
Describe the bug.
The example script uses relative paths (./examples/input.yaml and ./examples/output.yaml) to handle file reading and writing operations, it will fail if executed from different directories.
Expected behavior
The script should manage file paths using the __dirname variable to ensure consistent behaviour irrespective of the current execution directory. This will ensure correct file referencing at all times.
Screenshots
-
How to Reproduce
npm run dev
cd examples
thennode index.js
🥦 Browser
Other
👀 Have you checked for similar open issues?
🏢 Have you read the Contributing Guidelines?
Are you willing to work on this issue ?
No, someone else can work on it