|
1 | 1 | [](https://marketplace.visualstudio.com/items?itemName=ivangsa.asyncapi-preview) [](https://marketplace.visualstudio.com/items?itemName=ivangsa.asyncapi-preview.svg)
|
2 | 2 |
|
3 |
| -# AsyncAPI Playground Viewer - v0.0.1 |
| 3 | +# AsyncAPI Preview |
4 | 4 |
|
5 |
| -**AsyncAPI Playground Viewer lets you preview AsyncAPI 2.0.0 files as you type in Visual Studio Code. Additionally provide intellisense/linting for the files as well.** |
| 5 | +Preview AsyncAPI documents inside VSCode. |
6 | 6 |
|
7 |
| -It works on asyncapi files in yaml format. Preview happens in real time as you type. |
| 7 | +AsyncAPI Preview was simplified and reworked from scratch to use the latest [@asyncapi/asyncapi-react](https://github.com/asyncapi/asyncapi-react/tree/next), removing old dependencies on Express, socket.io and js-yaml with better startup preformace and bundle size. |
8 | 8 |
|
9 |
| -## Requirements |
10 |
| -AsyncAPI Playground Viewer uses https://github.com/asyncapi/generator which requires this software to be installed: |
| 9 | +You can open AsyncAPI Preview from editor title/context menu. |
11 | 10 |
|
12 |
| -- v12.16+ < Node.js |
13 |
| -- v6.13.7+ < npm |
| 11 | + |
14 | 12 |
|
15 |
| -## Preview |
| 13 | +## Automatic hot-reloading |
16 | 14 |
|
17 |
| -To start |
18 |
| - |
19 |
| -- Open the asyncapi file and press F1. |
20 |
| -- Run the Command `Preview AsyncAPI`. |
21 |
| - |
22 |
| -OR |
23 |
| - |
24 |
| -- Press `Shift + Alt + A` |
25 |
| - |
26 |
| -OR |
27 |
| - |
28 |
| -- Click in the Editor's title bar and click `Preview AsyncAPI` |
29 |
| - |
30 |
| -OR |
31 |
| - |
32 |
| -- Right click file in explorer panel and click `Preview AsyncAPI` |
33 |
| - |
34 |
| -THEN |
35 |
| - |
36 |
| -- Preview it in vscode Itself like this |
37 |
| - |
38 |
| - |
39 |
| - |
40 |
| - |
41 |
| - |
42 |
| -## Configurations |
43 |
| - |
44 |
| - |
45 |
| - |
46 |
| -### Opening In External browser |
47 |
| - |
48 |
| -If you want to preview the changes in external browser change the settings `Preview In Browser` to `true` in `User/Workspace Settings` |
49 |
| - |
50 |
| -THEN |
51 |
| - |
52 |
| -- Run the Command `Preview AsyncAPI`. |
53 |
| - |
54 |
| -OR |
55 |
| - |
56 |
| -- Press `Shift + Alt + A` |
57 |
| - |
58 |
| -**Preview will be automatically opened in default browser.** |
59 |
| - |
60 |
| -### Change Default Port |
61 |
| - |
62 |
| -Default port of the preview url can be changed by changing the `Default Port` value in `User/Workspace Settings` |
63 |
| - |
64 |
| -### Show Only File Name |
65 |
| - |
66 |
| -In the preview title the file name along with the full path is displayed by default. It can be changed to show only the file name by changing the `Show Only File Name` to `true` in `User/Workspace Settings` |
67 |
| - |
68 |
| -### Change Default Host |
69 |
| - |
70 |
| -Default host(localhost) of the preview url can be changed by changing the `asyncapiViewer.defaultHost` value in `User/Workspace Settings` |
71 |
| - |
72 |
| -### Stop AsyncAPI Preview Server |
73 |
| - |
74 |
| -To stop the preview server simply click the status bar item. |
75 |
| - |
76 |
| - |
77 |
| - |
78 |
| -## Releases |
| 15 | +Automatic hot-reloading on editor save, but currently it doesn't reload when saving referenced external files. |
79 | 16 |
|
80 | 17 | ### Credits
|
81 | 18 |
|
82 |
| -AsyncAPI Viewer utilizes the following open source projects |
| 19 | +AsyncAPI Viewer utilizes the following open source projects: |
83 | 20 |
|
84 |
| -- [AsyncAPI Generator](https://github.com/asyncapi/generator) |
85 |
| -- [Express](https://github.com/expressjs/express) |
86 |
| -- [socket.io](https://github.com/socketio/socket.io/) |
87 |
| -- [yaml.js](https://github.com/jeremyfa/yaml.js) |
| 21 | +- [@asyncapi/asyncapi-react](https://github.com/asyncapi/asyncapi-react/tree/next) |
88 | 22 |
|
89 | 23 | ### Contributors
|
90 | 24 |
|
91 |
| -This extension is inspired in [Swagger Viewer](https://github.com/arjun-g/vs-swagger-viewer) |
| 25 | +Ivan Garcia Sainz-Aja [ivangsa](https://github.com/ivangsa) |
0 commit comments