-
-
Notifications
You must be signed in to change notification settings - Fork 279
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
ChannelItem.$ref field deprecation + proposal how to replace it with simpler and more flexible solution #607
Comments
That's a good catch 👍 I'll put this on hold while we see how to solve #520 because most probably the Channels object will be reworked too. I'm listing this issue there so we don't forget. Thanks! |
This issue has been automatically marked as stale because it has not had recent activity 😴 It will be closed in 120 days if no further activity occurs. To unstale this issue, add a comment with a detailed explanation. There can be many reasons why some specific issue has no activity. The most probable cause is lack of time, not lack of interest. AsyncAPI Initiative is a Linux Foundation project not owned by a single for-profit company. It is a community-driven initiative ruled under open governance model. Let us figure out together how to push this issue forward. Connect with us through one of many communication channels we established here. Thank you for your patience ❤️ |
@char0n if you want to push this one further into the spec in 3.0, next week we start meetings related to 3.0 where all folks can sync the async work 😄 Just check this calendar https://calendar.google.com/calendar/u/0/[email protected] or join https://groups.google.com/u/1/g/asyncapi-users to get invites |
@derberg sure, I'd like to be the champion of this RFC. As far as I understand next SIG is at 25.11.2021, at 9:00 CET right? I'll be there. |
@derberg I have an overlapping meeting in my work today. Will there be another chance to challenge this issue for 3.0 release? |
@char0n 3.0 meetings will be regular, and happen every 2 weeks, so no worries |
Proposed course of action: AsyncAPI 2.x The aim here is to limit complexity and bring more flexibility. Resolution rules around
AsyncAPI 3.x. The aim here is to have single referencing mechanism within AsyncAPI 3.x spec (reducing complexity) -
|
@char0n do you champion this for the 3.0 release? 🙂 Or can we consider this issue as needs champion? 🤔 |
@jonaslagoni sure I can champion this. I've only champion one other RFC here before: #609 and there wan't really much of a championing there ;] In #607 (comment) @fmvilas mentioned that his putting this on hold due to the #520. That's the only reason I haven't produced an RFC PRs yet. I can issue PRs if it's warranted at this stage. |
Yeah, I think so. Can you confirm it's the same, @char0n? |
Hey guys, Unfortunately #665 introduces ambiguity (which I was trying to avoid with this RFC) into the specification and couple of issues with naming and types. Naming issuesChannel vs Channel Itemhttps://github.com/asyncapi/spec/pull/665/files#diff-34bca0c91901dffce093114c7d4cac16477410fbca7cabf3a1b888d7dfc3eb4dR1437 - new field Incorrect typeThe type is defined as Map[ AmbiguityNow this is the most important thing. The ambiguity is now in Given following AsyncAPI definition fragment: components:
channels:
$ref: #/pointer there is no way to determine if the author of the definition intended to define a PS: these changes are still not released, we can intercept and provide remediation |
cc @dalelane just to make you aware of the issue. |
I do see this is a typo and should be fixed indeed. However, I don't fully understand why we would change |
@smoya right, sorry I take this point back; your argument makes sense and |
I would disagree with this observation -
If we use Looking at this branch: https://github.com/asyncapi/spec/blob/2022-01-release/spec/asyncapi.md |
Technically speaking, checking the JSON Schema: Channels at root level: Channels at components level: Meaning channels at components level are referencing to the same object as far as I can see. So I'm still confused and I can't see the issue. Sorry @char0n but its on my side 😓 so I would need you to explain it again if you don't mind. |
Sure, np. I'll try on more examples. Let's limit our discussion to types mentioned above, not the Components ObjectSpecification defines it like this: This clearly says that the type for This tells us that the value of every key in this object can be Channels ObjectThis clearly says that the type for pattern field is This tells us that the value of every key in this object can be exclusively |
I think I got it. You mean we somehow need to unify that to a consistent definition. Either change the At the end, I see this is a change on documentation but not in the JSON Schema, right? |
Yes, the inconsistency I see is in the fact that you cannot use
Yes, the documentation in MARKDOWN format is the source of truth not the JSON Schema as far as I understand in this specification. But circling back to ambiguity problem defined in #607 (comment), having union type of My proposed sequence of steps to get rid of this problem is here: #607 (comment). Some of the steps you already did in #665, but the changes needs to be introduced in proper sequence to avoid the ambiguity. |
Right... What a mess 😆 I honestly think we should just follow your suggestion @char0n #607 (comment) to the letter. And simply accepting introducing this change makes it a little bit weird, but we don't break any interpretation of it. And then in the major version, we fix this, as you wrote in the comment. + Renaming it makes sense 👍 Or directly target 3.0 and revert #665 🤷 |
Here is RFC PR #696 that builds on top #665 without need to revert it, is aligned with #607 (comment) and eliminates the ambiguity. |
Contributes to: asyncapi/spec#607 Signed-off-by: Dale Lane <[email protected]>
This issue can be succeed by #699 (that I've just created) to limit the context of the next steps for 3.x version of the spec. |
🎉 This issue has been resolved in version 2.3.0-2022-01-release.3 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
I'm not sure if I already asked this, but should I close my own issues or will @asyncapi-bot close it automatically in some point in time? Thanks! |
Usually, Github will close it automatically if you include Otherwise, you have to close it manually :) |
Hi all,
I was wondering if specification would be open to proposal of deprecating
ChannelItem.$ref
field and instead introduce a more flexible solution based on following spec changes:Introduce new fixed field called
channelItems
toComponent Object
string
,Channel Item Object
|Reference Object
]Change type of
Channels Object
The type of
Channels Object
patterned field would change fromChannel Item Object
toChannel Item Object | Reference Object
Deprecating the
Channel Item Object
$ref
field.This proposal makes specification more flexible (introducing reusable
Channel Item Objects
) and simpler as there will be only one mechanism for referencing other objects (Reference Object) instead of two (Reference Object, Channel Item Object).Similar course of action is already in progress in OAS: OAI/OpenAPI-Specification#2635
The text was updated successfully, but these errors were encountered: