Skip to content

feat: allow servers and channels to be defined as components - #665

Merged
asyncapi-bot merged 2 commits into
asyncapi:2022-01-releasefrom
smoya:feat/serversChannelsAsComponents
Jan 13, 2022
Merged

asyncapi-bot merged 2 commits into
asyncapi:2022-01-releasefrom
smoya:feat/serversChannelsAsComponents

Conversation

@smoya

@smoya smoya commented Dec 2, 2021 •

Copy link
Copy Markdown
Member

Note that this PR is targeting asyncapi:2022-01-release branch, so merging it won't release a new version.

Description
This PR is part of #660.
It allows both servers and channels to be defined as (and referenced from) components, meaning the following will be now valid:

servers:
  production:
    $ref: '#/components/servers/myserver'
channels:
  some/events:
    $ref: '#/components/channels/myChannel'
components:
  servers:
    myserver:
      url: "http://localhost:5000/ws"
      protocol: ws
  channels:
    myChannel:
      description: "mychannel"

Related issue(s)
#660

@smoya smoya added the 💭 Strawman (RFC 0) RFC Stage 0 (See CONTRIBUTING.md) label Dec 2, 2021
@derberg

derberg commented Dec 2, 2021

Copy link
Copy Markdown
Member

@smoya fyi this pr goes to master, not release branch. Also, we release stuff from release branches, we create release candidates that are automatically published to the website. So you should have prefix feat: as you are introducing a feature

FYI, I haven't looked into the proposal itself, just quickly noticed what you wrote when I saw a pop up in slack channel and thought I will give you a quick heads up. For proposals, I plan to delegate some time next week to jump into the review in spec repo

@smoya
smoya changed the base branch from master to 2022-01-release December 2, 2021 16:33
@smoya smoya changed the title docs(spec): allow servers and channels to be defined as components feat: allow servers and channels to be defined as components Dec 2, 2021
@smoya
smoya force-pushed the feat/serversChannelsAsComponents branch from c9023da to 4658b28 Compare December 28, 2021 11:20
@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

@smoya

smoya commented Dec 28, 2021 •

Copy link
Copy Markdown
Member Author

This branch is now up-to-date with 2022-01-release and all conflicts have been solved.
Also, the social media example has been edited to illustrate the changes. As mentioned in #660 (comment):

unfortunately, the only thing it can be moved to components is one of the servers. See the diff here.
The reason for not moving the rest of servers and channels is because some field change, such as the descriptiion and, as per today, our reference and bundling system does not support fields to be overridden (We follow JSON Reference).

cc @derberg

@derberg derberg 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.

/dnm

@derberg derberg added 🏁 Accepted (RFC 3) RFC Stage 3 (See CONTRIBUTING.md) and removed 💭 Strawman (RFC 0) RFC Stage 0 (See CONTRIBUTING.md) do-not-merge labels Jan 13, 2022
@derberg

derberg commented Jan 13, 2022

Copy link
Copy Markdown
Member

All stuff in place, reference implementation provided and will be released to release branches after this merge.

/rtm

@asyncapi-bot

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 2.3.0-2022-01-release.2 🎉

The release is available on GitHub release

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.

4 participants