Better handle response documentation
This commit is contained in:
parent
1ccdad8a86
commit
8afb0757bd
12 changed files with 143 additions and 115 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue