bluesky / scanspec

Specify step and flyscan paths in a serializable, efficient and Pythonic way
Apache License 2.0
7 stars 2 forks source link

Update FastAPI schema when new Spec is registered #133

Open DiamondJoseph opened 1 month ago

DiamondJoseph commented 1 month ago

Current handling allows for dataclasses and BaseModels annotated with @uses_tagged_union to be deserialised using the Pydantic TypeAdapter that knows about the Spec/Region discriminated union.

However, the routes into the Service are not currently updated when their usage of Spec as return or input type is updated by registering a new subclass.