Merge ~adam-collard/maas:api-docs-reformat into maas:master

Proposed by Adam Collard
Status: Merged
Approved by: Adam Collard
Approved revision: 63616417ef6bc880ae5d4fdb9b316de22724e173
Merge reported by: MAAS Lander
Merged at revision: not available
Proposed branch: ~adam-collard/maas:api-docs-reformat
Merge into: maas:master
Diff against target: 96 lines (+12/-8)
5 files modified
src/maasserver/api/commissioning_scripts.py (+4/-2)
src/maasserver/api/networks.py (+4/-2)
src/maasserver/api/ssh_keys.py (+2/-2)
src/maasserver/api/ssl_keys.py (+1/-1)
src/maasserver/api/tmpl-apidoc.rst (+1/-1)
Reviewer Review Type Date Requested Status
MAAS Lander Approve
Alberto Donato (community) Approve
Review via email: mp+397278@code.launchpad.net

Commit message

Fix whitespace in API documentation

Leading whitespace in the docstrings themselves cause <blockquote /> in the
HTML output which is undesirable.

Missing break at the start of class docstrings causes false
indentation, again causing <blockquote /> in HTML.

To post a comment you must log in.
Revision history for this message
Alberto Donato (ack) wrote :

+1

review: Approve
Revision history for this message
MAAS Lander (maas-lander) wrote :

UNIT TESTS
-b api-docs-reformat lp:~adam-collard/maas/+git/maas into -b master lp:~maas-committers/maas

STATUS: SUCCESS
COMMIT: 63616417ef6bc880ae5d4fdb9b316de22724e173

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/src/maasserver/api/commissioning_scripts.py b/src/maasserver/api/commissioning_scripts.py
2index 6a513ce..443a280 100644
3--- a/src/maasserver/api/commissioning_scripts.py
4+++ b/src/maasserver/api/commissioning_scripts.py
5@@ -30,7 +30,8 @@ def get_content_parameter(request):
6
7
8 class CommissioningScriptsHandler(OperationsHandler):
9- """Manage custom commissioning scripts.
10+ """
11+ Manage custom commissioning scripts.
12
13 This functionality is only available to administrators.
14
15@@ -111,7 +112,8 @@ class CommissioningScriptsHandler(OperationsHandler):
16
17
18 class CommissioningScriptHandler(OperationsHandler):
19- """Manage a custom commissioning script.
20+ """
21+ Manage a custom commissioning script.
22
23 This functionality is only available to administrators.
24
25diff --git a/src/maasserver/api/networks.py b/src/maasserver/api/networks.py
26index d313cd5..d166f9a 100644
27--- a/src/maasserver/api/networks.py
28+++ b/src/maasserver/api/networks.py
29@@ -40,7 +40,8 @@ def render_networks_json(subnets):
30
31
32 class NetworkHandler(OperationsHandler):
33- """Manage a network.
34+ """
35+ Manage a network.
36
37 This endpoint is deprecated. Use the new 'subnet' endpoint instead.
38 """
39@@ -147,7 +148,8 @@ class NetworkHandler(OperationsHandler):
40
41
42 class NetworksHandler(OperationsHandler):
43- """Manage the networks.
44+ """
45+ Manage the networks.
46
47 This endpoint is deprecated. Use the new 'subnets' endpoint instead.
48 """
49diff --git a/src/maasserver/api/ssh_keys.py b/src/maasserver/api/ssh_keys.py
50index 0c2e875..4692f82 100644
51--- a/src/maasserver/api/ssh_keys.py
52+++ b/src/maasserver/api/ssh_keys.py
53@@ -56,7 +56,7 @@ class SSHKeysHandler(OperationsHandler):
54 should be provided in the request payload as form data with the name
55 'key':
56
57- key: "key-type public-key-data"
58+ ``key: "key-type public-key-data"``
59
60 - ``key-type``: ecdsa-sha2-nistp256, ecdsa-sha2-nistp384,
61 ecdsa-sha2-nistp521, ssh-dss, ssh-ed25519, ssh-rsa
62@@ -112,7 +112,7 @@ class SSHKeysHandler(OperationsHandler):
63
64 E.g.
65
66- source:user
67+ ``source:user``
68
69 - ``source``: lp (Launchpad), gh (GitHub)
70 - ``user``: User login
71diff --git a/src/maasserver/api/ssl_keys.py b/src/maasserver/api/ssl_keys.py
72index 3c03a8c..da19023 100644
73--- a/src/maasserver/api/ssl_keys.py
74+++ b/src/maasserver/api/ssl_keys.py
75@@ -50,7 +50,7 @@ class SSLKeysHandler(OperationsHandler):
76 should be provided in the request payload as form data with the name
77 'key':
78
79- key: "key data"
80+ ``key: "key data"``
81
82 - ``key data``: The contents of a pem file.
83
84diff --git a/src/maasserver/api/tmpl-apidoc.rst b/src/maasserver/api/tmpl-apidoc.rst
85index 1d2c3e5..7568a7c 100644
86--- a/src/maasserver/api/tmpl-apidoc.rst
87+++ b/src/maasserver/api/tmpl-apidoc.rst
88@@ -1,7 +1,7 @@
89 .. raw:: html
90
91 <details>
92- <summary><code>{{ http_method }} {{ uri }}{{if operation != ""}}?{{ operation }}{{endif}}</code></summary>
93+ <summary><code>{{ http_method }} {{ uri }}{{if operation != ""}}?{{ operation }}{{endif}}</code></summary>
94
95 {{py:
96 params_length = len(params)

Subscribers

People subscribed via source and target branches