Open-Assistant
Open-Assistant copied to clipboard
Use fastapi response_model for API documentation
We should use the feature provided by FastAPI to validate and document our API response: https://fastapi.tiangolo.com/tutorial/response-model/
Currently the openapi documentation doesn't have any documentation on the API output. Using response_model will fix that.
I'll work on this issue soon.
Very good point, please assign yourself to this issue if you start working on it. Please note that some of the endpoint models are still a bit "volatile" at the moment. We definitely need a bit cleaner structuring of the web-facing request/response models + documentation for them. But laying the groundwork for this would be helpful and we could follow that pattern for changes and new models.