You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is the meeting for the AsyncAPI Special Interest Group (SIG). You're invited to join us and ask questions. The meeting takes place on alternate Tuesdays. Recordings from the previous meetings are available in this playlist on YouTube.
The meeting was entirely dedicated to traits (example Trait Object). Simon did a great introduction to the current behavior of the algorithm that handles traits merging when the AsyncAPI file with traits is parsed by the JavaScript Parser. We learned why it works this and not the other way (as composition). Simon explained his proposal (to support inheritance) and we discussed possible options on how to support all possible use cases. Please engage with the proposal and challenge it with different use cases.
How and what for do you use traits in AsyncAPI? Tell us!
Chat
00:15:12 Michael Staub: This is like javascript Object.assign() which makes sense to me. Does it do a deep merge though? If the message had ‘Cat’ in the array would the final array also contain ‘Cat’?
00:16:34 Sergio Moya: Wouldn’t make sense to raise an error on tooling whenever a property is found in both places
00:16:34 Michael Staub: That answers my question.
00:16:58 Michael Staub: Or warning at least
00:19:33 Michael Staub: Here is a similar API: https://www.npmjs.com/package/deepmerge#options
00:20:13 Simon Heimler: Here is the PR: asyncapi/spec#532
00:24:19 Sergio Moya: You can/should remove the all the required except chirp on the trait
00:26:50 Michael Staub: I think it makes sense as is, just needs to be better documented.
00:27:17 Michael Staub: I can’t think of a use-case where merging arrays would not be an code smell in the API?
00:42:41 Michael Staub: Perhaps the Object could have an ‘overrides’ field that specifies which traits ( or other sources ) that should be overridden?
00:42:50 Simon Heimler: https://jsfiddle.net/FannonF/yLsonr57/latest/
00:42:53 Michael Staub: So force the users to be explicit
00:44:41 Fran Mendez: I’m not sure I get it Michael. Mind expanding?
00:45:06 Michael Staub: Sure
00:49:32 Jonas Lagoni: That or create a trait object instead of relying only on JSON Schema for defining traits
00:52:25 Michael Staub: So create a DSL and ditch JSON?
00:53:05 Sergio Moya: HCL!
00:54:16 Hugo Guerrero: DSL for everyone! :)
00:55:02 Hugo Guerrero: That way we can secure our work for many many years
00:55:09 Sergio Moya: lol
00:55:14 Michael Staub: Decades*
00:55:20 Fran Mendez: Forever haha
00:55:30 Fran Mendez: XSD FTW
00:56:47 Michael Staub: If they coexist, then it will not be a breaking change, correct?
00:56:55 Simon Heimler: yes, I think so
00:57:02 Jonas Lagoni: Yep
01:00:39 Sergio Moya: Are u talking about FCL? FRAN CUSTOM LANGUAGE
01:00:55 Fran Mendez: You mean Extremeño?
01:01:36 Aayush Sahu: XD
01:01:37 Lukasz Gornicki: https://github.com/asyncapi/community/discussions
01:02:25 Simon Heimler: Ok, I'm not sure on the Breaking Change nature on a second thought. If you introduce a new feature that users start using and the tooling / consumers of the spec don't support it already it will break.
01:02:48 Michael Staub: thanks
can you set the trait inheritance behavior topic on the agenda?
I can quickly introduce and explain the issue.
Likely we will have some discussions on this, how to approach it best?
@Fannon done, added. During the call we can share with you rights to share screen so you can not only talk and explain but also show in case it helps to explain
This is the meeting for the AsyncAPI Special Interest Group (SIG). You're invited to join us and ask questions. The meeting takes place on alternate Tuesdays. Recordings from the previous meetings are available in this playlist on YouTube.
This time we meet at 4PM UTC
If you want to make proposals for the specification and/or the tooling, please reach out in our Slack workspace or just leave a comment below.
Join this mailing list to get an always-up-to-date invite to the meeting in your calendar.
Attendees
Agenda
Notes
The meeting was entirely dedicated to
traits
(example Trait Object). Simon did a great introduction to the current behavior of the algorithm that handles traits merging when the AsyncAPI file with traits is parsed by the JavaScript Parser. We learned why it works this and not the other way (as composition). Simon explained his proposal (to support inheritance) and we discussed possible options on how to support all possible use cases. Please engage with the proposal and challenge it with different use cases.How and what for do you use
traits
in AsyncAPI? Tell us!Chat
00:15:12 Michael Staub: This is like javascript Object.assign() which makes sense to me. Does it do a deep merge though? If the message had ‘Cat’ in the array would the final array also contain ‘Cat’?
00:16:34 Sergio Moya: Wouldn’t make sense to raise an error on tooling whenever a property is found in both places
00:16:34 Michael Staub: That answers my question.
00:16:58 Michael Staub: Or warning at least
00:19:33 Michael Staub: Here is a similar API: https://www.npmjs.com/package/deepmerge#options
00:20:13 Simon Heimler: Here is the PR: asyncapi/spec#532
00:24:19 Sergio Moya: You can/should remove the all the
required
except chirp on the trait00:26:50 Michael Staub: I think it makes sense as is, just needs to be better documented.
00:27:17 Michael Staub: I can’t think of a use-case where merging arrays would not be an code smell in the API?
00:42:41 Michael Staub: Perhaps the Object could have an ‘overrides’ field that specifies which traits ( or other sources ) that should be overridden?
00:42:50 Simon Heimler: https://jsfiddle.net/FannonF/yLsonr57/latest/
00:42:53 Michael Staub: So force the users to be explicit
00:44:41 Fran Mendez: I’m not sure I get it Michael. Mind expanding?
00:45:06 Michael Staub: Sure
00:49:32 Jonas Lagoni: That or create a trait object instead of relying only on JSON Schema for defining traits
00:52:25 Michael Staub: So create a DSL and ditch JSON?
00:53:05 Sergio Moya: HCL!
00:54:16 Hugo Guerrero: DSL for everyone! :)
00:55:02 Hugo Guerrero: That way we can secure our work for many many years
00:55:09 Sergio Moya: lol
00:55:14 Michael Staub: Decades*
00:55:20 Fran Mendez: Forever haha
00:55:30 Fran Mendez: XSD FTW
00:56:47 Michael Staub: If they coexist, then it will not be a breaking change, correct?
00:56:55 Simon Heimler: yes, I think so
00:57:02 Jonas Lagoni: Yep
01:00:39 Sergio Moya: Are u talking about FCL? FRAN CUSTOM LANGUAGE
01:00:55 Fran Mendez: You mean Extremeño?
01:01:36 Aayush Sahu: XD
01:01:37 Lukasz Gornicki: https://github.com/asyncapi/community/discussions
01:02:25 Simon Heimler: Ok, I'm not sure on the Breaking Change nature on a second thought. If you introduce a new feature that users start using and the tooling / consumers of the spec don't support it already it will break.
01:02:48 Michael Staub: thanks
Recording
https://youtu.be/FXgaLehiQcQ
The text was updated successfully, but these errors were encountered: