A demo project to get acquainted with AsyncAPI using the example of an order service. This project shows how to document asynchronous APIs and automatically create convenient documentation.
- 📝 Example AsyncAPI specification for the order service
- 🌐 Automatically generated documentation on GitHub Pages
- 🔄 Live Demo for sending and receiving messages
- 🐳 Local environment on Docker (optional)
- Click the "Fork" button in the upper right corner of this repository
- In your copy of the repository, go to Settings -> Pages and enable GitHub Pages
- After a few minutes, the documentation will be available at:
https://{username}.github.io/asyncapi-demo/
- Open the
asyncapi.yaml
file - Click the edit button (pencil icon)
- Make changes
- Click "Commit changes"
- After 1-2 minutes, the changes will appear in the documentation
- Adding a new field to the order:
# Find the OrderSchema section and add a new field
properties:
delivery_comments: # New field
type: string
description: Delivery comments
example: "Call one hour before delivery"
- Changing the topic description:
# Find the channels section and change the description
channels:
order/created:
description: |
Your new topic description
You can use markdown
- API Documentation - automatically generated documentation
- Live Demo - interactive demonstration
- asyncapi.yaml - source specification file
- Add a new field to the order schema
- Create a new topic for notifications
- Enhance descriptions with markdown formatting
- Add message examples
Q: Where can I see the result of my changes? A: After committing the changes, go to the GitHub Pages of your repository. The update takes 1-2 minutes.
Q: Why are my changes not applied? A: Check the validity of the YAML file. If there are errors, GitHub Actions will show them in the Actions section.
Q: How can I check that my changes are correct? A: After each commit, an automatic check is run. The results can be seen in the Actions tab.
If you want to run the project locally:
# Clone the repository
git clone your-fork
# Navigate to the project folder
cd async-api-example/app-example
# Start the Docker containers
docker-compose up -d
# Open the documentation
open http://localhost:8080