nexmo-oas-renderer 2.1.2 → 2.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/workflows/ci.yml +28 -0
- data/.github/workflows/pull_request-review.yml +14 -0
- data/CHANGELOG.md +3 -0
- data/Dockerfile +1 -1
- data/Gemfile.lock +66 -66
- data/Procfile +1 -0
- data/README.md +4 -0
- data/app.json +15 -0
- data/lib/nexmo/oas/renderer/app.rb +1 -0
- data/lib/nexmo/oas/renderer/helpers/render.rb +1 -1
- data/lib/nexmo/oas/renderer/presenters/content_switcher.rb +47 -0
- data/lib/nexmo/oas/renderer/presenters/response_tabs.rb +2 -1
- data/lib/nexmo/oas/renderer/public/assets/javascripts/nexmo-oas-renderer.js +8 -0
- data/lib/nexmo/oas/renderer/public/assets/javascripts/volta.dropdown.js +145 -0
- data/lib/nexmo/oas/renderer/public/assets/stylesheets/nexmo-oas-renderer.css +1 -0
- data/lib/nexmo/oas/renderer/version.rb +1 -1
- data/lib/nexmo/oas/renderer/views/layouts/_javascripts.erb +2 -1
- data/lib/nexmo/oas/renderer/views/open_api/_errors.erb +34 -0
- data/lib/nexmo/oas/renderer/views/open_api/_header.erb +14 -0
- data/lib/nexmo/oas/renderer/views/open_api/_navigation.erb +7 -0
- data/lib/nexmo/oas/renderer/views/open_api/_parameter_groups.erb +4 -10
- data/lib/nexmo/oas/renderer/views/open_api/_parameters.erb +9 -1
- data/lib/nexmo/oas/renderer/views/open_api/_response_tabs.erb +15 -17
- data/lib/nexmo/oas/renderer/views/open_api/_tabbed_parameters.erb +15 -35
- data/lib/nexmo/oas/renderer/views/open_api/content_switcher/_dropdown.erb +22 -0
- data/lib/nexmo/oas/renderer/views/open_api/content_switcher/_tabs.erb +18 -0
- data/lib/nexmo/oas/renderer/views/open_api/show.erb +1 -1
- data/nexmo-oas-renderer.gemspec +1 -1
- metadata +12 -4
- data/.travis.yml +0 -9
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 76599ec305ebd6c8c31bb6ef59866f9ee4973dbb58e5214517e74c522357398e
|
|
4
|
+
data.tar.gz: f0b864fa9c8751ddf292728f492d0f0b920b751fa2898ab6c5b6a3694b192bb8
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d97b6959b622e3c407d385af7e54af0690a34ae6ef6720dee5e75c3db05850c3b3a37b1d60f6e1826c10d76584bcd56dfddde8a3d0055aba9fae9c529f6275a6
|
|
7
|
+
data.tar.gz: a30ee39bf768f4c3d04adbe43bc5127db3d9af982bd90cf457481868c8154bef574219ab7a0e04525ae76990212f80b1a76301863ebe4e03d0d885ff180b65fc
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
|
|
2
|
+
name: CI
|
|
3
|
+
|
|
4
|
+
on:
|
|
5
|
+
push:
|
|
6
|
+
branches: [ master ]
|
|
7
|
+
pull_request:
|
|
8
|
+
branches: [ master ]
|
|
9
|
+
|
|
10
|
+
jobs:
|
|
11
|
+
test:
|
|
12
|
+
strategy:
|
|
13
|
+
matrix:
|
|
14
|
+
os: [ubuntu-latest, macos-latest]
|
|
15
|
+
ruby: [2.5, 2.6, 2.7]
|
|
16
|
+
runs-on: ${{ matrix.os }}
|
|
17
|
+
steps:
|
|
18
|
+
- uses: actions/checkout@v2
|
|
19
|
+
- name: Set up Ruby
|
|
20
|
+
uses: ruby/setup-ruby@v1
|
|
21
|
+
with:
|
|
22
|
+
ruby-version: ${{ matrix.ruby }}
|
|
23
|
+
- name: Install dependencies
|
|
24
|
+
run: bundle install
|
|
25
|
+
- name: Run tests
|
|
26
|
+
run: bundle exec rspec
|
|
27
|
+
- name: Run rubocop
|
|
28
|
+
run: bundle exec rubocop
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
name: Review App
|
|
2
|
+
on:
|
|
3
|
+
pull_request_target:
|
|
4
|
+
types: [opened, reopened, synchronize, labeled, closed]
|
|
5
|
+
jobs:
|
|
6
|
+
create-review-app:
|
|
7
|
+
runs-on: ubuntu-latest
|
|
8
|
+
steps:
|
|
9
|
+
- name: Create Review App
|
|
10
|
+
uses: mheap/github-action-pr-heroku-review-app@v1
|
|
11
|
+
env:
|
|
12
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
13
|
+
HEROKU_PIPELINE_ID: ${{ secrets.HEROKU_PIPELINE_ID }}
|
|
14
|
+
HEROKU_API_TOKEN: ${{ secrets.HEROKU_API_TOKEN }}
|
data/CHANGELOG.md
CHANGED
data/Dockerfile
CHANGED
data/Gemfile.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
nexmo-oas-renderer (2.
|
|
4
|
+
nexmo-oas-renderer (2.4.0)
|
|
5
5
|
activemodel (~> 6.0)
|
|
6
6
|
activesupport (~> 6.0)
|
|
7
7
|
banzai (~> 0.1.2)
|
|
@@ -18,56 +18,56 @@ PATH
|
|
|
18
18
|
GEM
|
|
19
19
|
remote: https://rubygems.org/
|
|
20
20
|
specs:
|
|
21
|
-
actioncable (6.0.3.
|
|
22
|
-
actionpack (= 6.0.3.
|
|
21
|
+
actioncable (6.0.3.4)
|
|
22
|
+
actionpack (= 6.0.3.4)
|
|
23
23
|
nio4r (~> 2.0)
|
|
24
24
|
websocket-driver (>= 0.6.1)
|
|
25
|
-
actionmailbox (6.0.3.
|
|
26
|
-
actionpack (= 6.0.3.
|
|
27
|
-
activejob (= 6.0.3.
|
|
28
|
-
activerecord (= 6.0.3.
|
|
29
|
-
activestorage (= 6.0.3.
|
|
30
|
-
activesupport (= 6.0.3.
|
|
25
|
+
actionmailbox (6.0.3.4)
|
|
26
|
+
actionpack (= 6.0.3.4)
|
|
27
|
+
activejob (= 6.0.3.4)
|
|
28
|
+
activerecord (= 6.0.3.4)
|
|
29
|
+
activestorage (= 6.0.3.4)
|
|
30
|
+
activesupport (= 6.0.3.4)
|
|
31
31
|
mail (>= 2.7.1)
|
|
32
|
-
actionmailer (6.0.3.
|
|
33
|
-
actionpack (= 6.0.3.
|
|
34
|
-
actionview (= 6.0.3.
|
|
35
|
-
activejob (= 6.0.3.
|
|
32
|
+
actionmailer (6.0.3.4)
|
|
33
|
+
actionpack (= 6.0.3.4)
|
|
34
|
+
actionview (= 6.0.3.4)
|
|
35
|
+
activejob (= 6.0.3.4)
|
|
36
36
|
mail (~> 2.5, >= 2.5.4)
|
|
37
37
|
rails-dom-testing (~> 2.0)
|
|
38
|
-
actionpack (6.0.3.
|
|
39
|
-
actionview (= 6.0.3.
|
|
40
|
-
activesupport (= 6.0.3.
|
|
38
|
+
actionpack (6.0.3.4)
|
|
39
|
+
actionview (= 6.0.3.4)
|
|
40
|
+
activesupport (= 6.0.3.4)
|
|
41
41
|
rack (~> 2.0, >= 2.0.8)
|
|
42
42
|
rack-test (>= 0.6.3)
|
|
43
43
|
rails-dom-testing (~> 2.0)
|
|
44
44
|
rails-html-sanitizer (~> 1.0, >= 1.2.0)
|
|
45
|
-
actiontext (6.0.3.
|
|
46
|
-
actionpack (= 6.0.3.
|
|
47
|
-
activerecord (= 6.0.3.
|
|
48
|
-
activestorage (= 6.0.3.
|
|
49
|
-
activesupport (= 6.0.3.
|
|
45
|
+
actiontext (6.0.3.4)
|
|
46
|
+
actionpack (= 6.0.3.4)
|
|
47
|
+
activerecord (= 6.0.3.4)
|
|
48
|
+
activestorage (= 6.0.3.4)
|
|
49
|
+
activesupport (= 6.0.3.4)
|
|
50
50
|
nokogiri (>= 1.8.5)
|
|
51
|
-
actionview (6.0.3.
|
|
52
|
-
activesupport (= 6.0.3.
|
|
51
|
+
actionview (6.0.3.4)
|
|
52
|
+
activesupport (= 6.0.3.4)
|
|
53
53
|
builder (~> 3.1)
|
|
54
54
|
erubi (~> 1.4)
|
|
55
55
|
rails-dom-testing (~> 2.0)
|
|
56
56
|
rails-html-sanitizer (~> 1.1, >= 1.2.0)
|
|
57
|
-
activejob (6.0.3.
|
|
58
|
-
activesupport (= 6.0.3.
|
|
57
|
+
activejob (6.0.3.4)
|
|
58
|
+
activesupport (= 6.0.3.4)
|
|
59
59
|
globalid (>= 0.3.6)
|
|
60
|
-
activemodel (6.0.3.
|
|
61
|
-
activesupport (= 6.0.3.
|
|
62
|
-
activerecord (6.0.3.
|
|
63
|
-
activemodel (= 6.0.3.
|
|
64
|
-
activesupport (= 6.0.3.
|
|
65
|
-
activestorage (6.0.3.
|
|
66
|
-
actionpack (= 6.0.3.
|
|
67
|
-
activejob (= 6.0.3.
|
|
68
|
-
activerecord (= 6.0.3.
|
|
60
|
+
activemodel (6.0.3.4)
|
|
61
|
+
activesupport (= 6.0.3.4)
|
|
62
|
+
activerecord (6.0.3.4)
|
|
63
|
+
activemodel (= 6.0.3.4)
|
|
64
|
+
activesupport (= 6.0.3.4)
|
|
65
|
+
activestorage (6.0.3.4)
|
|
66
|
+
actionpack (= 6.0.3.4)
|
|
67
|
+
activejob (= 6.0.3.4)
|
|
68
|
+
activerecord (= 6.0.3.4)
|
|
69
69
|
marcel (~> 0.3.1)
|
|
70
|
-
activesupport (6.0.3.
|
|
70
|
+
activesupport (6.0.3.4)
|
|
71
71
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
|
72
72
|
i18n (>= 0.7, < 2)
|
|
73
73
|
minitest (~> 5.1)
|
|
@@ -78,7 +78,7 @@ GEM
|
|
|
78
78
|
ast (2.4.1)
|
|
79
79
|
banzai (0.1.3)
|
|
80
80
|
builder (3.2.4)
|
|
81
|
-
concurrent-ruby (1.1.
|
|
81
|
+
concurrent-ruby (1.1.7)
|
|
82
82
|
crass (1.0.6)
|
|
83
83
|
deep_merge (1.2.1)
|
|
84
84
|
diff-lcs (1.4.2)
|
|
@@ -89,9 +89,9 @@ GEM
|
|
|
89
89
|
activesupport (>= 4.2.0)
|
|
90
90
|
hansi (0.2.0)
|
|
91
91
|
hash-deep-merge (0.1.1)
|
|
92
|
-
i18n (1.8.
|
|
92
|
+
i18n (1.8.5)
|
|
93
93
|
concurrent-ruby (~> 1.0)
|
|
94
|
-
loofah (2.
|
|
94
|
+
loofah (2.7.0)
|
|
95
95
|
crass (~> 1.0.2)
|
|
96
96
|
nokogiri (>= 1.5.9)
|
|
97
97
|
mail (2.7.1)
|
|
@@ -102,14 +102,14 @@ GEM
|
|
|
102
102
|
mimemagic (0.3.5)
|
|
103
103
|
mini_mime (1.0.2)
|
|
104
104
|
mini_portile2 (2.4.0)
|
|
105
|
-
minitest (5.14.
|
|
105
|
+
minitest (5.14.2)
|
|
106
106
|
mustermann (1.1.1)
|
|
107
107
|
ruby2_keywords (~> 0.0.1)
|
|
108
108
|
mustermann-contrib (1.1.1)
|
|
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.5.0)
|
|
113
113
|
activemodel (~> 6.0)
|
|
114
114
|
banzai (~> 0.1.2)
|
|
115
115
|
i18n (~> 1.7)
|
|
@@ -117,8 +117,8 @@ GEM
|
|
|
117
117
|
octicons_helper (~> 8.2)
|
|
118
118
|
redcarpet (~> 3.4)
|
|
119
119
|
rouge (~> 2.0.7)
|
|
120
|
-
nio4r (2.5.
|
|
121
|
-
nokogiri (1.10.
|
|
120
|
+
nio4r (2.5.4)
|
|
121
|
+
nokogiri (1.10.10)
|
|
122
122
|
mini_portile2 (~> 2.4.0)
|
|
123
123
|
oas_parser (0.25.1)
|
|
124
124
|
activesupport (>= 4.0.0)
|
|
@@ -136,35 +136,35 @@ GEM
|
|
|
136
136
|
parallel (1.19.2)
|
|
137
137
|
parser (2.7.1.4)
|
|
138
138
|
ast (~> 2.4.1)
|
|
139
|
-
public_suffix (4.0.
|
|
139
|
+
public_suffix (4.0.6)
|
|
140
140
|
rack (2.2.3)
|
|
141
|
-
rack-protection (2.0
|
|
141
|
+
rack-protection (2.1.0)
|
|
142
142
|
rack
|
|
143
143
|
rack-test (1.1.0)
|
|
144
144
|
rack (>= 1.0, < 3)
|
|
145
|
-
rails (6.0.3.
|
|
146
|
-
actioncable (= 6.0.3.
|
|
147
|
-
actionmailbox (= 6.0.3.
|
|
148
|
-
actionmailer (= 6.0.3.
|
|
149
|
-
actionpack (= 6.0.3.
|
|
150
|
-
actiontext (= 6.0.3.
|
|
151
|
-
actionview (= 6.0.3.
|
|
152
|
-
activejob (= 6.0.3.
|
|
153
|
-
activemodel (= 6.0.3.
|
|
154
|
-
activerecord (= 6.0.3.
|
|
155
|
-
activestorage (= 6.0.3.
|
|
156
|
-
activesupport (= 6.0.3.
|
|
145
|
+
rails (6.0.3.4)
|
|
146
|
+
actioncable (= 6.0.3.4)
|
|
147
|
+
actionmailbox (= 6.0.3.4)
|
|
148
|
+
actionmailer (= 6.0.3.4)
|
|
149
|
+
actionpack (= 6.0.3.4)
|
|
150
|
+
actiontext (= 6.0.3.4)
|
|
151
|
+
actionview (= 6.0.3.4)
|
|
152
|
+
activejob (= 6.0.3.4)
|
|
153
|
+
activemodel (= 6.0.3.4)
|
|
154
|
+
activerecord (= 6.0.3.4)
|
|
155
|
+
activestorage (= 6.0.3.4)
|
|
156
|
+
activesupport (= 6.0.3.4)
|
|
157
157
|
bundler (>= 1.3.0)
|
|
158
|
-
railties (= 6.0.3.
|
|
158
|
+
railties (= 6.0.3.4)
|
|
159
159
|
sprockets-rails (>= 2.0.0)
|
|
160
160
|
rails-dom-testing (2.0.3)
|
|
161
161
|
activesupport (>= 4.2.0)
|
|
162
162
|
nokogiri (>= 1.6)
|
|
163
163
|
rails-html-sanitizer (1.3.0)
|
|
164
164
|
loofah (~> 2.3)
|
|
165
|
-
railties (6.0.3.
|
|
166
|
-
actionpack (= 6.0.3.
|
|
167
|
-
activesupport (= 6.0.3.
|
|
165
|
+
railties (6.0.3.4)
|
|
166
|
+
actionpack (= 6.0.3.4)
|
|
167
|
+
activesupport (= 6.0.3.4)
|
|
168
168
|
method_source
|
|
169
169
|
rake (>= 0.8.7)
|
|
170
170
|
thor (>= 0.20.3, < 2.0)
|
|
@@ -210,15 +210,15 @@ GEM
|
|
|
210
210
|
rb-inotify (~> 0.9, >= 0.9.7)
|
|
211
211
|
shotgun (0.9.2)
|
|
212
212
|
rack (>= 1.0)
|
|
213
|
-
sinatra (2.0
|
|
213
|
+
sinatra (2.1.0)
|
|
214
214
|
mustermann (~> 1.0)
|
|
215
|
-
rack (~> 2.
|
|
216
|
-
rack-protection (= 2.0
|
|
215
|
+
rack (~> 2.2)
|
|
216
|
+
rack-protection (= 2.1.0)
|
|
217
217
|
tilt (~> 2.0)
|
|
218
218
|
sprockets (4.0.2)
|
|
219
219
|
concurrent-ruby (~> 1.0)
|
|
220
220
|
rack (> 1, < 3)
|
|
221
|
-
sprockets-rails (3.2.
|
|
221
|
+
sprockets-rails (3.2.2)
|
|
222
222
|
actionpack (>= 4.0)
|
|
223
223
|
activesupport (>= 4.0)
|
|
224
224
|
sprockets (>= 3.0.0)
|
|
@@ -228,10 +228,10 @@ GEM
|
|
|
228
228
|
tzinfo (1.2.7)
|
|
229
229
|
thread_safe (~> 0.1)
|
|
230
230
|
unicode-display_width (1.7.0)
|
|
231
|
-
websocket-driver (0.7.
|
|
231
|
+
websocket-driver (0.7.3)
|
|
232
232
|
websocket-extensions (>= 0.1.0)
|
|
233
233
|
websocket-extensions (0.1.5)
|
|
234
|
-
zeitwerk (2.
|
|
234
|
+
zeitwerk (2.4.1)
|
|
235
235
|
|
|
236
236
|
PLATFORMS
|
|
237
237
|
ruby
|
data/Procfile
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
web: bundle exec ./exe/nexmo-oas-renderer
|
data/README.md
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
# Nexmo OAS Renderer
|
|
2
|
+
|
|
3
|
+

|
|
4
|
+
[](./LICENSE.txt)
|
|
5
|
+
|
|
2
6
|
Sinatra application that provides a preview of how the OAS documents will be rendered within [Nexmo Developer](https://developer.nexmo.com/).
|
|
3
7
|
|
|
4
8
|
* [Dependencies](#requirements)
|
data/app.json
ADDED
|
@@ -13,6 +13,7 @@ require_relative './presenters/open_api_specification'
|
|
|
13
13
|
require_relative './presenters/navigation'
|
|
14
14
|
require_relative './presenters/request_body_raw'
|
|
15
15
|
require_relative './presenters/response_tabs'
|
|
16
|
+
require_relative './presenters/content_switcher'
|
|
16
17
|
require_relative './helpers/render'
|
|
17
18
|
require_relative './helpers/navigation'
|
|
18
19
|
require_relative './helpers/summary'
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Nexmo
|
|
4
|
+
module OAS
|
|
5
|
+
module Renderer
|
|
6
|
+
module Presenters
|
|
7
|
+
class ContentSwitcher
|
|
8
|
+
def initialize(format:, label:, theme_light:, force_type: nil)
|
|
9
|
+
@format = format
|
|
10
|
+
@panels = []
|
|
11
|
+
@label = label
|
|
12
|
+
@force_type = force_type
|
|
13
|
+
@theme_light = theme_light
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
def add_content(title:, content:, tab_id:, active:)
|
|
17
|
+
@panels.push({
|
|
18
|
+
'title' => title,
|
|
19
|
+
'content' => content,
|
|
20
|
+
'x-tab-id' => tab_id,
|
|
21
|
+
'active' => active,
|
|
22
|
+
})
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
def render
|
|
26
|
+
type = 'tabs'
|
|
27
|
+
type = 'dropdown' if @panels.length >= 8
|
|
28
|
+
|
|
29
|
+
type = @force_type if @force_type
|
|
30
|
+
|
|
31
|
+
[:"open_api/content_switcher/_#{type}", locals: {
|
|
32
|
+
panels: @panels,
|
|
33
|
+
format: @format,
|
|
34
|
+
label: @label,
|
|
35
|
+
switcher: self,
|
|
36
|
+
theme_light: @theme_light,
|
|
37
|
+
}]
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
def id
|
|
41
|
+
@id ||= "s-#{SecureRandom.hex}"
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
end
|
|
@@ -8,7 +8,7 @@ module Nexmo
|
|
|
8
8
|
module Renderer
|
|
9
9
|
module Presenters
|
|
10
10
|
class ResponseTabs
|
|
11
|
-
attr_reader :format
|
|
11
|
+
attr_reader :format, :switcher
|
|
12
12
|
|
|
13
13
|
def initialize(format, response, content, endpoint, theme_light: nil)
|
|
14
14
|
@format = format
|
|
@@ -16,6 +16,7 @@ module Nexmo
|
|
|
16
16
|
@content = content
|
|
17
17
|
@endpoint = endpoint
|
|
18
18
|
@theme_light = theme_light
|
|
19
|
+
@switcher ||= @response.schema(@format)['x-switcher']
|
|
19
20
|
end
|
|
20
21
|
|
|
21
22
|
def tab_links
|
|
@@ -20,6 +20,14 @@ document.addEventListener("DOMContentLoaded", function() {
|
|
|
20
20
|
var matchingTabs = document.querySelectorAll('[data-tab-link="' + link + '"]');
|
|
21
21
|
Array.from(matchingTabs).forEach(function (element) {
|
|
22
22
|
element.dispatchEvent(new Event('toggle'));
|
|
23
|
+
|
|
24
|
+
// Switch anything that's in a dropdown
|
|
25
|
+
if (element.parentNode.className.indexOf("Vlt-dropdown__panel__content") !== -1) {
|
|
26
|
+
// This is *very* structure dependent, but also the most compatible way to handle it
|
|
27
|
+
var panel = element.parentNode.parentNode;
|
|
28
|
+
var titleNodes = Array.from(panel.previousSibling.previousSibling.firstChild.childNodes);
|
|
29
|
+
titleNodes[1].textContent = element.textContent;
|
|
30
|
+
}
|
|
23
31
|
});
|
|
24
32
|
});
|
|
25
33
|
});
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2001-present, Vonage.
|
|
3
|
+
*
|
|
4
|
+
* Dropdowns (requires core)
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
'use strict';
|
|
8
|
+
|
|
9
|
+
Volta.dropdown = function () {
|
|
10
|
+
var _class = {
|
|
11
|
+
wrapper: 'Vlt-dropdown',
|
|
12
|
+
block: 'Vlt-dropdown__block',
|
|
13
|
+
btn: 'Vlt-dropdown__trigger',
|
|
14
|
+
btnLegacy: 'Vlt-dropdown__btn',
|
|
15
|
+
dismissed: 'Vlt-callout--dismissed',
|
|
16
|
+
expanded: 'Vlt-dropdown--expanded',
|
|
17
|
+
label: 'Vlt-dropdown__label',
|
|
18
|
+
link: 'Vlt-dropdown__link',
|
|
19
|
+
noCloseLink: 'Vlt-dropdown__link--noclose',
|
|
20
|
+
noCloseBlock: 'Vlt-dropdown__block--noclose',
|
|
21
|
+
panel: 'Vlt-dropdown__panel',
|
|
22
|
+
panelContent: 'Vlt-dropdown__panel__content',
|
|
23
|
+
selection: 'Vlt-dropdown__selection',
|
|
24
|
+
switch: 'Vlt-switch',
|
|
25
|
+
switchSlider: 'Vlt-switch__slider'
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
function Dropdown() {}
|
|
29
|
+
|
|
30
|
+
Dropdown.prototype = {
|
|
31
|
+
init: function(element, supressClickHandler) {
|
|
32
|
+
this.dropdown = element;
|
|
33
|
+
this.selection = this.dropdown.querySelector('.' + _class.selection);
|
|
34
|
+
this.isSelectionVisible = !!this.selection;
|
|
35
|
+
this.btn = this.dropdown.querySelector('.' + _class.btn) || this.dropdown.querySelector('.' + _class.btnLegacy);
|
|
36
|
+
this._suppress = supressClickHandler;
|
|
37
|
+
|
|
38
|
+
if(!this._suppress) {
|
|
39
|
+
this._addEventListener();
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
_addEventListener: function(){
|
|
43
|
+
var openHandler = this.open.bind(this);
|
|
44
|
+
this.dropdown.addEventListener('click', openHandler, { once: true })
|
|
45
|
+
},
|
|
46
|
+
close: function(text) {
|
|
47
|
+
if(text) {
|
|
48
|
+
this._setDropdownSelectionText(text);
|
|
49
|
+
}
|
|
50
|
+
this.dropdown.classList.remove(_class.expanded);
|
|
51
|
+
|
|
52
|
+
if(!this._suppress){
|
|
53
|
+
this._addEventListener();
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
},
|
|
57
|
+
_closeEventHandler: undefined,
|
|
58
|
+
_closeEvent: function(e) {
|
|
59
|
+
var targetIsPanel = Volta._hasClass(e.target, _class.panel);
|
|
60
|
+
var parentIsPanel = Volta._closest(e.target, '.' + _class.panelContent, _class.panel) !== null;
|
|
61
|
+
var parentLink = Volta._closest(e.target, '.' + _class.link, _class.wrapper);
|
|
62
|
+
var parentIsLink = parentLink && parentLink.length === 1;
|
|
63
|
+
var isSwitchSlider = Volta._hasClass(e.target, _class.switchSlider);
|
|
64
|
+
var isParentSwitch = Volta._closest(e.target,'.' + _class.switch, _class.link);
|
|
65
|
+
var isNoClose = Volta._hasClass(e.target, _class.noCloseLink) || Volta._hasClass(e.target, _class.noCloseBlock);
|
|
66
|
+
var isNoCloseParent = Volta._closest(e.target,'.' + _class.noCloseLink, _class.link) || Volta._closest(e.target,'.' + _class.noCloseBlock, _class.noCloseBlock);
|
|
67
|
+
var isInput = e.target instanceof HTMLInputElement;
|
|
68
|
+
|
|
69
|
+
if(!targetIsPanel && !parentIsPanel && !parentIsLink && !isNoClose && !isInput && !isNoCloseParent) {
|
|
70
|
+
e.preventDefault();
|
|
71
|
+
e.stopPropagation();
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
if(isSwitchSlider || isParentSwitch || isNoClose || isInput || isNoCloseParent) {
|
|
75
|
+
return null;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
var text;
|
|
79
|
+
if(parentIsPanel && Volta._hasClass(e.target, _class.label)) {
|
|
80
|
+
text = e.target.innerHTML;
|
|
81
|
+
} else if (parentIsPanel) {
|
|
82
|
+
var label = e.target.querySelector('.' + _class.label);
|
|
83
|
+
if(label) {
|
|
84
|
+
text = label.innerHTML;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
this.close(text);
|
|
89
|
+
|
|
90
|
+
document.querySelector('body').removeEventListener('click', this._closeEventHandler );
|
|
91
|
+
},
|
|
92
|
+
open: function(event) {
|
|
93
|
+
if(event) {
|
|
94
|
+
event.preventDefault();
|
|
95
|
+
event.stopPropagation();
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
this.dropdown.classList.add(_class.expanded);
|
|
99
|
+
|
|
100
|
+
if(!this._suppress){
|
|
101
|
+
this._closeEventHandler = this._closeEvent.bind(this);
|
|
102
|
+
document.querySelector('body').addEventListener('click', this._closeEventHandler );
|
|
103
|
+
}
|
|
104
|
+
},
|
|
105
|
+
_setDropdownSelectionText: function(text) {
|
|
106
|
+
if(this.isSelectionVisible) {
|
|
107
|
+
this.selection.innerText = text;
|
|
108
|
+
} else {
|
|
109
|
+
this.btn.innerText = text;
|
|
110
|
+
this.btn.value = text;
|
|
111
|
+
}
|
|
112
|
+
},
|
|
113
|
+
_suppress: false
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
return {
|
|
117
|
+
create: create,
|
|
118
|
+
init: attachDropdownHandlers
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* @public
|
|
123
|
+
*
|
|
124
|
+
* @description Attach a listeners to dropdowns
|
|
125
|
+
*/
|
|
126
|
+
function attachDropdownHandlers() {
|
|
127
|
+
document.querySelectorAll('.' + _class.wrapper).forEach(attachHandler);
|
|
128
|
+
|
|
129
|
+
function attachHandler(dropdown) {
|
|
130
|
+
create(dropdown);
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
* @private
|
|
136
|
+
*
|
|
137
|
+
* @description Create a dropdown element
|
|
138
|
+
* @param {HTMLElement} element
|
|
139
|
+
*/
|
|
140
|
+
function create(element){
|
|
141
|
+
var dropdown = Object.create(Dropdown.prototype, {})
|
|
142
|
+
dropdown.init(element);
|
|
143
|
+
return dropdown;
|
|
144
|
+
}
|
|
145
|
+
}();
|
|
@@ -5,10 +5,11 @@
|
|
|
5
5
|
<script src="/assets/javascripts/volta.accordion.js"></script>
|
|
6
6
|
<script src="/assets/javascripts/volta.tabs.js"></script>
|
|
7
7
|
<script src="/assets/javascripts/volta.modal.js"></script>
|
|
8
|
+
<script src="/assets/javascripts/volta.dropdown.js"></script>
|
|
8
9
|
<script src="/assets/javascripts/volta.tooltip.js"></script>
|
|
9
10
|
<script src="/assets/javascripts/nexmo-oas-renderer.js?a=1"></script>
|
|
10
11
|
<script src="/assets/javascripts/components/format.js"></script>
|
|
11
12
|
<script type="text/javascript">
|
|
12
|
-
Volta.init(["accordion", "tab", "modal", "tooltip"]);
|
|
13
|
+
Volta.init(["accordion", "tab", "modal", "tooltip", "dropdown"]);
|
|
13
14
|
new Format
|
|
14
15
|
</script>
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
<% if definition.raw['x-errors'] %>
|
|
2
|
+
<div>
|
|
3
|
+
<div class="Vlt-grid">
|
|
4
|
+
<div class="Vlt-col oas-left-panel" style="padding-bottom: 36px;">
|
|
5
|
+
<h2 id="errors">Errors</h2>
|
|
6
|
+
<p>
|
|
7
|
+
The following is a non-exhaustive list of error codes that may occur while using this API. These codes are in addition to any of our <a href="/api-errors">generic error codes</a>.
|
|
8
|
+
</p>
|
|
9
|
+
</div>
|
|
10
|
+
<div class="Vlt-col oas-right-panel"></div>
|
|
11
|
+
</div>
|
|
12
|
+
<div class="Vlt-grid">
|
|
13
|
+
<div class="Vlt-col Vlt-table oas-left-panel">
|
|
14
|
+
<table>
|
|
15
|
+
<thead>
|
|
16
|
+
<tr>
|
|
17
|
+
<th>Code</th>
|
|
18
|
+
<th>Details</th>
|
|
19
|
+
</tr>
|
|
20
|
+
</thead>
|
|
21
|
+
<tbody>
|
|
22
|
+
<% definition.raw['x-errors'].each do |name, body| %>
|
|
23
|
+
<tr>
|
|
24
|
+
<td><a href="/api-errors/<%= @specification.definition_name %>#<%= name %>"><b><%= name %></b></a></td>
|
|
25
|
+
<td><%= body['description'].render_markdown %> </td>
|
|
26
|
+
</tr>
|
|
27
|
+
<% end %>
|
|
28
|
+
</tbody>
|
|
29
|
+
</table>
|
|
30
|
+
</div>
|
|
31
|
+
<div class="Vlt-col oas-right-panel"></div>
|
|
32
|
+
</div>
|
|
33
|
+
</div>
|
|
34
|
+
<% end %>
|
|
@@ -39,6 +39,20 @@
|
|
|
39
39
|
</div>
|
|
40
40
|
</div>
|
|
41
41
|
|
|
42
|
+
|
|
43
|
+
<% if @specification.groups.size > 1 %>
|
|
44
|
+
<h4>Jump to:</h4>
|
|
45
|
+
<div style="margin-bottom: 30px; padding: 8px;">
|
|
46
|
+
<% @specification.groups.each do |name, endpoints| %>
|
|
47
|
+
<% if name %>
|
|
48
|
+
<% group = definition.raw['tags'].detect { |tag| tag['name'].capitalize == name.capitalize } %>
|
|
49
|
+
<p><a href="#<%= group['name'].parameterize %>"><%= group['name'] %> »</a></p>
|
|
50
|
+
<p class="Vlt-grey-darker"><%= group['description']&.render_markdown %></p>
|
|
51
|
+
<% end %>
|
|
52
|
+
<% end %>
|
|
53
|
+
</div>
|
|
54
|
+
<% end %>
|
|
55
|
+
|
|
42
56
|
<%
|
|
43
57
|
# If there's only one group, everything is untagged
|
|
44
58
|
if @specification.groups.size === 1
|
|
@@ -13,6 +13,9 @@
|
|
|
13
13
|
<a href="#webhooks" class="Vlt-btn Vlt-btn--tertiary group-link">Webhooks</a>
|
|
14
14
|
<% end %>
|
|
15
15
|
|
|
16
|
+
<% if definition.raw['x-errors'] %>
|
|
17
|
+
<a href="#errors" class="Vlt-btn Vlt-btn--tertiary group-link">Errors</a>
|
|
18
|
+
<% end %>
|
|
16
19
|
|
|
17
20
|
<% if @specification.formats.size > 1 %>
|
|
18
21
|
<div class="Vlt-native-dropdown">
|
|
@@ -44,6 +47,10 @@
|
|
|
44
47
|
<a href="#top" class="Vlt-btn Vlt-btn--tertiary group-link">Available Operations</a>
|
|
45
48
|
<% end %>
|
|
46
49
|
|
|
50
|
+
<% if definition.raw['x-errors'] %>
|
|
51
|
+
<a href="#errors" class="Vlt-btn Vlt-btn--tertiary group-link">Errors</a>
|
|
52
|
+
<% end %>
|
|
53
|
+
|
|
47
54
|
<br />
|
|
48
55
|
<br />
|
|
49
56
|
|
|
@@ -29,14 +29,7 @@
|
|
|
29
29
|
<% unless endpoint.request_body.exhibits_one_of_multiple_schemas?(format) %>
|
|
30
30
|
|
|
31
31
|
<%
|
|
32
|
-
|
|
33
|
-
# We probably want real allOf support in OasParser, but that's more time than I have right now
|
|
34
|
-
allOf = endpoint.request_body.content[format]['schema']['allOf']
|
|
35
|
-
if allOf
|
|
36
|
-
params = endpoint.request_body.handle_all_of(allOf)
|
|
37
|
-
else
|
|
38
|
-
params = endpoint.request_body.properties_for_format(format)
|
|
39
|
-
end
|
|
32
|
+
params = endpoint.request_body.properties_for_format(format)
|
|
40
33
|
if params
|
|
41
34
|
%>
|
|
42
35
|
|
|
@@ -46,9 +39,10 @@
|
|
|
46
39
|
|
|
47
40
|
<%
|
|
48
41
|
# This can likely be better done as a presenter, but it works for now
|
|
49
|
-
|
|
42
|
+
request = endpoint.request_body.content[format]['schema']
|
|
43
|
+
schema = request['oneOf']
|
|
50
44
|
%>
|
|
51
|
-
<%= erb :'open_api/_tabbed_parameters', locals: { body: endpoint.request_body, schema: schema, format: format, callback: callback } %>
|
|
45
|
+
<%= erb :'open_api/_tabbed_parameters', locals: { body: endpoint.request_body, request: request, schema: schema, format: format, callback: callback } %>
|
|
52
46
|
<%
|
|
53
47
|
end
|
|
54
48
|
end
|
|
@@ -58,13 +58,21 @@
|
|
|
58
58
|
<% if parameter.required %>
|
|
59
59
|
<span class="constraint">Required</span>
|
|
60
60
|
<% end %>
|
|
61
|
-
|
|
62
61
|
<% if parameter.minimum || parameter.raw['minLength'] %>
|
|
63
62
|
| <span class="constraint">Min:</span> <%= parameter.minimum || parameter.raw['minLength'] %>
|
|
64
63
|
<% end %>
|
|
65
64
|
<% if parameter.maximum || parameter.raw['maxLength'] %>
|
|
66
65
|
| <span class="constraint">Max:</span> <%= parameter.maximum || parameter.raw['maxLength'] %>
|
|
67
66
|
<% end %>
|
|
67
|
+
<% if parameter.default || parameter.raw['default'] %>
|
|
68
|
+
| <span class="constraint">Default:</span> <%= parameter.default || parameter.raw['default'] %>
|
|
69
|
+
<% end %>
|
|
70
|
+
<% if parameter.raw['deprecated'] %>
|
|
71
|
+
| <span class="constraint">DEPRECATED</span> <span>: This field has been deprecated. </span>
|
|
72
|
+
<% end %>
|
|
73
|
+
<% if parameter.raw['x-replace-with']%>
|
|
74
|
+
<span> <%= 'Please use ' + '<code>'+ parameter.raw['x-replace-with'] + '</code>' + ' instead.' %> </span>
|
|
75
|
+
<% end %>
|
|
68
76
|
</div>
|
|
69
77
|
|
|
70
78
|
<%= (parameter.description || parameter.schema['description'] || '').render_markdown %>
|
|
@@ -1,18 +1,16 @@
|
|
|
1
|
-
<%
|
|
1
|
+
<%
|
|
2
|
+
tabs = Nexmo::OAS::Renderer::Presenters::ResponseTabs.new(format, response, content, endpoint, theme_light: @theme_light)
|
|
2
3
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
<% end %>
|
|
17
|
-
</div>
|
|
18
|
-
</div>
|
|
4
|
+
switcher = Nexmo::OAS::Renderer::Presenters::ContentSwitcher.new(label: "Response Example", format: format, force_type: tabs.switcher, theme_light: @theme_light)
|
|
5
|
+
|
|
6
|
+
tabs.tab_links.each_with_index do |v,k|
|
|
7
|
+
switcher.add_content(
|
|
8
|
+
title: v.content,
|
|
9
|
+
content: (erb *tabs.tab_panels[k].content),
|
|
10
|
+
tab_id: v.data_tab_link,
|
|
11
|
+
active: k == 0
|
|
12
|
+
)
|
|
13
|
+
end
|
|
14
|
+
%>
|
|
15
|
+
|
|
16
|
+
<%= erb *switcher.render %>
|
|
@@ -12,8 +12,7 @@
|
|
|
12
12
|
s
|
|
13
13
|
end
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
panels = []
|
|
15
|
+
switcher = Nexmo::OAS::Renderer::Presenters::ContentSwitcher.new(label: "Request Details", format: format, force_type: request['x-switcher'], theme_light: @theme_light)
|
|
17
16
|
|
|
18
17
|
schemas.each_with_index do |schema, index|
|
|
19
18
|
if schema['properties']
|
|
@@ -25,40 +24,21 @@
|
|
|
25
24
|
end
|
|
26
25
|
end
|
|
27
26
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
'
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
27
|
+
|
|
28
|
+
if schema['oneOf']
|
|
29
|
+
content = (erb :'open_api/_tabbed_parameters', locals: { body: body, request: schema, schema: schema['oneOf'], format: format, callback: callback })
|
|
30
|
+
else
|
|
31
|
+
content = (erb :'open_api/_parameters', locals: { parameters: schema['properties'], callback: callback })
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
switcher.add_content(
|
|
35
|
+
title: schema['title'] || schema['description'],
|
|
36
|
+
content: content,
|
|
37
|
+
tab_id: schema['x-tab-id'],
|
|
38
|
+
active: index == 0
|
|
39
|
+
)
|
|
35
40
|
end
|
|
36
41
|
%>
|
|
37
42
|
|
|
38
|
-
|
|
39
|
-
<div class="Vlt-tabs__header" role="tablist" aria-label="Responses">
|
|
40
|
-
<% panels.each do |panel| %>
|
|
41
|
-
<div role="tab" data-tab-link="<%= panel['x-tab-id'] %>" class="Vlt-tabs__link <%= panel['active'] ? 'Vlt-tabs__link_active' : '' %>">
|
|
42
|
-
<%= panel['description'] %>
|
|
43
|
-
</div>
|
|
44
|
-
<% end %>
|
|
45
|
-
</div>
|
|
46
|
-
<div class="Vlt-tabs__content">
|
|
47
|
-
<% panels.each do |panel| %>
|
|
48
|
-
<div class="Vlt-tabs__panel <%= panel['active'] ? 'Vlt-tabs__panel_active' : '' %>">
|
|
49
|
-
<%
|
|
50
|
-
# Nested oneOf?
|
|
51
|
-
if panel['oneOf']
|
|
52
|
-
%>
|
|
53
|
-
<%= erb :'open_api/_tabbed_parameters', locals: { body: body, schema: panel['oneOf'], format: format, callback: callback } %>
|
|
54
|
-
<%
|
|
55
|
-
else
|
|
56
|
-
%>
|
|
57
|
-
|
|
58
|
-
<%= erb :'open_api/_parameters', locals: { parameters: panel['parameters'], callback: callback } %>
|
|
59
|
-
<% end %>
|
|
60
|
-
</div>
|
|
61
|
-
<% end %>
|
|
62
|
-
</div>
|
|
63
|
-
</div>
|
|
43
|
+
<%= erb *switcher.render %>
|
|
64
44
|
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
<div class="Vlt-dropdown Vlt-dropdown--full-width">
|
|
2
|
+
<div class="Vlt-dropdown__trigger Vlt-dropdown__trigger--btn"><button class="Vlt-btn Vlt-btn--<%= (theme_light ? "secondary" : "tertiary") %>"><%= label %>: <span class="Vlt-dropdown__selection"><%= panels[0]['title'] %></span></button></div>
|
|
3
|
+
<div class="Vlt-dropdown__panel">
|
|
4
|
+
<div data-tab-content="<%= switcher.id %>" class="Vlt-dropdown__panel__content">
|
|
5
|
+
<% panels.each do |panel| %>
|
|
6
|
+
<div role="tab" data-tab-link="<%= panel['x-tab-id'] || panel['title'].parameterize %>" class="Vlt-dropdown__link Vlt-dropdown__label Vlt-js-tabs__link"><%= panel['title'] %></div>
|
|
7
|
+
<% end %>
|
|
8
|
+
</div>
|
|
9
|
+
</div>
|
|
10
|
+
</div>
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
<div class="js-format" data-format="<%= format %>">
|
|
14
|
+
<div id="<%= switcher.id %>" class="Vlt-js-tabs__content">
|
|
15
|
+
<% panels.each do |panel| %>
|
|
16
|
+
<div class="Vlt-js-tabs__panel <%= panel['active'] ? 'Vlt-js-tabs__panel_active' : '' %>">
|
|
17
|
+
<%= panel['content'] %>
|
|
18
|
+
</div>
|
|
19
|
+
<% end %>
|
|
20
|
+
</div>
|
|
21
|
+
</div>
|
|
22
|
+
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<div class="Vlt-tabs js-format" data-format="<%= format %>">
|
|
2
|
+
<div class="Vlt-tabs__header" role="tablist" aria-label="<%= label %>">
|
|
3
|
+
<% panels.each do |panel| %>
|
|
4
|
+
<div role="tab" data-tab-link="<%= panel['x-tab-id'] || panel['title'].parameterize %>" class="Vlt-tabs__link <%= panel['active'] ? 'Vlt-tabs__link_active' : '' %>">
|
|
5
|
+
<%= panel['title'] %>
|
|
6
|
+
</div>
|
|
7
|
+
<% end %>
|
|
8
|
+
</div>
|
|
9
|
+
<div class="Vlt-tabs__content">
|
|
10
|
+
<% panels.each do |panel| %>
|
|
11
|
+
<div class="Vlt-tabs__panel <%= panel['active'] ? 'Vlt-tabs__panel_active' : '' %>">
|
|
12
|
+
<%= panel['content'] %>
|
|
13
|
+
</div>
|
|
14
|
+
<% end %>
|
|
15
|
+
</div>
|
|
16
|
+
</div>
|
|
17
|
+
|
|
18
|
+
|
data/nexmo-oas-renderer.gemspec
CHANGED
|
@@ -25,7 +25,7 @@ Gem::Specification.new do |spec|
|
|
|
25
25
|
# Specify which files should be added to the gem when it is released.
|
|
26
26
|
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
|
27
27
|
spec.files = Dir.chdir(File.expand_path(__dir__)) do
|
|
28
|
-
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
|
28
|
+
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features|samples)/}) }
|
|
29
29
|
end
|
|
30
30
|
spec.bindir = 'exe'
|
|
31
31
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
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: 2.1
|
|
4
|
+
version: 2.4.1
|
|
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-11-19 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activemodel
|
|
@@ -243,19 +243,22 @@ extensions: []
|
|
|
243
243
|
extra_rdoc_files: []
|
|
244
244
|
files:
|
|
245
245
|
- ".env.example"
|
|
246
|
+
- ".github/workflows/ci.yml"
|
|
247
|
+
- ".github/workflows/pull_request-review.yml"
|
|
246
248
|
- ".github/workflows/push-docker-publish.yml"
|
|
247
249
|
- ".gitignore"
|
|
248
250
|
- ".rspec"
|
|
249
251
|
- ".rubocop.yml"
|
|
250
|
-
- ".travis.yml"
|
|
251
252
|
- CHANGELOG.md
|
|
252
253
|
- CONTRIBUTING.md
|
|
253
254
|
- Dockerfile
|
|
254
255
|
- Gemfile
|
|
255
256
|
- Gemfile.lock
|
|
256
257
|
- LICENSE.txt
|
|
258
|
+
- Procfile
|
|
257
259
|
- README.md
|
|
258
260
|
- Rakefile
|
|
261
|
+
- app.json
|
|
259
262
|
- bin/console
|
|
260
263
|
- bin/setup
|
|
261
264
|
- exe/nexmo-oas-renderer
|
|
@@ -271,6 +274,7 @@ files:
|
|
|
271
274
|
- lib/nexmo/oas/renderer/helpers/summary.rb
|
|
272
275
|
- lib/nexmo/oas/renderer/helpers/url.rb
|
|
273
276
|
- lib/nexmo/oas/renderer/presenters/api_specification.rb
|
|
277
|
+
- lib/nexmo/oas/renderer/presenters/content_switcher.rb
|
|
274
278
|
- lib/nexmo/oas/renderer/presenters/endpoint.rb
|
|
275
279
|
- lib/nexmo/oas/renderer/presenters/groups.rb
|
|
276
280
|
- lib/nexmo/oas/renderer/presenters/navigation.rb
|
|
@@ -300,6 +304,7 @@ files:
|
|
|
300
304
|
- lib/nexmo/oas/renderer/public/assets/javascripts/tooltip.min.js
|
|
301
305
|
- lib/nexmo/oas/renderer/public/assets/javascripts/volta.accordion.js
|
|
302
306
|
- lib/nexmo/oas/renderer/public/assets/javascripts/volta.core.js
|
|
307
|
+
- lib/nexmo/oas/renderer/public/assets/javascripts/volta.dropdown.js
|
|
303
308
|
- lib/nexmo/oas/renderer/public/assets/javascripts/volta.modal.js
|
|
304
309
|
- lib/nexmo/oas/renderer/public/assets/javascripts/volta.tabs.js
|
|
305
310
|
- lib/nexmo/oas/renderer/public/assets/javascripts/volta.tooltip.js
|
|
@@ -348,6 +353,7 @@ files:
|
|
|
348
353
|
- lib/nexmo/oas/renderer/views/open_api/_callbacks.erb
|
|
349
354
|
- lib/nexmo/oas/renderer/views/open_api/_code_examples.erb
|
|
350
355
|
- lib/nexmo/oas/renderer/views/open_api/_endpoint.erb
|
|
356
|
+
- lib/nexmo/oas/renderer/views/open_api/_errors.erb
|
|
351
357
|
- lib/nexmo/oas/renderer/views/open_api/_header.erb
|
|
352
358
|
- lib/nexmo/oas/renderer/views/open_api/_model.erb
|
|
353
359
|
- lib/nexmo/oas/renderer/views/open_api/_navigation.erb
|
|
@@ -365,6 +371,8 @@ files:
|
|
|
365
371
|
- lib/nexmo/oas/renderer/views/open_api/_tabbed_parameters.erb
|
|
366
372
|
- lib/nexmo/oas/renderer/views/open_api/_tabbed_single_parameter.erb
|
|
367
373
|
- lib/nexmo/oas/renderer/views/open_api/_webhooks.erb
|
|
374
|
+
- lib/nexmo/oas/renderer/views/open_api/content_switcher/_dropdown.erb
|
|
375
|
+
- lib/nexmo/oas/renderer/views/open_api/content_switcher/_tabs.erb
|
|
368
376
|
- lib/nexmo/oas/renderer/views/open_api/show.erb
|
|
369
377
|
- lib/nexmo/oas/renderer/views/static/404.erb
|
|
370
378
|
- nexmo-oas-renderer.gemspec
|
|
@@ -389,7 +397,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
389
397
|
- !ruby/object:Gem::Version
|
|
390
398
|
version: '0'
|
|
391
399
|
requirements: []
|
|
392
|
-
rubygems_version: 3.
|
|
400
|
+
rubygems_version: 3.1.4
|
|
393
401
|
signing_key:
|
|
394
402
|
specification_version: 4
|
|
395
403
|
summary: OpenAPI Specification renderer.
|