NSwag icon indicating copy to clipboard operation
NSwag copied to clipboard

Beginner's Question: How to generate swagger.jon from classes which are not MVC controllers.

Open szguoxz opened this issue 5 months ago • 0 comments

I have implemented my own API framework. All my controllers are normal c# classes, not inherit from MVC controllerbase. And all its public method serve as my webapi.

Is there anyway to generate a swagger.json from it? Goodnews are that I have already collect all the APIs, paths into a apicollection using reflection. If there's an easy way to turn one MethodInfo into a swagger.json api element, then everything else will be easy.

Anybody done that before?

szguoxz avatar Sep 11 '24 14:09 szguoxz