Merge remote-tracking branch 'remotes/origin/master' into kitsune-map-to-enum-support
This commit is contained in:
commit
6b37bb1dd9
62 changed files with 3182 additions and 96 deletions
|
@ -1,11 +1,15 @@
|
|||
{% import 'tables.tmpl' as tables -%}
|
||||
|
||||
``{{endpoint.method}} {{endpoint.path}}``
|
||||
{{(5 + (endpoint.path | length) + (endpoint.method | length)) * title_kind}}
|
||||
{% if "deprecated" in endpoint and endpoint.deprecated -%}
|
||||
Deprecated: ``{{endpoint.method}} {{endpoint.path}}``
|
||||
{{(17 + (endpoint.path | length) + (endpoint.method | length)) * title_kind}}
|
||||
|
||||
.. WARNING::
|
||||
This API is deprecated and will be removed from a future release.
|
||||
|
||||
{% else %}
|
||||
``{{endpoint.method}} {{endpoint.path}}``
|
||||
{{(5 + (endpoint.path | length) + (endpoint.method | length)) * title_kind}}
|
||||
{% endif -%}
|
||||
|
||||
{{endpoint.desc}}
|
||||
|
|
|
@ -594,7 +594,21 @@ class MatrixUnits(Units):
|
|||
raise Exception("Error handling parameter %s" % param_name, e)
|
||||
# endfor[param]
|
||||
good_response = None
|
||||
for code in sorted(endpoint_swagger.get("responses", {}).keys()):
|
||||
endpoint_status_codes = endpoint_swagger.get("responses", {}).keys()
|
||||
# Check to see if any of the status codes are strings ("4xx") and if
|
||||
# so convert everything to a string to avoid comparing ints and strings.
|
||||
has_string_status = False
|
||||
for code in endpoint_status_codes:
|
||||
if isinstance(code, str):
|
||||
has_string_status = True
|
||||
break
|
||||
if has_string_status:
|
||||
endpoint_status_codes = [str(i) for i in endpoint_status_codes]
|
||||
for code in sorted(endpoint_status_codes):
|
||||
# Convert numeric responses to ints, assuming they got converted
|
||||
# above.
|
||||
if isinstance(code, str) and code.isdigit():
|
||||
code = int(code)
|
||||
res = endpoint_swagger["responses"][code]
|
||||
if not good_response and code == 200:
|
||||
good_response = res
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue