Closed colinbate closed 2 years ago
Like Get(“/home”, new RouteMetaData{Responses = new []{..}}, async context => ....
Yes, something like that...
I was imagining pairing it with some sort of helper function or reusable class:
Get("/home", Describe<Input, Output>("My home endpoint", "tag"), async ctx => {});
Carter 6 will use .NET 6 for OpenApi
Thanks for the OpenAPI work, it would be nice if the route could accept an instance of
RouteMetaData
as an alternative to a type name. I'm not too concerned about how that instance would get passed but I'd like to avoid the creation of new classes for each route just to document it. Kind of defeats the purpose of using Carter in the first place in my opinion.