Skip to content
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: allOf interpretation #185

Merged
merged 41 commits into from
May 20, 2021

Conversation

jonaslagoni
Copy link
Sponsor Member

@jonaslagoni jonaslagoni commented May 12, 2021

Description
This PR adds the refactoring of allOf to the new interpreter.

It changes the entire perspective, to instead of adding simplification functions per CommonModel property, we process the JSON Schema keywords which then affects the CommonModel in some way.

It adds

  • InterpretAllOf, to interpret the allOf schema keyword.

Files this PR is supposed to replace

Todo

  • Refactor docs
  • Solve code smells
  • Add logging to the process
  • Inspect tests
  • Rename to transformer

Related issue(s)
Blocked by #184

@coveralls
Copy link

coveralls commented May 18, 2021

Coverage Status

Coverage increased (+0.1%) to 94.927% when pulling 4b5696f on jonaslagoni:feature/all_of_simplification into 29506ee on asyncapi:master.

@jonaslagoni jonaslagoni changed the title refactor: introduce new allOf simplification refactor: allOf simplification May 18, 2021
@jonaslagoni jonaslagoni changed the title refactor: allOf simplification refactor: allOf interpretation May 19, 2021
@jonaslagoni jonaslagoni marked this pull request as ready for review May 19, 2021 11:00
src/interpreter/InterpretAllOf.ts Outdated Show resolved Hide resolved
src/interpreter/InterpretAllOf.ts Outdated Show resolved Hide resolved
src/models/CommonModel.ts Outdated Show resolved Hide resolved
jonaslagoni and others added 5 commits May 20, 2021 13:18
Co-authored-by: Maciej Urbańczyk <urbanczyk.maciej.95@gmail.com>
Co-authored-by: Maciej Urbańczyk <urbanczyk.maciej.95@gmail.com>
@sonarcloud
Copy link

sonarcloud bot commented May 20, 2021

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
1.9% 1.9% Duplication

Copy link
Member

@magicmatatjahu magicmatatjahu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! :)

@jonaslagoni
Copy link
Sponsor Member Author

Thanks for the review 👍

@jonaslagoni jonaslagoni merged commit 0db6ea0 into asyncapi:master May 20, 2021
@jonaslagoni jonaslagoni deleted the feature/all_of_simplification branch May 20, 2021 11:27
@asyncapi-bot
Copy link
Contributor

🎉 This PR is included in version 0.6.4 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants