Better handle response documentation

This commit is contained in:
jtc42 2020-01-06 22:28:00 +00:00
parent 1ccdad8a86
commit 8afb0757bd
12 changed files with 143 additions and 115 deletions

View file

@ -2,6 +2,7 @@ from openflexure_microscope.common.labthings_core.utilities import (
get_docstring,
get_summary,
)
from flask import current_app
def description_from_view(view_class):
@ -14,3 +15,7 @@ def description_from_view(view_class):
d = {"methods": methods, "description": summary}
return d
def view_class_from_endpoint(endpoint: str):
return current_app.view_functions[endpoint].view_class