How to get default VERB and URL from webapi route configuration
It's a excellent tools, but can it be easier and more intelligent to use.
It is unnecessary to annotate the verb and url and parameters for all of the web API actions, because It already exists in routing.
for example
[HttpGet]
[Route("V1/samples/{id}")]
public async Task<SampleObject1> SampleGet1(string id, [FromUri]bool queryBool)
{
throw new NotImplementedException();
}
we can know:
- the
verbisGET - the
pathisV1/samples/{id} - the parameter
idisin pathasstring - the parameter
queryBoolisin queryasboolean
Can we generate the document from the code without Superfluous Annotations of those? like this project https://github.com/domaindrivendev/Swashbuckle dose.
( In addition, the response tag is what I really want to add)
@NewFuture Thanks for the question. Not every service wants to take run time dependency on a tool to generate document, swashbuckle comes with its own limitation on support for various platforms. So this tool leverages the VS Comments with few modifications to generate document.
@Shwetap05 yes, I agree with you.
Not every service wants to take run time dependency on a tool to generate document
But, we need not do this in runtime. We can get those info from assembly files (the DLL,which are already provided), as the NSwag CommandLine dose.
It will be awesome features.
@NewFuture thanks for the feedback we will look into this.
Thank you
any update about this feature?
Any idea if/when this will be available?
Upvoting this feature as well! Verb and path can be extracted implicitly based on the existing attributes.