title: Generate Swagger specification from Python code without annotations
body: <p>I am searching for a way to generate a Swagger specification (the JSON and Swagger-UI) from the definition of a Python service. I have found many options (normally Flask-based), but all of them use annotations, which I cannot properly handle from within the code, e.g. define 10 equivalent services with different routes in a loop (the handler could be currified in this example, first function call to obtain it).</p>
  
  <p>Is there any way to do this without annotations? I would like to generate the method in the API and its documentation by calling a function (or a method, or a constructor of a class) with the values corresponding to the implementation and the documentation of that API method.</p>