-
-
Notifications
You must be signed in to change notification settings - Fork 193
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
[FEATURE] introduce new command asyncapi start preview
#1627
Comments
I am working on this. |
@derberg The readOnly parameter cannot be used with locally stored files; it must be used with a URL. So, when starting this |
yes,
what I'm thinking about is - should we use studio, or maybe better use https://github.com/asyncapi/asyncapi-react (used in studio for preview) directly. It is super simple to use like https://github.com/asyncapi/asyncapi-react/blob/master/docs/usage/web-component.md I would say requirement is:
|
Just my two cents here, can't we put this as an additional feature in studio. Because having two commands do the same thing doesn't sit right with me somehow? |
but these are 2 separate things imho, one is to open studio, and studio is a tool for AsyncAPI editing. The other is only to open the preview, like the VSCode extension, when you see a human readable documentation generated on the side of editing your AsyncAPI document in IDE, not Studio (as you want local file references to work). of course, as I said, it can be a feature in Studio (that is almost there but support url query param only), but |
Fair enough. If we are making it readonly, should we just use |
no strong opinion, I wrote above that using react directly is also technically possible. Up to you. I would choose solution that is easiest to implement, and I think reusing studio is the easiest as there is already a solution for websocket connection to support reload |
Why do we need this improvement?
ATM we have
asyncapi start studio
. It is cool, starts local Studio editor, so people can edit in browser. Problem is that users still locally have the same limitation as https://studio.asyncapi.com/ - no support in web app for references pointing to the local file system.I think we need new command:
asyncapi start preview
asyncapi bundle
) and do it in memory (not save to file) and pass to studioreadOnly=true
param to hide editor (it has some limits though readOnly Query Parameter not hiding text editor studio#591)And the preview would have to be hot reloaded on any change in the file on local
How will this change help?
Solve problem that to preview my local AsyncAPI document on local, that uses local file references, I need to generate docs or use special plugins.
Screenshots
No response
How could it be implemented/designed?
already described in main description.
although maybe instead of using studio better just use react component directly? 🤔 something to validate during implementation. This is how preview was done in https://github.com/asyncapi/vs-asyncapi-preview
🚧 Breaking changes
No
👀 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: