code: def to_flasgger(self, app=None, definitions=None, paths=None):
          
          if Schema is None:
              raise RuntimeError('Please install marshmallow and apispec')
  
          return flasgger.utils.apispec_to_template(
              app,
              self,
              definitions=definitions,
              paths=paths
          )
docs: Converts APISpec dict to flasgger suitable dict
          also adds definitions and paths (optional)