forked from anodejs/node-docrouter
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdoc.jade
173 lines (170 loc) · 7.33 KB
/
doc.jade
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
!!!5
html(lang="en")
head
title Documentation for #{baseUrl}
style
body {
font-family: "Times New Roman", Geneva, Helvetica, sans-serif;
font-size: 16px;
}
.wrapper {
max-width: 900px;
margin: auto;
}
.methodDescription {
display: block; color: #626163; background: #EDEDED;
margin: 10px 0 5px 0; clear: both;
border: 1px solid #E1E1E2;
padding: 8px 12px;
width: 98%;
}
label.methodType {
margin: 10px 5px 10px 5px; clear: both;
padding: 5px 5px 5px 5px; clear: both;
border-radius: 7px;
font-size: 16px; font-weight: bold;
color: white; background: #8D6DD7;
}
label.methodPath {
margin: 10px 5px 10px 5px; clear: both;
padding: 5px 5px 5px 5px; clear: both;
font-size: 22px;
color: black;
}
.doc {
margin: 10px 0 15px 0; clear: both;
font-size: 18px;
}
.param {
display: block;
margin: 3px 0 5px 0; clear: both;
list-style-type: none;
}
.methodDescription li .doc {
display: inline;
}
.param .header {
min-width: 90px;
min-height: 30px;
display: block;
margin-right: 10px;
float: left;
}
.param label {
display: block;
padding: 5px 5px 5px 5px; clear: both;
margin-top: 5px;
left: 15px; right: 15px;
border-radius: 7px;
font-size: 16px; font-weight: bold; text-align:center;
color: white; background: #6D8DD7;
}
.methodDescription ul {
display: block;
padding: 0;
margin-left: 15px;
}
.methodDescription li {
display: inline;
list-style-type: none;
padding-right: 20px;
font-size: 18px;
}
pre.source-code {
font-family: "Andale Mono", "Lucida Console", Monaco, fixed, monospace;
color: black;
background-color: #DDDDDD;
font-size: 12px;
overflow: auto;
padding: 5px;
width: 98%;
border: 1px dashed #999999;
line-height: 14px;
clear:both;
}
body
.wrapper
h1= baseUrl
each resource in restdoc.resources
.methodDescription
h1= resource.id
.doc= resource.description
if resource.params
h2 Parameters
each param, paramName in resource.params
.param
ul
li
.header
label
em #{paramName}
li
if param.description
.doc= param.description
ul
each val, key in param
if key != "description" && key != "doc"
li
strong #{key}:#{" "}
em #{val}
each method, methodType in resource.methods
.methodDescription
label.methodType= methodType
label.methodPath= method.path
.doc= method.description
if method.params
h2 Parameters
each param, paramName in method.params
.param
ul
li
.header
label
em #{paramName}
li
if param.description
.doc= param.description
ul
each val, key in param
if key != "description" && key != "doc"
li
strong #{key}:#{" "}
em #{val}
if method.request
h2 Request
if method.request.description
.doc= method.request.description
if method.request.representations
ul
each val, key in method.request.representations
li #{val}
each param, paramName in method.request.params
.param
ul
li
.header
label
em #{paramName}
li
if param.description
.doc= param.description
ul
each val, key in param
if key != "description" && key != "doc"
li
strong #{key}:#{" "}
em #{val}
if method.request.example
h3 Example
pre.source-code= method.request.example
if method.response
h2 Response
if method.response.description
.doc= method.response.description
if method.response.representations
ul
each val, key in method.response.representations
li #{val}
if method.response.example
h3 Example
pre.source-code= method.response.example