inject
helper excludeChannel
and includeOnlyChannels
params don't work with AsyncAPI document
#70
Labels
bug
Something isn't working
Alternate title:
Injector
mapIndex
produces empty object for AsyncAPI documentDescribe the bug
inject([...])
filter functionality (excludeChannel
,includeOnlyChannels
) doesn't work, scope unclear.To Reproduce
I'm using a standard, valid asyncAPI document, I'm not sure if it works for other things.
Expected behavior
excludeChannel
,includeOnlyChannels
params are respectedAdditional context
I'm debugging into
Injector.ts
, and the offending code seems to be the mapIndex function. With this particular example at least, the problem seems to be that the$ref
field is selected twice, once by theObject.values(methods)
call, and then a second time by the explicitmethodToFileRef.$ref
accessor.You can see in the debugger that
![Screenshot 2022-03-25 at 13 41 10](https://user-images.githubusercontent.com/63397303/160122543-335d7b44-2e8a-435b-910c-22c7593438d3.png)
Object.values(methods)
is already a string array:The result is that
![Screenshot 2022-03-25 at 13 29 53](https://user-images.githubusercontent.com/63397303/160121100-f319425e-419c-4677-9c24-d001fb46df19.png)
methodToFileRef
is a string andmethodToFileRef.$ref
is undefined.Therefore nothing ever gets added to
this.this.fileToRouteMap
so nothing ever passes the filter whitelist or blacklists. They have no entries to filter against.The text was updated successfully, but these errors were encountered: