<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/your-symfony-events-have-a-contract-generate-the-asyncapi-docs-from-your-code-1vzjys2sg" -->

---
title: Your Symfony events have a contract: generate the...
description: A Symfony bundle called zeusi/asyncapi-bundle generates AsyncAPI 3.x documentation from PHP code, solving the problem of undocumented or manually maintained...
canonical: https://daily.dev/posts/your-symfony-events-have-a-contract-generate-the-asyncapi-docs-from-your-code-1vzjys2sg
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Your Symfony events have a contract: generate the AsyncAPI docs from your code | daily.dev
og:description: A Symfony bundle called zeusi/asyncapi-bundle generates AsyncAPI 3.x documentation from PHP code, solving the problem of undocumented or manually maintained...
og:url: https://daily.dev/posts/your-symfony-events-have-a-contract-generate-the-asyncapi-docs-from-your-code-1vzjys2sg
og:image: https://api.daily.dev/og/posts/1VzjYS2SG.png
og:image:alt: Your Symfony events have a contract: generate the AsyncAPI docs from your code
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Your Symfony events have a contract: generate the AsyncAPI docs from your code

**[Medium](https://daily.dev/sources/medium_js)** · 7 min read · 0 upvotes · 0 comments

## Summary

A Symfony bundle called zeusi/asyncapi-bundle generates AsyncAPI 3.x documentation from PHP code, solving the problem of undocumented or manually maintained event contracts in event-driven systems. Unlike REST APIs where routes serve as a natural anchor for OpenAPI generation, async messaging has no equivalent registry. The bundle uses PHP attributes on DTO classes to declare messages, derives payload schemas automatically from the class structure, and exposes both a JSON spec endpoint and a browsable UI. It also integrates with Symfony Messenger to optionally enrich documentation with server/transport details and discover messages from the routing configuration, both opt-in to avoid misleading documentation when Messenger is used for internal queues only.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://antonio-turdo.medium.com/your-symfony-events-have-a-contract-generate-the-asyncapi-docs-from-your-code-e0100168f520>

## Similar posts on daily.dev

- [SymfonyOnline June 2026: Event Streaming with Symfony Messenger \(Symfony Blog\)](https://daily.dev/posts/symfonyonline-june-2026-event-streaming-with-symfony-messenger-symfony-blog--i99kknn9j) · Symfony · 0 upvotes · 0 comments

---

Tags: [#architecture](https://daily.dev/tags/architecture), [#php](https://daily.dev/tags/php), [#symfony](https://daily.dev/tags/symfony)

[View this post on daily.dev](https://daily.dev/posts/your-symfony-events-have-a-contract-generate-the-asyncapi-docs-from-your-code-1vzjys2sg)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Your Symfony events have a contract: generate the AsyncAPI docs from your code","url":"https://daily.dev/posts/your-symfony-events-have-a-contract-generate-the-asyncapi-docs-from-your-code-1vzjys2sg","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/your-symfony-events-have-a-contract-generate-the-asyncapi-docs-from-your-code-1vzjys2sg"},"datePublished":"2026-07-04T20:22:50.018Z","dateModified":"2026-07-05T20:23:59.021Z","description":"A Symfony bundle called zeusi/asyncapi-bundle generates AsyncAPI 3.x documentation from PHP code, solving the problem of undocumented or manually maintained...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/bfd07f120836d2e0a047041a1a887ce3?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/bfd07f120836d2e0a047041a1a887ce3?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Medium","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Medium","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/medium","url":"https://daily.dev/sources/medium_js"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/your-symfony-events-have-a-contract-generate-the-asyncapi-docs-from-your-code-1vzjys2sg","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"architecture,php,symfony","timeRequired":"PT7M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Medium","item":"https://daily.dev/sources/medium_js"},{"@type":"ListItem","position":3,"name":"Your Symfony events have a contract: generate the AsyncAPI docs from your code"}]}
```

