nexmo-oas-renderer 2.1.3 → 2.5.0

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.
Files changed (32) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/ci.yml +28 -0
  3. data/.github/workflows/pull_request-review.yml +14 -0
  4. data/CHANGELOG.md +3 -0
  5. data/Dockerfile +1 -1
  6. data/Gemfile.lock +73 -71
  7. data/Procfile +1 -0
  8. data/README.md +4 -0
  9. data/app.json +15 -0
  10. data/lib/nexmo/oas/renderer/app.rb +1 -0
  11. data/lib/nexmo/oas/renderer/helpers/render.rb +1 -1
  12. data/lib/nexmo/oas/renderer/presenters/content_switcher.rb +49 -0
  13. data/lib/nexmo/oas/renderer/presenters/response_tab/panel.rb +4 -0
  14. data/lib/nexmo/oas/renderer/presenters/response_tabs.rb +36 -2
  15. data/lib/nexmo/oas/renderer/public/assets/javascripts/nexmo-oas-renderer.js +8 -0
  16. data/lib/nexmo/oas/renderer/public/assets/javascripts/volta.dropdown.js +145 -0
  17. data/lib/nexmo/oas/renderer/public/assets/stylesheets/nexmo-oas-renderer.css +1 -0
  18. data/lib/nexmo/oas/renderer/version.rb +1 -1
  19. data/lib/nexmo/oas/renderer/views/layouts/_javascripts.erb +2 -1
  20. data/lib/nexmo/oas/renderer/views/open_api/_errors.erb +34 -0
  21. data/lib/nexmo/oas/renderer/views/open_api/_header.erb +15 -1
  22. data/lib/nexmo/oas/renderer/views/open_api/_navigation.erb +7 -0
  23. data/lib/nexmo/oas/renderer/views/open_api/_parameter_groups.erb +3 -2
  24. data/lib/nexmo/oas/renderer/views/open_api/_parameters.erb +9 -1
  25. data/lib/nexmo/oas/renderer/views/open_api/_response_tabs.erb +15 -17
  26. data/lib/nexmo/oas/renderer/views/open_api/_tabbed_parameters.erb +15 -35
  27. data/lib/nexmo/oas/renderer/views/open_api/content_switcher/_dropdown.erb +24 -0
  28. data/lib/nexmo/oas/renderer/views/open_api/content_switcher/_tabs.erb +18 -0
  29. data/lib/nexmo/oas/renderer/views/open_api/show.erb +1 -1
  30. data/nexmo-oas-renderer.gemspec +2 -2
  31. metadata +18 -10
  32. data/.travis.yml +0 -9
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: faadea352082b3d76c8da570d39ba77aa64f5de16b4ac62f8875d7750c3a8e94
4
- data.tar.gz: 0b9b036687ce18bb6bbd810526bf148ecb827d8a0a4b8657208b62321141e52e
3
+ metadata.gz: 370c5844bff4cc86ca8a558fe2d1f0dcc54103440325e836c3b9fb1043ab7c92
4
+ data.tar.gz: e62da1e342e6a00571750c398ec673e6ffb01252afa50c360e0a4cc3ea568ff2
5
5
  SHA512:
6
- metadata.gz: 98fd531733f922f6e4eb15419ee3bc2392f39e1079ef95f6bcf657303269439b8a6c93b76e50735489869b76cf1b5497a105bb44a1f3e2edc087e666b73da5a9
7
- data.tar.gz: 6d566a1770a5edc2f8b12c074374b34bc2758fd7d391a221c84397e9d5bbb9ac6664e654c58f7d54736411da44947e9e8671a231de407c8a377cd17b9f20f6d6
6
+ metadata.gz: 4332086bfd477d6d137e16943b014487788f24a78125ce7f23e0b05f9e81debc09709415c7e734050e41c4e43b1a354a8292dcff8e89213c19ea868c0a5510ff
7
+ data.tar.gz: f6f1dd5a4545f2be0fa1381596577514a530c3623a070f9b69a48e17ef7ae209b6058ad0b66f1fc5cafca526a438ce5b4be8172cfb5542411ccb5797ad4bc7bb
@@ -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 }}
@@ -1,3 +1,6 @@
1
+ # 2.2.0
2
+ * Add error list to API reference
3
+
1
4
  # 0.11.3
2
5
  * Change oas url constructor to be entire config parameter and not only partial
3
6
  * Bump websocket-extensions, fixes CVE-2020-7663
data/Dockerfile CHANGED
@@ -1,4 +1,4 @@
1
- FROM ruby:2.6
1
+ FROM ruby:2.7.2
2
2
  COPY . /
3
3
  RUN gem install bundler
4
4
  RUN bundle install
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- nexmo-oas-renderer (2.1.3)
4
+ nexmo-oas-renderer (2.5.0)
5
5
  activemodel (~> 6.0)
6
6
  activesupport (~> 6.0)
7
7
  banzai (~> 0.1.2)
@@ -10,7 +10,7 @@ PATH
10
10
  nexmo_markdown_renderer (~> 0.3)
11
11
  oas_parser (~> 0.25.1)
12
12
  octicons_helper (~> 8.2)
13
- redcarpet (= 3.4.0)
13
+ redcarpet (= 3.5.1)
14
14
  sass (~> 3.1)
15
15
  shotgun (~> 0.9)
16
16
  sinatra (~> 2.0)
@@ -18,56 +18,56 @@ PATH
18
18
  GEM
19
19
  remote: https://rubygems.org/
20
20
  specs:
21
- actioncable (6.0.3.2)
22
- actionpack (= 6.0.3.2)
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.2)
26
- actionpack (= 6.0.3.2)
27
- activejob (= 6.0.3.2)
28
- activerecord (= 6.0.3.2)
29
- activestorage (= 6.0.3.2)
30
- activesupport (= 6.0.3.2)
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.2)
33
- actionpack (= 6.0.3.2)
34
- actionview (= 6.0.3.2)
35
- activejob (= 6.0.3.2)
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.2)
39
- actionview (= 6.0.3.2)
40
- activesupport (= 6.0.3.2)
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.2)
46
- actionpack (= 6.0.3.2)
47
- activerecord (= 6.0.3.2)
48
- activestorage (= 6.0.3.2)
49
- activesupport (= 6.0.3.2)
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.2)
52
- activesupport (= 6.0.3.2)
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.2)
58
- activesupport (= 6.0.3.2)
57
+ activejob (6.0.3.4)
58
+ activesupport (= 6.0.3.4)
59
59
  globalid (>= 0.3.6)
60
- activemodel (6.0.3.2)
61
- activesupport (= 6.0.3.2)
62
- activerecord (6.0.3.2)
63
- activemodel (= 6.0.3.2)
64
- activesupport (= 6.0.3.2)
65
- activestorage (6.0.3.2)
66
- actionpack (= 6.0.3.2)
67
- activejob (= 6.0.3.2)
68
- activerecord (= 6.0.3.2)
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.2)
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,20 +78,20 @@ GEM
78
78
  ast (2.4.1)
79
79
  banzai (0.1.3)
80
80
  builder (3.2.4)
81
- concurrent-ruby (1.1.6)
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)
85
85
  dotenv (2.7.6)
86
86
  erubi (1.9.0)
87
- ffi (1.13.1)
87
+ ffi (1.14.2)
88
88
  globalid (0.4.2)
89
89
  activesupport (>= 4.2.0)
90
90
  hansi (0.2.0)
91
91
  hash-deep-merge (0.1.1)
92
- i18n (1.8.3)
92
+ i18n (1.8.5)
93
93
  concurrent-ruby (~> 1.0)
94
- loofah (2.6.0)
94
+ loofah (2.7.0)
95
95
  crass (~> 1.0.2)
96
96
  nokogiri (>= 1.5.9)
97
97
  mail (2.7.1)
@@ -101,15 +101,15 @@ GEM
101
101
  method_source (1.0.0)
102
102
  mimemagic (0.3.5)
103
103
  mini_mime (1.0.2)
104
- mini_portile2 (2.4.0)
105
- minitest (5.14.1)
104
+ mini_portile2 (2.5.0)
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.4.1)
112
+ nexmo_markdown_renderer (0.7.5)
113
113
  activemodel (~> 6.0)
114
114
  banzai (~> 0.1.2)
115
115
  i18n (~> 1.7)
@@ -117,9 +117,10 @@ GEM
117
117
  octicons_helper (~> 8.2)
118
118
  redcarpet (~> 3.4)
119
119
  rouge (~> 2.0.7)
120
- nio4r (2.5.2)
121
- nokogiri (1.10.9)
122
- mini_portile2 (~> 2.4.0)
120
+ nio4r (2.5.4)
121
+ nokogiri (1.11.1)
122
+ mini_portile2 (~> 2.5.0)
123
+ racc (~> 1.4)
123
124
  oas_parser (0.25.1)
124
125
  activesupport (>= 4.0.0)
125
126
  addressable (~> 2.3)
@@ -136,35 +137,36 @@ GEM
136
137
  parallel (1.19.2)
137
138
  parser (2.7.1.4)
138
139
  ast (~> 2.4.1)
139
- public_suffix (4.0.5)
140
+ public_suffix (4.0.6)
141
+ racc (1.5.2)
140
142
  rack (2.2.3)
141
- rack-protection (2.0.8.1)
143
+ rack-protection (2.1.0)
142
144
  rack
143
145
  rack-test (1.1.0)
144
146
  rack (>= 1.0, < 3)
145
- rails (6.0.3.2)
146
- actioncable (= 6.0.3.2)
147
- actionmailbox (= 6.0.3.2)
148
- actionmailer (= 6.0.3.2)
149
- actionpack (= 6.0.3.2)
150
- actiontext (= 6.0.3.2)
151
- actionview (= 6.0.3.2)
152
- activejob (= 6.0.3.2)
153
- activemodel (= 6.0.3.2)
154
- activerecord (= 6.0.3.2)
155
- activestorage (= 6.0.3.2)
156
- activesupport (= 6.0.3.2)
147
+ rails (6.0.3.4)
148
+ actioncable (= 6.0.3.4)
149
+ actionmailbox (= 6.0.3.4)
150
+ actionmailer (= 6.0.3.4)
151
+ actionpack (= 6.0.3.4)
152
+ actiontext (= 6.0.3.4)
153
+ actionview (= 6.0.3.4)
154
+ activejob (= 6.0.3.4)
155
+ activemodel (= 6.0.3.4)
156
+ activerecord (= 6.0.3.4)
157
+ activestorage (= 6.0.3.4)
158
+ activesupport (= 6.0.3.4)
157
159
  bundler (>= 1.3.0)
158
- railties (= 6.0.3.2)
160
+ railties (= 6.0.3.4)
159
161
  sprockets-rails (>= 2.0.0)
160
162
  rails-dom-testing (2.0.3)
161
163
  activesupport (>= 4.2.0)
162
164
  nokogiri (>= 1.6)
163
165
  rails-html-sanitizer (1.3.0)
164
166
  loofah (~> 2.3)
165
- railties (6.0.3.2)
166
- actionpack (= 6.0.3.2)
167
- activesupport (= 6.0.3.2)
167
+ railties (6.0.3.4)
168
+ actionpack (= 6.0.3.4)
169
+ activesupport (= 6.0.3.4)
168
170
  method_source
169
171
  rake (>= 0.8.7)
170
172
  thor (>= 0.20.3, < 2.0)
@@ -173,7 +175,7 @@ GEM
173
175
  rb-fsevent (0.10.4)
174
176
  rb-inotify (0.10.1)
175
177
  ffi (~> 1.0)
176
- redcarpet (3.4.0)
178
+ redcarpet (3.5.1)
177
179
  regexp_parser (1.7.1)
178
180
  rexml (3.2.4)
179
181
  rouge (2.0.7)
@@ -210,15 +212,15 @@ GEM
210
212
  rb-inotify (~> 0.9, >= 0.9.7)
211
213
  shotgun (0.9.2)
212
214
  rack (>= 1.0)
213
- sinatra (2.0.8.1)
215
+ sinatra (2.1.0)
214
216
  mustermann (~> 1.0)
215
- rack (~> 2.0)
216
- rack-protection (= 2.0.8.1)
217
+ rack (~> 2.2)
218
+ rack-protection (= 2.1.0)
217
219
  tilt (~> 2.0)
218
220
  sprockets (4.0.2)
219
221
  concurrent-ruby (~> 1.0)
220
222
  rack (> 1, < 3)
221
- sprockets-rails (3.2.1)
223
+ sprockets-rails (3.2.2)
222
224
  actionpack (>= 4.0)
223
225
  activesupport (>= 4.0)
224
226
  sprockets (>= 3.0.0)
@@ -228,10 +230,10 @@ GEM
228
230
  tzinfo (1.2.7)
229
231
  thread_safe (~> 0.1)
230
232
  unicode-display_width (1.7.0)
231
- websocket-driver (0.7.2)
233
+ websocket-driver (0.7.3)
232
234
  websocket-extensions (>= 0.1.0)
233
235
  websocket-extensions (0.1.5)
234
- zeitwerk (2.3.1)
236
+ zeitwerk (2.4.1)
235
237
 
236
238
  PLATFORMS
237
239
  ruby
@@ -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
+ ![Build Status](https://github.com/Nexmo/nexmo-oas-renderer/workflows/CI/badge.svg)
4
+ [![MIT licensed](https://img.shields.io/badge/license-MIT-blue.svg)](./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)
@@ -0,0 +1,15 @@
1
+ {
2
+ "buildpacks": [{ "url": "heroku/ruby" }],
3
+ "env": {
4
+ "RACK_ENV": "production",
5
+ "RAILS_ENV": "production",
6
+ "OAS_PATH": "samples"
7
+ },
8
+ "stack": "heroku-18",
9
+ "formation": {
10
+ "web": {
11
+ "quantity": 1,
12
+ "size": "free"
13
+ }
14
+ }
15
+ }
@@ -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'
@@ -15,7 +15,7 @@ module Nexmo
15
15
  if args.length > 2
16
16
  super
17
17
  else
18
- ApplicationController.renderer.render(*args)
18
+ ApplicationController.renderer.new(request.env).render(*args)
19
19
  end
20
20
  end
21
21
  end
@@ -0,0 +1,49 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Nexmo
4
+ module OAS
5
+ module Renderer
6
+ module Presenters
7
+ class ContentSwitcher
8
+ attr_reader :panels
9
+
10
+ def initialize(format:, label: nil, theme_light:, force_type: nil)
11
+ @format = format
12
+ @panels = []
13
+ @label = label
14
+ @force_type = force_type
15
+ @theme_light = theme_light
16
+ end
17
+
18
+ def add_content(title:, content:, tab_id:, active:)
19
+ @panels.push({
20
+ 'title' => title,
21
+ 'content' => content,
22
+ 'x-tab-id' => tab_id,
23
+ 'active' => active,
24
+ })
25
+ end
26
+
27
+ def render
28
+ type = 'tabs'
29
+ type = 'dropdown' if @panels.length >= 8
30
+
31
+ type = @force_type if @force_type
32
+
33
+ [:"open_api/content_switcher/_#{type}", locals: {
34
+ panels: @panels,
35
+ format: @format,
36
+ label: @label,
37
+ switcher: self,
38
+ theme_light: @theme_light,
39
+ }]
40
+ end
41
+
42
+ def id
43
+ @id ||= "s-#{SecureRandom.hex}"
44
+ end
45
+ end
46
+ end
47
+ end
48
+ end
49
+ end
@@ -24,6 +24,10 @@ module Nexmo
24
24
  end
25
25
 
26
26
  def content
27
+ if @content.is_a?(Nexmo::OAS::Renderer::Presenters::ContentSwitcher)
28
+ return @content.render
29
+ end
30
+
27
31
  if @content == :responses
28
32
  Nexmo::OAS::Renderer::ResponseParserDecorator
29
33
  .new(@schema)
@@ -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
@@ -31,17 +32,50 @@ module Nexmo
31
32
  def tab_panels
32
33
  @tab_panels ||= @response.split_schemas(@format).map.with_index do |schema, index|
33
34
  schema = handle_all_of(schema)
35
+ examples = examples_for_schema(schema)
34
36
  ResponseTab::Panel.new(
35
37
  schema: schema,
36
38
  index: index,
37
39
  format: @format,
38
- content: @content,
40
+ content: examples || @content,
39
41
  endpoint: @endpoint,
40
42
  theme_light: @theme_light
41
43
  )
42
44
  end
43
45
  end
44
46
 
47
+ def examples_for_schema(schema)
48
+ # If there are any examples, show them
49
+ examples = @response.raw.dig('content', @format, 'examples')
50
+ return nil unless @content == :responses && @format == 'application/json' && examples
51
+
52
+ example_switcher = Nexmo::OAS::Renderer::Presenters::ContentSwitcher.new(format: format, force_type: 'dropdown', theme_light: @theme_light)
53
+
54
+ has_visible_panel = false
55
+ examples.each_with_index do |v, _k|
56
+ # Only if the example key is listed in x-examples in the schema
57
+ next unless schema['x-examples']&.include?(v[0])
58
+
59
+ response = JSON.neat_generate(v[1], {
60
+ wrap: true,
61
+ after_colon: 1,
62
+ })
63
+
64
+ content = <<~HEREDOC
65
+ <pre class="pre-wrap language-json #{@theme_light ? 'Vlt-prism--dark' : ''} Vlt-prism--copy-disabled"><code>#{response}</code></pre>
66
+ HEREDOC
67
+
68
+ example_switcher.add_content(
69
+ title: v[0].titleize,
70
+ content: content,
71
+ tab_id: v[0],
72
+ active: !has_visible_panel
73
+ )
74
+ has_visible_panel = true
75
+ end
76
+ return example_switcher if example_switcher.panels.size.positive?
77
+ end
78
+
45
79
  def handle_all_of(schema)
46
80
  if schema['allOf']
47
81
  schema['allOf'].each do |p|
@@ -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
+ }();
@@ -53,6 +53,7 @@
53
53
  .oas-wrapper .oas-parameter-description {
54
54
  margin-left: 16px; }
55
55
  .oas-wrapper .oas-parameter-meta {
56
+ padding-bottom: 2px;
56
57
  border-bottom: 1px solid #ccc;
57
58
  margin-bottom: 4px; }
58
59
  .oas-wrapper .oas-parameter-nested {
@@ -3,7 +3,7 @@
3
3
  module Nexmo
4
4
  module OAS
5
5
  module Renderer
6
- VERSION = '2.1.3'
6
+ VERSION = '2.5.0'
7
7
  end
8
8
  end
9
9
  end
@@ -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 %>
@@ -1,6 +1,6 @@
1
1
  <div class="Vlt-grid">
2
2
  <div class="Vlt-col oas-left-panel header-row" style="padding-top:20px;">
3
- <a href="<%= @theme_link %>" class="Vlt-switch Vlt-switch--secondary" style="float:right;">
3
+ <a href="<%= @theme_link %>" class="Vlt-switch Vlt-switch--secondary" style="float:right;" title="colour theme switcher">
4
4
  <span class="Vlt-switch__slider"></span>
5
5
  </a>
6
6
 
@@ -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'] %> &raquo;</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
 
@@ -39,9 +39,10 @@
39
39
 
40
40
  <%
41
41
  # This can likely be better done as a presenter, but it works for now
42
- schema = endpoint.request_body.content[format]['schema']['oneOf']
42
+ request = endpoint.request_body.content[format]['schema']
43
+ schema = request['oneOf']
43
44
  %>
44
- <%= 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 } %>
45
46
  <%
46
47
  end
47
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
- <% tabs = Nexmo::OAS::Renderer::Presenters::ResponseTabs.new(format, response, content, endpoint, theme_light: @theme_light) %>
1
+ <%
2
+ tabs = Nexmo::OAS::Renderer::Presenters::ResponseTabs.new(format, response, content, endpoint, theme_light: @theme_light)
2
3
 
3
- <div class='Vlt-tabs js-format' data-format='<%= tabs.format %>'>
4
- <div class='Vlt-tabs__header' role='tablist' aria-label='Responses'>
5
- <% tabs.tab_links.each do |link| %>
6
- <div role='tab' class='<%= link.css_classes %>' <% if link.data_tab_link %>data-tab-link="<%= link.data_tab_link %>"<% end %>>
7
- <%= link.content %>
8
- </div>
9
- <% end %>
10
- </div>
11
- <div class='Vlt-tabs__content'>
12
- <% tabs.tab_panels.each do |panel| %>
13
- <div class='<%= panel.css_classes %>'>
14
- <%= erb *panel.content %>
15
- </div>
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
- panels.push({
29
- 'description' => schema['title'] || schema['description'],
30
- 'parameters' => schema['properties'],
31
- 'oneOf' => schema['oneOf'],
32
- 'x-tab-id' => schema['x-tab-id'] || schema['title'].parameterize,
33
- 'active' => index == 0
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
- <div class="Vlt-tabs js-format" data-format="<%= format %>">
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,24 @@
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") %>">
3
+ <%= label ? "#{label}: " : ""%><span class="Vlt-dropdown__selection"><%= panels[0]['title'] %></span>
4
+ </button></div>
5
+ <div class="Vlt-dropdown__panel">
6
+ <div data-tab-content="<%= switcher.id %>" class="Vlt-dropdown__panel__content">
7
+ <% panels.each do |panel| %>
8
+ <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>
9
+ <% end %>
10
+ </div>
11
+ </div>
12
+ </div>
13
+
14
+
15
+ <div class="js-format" data-format="<%= format %>">
16
+ <div id="<%= switcher.id %>" class="Vlt-js-tabs__content">
17
+ <% panels.each do |panel| %>
18
+ <div class="Vlt-js-tabs__panel <%= panel['active'] ? 'Vlt-js-tabs__panel_active' : '' %>">
19
+ <%= panel['content'] %>
20
+ </div>
21
+ <% end %>
22
+ </div>
23
+ </div>
24
+
@@ -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
+
@@ -21,6 +21,6 @@
21
21
  <% end %>
22
22
 
23
23
  <%= erb :'open_api/_webhooks', locals: { definition: definition } %>
24
-
24
+ <%= erb :'open_api/_errors', locals: {definition: definition } %>
25
25
  </div>
26
26
  </div>
@@ -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) }
@@ -39,7 +39,7 @@ Gem::Specification.new do |spec|
39
39
  spec.add_runtime_dependency 'nexmo_markdown_renderer', '~> 0.3'
40
40
  spec.add_runtime_dependency 'oas_parser', '~> 0.25.1'
41
41
  spec.add_runtime_dependency 'octicons_helper', '~> 8.2'
42
- spec.add_runtime_dependency 'redcarpet', '3.4.0'
42
+ spec.add_runtime_dependency 'redcarpet', '3.5.1'
43
43
  spec.add_runtime_dependency 'sass', '~> 3.1'
44
44
  spec.add_runtime_dependency 'shotgun', '~> 0.9'
45
45
  spec.add_runtime_dependency 'sinatra', '~> 2.0'
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.3
4
+ version: 2.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Fabian Rodriguez
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-08-28 00:00:00.000000000 Z
11
+ date: 2021-01-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activemodel
@@ -128,14 +128,14 @@ dependencies:
128
128
  requirements:
129
129
  - - '='
130
130
  - !ruby/object:Gem::Version
131
- version: 3.4.0
131
+ version: 3.5.1
132
132
  type: :runtime
133
133
  prerelease: false
134
134
  version_requirements: !ruby/object:Gem::Requirement
135
135
  requirements:
136
136
  - - '='
137
137
  - !ruby/object:Gem::Version
138
- version: 3.4.0
138
+ version: 3.5.1
139
139
  - !ruby/object:Gem::Dependency
140
140
  name: sass
141
141
  requirement: !ruby/object:Gem::Requirement
@@ -234,7 +234,7 @@ dependencies:
234
234
  - - "~>"
235
235
  - !ruby/object:Gem::Version
236
236
  version: '0.86'
237
- description:
237
+ description:
238
238
  email:
239
239
  - fabian.rodriguez@vonage.com
240
240
  executables:
@@ -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
@@ -374,7 +382,7 @@ licenses:
374
382
  metadata:
375
383
  homepage_uri: https://github.com/Nexmo/nexmo-oas-renderer
376
384
  source_code_uri: https://github.com/Nexmo/nexmo-oas-renderer
377
- post_install_message:
385
+ post_install_message:
378
386
  rdoc_options: []
379
387
  require_paths:
380
388
  - lib
@@ -389,9 +397,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
389
397
  - !ruby/object:Gem::Version
390
398
  version: '0'
391
399
  requirements: []
392
- rubyforge_project:
400
+ rubyforge_project:
393
401
  rubygems_version: 2.7.6.2
394
- signing_key:
402
+ signing_key:
395
403
  specification_version: 4
396
404
  summary: OpenAPI Specification renderer.
397
405
  test_files: []
@@ -1,9 +0,0 @@
1
- language: ruby
2
- cache: bundler
3
- rvm:
4
- - 2.5
5
- - 2.6
6
- - 2.7
7
- script:
8
- - bundle exec rspec
9
- - bundle exec rubocop