-
-
Notifications
You must be signed in to change notification settings - Fork 280
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: channel object / $ref note. #826
Merged
Merged
Changes from 2 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
8733388
Update asyncapi.md
ponelat 3dfb71d
Update asyncapi.md
ponelat c8f2cd4
Update asyncapi.md
ponelat 4d113c2
Update asyncapi.md
ponelat 235b242
Update spec/asyncapi.md
derberg a42281e
Merge branch 'master' into patch-1
derberg 2425fc5
Merge branch 'master' into patch-1
derberg 50dbafe
fix markdown lint
derberg File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @ponelat,
Thanks for the proposal, here are couple of notes I have to this change:
Removal of deprecation message
If we remove the deprecation message, it's going to look like a cosmetic change, but it's not. We're actually removing a fixed field from the
Channel Item Object
, which will change the way, how the eventual transcluded referenced value shape will look like (merging). I think we can make the deprecation message more precise by doing following change to clarify the deprecation scope:We did the same change in OpenAPI specification some time ago to Path Item Object - https://github.com/OAI/OpenAPI-Specification/pull/2656/files
Self containment
The wording of the change is IMHO not self-contained. The wording inside one version of the spec should probably not refer to the future version of the spec - OAI/OpenAPI-Specification#2656 (comment)
Different behavior
but will continue to function in the same role, as part of [Reference Object](#referenceObject)
- this might not be true.Reference Object
does't allow additional fields, which means, no merging with referenced value is performed.ChannelItem.$ref
does allow additional fields, which gets merged with the referenced value. If there is a conflict, the behavior is undefined, but most implementations do merge using right shallow merge algorithm.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @char0n ,
Removal of deprecation message
Understood, although without highlighting how it can be used outside of fixed fields, then it reads as "Don't use $ref here".
Perhaps a tweak on your suggestion:
Self containment and Different behavior. Understood and agreed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The tweak sounds great, and is aligned with #699
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Made the change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have to disagree with you. IMHO, the sentence
Using $ref with sibling fixed fields has been deprecated. Usage without any siblings is still encouraged!
is very difficult to understand. In particular, the wordsiblings
and referring tofixed fields
sounds confusing to me.WDYT about this version?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @smoya,
When using https://grammarly.com/ to analyze the sentence, there are two suggestions to it:
IMHO @ponelat intention was to make explicit that if you use
$ref
without any other properties nothing will change in the future.I propose another suggestion that passes grammarly and is less technical (possibly less confusing as well):
This doesn't suffer from passive voice and wordy sentence issues and it aligned with your suggestion.
properties
is already used within the spec to refer to fixed or pattern fields. For me personally it also implicitly communicates thatusing $ref with no additional properties
is not deprecated and will continue to functional equivalently, but IMHO it's worth considering if we want to communicate explicitly as @ponelat did in his suggestion as a second sentence.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm happy with:
Let's see what others say.
cc @alequetzalli @derberg
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated, but used
field
instead ofproperty
, to be consistent with the column nameField name
and the sectionFixed Fields
.