Skip to content

refactor: add metadata to models - #496

Merged
asyncapi-bot merged 7 commits into
asyncapi:next-majorfrom
magicmatatjahu:next/model-metadata
Mar 25, 2022
Merged

asyncapi-bot merged 7 commits into
asyncapi:next-majorfrom
magicmatatjahu:next/model-metadata

Conversation

@magicmatatjahu

@magicmatatjahu magicmatatjahu commented Mar 16, 2022 •

Copy link
Copy Markdown
Member

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 asyncapi-bot-eve, derberg, fmvilas and jonaslagoni March 16, 2022 12:28
@magicmatatjahu

Copy link
Copy Markdown
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 :)

@smoya smoya left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM!

@sonarqubecloud

Copy link
Copy Markdown

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
Copy Markdown
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.

3 participants