nexmo-oas-renderer 0.9.0 → 0.10.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +8 -0
- data/Gemfile.lock +69 -69
- data/lib/nexmo/oas/renderer/public/assets/stylesheets/sass/api.scss +1 -1
- data/lib/nexmo/oas/renderer/version.rb +1 -1
- data/lib/nexmo/oas/renderer/views/open_api/_callback_endpoint.erb +1 -2
- data/lib/nexmo/oas/renderer/views/open_api/_navigation.erb +11 -0
- data/lib/nexmo/oas/renderer/views/open_api/show.erb +26 -0
- data/nexmo-oas-renderer.gemspec +1 -1
- metadata +7 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 691cea5c58db9e4302f16eeb56da4d2b8acc182d7849394b55e540d25cbef01e
|
4
|
+
data.tar.gz: f83955f0c99f81b184551666c82d4825ed6651801c2a485f482125191c9b7bcf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: aaa967c7b0c411b2da091ad3ad1e4916c198bb545417b453ebd16646fa57db88d7b29b94a2907349fa077d6108438e775a3e8c41644150fa5e187c130a64d7f7
|
7
|
+
data.tar.gz: 5b952135e2310ef7dcebf6de690df94aae5d7c86ec2ee190792a225ed566495c86d19a4677ec2eee353b24bd741d86e2c5f557b8e3c20905475c80a0e11144a1
|
data/.travis.yml
ADDED
data/Gemfile.lock
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
nexmo-oas-renderer (0.
|
4
|
+
nexmo-oas-renderer (0.10.0)
|
5
5
|
activemodel (~> 6.0)
|
6
6
|
activesupport (~> 6.0)
|
7
7
|
banzai (~> 0.1.2)
|
8
8
|
dotenv (~> 2.7)
|
9
9
|
neatjson (~> 0.8)
|
10
10
|
nexmo_markdown_renderer (~> 0.2)
|
11
|
-
oas_parser (~> 0.
|
11
|
+
oas_parser (~> 0.25.1)
|
12
12
|
octicons_helper (~> 8.2)
|
13
13
|
redcarpet (= 3.4.0)
|
14
14
|
rouge (= 2.0.7)
|
@@ -19,56 +19,56 @@ PATH
|
|
19
19
|
GEM
|
20
20
|
remote: https://rubygems.org/
|
21
21
|
specs:
|
22
|
-
actioncable (6.0.2.
|
23
|
-
actionpack (= 6.0.2.
|
22
|
+
actioncable (6.0.2.2)
|
23
|
+
actionpack (= 6.0.2.2)
|
24
24
|
nio4r (~> 2.0)
|
25
25
|
websocket-driver (>= 0.6.1)
|
26
|
-
actionmailbox (6.0.2.
|
27
|
-
actionpack (= 6.0.2.
|
28
|
-
activejob (= 6.0.2.
|
29
|
-
activerecord (= 6.0.2.
|
30
|
-
activestorage (= 6.0.2.
|
31
|
-
activesupport (= 6.0.2.
|
26
|
+
actionmailbox (6.0.2.2)
|
27
|
+
actionpack (= 6.0.2.2)
|
28
|
+
activejob (= 6.0.2.2)
|
29
|
+
activerecord (= 6.0.2.2)
|
30
|
+
activestorage (= 6.0.2.2)
|
31
|
+
activesupport (= 6.0.2.2)
|
32
32
|
mail (>= 2.7.1)
|
33
|
-
actionmailer (6.0.2.
|
34
|
-
actionpack (= 6.0.2.
|
35
|
-
actionview (= 6.0.2.
|
36
|
-
activejob (= 6.0.2.
|
33
|
+
actionmailer (6.0.2.2)
|
34
|
+
actionpack (= 6.0.2.2)
|
35
|
+
actionview (= 6.0.2.2)
|
36
|
+
activejob (= 6.0.2.2)
|
37
37
|
mail (~> 2.5, >= 2.5.4)
|
38
38
|
rails-dom-testing (~> 2.0)
|
39
|
-
actionpack (6.0.2.
|
40
|
-
actionview (= 6.0.2.
|
41
|
-
activesupport (= 6.0.2.
|
39
|
+
actionpack (6.0.2.2)
|
40
|
+
actionview (= 6.0.2.2)
|
41
|
+
activesupport (= 6.0.2.2)
|
42
42
|
rack (~> 2.0, >= 2.0.8)
|
43
43
|
rack-test (>= 0.6.3)
|
44
44
|
rails-dom-testing (~> 2.0)
|
45
45
|
rails-html-sanitizer (~> 1.0, >= 1.2.0)
|
46
|
-
actiontext (6.0.2.
|
47
|
-
actionpack (= 6.0.2.
|
48
|
-
activerecord (= 6.0.2.
|
49
|
-
activestorage (= 6.0.2.
|
50
|
-
activesupport (= 6.0.2.
|
46
|
+
actiontext (6.0.2.2)
|
47
|
+
actionpack (= 6.0.2.2)
|
48
|
+
activerecord (= 6.0.2.2)
|
49
|
+
activestorage (= 6.0.2.2)
|
50
|
+
activesupport (= 6.0.2.2)
|
51
51
|
nokogiri (>= 1.8.5)
|
52
|
-
actionview (6.0.2.
|
53
|
-
activesupport (= 6.0.2.
|
52
|
+
actionview (6.0.2.2)
|
53
|
+
activesupport (= 6.0.2.2)
|
54
54
|
builder (~> 3.1)
|
55
55
|
erubi (~> 1.4)
|
56
56
|
rails-dom-testing (~> 2.0)
|
57
57
|
rails-html-sanitizer (~> 1.1, >= 1.2.0)
|
58
|
-
activejob (6.0.2.
|
59
|
-
activesupport (= 6.0.2.
|
58
|
+
activejob (6.0.2.2)
|
59
|
+
activesupport (= 6.0.2.2)
|
60
60
|
globalid (>= 0.3.6)
|
61
|
-
activemodel (6.0.2.
|
62
|
-
activesupport (= 6.0.2.
|
63
|
-
activerecord (6.0.2.
|
64
|
-
activemodel (= 6.0.2.
|
65
|
-
activesupport (= 6.0.2.
|
66
|
-
activestorage (6.0.2.
|
67
|
-
actionpack (= 6.0.2.
|
68
|
-
activejob (= 6.0.2.
|
69
|
-
activerecord (= 6.0.2.
|
61
|
+
activemodel (6.0.2.2)
|
62
|
+
activesupport (= 6.0.2.2)
|
63
|
+
activerecord (6.0.2.2)
|
64
|
+
activemodel (= 6.0.2.2)
|
65
|
+
activesupport (= 6.0.2.2)
|
66
|
+
activestorage (6.0.2.2)
|
67
|
+
actionpack (= 6.0.2.2)
|
68
|
+
activejob (= 6.0.2.2)
|
69
|
+
activerecord (= 6.0.2.2)
|
70
70
|
marcel (~> 0.3.1)
|
71
|
-
activesupport (6.0.2.
|
71
|
+
activesupport (6.0.2.2)
|
72
72
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
73
73
|
i18n (>= 0.7, < 2)
|
74
74
|
minitest (~> 5.1)
|
@@ -91,14 +91,14 @@ GEM
|
|
91
91
|
hash-deep-merge (0.1.1)
|
92
92
|
i18n (1.8.2)
|
93
93
|
concurrent-ruby (~> 1.0)
|
94
|
-
loofah (2.
|
94
|
+
loofah (2.5.0)
|
95
95
|
crass (~> 1.0.2)
|
96
96
|
nokogiri (>= 1.5.9)
|
97
97
|
mail (2.7.1)
|
98
98
|
mini_mime (>= 0.1.1)
|
99
99
|
marcel (0.3.3)
|
100
100
|
mimemagic (~> 0.3.2)
|
101
|
-
method_source (0.
|
101
|
+
method_source (1.0.0)
|
102
102
|
mimemagic (0.3.4)
|
103
103
|
mini_mime (1.0.2)
|
104
104
|
mini_portile2 (2.4.0)
|
@@ -109,7 +109,7 @@ GEM
|
|
109
109
|
hansi (~> 0.2.0)
|
110
110
|
mustermann (= 1.1.1)
|
111
111
|
neatjson (0.9)
|
112
|
-
nexmo_markdown_renderer (0.
|
112
|
+
nexmo_markdown_renderer (0.3.0)
|
113
113
|
activemodel (~> 6.0)
|
114
114
|
banzai (~> 0.1.2)
|
115
115
|
i18n (~> 1.7)
|
@@ -120,7 +120,7 @@ GEM
|
|
120
120
|
nio4r (2.5.2)
|
121
121
|
nokogiri (1.10.9)
|
122
122
|
mini_portile2 (~> 2.4.0)
|
123
|
-
oas_parser (0.
|
123
|
+
oas_parser (0.25.1)
|
124
124
|
activesupport (>= 4.0.0)
|
125
125
|
addressable (~> 2.3)
|
126
126
|
builder (~> 3.2.3)
|
@@ -133,35 +133,35 @@ GEM
|
|
133
133
|
octicons_helper (8.5.0)
|
134
134
|
octicons (= 8.5.0)
|
135
135
|
rails
|
136
|
-
public_suffix (4.0.
|
136
|
+
public_suffix (4.0.4)
|
137
137
|
rack (2.2.2)
|
138
138
|
rack-protection (2.0.8.1)
|
139
139
|
rack
|
140
140
|
rack-test (1.1.0)
|
141
141
|
rack (>= 1.0, < 3)
|
142
|
-
rails (6.0.2.
|
143
|
-
actioncable (= 6.0.2.
|
144
|
-
actionmailbox (= 6.0.2.
|
145
|
-
actionmailer (= 6.0.2.
|
146
|
-
actionpack (= 6.0.2.
|
147
|
-
actiontext (= 6.0.2.
|
148
|
-
actionview (= 6.0.2.
|
149
|
-
activejob (= 6.0.2.
|
150
|
-
activemodel (= 6.0.2.
|
151
|
-
activerecord (= 6.0.2.
|
152
|
-
activestorage (= 6.0.2.
|
153
|
-
activesupport (= 6.0.2.
|
142
|
+
rails (6.0.2.2)
|
143
|
+
actioncable (= 6.0.2.2)
|
144
|
+
actionmailbox (= 6.0.2.2)
|
145
|
+
actionmailer (= 6.0.2.2)
|
146
|
+
actionpack (= 6.0.2.2)
|
147
|
+
actiontext (= 6.0.2.2)
|
148
|
+
actionview (= 6.0.2.2)
|
149
|
+
activejob (= 6.0.2.2)
|
150
|
+
activemodel (= 6.0.2.2)
|
151
|
+
activerecord (= 6.0.2.2)
|
152
|
+
activestorage (= 6.0.2.2)
|
153
|
+
activesupport (= 6.0.2.2)
|
154
154
|
bundler (>= 1.3.0)
|
155
|
-
railties (= 6.0.2.
|
155
|
+
railties (= 6.0.2.2)
|
156
156
|
sprockets-rails (>= 2.0.0)
|
157
157
|
rails-dom-testing (2.0.3)
|
158
158
|
activesupport (>= 4.2.0)
|
159
159
|
nokogiri (>= 1.6)
|
160
160
|
rails-html-sanitizer (1.3.0)
|
161
161
|
loofah (~> 2.3)
|
162
|
-
railties (6.0.2.
|
163
|
-
actionpack (= 6.0.2.
|
164
|
-
activesupport (= 6.0.2.
|
162
|
+
railties (6.0.2.2)
|
163
|
+
actionpack (= 6.0.2.2)
|
164
|
+
activesupport (= 6.0.2.2)
|
165
165
|
method_source
|
166
166
|
rake (>= 0.8.7)
|
167
167
|
thor (>= 0.20.3, < 2.0)
|
@@ -171,19 +171,19 @@ GEM
|
|
171
171
|
ffi (~> 1.0)
|
172
172
|
redcarpet (3.4.0)
|
173
173
|
rouge (2.0.7)
|
174
|
-
rspec (3.
|
175
|
-
rspec-core (~> 3.
|
176
|
-
rspec-expectations (~> 3.
|
177
|
-
rspec-mocks (~> 3.
|
178
|
-
rspec-core (3.
|
179
|
-
rspec-support (~> 3.
|
180
|
-
rspec-expectations (3.
|
174
|
+
rspec (3.9.0)
|
175
|
+
rspec-core (~> 3.9.0)
|
176
|
+
rspec-expectations (~> 3.9.0)
|
177
|
+
rspec-mocks (~> 3.9.0)
|
178
|
+
rspec-core (3.9.1)
|
179
|
+
rspec-support (~> 3.9.1)
|
180
|
+
rspec-expectations (3.9.1)
|
181
181
|
diff-lcs (>= 1.2.0, < 2.0)
|
182
|
-
rspec-support (~> 3.
|
183
|
-
rspec-mocks (3.
|
182
|
+
rspec-support (~> 3.9.0)
|
183
|
+
rspec-mocks (3.9.1)
|
184
184
|
diff-lcs (>= 1.2.0, < 2.0)
|
185
|
-
rspec-support (~> 3.
|
186
|
-
rspec-support (3.
|
185
|
+
rspec-support (~> 3.9.0)
|
186
|
+
rspec-support (3.9.2)
|
187
187
|
ruby2_keywords (0.0.2)
|
188
188
|
sass (3.7.4)
|
189
189
|
sass-listen (~> 4.0.0)
|
@@ -207,7 +207,7 @@ GEM
|
|
207
207
|
thor (1.0.1)
|
208
208
|
thread_safe (0.3.6)
|
209
209
|
tilt (2.0.10)
|
210
|
-
tzinfo (1.2.
|
210
|
+
tzinfo (1.2.7)
|
211
211
|
thread_safe (~> 0.1)
|
212
212
|
websocket-driver (0.7.1)
|
213
213
|
websocket-extensions (>= 0.1.0)
|
@@ -20,8 +20,7 @@
|
|
20
20
|
<div class="Vlt-badge-combined">
|
21
21
|
<code class="Vlt-badge Vlt-white Vlt-badge--large Nxd-method-badge Nxd-method-badge--<%= endpoint.method %>"><%= endpoint.method.upcase %></code>
|
22
22
|
<code class="Vlt-badge Vlt-badge--large Vlt-bg-grey-lighter Vlt-black">
|
23
|
-
<span class="api-path-host">https://example.com</span>
|
24
|
-
<%= (endpoint.raw['x-example-path'] || '/webhooks/event').gsub(/\{(.+?)\}/, '<span class="api-path-parameter">:\1</span>') %>
|
23
|
+
<span class="api-path-host">https://example.com</span><%= (endpoint.raw['x-example-path'] || '/webhooks/event').gsub(/\{(.+?)\}/, '<span class="api-path-parameter">:\1</span>') %>
|
25
24
|
</code>
|
26
25
|
</div>
|
27
26
|
|
@@ -48,6 +48,17 @@
|
|
48
48
|
<% end %>
|
49
49
|
<% end %>
|
50
50
|
|
51
|
+
<% definition.webhooks.each do |webhook| %>
|
52
|
+
<% webhook.endpoints.each do |endpoint| %>
|
53
|
+
<li>
|
54
|
+
<a href="#<%= webhook.name %>" class="Vlt-sidemenu__link">
|
55
|
+
<svg class="Vlt-grey-darker"><use xlink:href="/assets/symbol/volta-icons.svg#Vlt-icon-mind-map" /></svg>
|
56
|
+
<span class="Vlt-sidemenu__label"><%= endpoint.summary %></span>
|
57
|
+
</a>
|
58
|
+
</li>
|
59
|
+
<% end %>
|
60
|
+
<% end %>
|
61
|
+
|
51
62
|
<% if definition.raw['x-webhooks'] %>
|
52
63
|
<% definition.raw['x-webhooks'].each do |name, definition| %>
|
53
64
|
<% callback = OasParser::Callback.new(self, name, definition) %>
|
@@ -82,12 +82,38 @@
|
|
82
82
|
<% end %>
|
83
83
|
<% end %>
|
84
84
|
|
85
|
+
<% if @specification.definition.raw['x-webhooks'] || definition.webhooks.size.positive? %>
|
86
|
+
<div class="Vlt-grid">
|
87
|
+
<div class="Vlt-col Vlt-col--2of3 Nxd-api__docs">
|
88
|
+
<div>
|
89
|
+
<h2>Webhooks</h2>
|
90
|
+
<p>
|
91
|
+
Webhooks are an extension of an API, but instead of your code requesting data, the API sends data to you. The data arrives in a web request to your application.
|
92
|
+
</p>
|
93
|
+
<p>To learn more about webhooks, see our <a href="/concepts/guides/webhooks">webhooks documentation</a></p>
|
94
|
+
|
95
|
+
<p>This API may send any of the webhooks documented below to the URL that you have configured. You must repond with a `200` or `204` HTTP response, or the requests will be retried</p>
|
96
|
+
<br />
|
97
|
+
</div>
|
98
|
+
</div>
|
99
|
+
|
100
|
+
<div class="Vlt-col Vlt-col--1of3 Nxd-api__code">
|
101
|
+
</div>
|
102
|
+
</div>
|
103
|
+
<% end %>
|
104
|
+
|
85
105
|
<% if @specification.definition.raw['x-webhooks'] %>
|
86
106
|
<% @specification.definition.raw['x-webhooks'].each do |name, definition| %>
|
87
107
|
<%= erb :'open_api/_callback', locals: { callback: OasParser::Callback.new(self, name, definition), webhook: true } %>
|
88
108
|
<% end %>
|
89
109
|
<% end %>
|
90
110
|
|
111
|
+
<% definition.webhooks.each do |webhook| %>
|
112
|
+
<% webhook.endpoints.each do |endpoint| %>
|
113
|
+
<%= erb :'open_api/_callback_endpoint', locals: { webhook: webhook, endpoint: endpoint } %>
|
114
|
+
<% end %>
|
115
|
+
<% end %>
|
116
|
+
|
91
117
|
<% if @specification.definition_errors %>
|
92
118
|
<div class="Vlt-grid" id="errors">
|
93
119
|
<div class="Vlt-col Vlt-col--2of3 Nxd-api__docs">
|
data/nexmo-oas-renderer.gemspec
CHANGED
@@ -34,7 +34,7 @@ Gem::Specification.new do |spec|
|
|
34
34
|
spec.add_runtime_dependency 'sinatra', '~> 2.0'
|
35
35
|
spec.add_runtime_dependency 'shotgun', '~> 0.9'
|
36
36
|
spec.add_runtime_dependency 'rouge', '2.0.7'
|
37
|
-
spec.add_runtime_dependency 'oas_parser', '~> 0.
|
37
|
+
spec.add_runtime_dependency 'oas_parser', '~> 0.25.1'
|
38
38
|
spec.add_runtime_dependency 'neatjson', '~> 0.8'
|
39
39
|
spec.add_runtime_dependency 'activesupport', '~> 6.0'
|
40
40
|
spec.add_runtime_dependency 'banzai', '~> 0.1.2'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nexmo-oas-renderer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.10.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Fabian Rodriguez
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-04-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sinatra
|
@@ -58,14 +58,14 @@ dependencies:
|
|
58
58
|
requirements:
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version:
|
61
|
+
version: 0.25.1
|
62
62
|
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version:
|
68
|
+
version: 0.25.1
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: neatjson
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -246,6 +246,7 @@ files:
|
|
246
246
|
- ".github/workflows/push-docker-publish.yml"
|
247
247
|
- ".gitignore"
|
248
248
|
- ".rspec"
|
249
|
+
- ".travis.yml"
|
249
250
|
- CHANGELOG.md
|
250
251
|
- CONTRIBUTING.md
|
251
252
|
- Dockerfile
|
@@ -377,7 +378,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
377
378
|
- !ruby/object:Gem::Version
|
378
379
|
version: '0'
|
379
380
|
requirements: []
|
380
|
-
|
381
|
+
rubyforge_project:
|
382
|
+
rubygems_version: 2.7.6.2
|
381
383
|
signing_key:
|
382
384
|
specification_version: 4
|
383
385
|
summary: OpenAPI Specification renderer.
|