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: add metadata to models #496

Merged
merged 7 commits into from Mar 25, 2022

Conversation

magicmatatjahu
Copy link
Member

@magicmatatjahu magicmatatjahu commented Mar 16, 2022

Description

  • add metadata to model like pointer (JSON Pointer), asyncapi data with detailed AsyncAPI document, parent which points to the parent model
  • add helpers (similar we have in old implementation) for creating map/list of given model etc.
  • add unit tests
  • add missed mixins to models

Related issue(s)
Part of #481
Part of #482

@magicmatatjahu magicmatatjahu added the enhancement New feature or request label Mar 16, 2022
@magicmatatjahu magicmatatjahu marked this pull request as ready for review March 16, 2022 12:27
@magicmatatjahu magicmatatjahu requested review from smoya and removed request for fmvilas, derberg, jonaslagoni and asyncapi-bot-eve March 16, 2022 12:28
@magicmatatjahu
Copy link
Member Author

@smoya Why do we need metadata and a pointer for example? E.g. in react component and also in studio we make anchors by which people can move between given sections of specification (in html preview and also in editor). Current solution in studio is custom and not very optimal. By adding this small thing to the model implementation we have the ability to specify where the object is located and it is version agnostic. In the future we can always add other things to the metadata that will be needed. Write what you think about it :)

Copy link
Member

@smoya smoya left a comment

Choose a reason for hiding this comment

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

LGTM!

@sonarcloud
Copy link

sonarcloud bot commented Mar 25, 2022

Kudos, SonarCloud Quality Gate passed!    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
No Duplication information No Duplication information

@magicmatatjahu
Copy link
Member Author

/rtm

@asyncapi-bot asyncapi-bot merged commit 6e959f5 into asyncapi:next-major Mar 25, 2022
@magicmatatjahu magicmatatjahu deleted the next/model-metadata branch March 25, 2022 12:45
magicmatatjahu added a commit to magicmatatjahu/parser-js that referenced this pull request Oct 3, 2022
derberg pushed a commit that referenced this pull request Oct 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request ready-to-merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants