Skip to content

Commit

Permalink
Merge pull request tidev#2800 from billdawson/timob-10241
Browse files Browse the repository at this point in the history
TIMOB-10241 In apidocs, if a proxy type is deprecated then so too should...
  • Loading branch information
Arthur Evans committed Aug 22, 2012
2 parents 2859c6c + 3cb8e18 commit 06d905c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
7 changes: 3 additions & 4 deletions apidoc/docgen.py
Original file line number Diff line number Diff line change
Expand Up @@ -480,10 +480,9 @@ def append_creation_methods(self, methods):
if method_name in existing_names:
continue
method_template_obj = {"proxy_name": proxy.name}
if "platforms" in proxy.api_obj:
method_template_obj["platforms"] = yaml.dump(proxy.api_obj["platforms"])
if "since" in proxy.api_obj:
method_template_obj["since"] = yaml.dump(proxy.api_obj["since"])
for key in ("platforms", "since", "deprecated"):
if key in proxy.api_obj:
method_template_obj[key] = yaml.dump(proxy.api_obj[key])
generated_method = yaml.load(AnnotatedModule.render_create_proxy_method(method_template_obj))
methods.append(AnnotatedMethod(generated_method, self))

Expand Down
5 changes: 4 additions & 1 deletion apidoc/templates/create_proxy_method.yml.mako
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,7 @@ platforms: ${data["platforms"]}
% endif
% if "since" in data:
since: ${data["since"]}
% endif
% endif
% if "deprecated" in data:
deprecated: ${data["deprecated"]}
% endif

0 comments on commit 06d905c

Please sign in to comment.