faststream icon indicating copy to clipboard operation
faststream copied to clipboard

Feature: Generate AsyncAPI from msgspec.Struct

Open dolfinus opened this issue 9 months ago • 3 comments

To suggest an idea or inquire about a new Message Broker supporting feature or any other enhancement, please follow this template:

Is your feature request related to a problem? Please describe.

Since 0.6, FastStream is going to support MsgSpec (according to https://github.com/Lancetnik/FastDepends/blob/51524261c847998bb3dafe7fc8dff76c23321396/fast_depends/msgspec/serializer.py). But for now, AsyncAPI is build only for Pydantic models, although MsgSpec also supports generating JSON Schema for specific model.

It would be nice if FastStream could generate AsyncAPI for MsgSpec structs.

Describe the solution you'd like

Feature code example

Describe alternatives you've considered

Additional context

dolfinus avatar Mar 10 '25 14:03 dolfinus

For sure, It is in roadmap

Lancetnik avatar Mar 10 '25 15:03 Lancetnik

msgspec is so much better in memory saving, please make it a first class citizen :)

kamikaze avatar Apr 06 '25 05:04 kamikaze

Well, we introduced Msgspec support in 0.6.0, so this feature could be implemented

Lancetnik avatar Oct 14 '25 20:10 Lancetnik