-
Notifications
You must be signed in to change notification settings - Fork 207
Asyncapi Docs #629
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
Merged
Merged
Asyncapi Docs #629
Changes from 3 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
b725cd5
add page about asyncapi setup
lawreka cc136d7
add playground page
lawreka 1e05943
update docs
lawreka 6906608
add single channel page docs
hahnbeelee c73f55f
delete unneeded paragraph
hahnbeelee f1d5cd7
add local+remote
hahnbeelee a67d3d1
Update api-playground/asyncapi/setup.mdx
lawreka 7be4b73
add asyncapi playground
hahnbeelee fcffeee
Merge branch 'kathryn/asyncapi-docs' of https://github.com/mintlify/d…
hahnbeelee File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
title: "Websockets Playground" | ||
description: "Enable users to interact with your websockets" | ||
--- | ||
|
||
Autogenerating pages from your AsyncAPI schema will create pages for each channel that display message data that can be sent and received. In the API Playground for websockets, you can connect to websocket servers to send and receive messages. | ||
|
||
 | ||
(this should be a nice image of messages in the API playground) | ||
|
||
The API Playground for websockets is enabled by default, but automatically disabled if security schemes are required in the schema. Learn more about playground settings [here](settings/global#param-playground). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
--- | ||
title: "AsyncAPI Setup" | ||
description: "Reference AsyncAPI endpoints in your docs pages" | ||
hahnbeelee marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
hahnbeelee marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
--- | ||
|
||
## Add an AsyncAPI specification file | ||
|
||
To begin to create pages for your websockets, make sure you have a valid AsyncAPI schema document in either JSON or YAML format that follows the [AsyncAPI specification](https://www.asyncapi.com/docs/reference/specification/v3.0.0). Your schema must follow AsyncAPI specification 3.0+. | ||
lawreka marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
<Tip>To make sure your AsyncAPI schema is valid, you can paste it into the [AsyncAPI Studio](https://studio.asyncapi.com/)</Tip> | ||
|
||
## Auto-populate websockets pages | ||
|
||
You can add an `asyncapi` field to any tab or group in the navigation of your `docs.json`. This field can contain either the path to an AsyncAPI schema document in your docs repo, the URL of a hosted AsyncAPI schema document, or an array of links to AsyncAPI schema documents. Mintlify will automatically generate a page for each AsyncAPI websocket channel. | ||
|
||
**Examples with Tabs:** | ||
```json {5} | ||
"navigation": { | ||
"tabs": [ | ||
{ | ||
"tab": "API Reference", | ||
"asyncapi": "https://github.com/asyncapi/spec/blob/master/examples/simple-asyncapi.yml" | ||
} | ||
] | ||
} | ||
``` | ||
|
||
**Examples with Groups:** | ||
```json {8-11} | ||
"navigation": { | ||
"tabs": [ | ||
{ | ||
"tab": "AsyncAPI", | ||
"groups": [ | ||
{ | ||
"group": "Websockets", | ||
"asyncapi": { | ||
"source": "/path/to/asyncapi.json", | ||
"directory": "api-reference" | ||
} | ||
} | ||
] | ||
} | ||
] | ||
} | ||
``` | ||
|
||
<Note>The directory field is optional. If not specified, the files will be placed in the **api-reference** folder of the docs repo.</Note> | ||
|
||
The metadata for the generated pages will contain the key `asyncapi` with a path to the original spec and the channel id so that the page can be generated per channel and display data about all websocket messages sent and received on that channel. Learn more about interacting with websockets with generated AsyncAPI pages in the playground [here](api-playground/asyncapi/playground). | ||
hahnbeelee marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this page doesnt seem necessary IMO - were u gonna make it have an example websocket playground?