stapi-spec / stapi-fastapi

Spatio Temporal Asset Tasking with FastAPI
MIT License
12 stars 4 forks source link

feat: use generic class to create router #69

Closed c-wygoda closed 1 month ago

c-wygoda commented 2 months ago

been thinking about how to use FastAPI to provide fully OpenAPI documented endpoints using each declared product's constraints instead of "just" providing them in the product endpoints.

Using generics I think this could be achieved like in this first idea. Would love to hear your thoughts if this would be worth the effort?

@mindflayer @jsignell et al.

c-wygoda commented 1 month ago

Closing. Python generics are not suitable (yet?) for this. TypeVar can be bound, but TypeVarTuple can't for example.