-
-
Notifications
You must be signed in to change notification settings - Fork 202
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: changing input processor and interpreter to support more schemas #377
refactor: changing input processor and interpreter to support more schemas #377
Conversation
# Conflicts: # package-lock.json
…o feature/refactor_input # Conflicts: # src/interpreter/Interpreter.ts # src/models/index.ts # src/processors/JsonSchemaInputProcessor.ts
Pull Request Test Coverage Report for Build 1261433956
💛 - Coveralls |
@magicmatatjahu we can ignore the bug as #379 removes 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.
@jonaslagoni I understand that we are still sticking with CommonModel etc? Will this be changed in the future?
Refactored the toX functions for Draft7Schema and CommonModel to be more generic, I did not find any way to generalize it anymore between them, so if you have any suggestion, let me know 🙏
It seems like too much boilerplate to me, but it would take a lot of work to change it and that's the easiest way to do it now... 😅
Also, you have one bug in sonar cloud.
# Conflicts: # package-lock.json
Kudos, SonarCloud Quality Gate passed!
|
@magicmatatjahu for now, however I have started to rework that part, but it is a WIP, as I still need test different things before making some noise around it - #365 (comment)
Yea, exactly, dont have any better alternative at the moment. At least I dont see 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 :)
🎉 This PR is included in version 0.31.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Description
As more input schemas are to be supported, we need to split out the schemas even more than we are now.
The changes:
Schema
andCommonSchema
completely and introduces the more specificDraft7Schema
andAsyncapiV2Schema
.originalSchema
property from theCommonModel
tooriginalInput
- see originalSchema for CommonModel should be called originalInput #86toX
functions forDraft7Schema
andCommonModel
to be more generic, I did not find any way to generalize it anymore between them, so if you have any suggestion, let me know 🙏Related issue(s)
Related to #360
Fixes #86