Repository navigation
refactor: integrate custom schemas with parser and spectral - #579
asyncapi-bot merged 10 commits into
Conversation
ef8a4d4 to
0826afe
Compare
6aad643 to
7676c9e
Compare
| } | ||
|
|
||
| async function parseSchemaV2(parser: Parser, item: ToParseItem) { | ||
| item.value[xParserOriginalSchemaFormat] = item.input.schemaFormat; |
There was a problem hiding this comment.
I see you are removing it but I can't see where we add xParserOriginalSchemaFormat value back.
There was a problem hiding this comment.
We don't remove schemaFormat from message in custom parsers so we don't need to set it the extension. Is it clear?
There was a problem hiding this comment.
Then we need remember to modify the README as well
There was a problem hiding this comment.
Ok, I will change it! :)
|
|
||
| // TODO: fix type | ||
| this.spectral.setRuleset(aasRuleset as any); | ||
| this.registerSchemaParser(AsyncAPISchemaParser()); |
There was a problem hiding this comment.
You can now register the other ones as all have been merged.
There was a problem hiding this comment.
No. As current solution, people need to register given format manually. For example, RAML works only on nodejs, so register RAML here will break browser compability.
dd89a9f to
9b1838b
Compare
|
Kudos, SonarCloud Quality Gate passed! |
| recommended: true, | ||
| given: [ | ||
| // operations | ||
| '$.channels.*.[publish,subscribe].message', |
There was a problem hiding this comment.
I just realized all those paths are tied to AsyncAPI Spec v2.x.x. How would we make it happen for v3.x.x ?
There was a problem hiding this comment.
By separate function, we can use different "formats" for rules in this same rulesets - one function for v2, another one for v3. Don't worry :)
smoya
left a comment
There was a problem hiding this comment.
LGTM! Great job @magicmatatjahu 💯 🚀 🌔
|
/rtm |








Description
cc @smoya
Related issue(s)
Part of #482