-
-
Notifications
You must be signed in to change notification settings - Fork 104
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
refactor: add Avro Schema Parser #576
refactor: add Avro Schema Parser #576
Conversation
|
||
async function parse(input: ParseSchemaInput<unknown, unknown>): Promise<AsyncAPISchema> { | ||
const asyncAPISchema = await avroToJsonSchema(input.data as AvroSchema); | ||
const message = (input.meta as any).message |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The big change VS what we had previously is that the new interface passes directly the Schema in input.data
rather than the message object.
I decided to add the message object in the input.meta
and only in case it is there, do the modifications (if they are being done here finally).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I will remember about that :) Avro parser there is a bit problematic 😅
I'm not involved in rewriting to TypeScript, so this might be silly question, but why are you porting avro schema parser here inside the parser? |
Even though there are unit tests, the idea is to have everything here, to do proper testing of the parser with those schema parsers, and once we confirm everything works as expected, to move the code to each schema parser repo. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great! I left some comments :) Please refer to them and we can merge it :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! 🚀 Should we wait for review of parser's maintainers?
We can merge now as we have two approvals from code owners. |
Kudos, SonarCloud Quality Gate passed! |
/rtm |
Description
This PR does the following:
validate()
method).Related issue(s)
#480