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
AsyncAPI version 2.6.0 is not supported #1133
Comments
Welcome to the Microcks community! 💖 Thanks and congrats 🎉 for opening your first issue here! Be sure to follow the issue template or please update it accordingly. 📢 If you're using Microcks in your organization, please add your company name to this list. 🙏 It really helps the project to gain momentum and credibility. It's a small contribution back to the project with a big impact. If you need to know why and how to add yourself to the list, please read the blog post "Join the Microcks Adopters list and Empower the vibrant open source Community 🙌" Hope you have a great time there! 🌟 ~~~~~~~~~ 🌟 📢 If you like Microcks, please ⭐ star ⭐ our repo to support it! 🙏 It really helps the project to gain momentum and credibility. It's a small contribution back to the project with a big impact. |
Thanks for raising this issue @AceTheCreator! You're right: I can reproduce the same error. It's the AsyncAPI web component that we're using to display the documentation that throws that error message. For AsyncAPI 2.x, we're using For AsyncAPI 3.x, we're using Maybe there's a fresher |
I did some quick tests, and it appears that the latest We'd probably adjust our rendering criterion for documentation with:
Do you know who could help on this and confirm that versions before 2.6 are no longer supported but |
I'll take a look at the react-component and write back! |
So, I've tested the 1.x react-component, and it renders the previous version of the spec. Can you show me how you tested it @lbroudoux? |
I installed
|
Hey @AceTheCreator I've done some complementary tests and have found some interesting results... It seems that the Let's me explain what I've seen. Let's imagine I've got this AsyncAPI v3.0.0: asyncapi: 3.0.0
id: 'urn:io.microcks.example.user-signedup'
info:
title: User signed-up API
version: 0.3.0
description: Sample AsyncAPI for user signedup events
defaultContentType: application/json
channels:
user-signedup:
description: The topic on which user signed up events may be consumed
messages:
userSignedUp:
$ref: '#/components/messages/userSignedUp'
operations:
publishUserSignedUps:
action: 'send'
channel:
$ref: '#/channels/user-signedup'
summary: Receive information about user signed up
messages:
- $ref: '#/channels/user-signedup/messages/userSignedUp'
components:
messages:
userSignedUp:
description: An event describing that a user just signed up
traits:
- $ref: '#/components/messageTraits/commonHeaders'
headers:
type: object
properties:
sentAt:
type: string
format: date-time
description: Date and time when the event was sent
payload:
type: object
additionalProperties: false
properties:
fullName:
type: string
email:
type: string
format: email
age:
type: integer
minimum: 18
examples:
- name: laurent
summary: Example for Laurent user
headers:
my-app-header: 23
sentAt: "2020-03-11T08:03:28Z"
payload:
fullName: Laurent Broudoux
email: "[email protected]"
age: 41
- name: john
summary: Example for John Doe user
headers:
my-app-header: 24
sentAt: "2020-03-11T08:03:38Z"
payload:
fullName: John Doe
email: '{{randomEmail()}}'
age: 36
messageTraits:
commonHeaders:
headers:
type: object
properties:
my-app-header:
type: integer
minimum: 0
maximum: 100
examples:
- laurent:
my-app-header: 21
- yacine:
my-app-header: 22 You see that the email address of one example ( Now if I've got the same error in an AsyncAPI v2.1.0 spec: asyncapi: '2.1.0'
id: 'urn:io.microcks.example.user-signedup'
info:
title: User events API
version: 0.1.0
description: Sample AsyncAPI for user related events
contact:
name: Laurent Broudoux
url: https://github.com/lbroudoux
email: [email protected]
license:
name: MIT License
url: https://opensource.org/licenses/MIT
defaultContentType: application/json
channels:
user/events:
subscribe:
message:
$ref: '#/components/messages/UserSignedUp'
components:
messages:
UserSignedUp:
payload:
type: object
properties:
displayName:
type: string
description: Name of the user
email:
type: string
format: email
description: Email of the user
examples:
- name: Laurent
summary: Example for Laurent user
payload:
displayName: Laurent Broudoux
email: [email protected]
- name: Random
summary: Example for Random user
payload:
displayName: '{{randomFullName()}}'
email: '{{randomEmail()}}' The rendering fails, only displaying a white screen with no messages, either on the developer console. Remove the And I think that's why we kept the older version of the web component for previous spec versions: the older version might be more permissive with older specs errors. Obviously, consistent behavior for the different spec versions would be better. Would it be worth creating an issue for this in AsyncAPI web component? Now that efforts are focused on 3.0, I'm not sure if it's worth backporting this.... What do you think? |
I'll create an issue about it and ask for the maintainer's opinion if it'll be worth backporting this. |
It's weird, it's not supposed to render in v3 too 🤔 I'm gonna investigate it and get back |
So what i found out is that the current Spectral ruleset for v3 doesn't have a rule for validating message examples, but it does for v2, hence the reason why it breaks on v2 and not on v3 I've reported this issue, so we'll work on porting important rules from v2 to v3 |
Ok but as I understand, it means that it may then break v3 document representation that holds functions once the spectral rules are ported to v3... It could be nice not to fail violently like on v2 but to just put a warning saying your example is not valid. Otherwise people will think it's a Microcks issue. What do you think? |
I'll keep a close eyes for the implementation to ensure this doesn't happen |
Could you please reference here the linked issue on AsyncAPI web component? That way it'll be easier to track. |
When using version 2.6.0 of the AsyncAPI document in the Microcks UI, I keep getting the following error:
Error: Version 2.6.0 is not supported.
Any idea why?
The text was updated successfully, but these errors were encountered: