Fall back to POST docstring for Action description
This commit is contained in:
parent
39866626dc
commit
fe1704f223
1 changed files with 3 additions and 1 deletions
|
|
@ -48,7 +48,9 @@ class W3CThingDescriptionResource(Resource):
|
|||
for key, prop in current_labthing().actions.items():
|
||||
actions[key] = {}
|
||||
actions[key]["title"] = prop.__name__
|
||||
actions[key]["description"] = get_docstring(prop)
|
||||
actions[key]["description"] = get_docstring(prop) or (
|
||||
get_docstring(prop.post) if hasattr(prop, "post") else ""
|
||||
)
|
||||
actions[key]["links"] = [
|
||||
{"href": current_labthing().url_for(prop, _external=True)}
|
||||
]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue