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

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

Merged

Conversation

magicmatatjahu
Copy link
Member

@magicmatatjahu magicmatatjahu commented Nov 22, 2022

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

@sonarcloud
Copy link

sonarcloud bot commented Nov 22, 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

Copy link
Member

@fmvilas fmvilas left a comment

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
Member Author

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

@magicmatatjahu
Copy link
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
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
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