Open alexisbz opened 5 months ago
While building API endpoints, it may be very interesting to add some OpenAPI endpoints.
Indeed, OpenAPI specs standardize the usage of API endpoints, allowing clients to consume them in a reliable way.
That's even some early feedback that we receive on Reddit lately
We should probably allow to annotate API endpoints from the router, maybe with a Annotate method on the route struct.
Annotate
Generics could be used to specify the expected input and output.
A good lib to implement this feature might be https://pb33f.io/libopenapi.
Context
While building API endpoints, it may be very interesting to add some OpenAPI endpoints.
Indeed, OpenAPI specs standardize the usage of API endpoints, allowing clients to consume them in a reliable way.
That's even some early feedback that we receive on Reddit lately
Initial Considerations
We should probably allow to annotate API endpoints from the router, maybe with a
Annotate
method on the route struct.Generics could be used to specify the expected input and output.
A good lib to implement this feature might be https://pb33f.io/libopenapi.