Feature Request: Add OpenAPI (Swagger) schema support for the REST API
Description
First of all, I would like to express my sincere gratitude to the maintainers for your incredible work on HyperKitty. It is a vital component of the Mailman 3 ecosystem and has been extremely helpful for our community.
Currently, I am working on building some custom integrations and automated tools that interact with HyperKitty's REST API. While the existing API is functional, I found that the lack of a standardized OpenAPI (Swagger) schema makes it somewhat challenging to generate client-side code and maintain type safety.
Proposed Improvement
I would like to humbly suggest adding support for OpenAPI schema generation.
Specifically, providing a machine-readable schema (e.g., /api/openapi.json) would allow users to:
- Automate Client Generation: Use tools like
openapi-generatororprismto create SDKs in various languages. - Interactive Documentation: Easily integrate with Swagger UI or Redoc for better API exploration.
- Validation: Improve the reliability of integrations by validating requests and responses against the schema.
Implementation Ideas (Optional)
Since HyperKitty is built on Django and Django REST Framework, tools like drf-spectacular (which is now the recommended choice for DRF) or drf-yasg might be potential candidates for this implementation.
However, I defer to the maintainers' expertise on the best architectural approach for the project.
Final Thoughts
I understand that the maintainers have many priorities, and I am more than happy to discuss this further or help with testing if this feature is aligned with the project's roadmap.
Thank you for your time and consideration!