launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #06344
[Merge] lp:~rvb/maas/maas-api-doc-title into lp:maas
Raphaël Badin has proposed merging lp:~rvb/maas/maas-api-doc-title into lp:maas.
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
For more details, see:
https://code.launchpad.net/~rvb/maas/maas-api-doc-title/+merge/92723
This branch fixes the generated api documentation. To be properly referenced by the rest of the rST pages, docs/api.rst needs a title.
--
https://code.launchpad.net/~rvb/maas/maas-api-doc-title/+merge/92723
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~rvb/maas/maas-api-doc-title into lp:maas.
=== modified file 'src/maasserver/api.py'
--- src/maasserver/api.py 2012-02-10 16:50:56 +0000
+++ src/maasserver/api.py 2012-02-13 09:21:19 +0000
@@ -378,7 +378,7 @@
}
-def generate_api_doc():
+def generate_api_doc(title=False):
docs = (
generate_doc(NodesHandler),
generate_doc(NodeHandler),
@@ -387,6 +387,13 @@
)
messages = []
+ if title:
+ messages.extend([
+ '**********************\n',
+ 'MaaS API documentation\n',
+ '**********************\n',
+ '\n\n']
+ )
for doc in docs:
for method in doc.get_methods():
messages.append(
=== modified file 'src/maasserver/management/commands/generate_api_doc.py'
--- src/maasserver/management/commands/generate_api_doc.py 2012-01-27 18:06:49 +0000
+++ src/maasserver/management/commands/generate_api_doc.py 2012-02-13 09:21:19 +0000
@@ -4,4 +4,4 @@
class Command(BaseCommand):
def handle(self, *args, **options):
- self.stdout.write(generate_api_doc())
+ self.stdout.write(generate_api_doc(title=True))