Skip to content

chore: add missed metadata methods to the core models - #677

Merged
asyncapi-bot merged 2 commits into
asyncapi:next-major-specfrom
magicmatatjahu:next-spec/missed-metadata
Nov 24, 2022
Merged

asyncapi-bot merged 2 commits into
asyncapi:next-major-specfrom
magicmatatjahu:next-spec/missed-metadata

Conversation

@magicmatatjahu

@magicmatatjahu magicmatatjahu commented Nov 22, 2022 •

Copy link
Copy Markdown
Member

Description

  • add title(), hasTitle(), summary(), hasSummary(), tags() methods to the core models: Channel, Server, Operation.
  • add CoreMixins interface and abstract CoreModel class to use inheritance.
  • add unit tests for new methods.

Related issue(s)
Part of asyncapi/spec#795
Part of asyncapi/spec#750

@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

@fmvilas fmvilas left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I'm happy to accept this PR but I don't agree with this kind of "optimizations". This is one of these situations where DRY doesn't apply well and it's going to bite us further down the track.

You're grouping summary and description with unrelated stuff like externalDocs and bindings. All in a single place just to avoid repetition. It's all good now but code evolves over time and what's common today may not be common tomorrow and this PR is hiding all these "common" things making it harder to spot.

Just an opinion though. Time will tell 😄

@magicmatatjahu

Copy link
Copy Markdown
Member Author

Looking at the speed of change in the spec it will be in about 3 years 😆

@magicmatatjahu

Copy link
Copy Markdown
Member Author

/rtm

@asyncapi-bot
asyncapi-bot merged commit f804bdb into asyncapi:next-major-spec Nov 24, 2022
@magicmatatjahu
magicmatatjahu deleted the next-spec/missed-metadata branch November 24, 2022 13:45
@asyncapi-bot

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 2.1.0-next-major-spec.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

@asyncapi-bot

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 2.2.0-next-major-spec.1 🎉

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants