Add push YAML for pushers endpoint.

Also display "required" text on required JSON body request params. Also
increase the size of the request param column to support longer param names
present in the pushers API.
This commit is contained in:
Kegan Dougal 2015-10-07 16:01:36 +01:00
parent d3ed517ebf
commit c5edc60c4c
4 changed files with 162 additions and 55 deletions

View file

@ -207,12 +207,18 @@ class MatrixUnits(Units):
)
# loop top-level json keys
json_body = Units.prop(param, "schema/properties")
required_params = []
if Units.prop(param, "schema/required"):
required_params = Units.prop(param, "schema/required")
for key in json_body:
pdesc = json_body[key]["description"]
if key in required_params:
pdesc = "**Required.** " + pdesc
endpoint["req_params"].append({
"key": key,
"loc": "JSON body",
"type": json_body[key]["type"],
"desc": json_body[key]["description"]
"desc": pdesc
})
# endfor[param]
for row in endpoint["req_params"]: