raml_doc 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 879db6d7dd08d087491f65d4d9855a8a7d677826
4
- data.tar.gz: 5898ea73d20f2f3c872b82c0393e52b90c8ac524
3
+ metadata.gz: 2d87e088e96bd61223b2b3bc512c59edc4f6cd37
4
+ data.tar.gz: e4736c4e6e512501015c9db5d690ebbaa095c97e
5
5
  SHA512:
6
- metadata.gz: faca86782cc34da12f5aba1e94a90f6482e364c4c942c4e5c107e02df3f85064f68067f3d66aee37c6477cff0f71e498b157249c452a7e820d7dcf3e7dfcdde8
7
- data.tar.gz: fd973479d9df966907958eb502674e680e637b267dd650f5448d68dc2204ac0751f9128d7ac9a55f516a084fc1c0e0c106af9bee982a8e0ffc7e5d46c7468259
6
+ metadata.gz: eeadeaf1c9d143adb536466da0f560c828c2b3187c915f5cf8a9308fde1f7b08e90419c88edf66dbac44fb5dbcd3b8abcf2f09250e50a3ade858275bbc6ed941
7
+ data.tar.gz: d63922eb36496eaea1f324b2d0795b2c0ab91280017dd116cf30a942953a9d5aa3a118446ca310f66fe2abdfb35f111f225f9bf7f8c4fdf45feec3f5338d9685
data/README.md CHANGED
@@ -17,3 +17,7 @@ raml-doc --help
17
17
  ```sh
18
18
  raml-doc -s /path/to/api.raml -t default -f html > /path/to/api.html
19
19
  ```
20
+
21
+ ```ruby
22
+ RamlDoc.generate "/path/to/api.raml", "default", "html"
23
+ ```
@@ -11,7 +11,7 @@
11
11
  </h1>
12
12
 
13
13
  <% @raml.resources.each do |_, resource| %>
14
- <h2 id="<%= resource.resource_path_name %>" class="page-header">
14
+ <h2 id="<%= resource.resource_path_name %>">
15
15
  <i class="fa fa-external-link-square" aria-hidden="true"></i>
16
16
  <%= resource.name %>
17
17
  </h2>
@@ -36,14 +36,12 @@
36
36
  <ul class="nav nav-tabs" role="tablist">
37
37
  <li role="presentation" class="active">
38
38
  <a href="#<%= method_element_id method, "description" %>" aria-controls="home" role="tab" data-toggle="tab">
39
- <i class="fa fa-info-circle" aria-hidden="true"></i>
40
39
  Description
41
40
  </a>
42
41
  </li>
43
42
  <% if present? method.headers %>
44
43
  <li role="presentation">
45
44
  <a href="#<%= method_element_id method, "request-headers" %>" aria-controls="home" role="tab" data-toggle="tab">
46
- <i class="fa fa-code" aria-hidden="true"></i>
47
45
  Request Headers
48
46
  </a>
49
47
  </li>
@@ -51,7 +49,6 @@
51
49
  <% if present? method.query_parameters %>
52
50
  <li role="presentation">
53
51
  <a href="#<%= method_element_id method, "querystring-parameters" %>" aria-controls="profile" role="tab" data-toggle="tab">
54
- <i class="fa fa-code" aria-hidden="true"></i>
55
52
  Querystring Parameters
56
53
  </a>
57
54
  </li>
@@ -59,23 +56,37 @@
59
56
  <% if present? method.responses %>
60
57
  <li role="presentation">
61
58
  <a href="#<%= method_element_id method, "responses" %>" aria-controls="home" role="tab" data-toggle="tab">
62
- <i class="fa fa-code" aria-hidden="true"></i>
63
59
  Responses
64
60
  </a>
65
61
  </li>
66
62
  <% end %>
63
+ <li role="presentation">
64
+ <a href="#<%= method_element_id method, "examples" %>" aria-controls="home" role="tab" data-toggle="tab">
65
+ Examples
66
+ </a>
67
+ </li>
67
68
  </ul>
68
69
 
69
70
  <div class="tab-content">
70
71
  <div role="tabpanel" class="tab-pane active" id="<%= method_element_id method, "description" %>">
71
- <p class="lead">
72
- <%= markdown method.description %>
73
- </p>
72
+ <h3>
73
+ <i class="fa fa-info-circle" aria-hidden="true"></i>
74
+ Description
75
+ </h3>
76
+ <%= markdown method.description %>
74
77
  </div>
75
78
  <div role="tabpanel" class="tab-pane" id="<%= method_element_id method, "request-headers" %>">
79
+ <h3>
80
+ <i class="fa fa-info-circle" aria-hidden="true"></i>
81
+ Request Headers
82
+ </h3>
76
83
  <p>...</p>
77
84
  </div>
78
85
  <div role="tabpanel" class="tab-pane" id="<%= method_element_id method, "querystring-parameters" %>">
86
+ <h3>
87
+ <i class="fa fa-info-circle" aria-hidden="true"></i>
88
+ Querystring Parameters
89
+ </h3>
79
90
  <p>
80
91
  <ul>
81
92
  <% method.query_parameters.each do |_, parameter| %>
@@ -91,6 +102,17 @@
91
102
  </p>
92
103
  </div>
93
104
  <div role="tabpanel" class="tab-pane" id="<%= method_element_id method, "responses" %>">
105
+ <h3>
106
+ <i class="fa fa-info-circle" aria-hidden="true"></i>
107
+ Responses
108
+ </h3>
109
+ <p>...</p>
110
+ </div>
111
+ <div role="tabpanel" class="tab-pane" id="<%= method_element_id method, "examples" %>">
112
+ <h3>
113
+ <i class="fa fa-info-circle" aria-hidden="true"></i>
114
+ Examples
115
+ </h3>
94
116
  <p>...</p>
95
117
  </div>
96
118
  </div>
@@ -117,8 +139,11 @@
117
139
  <style type="text/css" rel="stylesheet">
118
140
  @import url(https://fonts.googleapis.com/css?family=Raleway:600|Merriweather);
119
141
  h1, h2, h3, h4, h5, h6 { font-family: "Raleway", sans-serif; }
142
+ h2 { margin-top: 40px; }
143
+ h3 { margin-top: 20px; margin-bottom: 20px; }
120
144
  p, div { font-family: "Merriweather", serif; }
121
145
  code, pre, kbd, var { font-family: monospace; }
146
+ .panel { margin-left: 30px; }
122
147
  </style>
123
148
  <script src="https://code.jquery.com/jquery-2.2.4.min.js" integrity="sha256-BbhdlvQf/xTY9gja0Dq3HiwQF8LaCRTXxZKRutelT44=" crossorigin="anonymous"></script>
124
149
  <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js" integrity="sha384-0mSbJDEHialfmuBBQP6A4Qrprq5OVfW37PRR3j5ELqxss1yVqOtnepnHVP9aJ7xS" crossorigin="anonymous"></script>
@@ -1,3 +1,3 @@
1
1
  module RamlDoc
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: raml_doc
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nathan Hopkins