-
Notifications
You must be signed in to change notification settings - Fork 127
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
asyncapi lint support custom rules #1544
Comments
Import this and it should work: |
@marianobntz how exactly are you trying to apply the rules? Could you provide an example of what doesn't work for you? |
I have this js file "custom_rules.js" `const path = require('path'); function FileNameArtifactRule() { function AddSourceLinkDecorator() { module.exports = { ` `plugins:
rules: This works fine when I validate openapi json files, but when I do it with asyncapi files I get this warning:
Of course the validation does not run :-) |
same thing happens when I add a custom decorator... the same warning
|
Where do I put this line? inside the custom js ? If I put it on top of the file it breaks compilation. Thanks!! |
There are some asyncapi rules in the lib @redocly/openapi-core/src/rules/async2. Look there and make yours :) |
So the problem was that I was not exporting properly the rules in my js file... The proper way to add asyncapi rules and decorators is using async2 as the key...
Best |
@marianobntz sorry for the late response. Glad you found the root cause 🎉 |
Currently the custom rules do not apply to asyncapi lint validation.
Any restriction (other than priorities) to add this feature?
Thanks
The text was updated successfully, but these errors were encountered: