Open adammfrank opened 1 month ago
Welcome to AsyncAPI. Thanks a lot for reporting your first issue. Please check out our contributors guide and the instructions about a basic recommended setup useful for opening a pull request.
Keep in mind there are also other channels you can use to interact with AsyncAPI community. For more details check out this issue.
Hey, have you tried again with v2.1.1 maybe? It sounds a lot like this could be the same problem that was fixed in that release.
@adammfrank can you confirm if you still have this error, we will close the issue if it is solved.
Describe the bug.
When I run a generate command from one directory up from the asyncapi.yml, it is looking for relative refs in the directory the command was run from (
cwd
) not the directory containing asyncapi.ymlThis is the asyncapi.yaml
./schemas/runCompleted
does exist and is next toasyncapi.yaml
. The generate command can't find it because it is running one directory up fromasyncapi.yaml
and is looking for./schemas
from there.If I run the command from the same directory as
asyncapi.yaml
then it worksPlease let me know if I'm doing something wrong, or if you think this should be fixed. It sounds like the type of thing I could help with.
Expected behavior
I expect generate to work from any directory as long as it is supplied a path to a valid
asyncapi.yaml
. Or it would also work if it needed a context argument likedocker build
uses.Screenshots
How to Reproduce
Create an asyncapi.yaml with relative path refs. Run a generate command from a directory above the asyncapi.yaml file
🥦 Browser
None
👀 Have you checked for similar open issues?
🏢 Have you read the Contributing Guidelines?
Are you willing to work on this issue ?
Yes I am willing to submit a PR!