-
-
Notifications
You must be signed in to change notification settings - Fork 9
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
[BUG] moveAllComponents is not working as expected. #261
Comments
@aeworxet any idea why this is happening? |
Investigating. If asyncapi: 3.0.0
info:
title: Account Service
version: '1.0'
channels:
userSignedUp:
$ref: '#/components/channels/userSignedUp'
components:
messages:
UserSignedUp:
payload:
type: object
properties:
email:
type: string
channels:
userSignedUp:
address: user/signedup
messages:
UserSignedUp:
$ref: '#/components/messages/UserSignedUp' |
@aeworxet yes. |
File (the one that issue was opened on) asyncapi: 3.0.0
info:
title: Account Service
version: '1.0'
channels:
userSignedUp:
$ref: '#/components/channels/userSignedUp'
components:
messages:
UserSignedUp:
payload:
type: object
properties:
email:
type: string
schemas: {}
channels:
userSignedUp:
address: user/signedup
messages:
UserSignedUp:
$ref: '#/components/messages/UserSignedUp'
payload:
properties:
email:
$ref: '#/components/schemas/email'
passed validation with Original file (everything that was in asyncapi: 3.0.0
info:
title: Account Service
version: "1.0"
channels:
userSignedUp:
address: user/signedup
messages:
UserSignedUp:
payload:
type: object
properties:
email:
type: string was optimized as asyncapi: 3.0.0
info:
title: Account Service
version: '1.0'
channels:
userSignedUp:
$ref: '#/components/channels/userSignedUp'
components:
schemas:
email:
type: string
payload:
type: object
properties:
email:
$ref: '#/components/schemas/email'
messages:
UserSignedUp:
payload:
$ref: '#/components/schemas/payload'
channels:
userSignedUp:
address: user/signedup
messages:
UserSignedUp:
$ref: '#/components/messages/UserSignedUp'
Thus, the issue is related to parsing components that are ALREADY in |
It's still invalid, right? I see two issues with it.
|
Then the list of issues in #261 (comment) is a reason for @jonaslagoni and @smoya to review the code of parser-js once again and find out why |
@aeworxet we can open an issue and discuss it on the respective repo but ultimately that is a different discussion and it's up to the parser-js maintainers to decide. For us, we have to make sure optimizer doesn't produce incorrect output. |
Opening separate issues is definitely a good way of doing it ✌️ |
Describe the bug.
I tried to run the optimizer on this file:
It generated the following invalid document.
Expected behavior
It should have generated:
Screenshots
...
How to Reproduce
Run the optimiser on the given AsyncAPI file.
🥦 Browser
None
👀 Have you checked for similar open issues?
🏢 Have you read the Contributing Guidelines?
Are you willing to work on this issue ?
No, someone else can work on it
The text was updated successfully, but these errors were encountered: