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

docs: fix invalid operation references in example snippets #620

Merged
merged 2 commits into from
Oct 8, 2021

Conversation

balogal
Copy link
Contributor

@balogal balogal commented Sep 9, 2021


title: Fix invalid operation references in example snippets


Related issue(s):
#619

Replaces invalid example snippets with valid ones. I decided to no longer include the message in the channel and parameter object section because I felt like it didn't add much to the understanding. But if you prefer, let me know and I add them as in the intro section.

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Welcome to AsyncAPI. Thanks a lot for creating your first pull request. Please check out our contributors guide and the instructions about a basic recommended setup useful for opening a pull request.

Keep in mind there are also other channels you can use to interact with AsyncAPI community. For more details check out this issue.

spec/asyncapi.md Outdated Show resolved Hide resolved
spec/asyncapi.md Outdated Show resolved Hide resolved
spec/asyncapi.md Outdated Show resolved Hide resolved
spec/asyncapi.md Outdated Show resolved Hide resolved
spec/asyncapi.md Outdated
@@ -538,7 +539,9 @@ Field Pattern | Type | Description
{
"user/signedup": {
"subscribe": {
"$ref": "#/components/messages/userSignedUp"
"message": {
"$ref": "#/components/messages/userSignUp"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Please note, that I also changed userSignedUp to userSignUp here and in other locations. Before, both variations where used inconsistently in the spec.

I decided for userSignUp because it was used more frequently and it's also the spelling used in the Message Object section.

Copy link
Member

Choose a reason for hiding this comment

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

Yeah, thanks for the heads up. IMHO it should be userSignedUp (past tense) but I don't think it matters a lot. Thanks for taking care anyway.

Copy link
Member

Choose a reason for hiding this comment

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

+1 to rename it to use the simple past tense as it is common in events (Domain events, event-sourcing, cqrs, etc)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think originally, userSignUp was used, because the example message given in the Message Object section is intended as a command. See for example this part: "summary": "Action to sign a user up.",.

In this case, past tense wouldn't be appropriate imho. So if we want to change to past tense, we should adapt a couple of other wordings in the spec. What do you think?

Copy link
Member

Choose a reason for hiding this comment

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

We use both (command and event) interchangeably. I don't think we have to change anything here or in any other place. It's correct as it is, it was just a suggestion because most of the time we're speaking about events instead of commands. That's why we explicitly describe it when it's a command. For the rest of the occurrences, it should be an event. But really, not a blocker. It's ok as it is, at least for me.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Alright, definitely not a hard opinion on the naming on my part. Even if it is not a blocker, since both of you have a preference towards the past tense names, I reverted the re-naming. So now, everything is as it was before naming wise.

fmvilas
fmvilas previously approved these changes Sep 16, 2021
@fmvilas fmvilas requested a review from smoya September 16, 2021 10:23
smoya
smoya previously approved these changes Sep 16, 2021
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, only one minor about the name of the event. I agree @fmvilas event names are usually written in the simple past tense.

@balogal balogal dismissed stale reviews from smoya and fmvilas via 713ba1a September 19, 2021 21:50
@balogal
Copy link
Contributor Author

balogal commented Oct 7, 2021

Hi @fmvilas, @smoya, is there currently anything needed from my side to advance this PR? This is my first contribution to the repo so I'm not 100% familiar with the processes in place.

@sonarcloud
Copy link

sonarcloud bot commented Oct 8, 2021

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
0.0% 0.0% Duplication

@smoya
Copy link
Member

smoya commented Oct 8, 2021

Hi @fmvilas, @smoya, is there currently anything needed from my side to advance this PR? This is my first contribution to the repo so I'm not 100% familiar with the processes in place.

Sorry, there is nothing else pending. This can be merged as it is 👍

@smoya smoya merged commit c416d3d into asyncapi:master Oct 8, 2021
@smoya smoya linked an issue Oct 8, 2021 that may be closed by this pull request
@asyncapi asyncapi deleted a comment from allcontributors bot Oct 8, 2021
@smoya
Copy link
Member

smoya commented Oct 8, 2021

@all-contributors please add @balogal for doc and bug

@allcontributors
Copy link
Contributor

@smoya

I've put up a pull request to add @balogal! 🎉

@derberg
Copy link
Member

derberg commented Dec 21, 2021

@all-contributors please add @balogal for doc and bug

@allcontributors
Copy link
Contributor

@derberg

I've put up a pull request to add @balogal! 🎉

@asyncapi-bot
Copy link
Contributor

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

The release is available on GitHub release

Your semantic-release bot 📦🚀

@asyncapi-bot
Copy link
Contributor

🎉 This PR is included in version 2.3.0 🎉

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.

Invalid Operation References in Example Snippets
5 participants