nexmo-oas-renderer 0.10.0 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (81) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +135 -0
  3. data/.travis.yml +1 -0
  4. data/CHANGELOG.md +15 -0
  5. data/Gemfile +2 -2
  6. data/Gemfile.lock +94 -74
  7. data/README.md +8 -0
  8. data/Rakefile +2 -2
  9. data/bin/console +3 -3
  10. data/lib/nexmo/oas/engine.rb +2 -0
  11. data/lib/nexmo/oas/renderer.rb +5 -5
  12. data/lib/nexmo/oas/renderer/app.rb +79 -40
  13. data/lib/nexmo/oas/renderer/config.ru +4 -2
  14. data/lib/nexmo/oas/renderer/decorators/response_parser_decorator.rb +18 -18
  15. data/lib/nexmo/oas/renderer/helpers/navigation.rb +2 -2
  16. data/lib/nexmo/oas/renderer/helpers/render.rb +2 -1
  17. data/lib/nexmo/oas/renderer/helpers/summary.rb +4 -1
  18. data/lib/nexmo/oas/renderer/helpers/url.rb +2 -0
  19. data/lib/nexmo/oas/renderer/presenters/api_specification.rb +2 -1
  20. data/lib/nexmo/oas/renderer/presenters/endpoint.rb +2 -0
  21. data/lib/nexmo/oas/renderer/presenters/groups.rb +4 -0
  22. data/lib/nexmo/oas/renderer/presenters/navigation.rb +2 -0
  23. data/lib/nexmo/oas/renderer/presenters/open_api_specification.rb +5 -2
  24. data/lib/nexmo/oas/renderer/presenters/request_body_raw.rb +141 -0
  25. data/lib/nexmo/oas/renderer/presenters/response_format.rb +4 -2
  26. data/lib/nexmo/oas/renderer/presenters/response_tab/link.rb +3 -0
  27. data/lib/nexmo/oas/renderer/presenters/response_tab/panel.rb +8 -5
  28. data/lib/nexmo/oas/renderer/presenters/response_tabs.rb +6 -2
  29. data/lib/nexmo/oas/renderer/presenters/versions.rb +11 -10
  30. data/lib/nexmo/oas/renderer/public/assets/javascripts/components/format.js +12 -7
  31. data/lib/nexmo/oas/renderer/public/assets/javascripts/nexmo-oas-renderer.js +51 -24
  32. data/lib/nexmo/oas/renderer/public/assets/javascripts/popper.min.js +5 -0
  33. data/lib/nexmo/oas/renderer/public/assets/javascripts/tooltip.min.js +5 -0
  34. data/lib/nexmo/oas/renderer/public/assets/javascripts/volta.accordion.js +301 -243
  35. data/lib/nexmo/oas/renderer/public/assets/javascripts/volta.tooltip.js +76 -0
  36. data/lib/nexmo/oas/renderer/public/assets/stylesheets/nexmo-oas-renderer.css +255 -823
  37. data/lib/nexmo/oas/renderer/public/assets/stylesheets/nexmo-oas-renderer.css.map +2 -2
  38. data/lib/nexmo/oas/renderer/public/assets/stylesheets/sass/api.scss +287 -90
  39. data/lib/nexmo/oas/renderer/public/assets/stylesheets/sass/style.scss +2 -6
  40. data/lib/nexmo/oas/renderer/public/assets/stylesheets/sass/themes/dark.scss +89 -0
  41. data/lib/nexmo/oas/renderer/public/assets/stylesheets/sass/themes/light.scss +68 -0
  42. data/lib/nexmo/oas/renderer/public/assets/stylesheets/volta-prism.min.css +1 -1
  43. data/lib/nexmo/oas/renderer/public/assets/stylesheets/volta.min.css +1 -1
  44. data/lib/nexmo/oas/renderer/services/oas_parser.rb +2 -0
  45. data/lib/nexmo/oas/renderer/services/open_api_definition_resolver.rb +3 -1
  46. data/lib/nexmo/oas/renderer/version.rb +3 -1
  47. data/lib/nexmo/oas/renderer/views/layouts/_head.erb +1 -0
  48. data/lib/nexmo/oas/renderer/views/layouts/_javascripts.erb +5 -4
  49. data/lib/nexmo/oas/renderer/views/layouts/open_api.erb +3 -1
  50. data/lib/nexmo/oas/renderer/views/open_api/_auth.erb +74 -0
  51. data/lib/nexmo/oas/renderer/views/open_api/_available_endpoints.erb +25 -0
  52. data/lib/nexmo/oas/renderer/views/open_api/_callback_endpoint.erb +18 -27
  53. data/lib/nexmo/oas/renderer/views/open_api/_callbacks.erb +5 -0
  54. data/lib/nexmo/oas/renderer/views/open_api/_endpoint.erb +39 -124
  55. data/lib/nexmo/oas/renderer/views/open_api/_header.erb +71 -0
  56. data/lib/nexmo/oas/renderer/views/open_api/_model.erb +31 -26
  57. data/lib/nexmo/oas/renderer/views/open_api/_navigation.erb +54 -78
  58. data/lib/nexmo/oas/renderer/views/open_api/_parameter_groups.erb +2 -5
  59. data/lib/nexmo/oas/renderer/views/open_api/_parameters.erb +98 -153
  60. data/lib/nexmo/oas/renderer/views/open_api/_request_json.erb +4 -0
  61. data/lib/nexmo/oas/renderer/views/open_api/_request_one_of.erb +70 -0
  62. data/lib/nexmo/oas/renderer/views/open_api/_request_single.erb +53 -0
  63. data/lib/nexmo/oas/renderer/views/open_api/_requests.erb +22 -0
  64. data/lib/nexmo/oas/renderer/views/open_api/_response_description_parameters.erb +88 -90
  65. data/lib/nexmo/oas/renderer/views/open_api/_response_descriptions.erb +17 -12
  66. data/lib/nexmo/oas/renderer/views/open_api/_response_fields.erb +1 -16
  67. data/lib/nexmo/oas/renderer/views/open_api/_response_tabs.erb +2 -2
  68. data/lib/nexmo/oas/renderer/views/open_api/_responses.erb +35 -0
  69. data/lib/nexmo/oas/renderer/views/open_api/_tabbed_parameters.erb +15 -4
  70. data/lib/nexmo/oas/renderer/views/open_api/_tabbed_single_parameter.erb +56 -0
  71. data/lib/nexmo/oas/renderer/views/open_api/_webhooks.erb +30 -0
  72. data/lib/nexmo/oas/renderer/views/open_api/show.erb +10 -115
  73. data/nexmo-oas-renderer.gemspec +26 -26
  74. metadata +59 -48
  75. data/lib/nexmo/oas/renderer/public/assets/javascripts/components/scroll.js +0 -21
  76. data/lib/nexmo/oas/renderer/public/assets/stylesheets/sass/core.scss +0 -137
  77. data/lib/nexmo/oas/renderer/public/assets/stylesheets/sass/navigation.scss +0 -102
  78. data/lib/nexmo/oas/renderer/public/assets/stylesheets/sass/nexmo.scss +0 -61
  79. data/lib/nexmo/oas/renderer/public/assets/stylesheets/sass/syntax.scss +0 -63
  80. data/lib/nexmo/oas/renderer/public/assets/stylesheets/sass/typography.scss +0 -248
  81. data/lib/nexmo/oas/renderer/public/assets/stylesheets/sass/volta-templates.scss +0 -119
@@ -1,6 +1,17 @@
1
1
  <%
2
2
  # Handle any cases where the top level of the oneOf is an allOf
3
- schemas = schema.map { |s| body.handle_all_of(s) }
3
+ schemas = schema.map do |s|
4
+ if s['allOf']
5
+ newSchema = body.handle_all_of(s)
6
+ s.each do |k,v|
7
+ newSchema[k] = v
8
+ end
9
+
10
+ next newSchema
11
+ end
12
+ s
13
+ end
14
+
4
15
 
5
16
  panels = []
6
17
 
@@ -18,16 +29,16 @@
18
29
  'description' => schema['title'] || schema['description'],
19
30
  'parameters' => schema['properties'],
20
31
  'oneOf' => schema['oneOf'],
21
- 'x-tab-id' => schema['x-tab-id'],
32
+ 'x-tab-id' => schema['x-tab-id'] || schema['title'].parameterize,
22
33
  'active' => index == 0
23
34
  })
24
35
  end
25
36
  %>
26
37
 
27
38
  <div class="Vlt-tabs js-format" data-format="<%= format %>">
28
- <div class="Vlt-tabs__header Vlt-tabs__header--bordered" role="tablist" aria-label="Responses">
39
+ <div class="Vlt-tabs__header" role="tablist" aria-label="Responses">
29
40
  <% panels.each do |panel| %>
30
- <div data-tab-link="<%= panel['x-tab-id'] %>" class="Vlt-tabs__link <%= panel['active'] ? 'Vlt-tabs__link_active' : '' %>">
41
+ <div role="tab" data-tab-link="<%= panel['x-tab-id'] %>" class="Vlt-tabs__link <%= panel['active'] ? 'Vlt-tabs__link_active' : '' %>">
31
42
  <%= panel['description'] %>
32
43
  </div>
33
44
  <% end %>
@@ -0,0 +1,56 @@
1
+ <%
2
+ # Handle any cases where the top level of the oneOf is an allOf
3
+ panels = []
4
+ oneOfId = "tabs-#{SecureRandom.hex}"
5
+
6
+ parameters.each_with_index do |parameter, index|
7
+ schema = parameter.raw
8
+ if schema['properties']
9
+ schema['properties'] = schema['properties'].map do |name, definition|
10
+ next name if name.instance_of?(OasParser::Property)
11
+ OasParser::Property.new(self, schema, name, definition)
12
+ end
13
+ .sort_by do |prop|
14
+ prop.required ? -1 : 1
15
+ end
16
+ end
17
+
18
+ panels.push({
19
+ 'description' => schema['title'] || schema['description'],
20
+ 'parameters' => schema['properties'],
21
+ 'oneOf' => schema['oneOf'],
22
+ 'x-tab-id' => "tab-#{SecureRandom.hex}",
23
+ 'active' => index == 0
24
+ })
25
+ end
26
+ %>
27
+
28
+ <div data-tab-content="<%= oneOfId %>" class="Vlt-btn-group">
29
+ <strong>Choose an option:</strong>
30
+ <ul class="Vlt-list Vlt-list--simple">
31
+ <% panels.each do |panel| %>
32
+ <li data-tab-link="<%= panel['x-tab-id'] %>" class="Vlt-js-tabs__link">
33
+ <%= panel['description'] %>
34
+ </li>
35
+ <% end %>
36
+ </ul>
37
+ </div>
38
+
39
+ <div id="<%= oneOfId %>">
40
+ <% panels.each do |panel| %>
41
+ <div class="Vlt-js-tabs__panel <%= panel['active'] ? 'Vlt-tabs__panel_active' : '' %>">
42
+ <%
43
+ # Nested oneOf?
44
+ if panel['oneOf']
45
+ %>
46
+ <%= erb :'open_api/_tabbed_parameters', locals: { parent: parent, body: body, schema: panel['oneOf'], format: format, callback: callback } %>
47
+ <%
48
+ else
49
+ %>
50
+
51
+ <%= erb :'open_api/_parameters', locals: { parent: parent, parameters: panel['parameters'], callback: callback } %>
52
+ <% end %>
53
+ </div>
54
+ <% end %>
55
+ </div>
56
+
@@ -0,0 +1,30 @@
1
+ <% if definition.raw['x-webhooks'] || definition.webhooks.size.positive? %>
2
+ <div class="Vlt-grid">
3
+ <div class="Vlt-col oas-left-panel" style="padding-bottom: 36px;">
4
+ <h2 id="webhooks">Webhooks</h2>
5
+
6
+ <p>
7
+ 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.
8
+ </p>
9
+ <p>To learn more about webhooks, see our <a href="/concepts/guides/webhooks">webhooks documentation</a></p>
10
+
11
+ <p>This API may send any of the webhooks documented below to the URL that you have configured. You must respond with a <code>200</code> or <code>204</code> HTTP response, or the requests will be retried</p>
12
+
13
+ </div>
14
+
15
+ <div class="Vlt-col oas-right-panel sm-hidden">&nbsp;</div>
16
+ </div>
17
+ <% end %>
18
+
19
+ <% if definition.raw['x-webhooks'] %>
20
+ <% definition.raw['x-webhooks'].each do |name, definition| %>
21
+ <% callback = OasParser::Callback.new(self, name, definition) %>
22
+ <%= erb :'open_api/_callback', locals: { callback: callback, webhook: true } %>
23
+ <% end %>
24
+ <% end %>
25
+
26
+ <% definition.webhooks.each do |webhook| %>
27
+ <% webhook.endpoints.each do |endpoint| %>
28
+ <%= erb :'open_api/_callback_endpoint', locals: { webhook: webhook, endpoint: endpoint } %>
29
+ <% end %>
30
+ <% end %>
@@ -1,131 +1,26 @@
1
1
  <% definition = @specification.definition %>
2
- <%= erb :'open_api/_navigation', locals: { definition: definition } %>
3
2
 
4
- <div class="Vlt-main Vlt-main--light Nxd-main" tabindex="2">
5
- <div class="Vlt-card Vlt-article Nxd-api">
6
- <div id="overview" class="Vlt-grid">
7
- <div class="Vlt-col Vlt-col--2of3 Nxd-api__docs">
8
- <div>
9
- <div class="Nxd-api__title">
10
- <h1>
11
- <%= definition.info['title'] %>
12
- </h1>
13
- <% if definition.info['x-label'] %>
14
- <div>
15
- <span class="Vlt-badge Vlt-badge--<%= definition.info['x-label'].parameterize %>">
16
- <%= definition.info['x-label'] %>
17
- </span>
18
- </div>
19
- <% end %>
20
- </div>
3
+ <div class="theme-<%= @theme %>">
4
+ <div class="oas-wrapper Vlt-article">
5
+ <%= erb :'open_api/_navigation', locals: { definition: definition } %>
6
+ <div class="oas-left-panel full-background sm-hidden">&nbsp;</div>
7
+ <div class="oas-right-panel full-background sm-hidden">&nbsp;</div>
21
8
 
22
- <% if definition.info['description'] %>
23
- <p><%= definition.info['description'].render_markdown %></p>
24
- <% end %>
25
-
26
- <div class="Vlt-grid">
27
- <div class="Vlt-col">
28
- <a href=<%= url("#{request.url}.#{definition.format}", params: request.params) %> class='Vlt-btn Vlt-btn--secondary Vlt-btn--app'>
29
- <svg><use xlink:href="/assets/symbol/volta-icons.svg#Vlt-icon-download" /></svg>
30
- Download OpenAPI 3 Definition
31
- </a>
32
- </div>
33
- <div class="Vlt-col Vlt-right">
34
- <a href="https://github.com/Nexmo/api-specification/blob/master/definitions/<%= @specification.definition_name %>.yml" class='Vlt-btn Vlt-btn--tertiary Vlt-btn--app Vlt-right Vlt-bg-grey-lighter'>
35
- <svg className="Vlt-icon Vlt-black">
36
- <use xlink:href="/assets/symbol/volta-icons.svg#Vlt-icon-github" />
37
- </svg>
38
- Improve this specification
39
- </a>
40
- </div>
41
- </div>
42
- </div>
43
- </div>
44
- <div class="Vlt-col Vlt-col--1of3 Nxd-api__code Nxd-api__code--install">
45
-
46
- <% if @specification.formats.size > 1 %>
47
- <div class="Nxd-api__code__header">
48
- <div class="Vlt-native-dropdown">
49
- <select class="js-format-selector">
50
- <% @specification.formats.each do |value, name| %>
51
- <option value="<%= value %>"><%= name %></option>
52
- <% end %>
53
- </select>
54
- </div>
55
- </div>
56
- <% end %>
57
-
58
- <% if @specification.available_versions && @specification.available_versions.count > 1 %>
59
- <div class="Vlt-callout Vlt-callout--shoutout Nxd-version">
60
- <i></i>
61
- <div class="Vlt-callout__content">
62
- <h4>There are multiple versions of this API available</h4>
63
- <p>
64
- <% @specification.available_versions.each do |v| %>
65
- <a href="/api/<%= v['name'] %>" <%= v['version'] == @specification.current_version ? 'class=active':'' %>>Version <%= v['version'] %></a> <%= '|' unless v == @specification.available_versions.last %>
66
- <% end %>
67
- </p>
68
- </div>
69
- </div>
70
- <% end %>
71
- </div>
72
- </div>
9
+ <%= erb :'open_api/_header', locals: { definition: definition } %>
73
10
 
74
11
  <% @specification.groups.each do |name, endpoints| %>
75
12
  <% if name %>
76
13
  <% group = definition.raw['tags'].select { |tag| tag['name'].capitalize == name.capitalize }.first %>
77
- <%= erb :'open_api/_model', locals: { group: group } %>
14
+ <%= erb :'open_api/_model', locals: { group: group, endpoints: endpoints } %>
78
15
  <% end %>
79
16
 
80
17
  <% endpoints.each do |endpoint| %>
81
- <%= erb :'open_api/_endpoint', locals: { endpoint: endpoint } %>
18
+ <%= erb :'open_api/_endpoint', locals: { definition: definition, endpoint: endpoint } %>
19
+ <%= erb :'open_api/_callbacks', locals: { endpoint: endpoint } %>
82
20
  <% end %>
83
21
  <% end %>
84
22
 
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>
23
+ <%= erb :'open_api/_webhooks', locals: { definition: definition } %>
99
24
 
100
- <div class="Vlt-col Vlt-col--1of3 Nxd-api__code">
101
- </div>
102
- </div>
103
- <% end %>
104
-
105
- <% if @specification.definition.raw['x-webhooks'] %>
106
- <% @specification.definition.raw['x-webhooks'].each do |name, definition| %>
107
- <%= erb :'open_api/_callback', locals: { callback: OasParser::Callback.new(self, name, definition), webhook: true } %>
108
- <% end %>
109
- <% end %>
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
-
117
- <% if @specification.definition_errors %>
118
- <div class="Vlt-grid" id="errors">
119
- <div class="Vlt-col Vlt-col--2of3 Nxd-api__docs">
120
- <div>
121
- <%= @specification.definition_errors %>
122
- </div>
123
- </div>
124
- <div class="Vlt-col Vlt-col--1of3 Nxd-api__code">
125
- <h5>Example response</h5>
126
- <%= Nexmo::OAS::Renderer::ResponseParserDecorator.new(definition.raw['components']['schemas']['Error']).html %>
127
- </div>
128
- </div>
129
- <% end %>
130
25
  </div>
131
26
  </div>
@@ -1,51 +1,51 @@
1
- lib = File.expand_path("../lib", __FILE__)
1
+ lib = File.expand_path('lib', __dir__)
2
2
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
- require "nexmo/oas/renderer/version"
3
+ require 'nexmo/oas/renderer/version'
4
4
 
5
5
  Gem::Specification.new do |spec|
6
- spec.name = "nexmo-oas-renderer"
6
+ spec.name = 'nexmo-oas-renderer'
7
7
  spec.version = Nexmo::OAS::Renderer::VERSION
8
- spec.authors = ["Fabian Rodriguez"]
9
- spec.email = ["fabian.rodriguez@vonage.com"]
8
+ spec.authors = ['Fabian Rodriguez']
9
+ spec.email = ['fabian.rodriguez@vonage.com']
10
10
 
11
- spec.summary = %q{OpenAPI Specification renderer.}
12
- spec.homepage = "https://github.com/Nexmo/nexmo-oas-renderer"
13
- spec.license = "MIT"
11
+ spec.summary = 'OpenAPI Specification renderer.'
12
+ spec.homepage = 'https://github.com/Nexmo/nexmo-oas-renderer'
13
+ spec.license = 'MIT'
14
14
 
15
15
  # Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
16
16
  # to allow pushing to a single host or delete this section to allow pushing to any host.
17
17
  if spec.respond_to?(:metadata)
18
- spec.metadata["homepage_uri"] = spec.homepage
19
- spec.metadata["source_code_uri"] = "https://github.com/Nexmo/nexmo-oas-renderer"
18
+ spec.metadata['homepage_uri'] = spec.homepage
19
+ spec.metadata['source_code_uri'] = 'https://github.com/Nexmo/nexmo-oas-renderer'
20
20
  else
21
- raise "RubyGems 2.0 or newer is required to protect against " \
22
- "public gem pushes."
21
+ raise 'RubyGems 2.0 or newer is required to protect against ' \
22
+ 'public gem pushes.'
23
23
  end
24
24
 
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
- spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
27
+ spec.files = Dir.chdir(File.expand_path(__dir__)) do
28
28
  `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
29
29
  end
30
- spec.bindir = "exe"
30
+ spec.bindir = 'exe'
31
31
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
32
- spec.require_paths = ["lib"]
32
+ spec.require_paths = ['lib']
33
33
 
34
- spec.add_runtime_dependency 'sinatra', '~> 2.0'
35
- spec.add_runtime_dependency 'shotgun', '~> 0.9'
36
- spec.add_runtime_dependency 'rouge', '2.0.7'
37
- spec.add_runtime_dependency 'oas_parser', '~> 0.25.1'
38
- spec.add_runtime_dependency 'neatjson', '~> 0.8'
34
+ spec.add_runtime_dependency 'activemodel', '~> 6.0'
39
35
  spec.add_runtime_dependency 'activesupport', '~> 6.0'
40
36
  spec.add_runtime_dependency 'banzai', '~> 0.1.2'
37
+ spec.add_runtime_dependency 'dotenv', '~> 2.7'
38
+ spec.add_runtime_dependency 'neatjson', '~> 0.8'
39
+ spec.add_runtime_dependency 'nexmo_markdown_renderer', '~> 0.3'
40
+ spec.add_runtime_dependency 'oas_parser', '~> 0.25.1'
41
41
  spec.add_runtime_dependency 'octicons_helper', '~> 8.2'
42
42
  spec.add_runtime_dependency 'redcarpet', '3.4.0'
43
43
  spec.add_runtime_dependency 'sass', '~> 3.1'
44
- spec.add_runtime_dependency 'activemodel', '~> 6.0'
45
- spec.add_runtime_dependency "dotenv", "~> 2.7"
46
- spec.add_runtime_dependency 'nexmo_markdown_renderer', '~> 0.2'
44
+ spec.add_runtime_dependency 'shotgun', '~> 0.9'
45
+ spec.add_runtime_dependency 'sinatra', '~> 2.0'
47
46
 
48
- spec.add_development_dependency "bundler", "~> 2.0"
49
- spec.add_development_dependency "rake", "~> 13.0"
50
- spec.add_development_dependency "rspec", "~> 3.8"
47
+ spec.add_development_dependency 'bundler', '~> 2.0'
48
+ spec.add_development_dependency 'rake', '~> 13.0'
49
+ spec.add_development_dependency 'rspec', '~> 3.8'
50
+ spec.add_development_dependency 'rubocop', '~> 0.86'
51
51
  end
metadata CHANGED
@@ -1,71 +1,71 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nexmo-oas-renderer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.0
4
+ version: 2.0.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-04-20 00:00:00.000000000 Z
11
+ date: 2020-07-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: sinatra
14
+ name: activemodel
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '2.0'
19
+ version: '6.0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '2.0'
26
+ version: '6.0'
27
27
  - !ruby/object:Gem::Dependency
28
- name: shotgun
28
+ name: activesupport
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '0.9'
33
+ version: '6.0'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '0.9'
40
+ version: '6.0'
41
41
  - !ruby/object:Gem::Dependency
42
- name: rouge
42
+ name: banzai
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - '='
45
+ - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: 2.0.7
47
+ version: 0.1.2
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - '='
52
+ - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: 2.0.7
54
+ version: 0.1.2
55
55
  - !ruby/object:Gem::Dependency
56
- name: oas_parser
56
+ name: dotenv
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: 0.25.1
61
+ version: '2.7'
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: 0.25.1
68
+ version: '2.7'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: neatjson
71
71
  requirement: !ruby/object:Gem::Requirement
@@ -81,33 +81,33 @@ dependencies:
81
81
  - !ruby/object:Gem::Version
82
82
  version: '0.8'
83
83
  - !ruby/object:Gem::Dependency
84
- name: activesupport
84
+ name: nexmo_markdown_renderer
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
87
  - - "~>"
88
88
  - !ruby/object:Gem::Version
89
- version: '6.0'
89
+ version: '0.3'
90
90
  type: :runtime
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
94
  - - "~>"
95
95
  - !ruby/object:Gem::Version
96
- version: '6.0'
96
+ version: '0.3'
97
97
  - !ruby/object:Gem::Dependency
98
- name: banzai
98
+ name: oas_parser
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
101
  - - "~>"
102
102
  - !ruby/object:Gem::Version
103
- version: 0.1.2
103
+ version: 0.25.1
104
104
  type: :runtime
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
108
  - - "~>"
109
109
  - !ruby/object:Gem::Version
110
- version: 0.1.2
110
+ version: 0.25.1
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: octicons_helper
113
113
  requirement: !ruby/object:Gem::Requirement
@@ -151,89 +151,89 @@ dependencies:
151
151
  - !ruby/object:Gem::Version
152
152
  version: '3.1'
153
153
  - !ruby/object:Gem::Dependency
154
- name: activemodel
154
+ name: shotgun
155
155
  requirement: !ruby/object:Gem::Requirement
156
156
  requirements:
157
157
  - - "~>"
158
158
  - !ruby/object:Gem::Version
159
- version: '6.0'
159
+ version: '0.9'
160
160
  type: :runtime
161
161
  prerelease: false
162
162
  version_requirements: !ruby/object:Gem::Requirement
163
163
  requirements:
164
164
  - - "~>"
165
165
  - !ruby/object:Gem::Version
166
- version: '6.0'
166
+ version: '0.9'
167
167
  - !ruby/object:Gem::Dependency
168
- name: dotenv
168
+ name: sinatra
169
169
  requirement: !ruby/object:Gem::Requirement
170
170
  requirements:
171
171
  - - "~>"
172
172
  - !ruby/object:Gem::Version
173
- version: '2.7'
173
+ version: '2.0'
174
174
  type: :runtime
175
175
  prerelease: false
176
176
  version_requirements: !ruby/object:Gem::Requirement
177
177
  requirements:
178
178
  - - "~>"
179
179
  - !ruby/object:Gem::Version
180
- version: '2.7'
180
+ version: '2.0'
181
181
  - !ruby/object:Gem::Dependency
182
- name: nexmo_markdown_renderer
182
+ name: bundler
183
183
  requirement: !ruby/object:Gem::Requirement
184
184
  requirements:
185
185
  - - "~>"
186
186
  - !ruby/object:Gem::Version
187
- version: '0.2'
188
- type: :runtime
187
+ version: '2.0'
188
+ type: :development
189
189
  prerelease: false
190
190
  version_requirements: !ruby/object:Gem::Requirement
191
191
  requirements:
192
192
  - - "~>"
193
193
  - !ruby/object:Gem::Version
194
- version: '0.2'
194
+ version: '2.0'
195
195
  - !ruby/object:Gem::Dependency
196
- name: bundler
196
+ name: rake
197
197
  requirement: !ruby/object:Gem::Requirement
198
198
  requirements:
199
199
  - - "~>"
200
200
  - !ruby/object:Gem::Version
201
- version: '2.0'
201
+ version: '13.0'
202
202
  type: :development
203
203
  prerelease: false
204
204
  version_requirements: !ruby/object:Gem::Requirement
205
205
  requirements:
206
206
  - - "~>"
207
207
  - !ruby/object:Gem::Version
208
- version: '2.0'
208
+ version: '13.0'
209
209
  - !ruby/object:Gem::Dependency
210
- name: rake
210
+ name: rspec
211
211
  requirement: !ruby/object:Gem::Requirement
212
212
  requirements:
213
213
  - - "~>"
214
214
  - !ruby/object:Gem::Version
215
- version: '13.0'
215
+ version: '3.8'
216
216
  type: :development
217
217
  prerelease: false
218
218
  version_requirements: !ruby/object:Gem::Requirement
219
219
  requirements:
220
220
  - - "~>"
221
221
  - !ruby/object:Gem::Version
222
- version: '13.0'
222
+ version: '3.8'
223
223
  - !ruby/object:Gem::Dependency
224
- name: rspec
224
+ name: rubocop
225
225
  requirement: !ruby/object:Gem::Requirement
226
226
  requirements:
227
227
  - - "~>"
228
228
  - !ruby/object:Gem::Version
229
- version: '3.8'
229
+ version: '0.86'
230
230
  type: :development
231
231
  prerelease: false
232
232
  version_requirements: !ruby/object:Gem::Requirement
233
233
  requirements:
234
234
  - - "~>"
235
235
  - !ruby/object:Gem::Version
236
- version: '3.8'
236
+ version: '0.86'
237
237
  description:
238
238
  email:
239
239
  - fabian.rodriguez@vonage.com
@@ -246,6 +246,7 @@ files:
246
246
  - ".github/workflows/push-docker-publish.yml"
247
247
  - ".gitignore"
248
248
  - ".rspec"
249
+ - ".rubocop.yml"
249
250
  - ".travis.yml"
250
251
  - CHANGELOG.md
251
252
  - CONTRIBUTING.md
@@ -274,6 +275,7 @@ files:
274
275
  - lib/nexmo/oas/renderer/presenters/groups.rb
275
276
  - lib/nexmo/oas/renderer/presenters/navigation.rb
276
277
  - lib/nexmo/oas/renderer/presenters/open_api_specification.rb
278
+ - lib/nexmo/oas/renderer/presenters/request_body_raw.rb
277
279
  - lib/nexmo/oas/renderer/presenters/response_format.rb
278
280
  - lib/nexmo/oas/renderer/presenters/response_tab/link.rb
279
281
  - lib/nexmo/oas/renderer/presenters/response_tab/panel.rb
@@ -292,25 +294,23 @@ files:
292
294
  - lib/nexmo/oas/renderer/public/assets/images/brands/ruby.svg
293
295
  - lib/nexmo/oas/renderer/public/assets/images/lost.svg
294
296
  - lib/nexmo/oas/renderer/public/assets/javascripts/components/format.js
295
- - lib/nexmo/oas/renderer/public/assets/javascripts/components/scroll.js
296
297
  - lib/nexmo/oas/renderer/public/assets/javascripts/nexmo-oas-renderer.js
298
+ - lib/nexmo/oas/renderer/public/assets/javascripts/popper.min.js
297
299
  - lib/nexmo/oas/renderer/public/assets/javascripts/prism.js
300
+ - lib/nexmo/oas/renderer/public/assets/javascripts/tooltip.min.js
298
301
  - lib/nexmo/oas/renderer/public/assets/javascripts/volta.accordion.js
299
302
  - lib/nexmo/oas/renderer/public/assets/javascripts/volta.core.js
300
303
  - lib/nexmo/oas/renderer/public/assets/javascripts/volta.modal.js
301
304
  - lib/nexmo/oas/renderer/public/assets/javascripts/volta.tabs.js
305
+ - lib/nexmo/oas/renderer/public/assets/javascripts/volta.tooltip.js
302
306
  - lib/nexmo/oas/renderer/public/assets/stylesheets/nexmo-oas-renderer.css
303
307
  - lib/nexmo/oas/renderer/public/assets/stylesheets/nexmo-oas-renderer.css.map
304
308
  - lib/nexmo/oas/renderer/public/assets/stylesheets/sass/api.scss
305
- - lib/nexmo/oas/renderer/public/assets/stylesheets/sass/core.scss
306
309
  - lib/nexmo/oas/renderer/public/assets/stylesheets/sass/mediaqueries.scss
307
- - lib/nexmo/oas/renderer/public/assets/stylesheets/sass/navigation.scss
308
- - lib/nexmo/oas/renderer/public/assets/stylesheets/sass/nexmo.scss
309
310
  - lib/nexmo/oas/renderer/public/assets/stylesheets/sass/style.scss
310
- - lib/nexmo/oas/renderer/public/assets/stylesheets/sass/syntax.scss
311
- - lib/nexmo/oas/renderer/public/assets/stylesheets/sass/typography.scss
311
+ - lib/nexmo/oas/renderer/public/assets/stylesheets/sass/themes/dark.scss
312
+ - lib/nexmo/oas/renderer/public/assets/stylesheets/sass/themes/light.scss
312
313
  - lib/nexmo/oas/renderer/public/assets/stylesheets/sass/variables.scss
313
- - lib/nexmo/oas/renderer/public/assets/stylesheets/sass/volta-templates.scss
314
314
  - lib/nexmo/oas/renderer/public/assets/stylesheets/volta-prism.min.css
315
315
  - lib/nexmo/oas/renderer/public/assets/stylesheets/volta.min.css
316
316
  - lib/nexmo/oas/renderer/public/assets/symbol/volta-icons.svg
@@ -341,19 +341,30 @@ files:
341
341
  - lib/nexmo/oas/renderer/views/layouts/_javascripts.erb
342
342
  - lib/nexmo/oas/renderer/views/layouts/api.erb
343
343
  - lib/nexmo/oas/renderer/views/layouts/open_api.erb
344
+ - lib/nexmo/oas/renderer/views/open_api/_auth.erb
345
+ - lib/nexmo/oas/renderer/views/open_api/_available_endpoints.erb
344
346
  - lib/nexmo/oas/renderer/views/open_api/_callback.erb
345
347
  - lib/nexmo/oas/renderer/views/open_api/_callback_endpoint.erb
348
+ - lib/nexmo/oas/renderer/views/open_api/_callbacks.erb
346
349
  - lib/nexmo/oas/renderer/views/open_api/_code_examples.erb
347
350
  - lib/nexmo/oas/renderer/views/open_api/_endpoint.erb
351
+ - lib/nexmo/oas/renderer/views/open_api/_header.erb
348
352
  - lib/nexmo/oas/renderer/views/open_api/_model.erb
349
353
  - lib/nexmo/oas/renderer/views/open_api/_navigation.erb
350
354
  - lib/nexmo/oas/renderer/views/open_api/_parameter_groups.erb
351
355
  - lib/nexmo/oas/renderer/views/open_api/_parameters.erb
356
+ - lib/nexmo/oas/renderer/views/open_api/_request_json.erb
357
+ - lib/nexmo/oas/renderer/views/open_api/_request_one_of.erb
358
+ - lib/nexmo/oas/renderer/views/open_api/_request_single.erb
359
+ - lib/nexmo/oas/renderer/views/open_api/_requests.erb
352
360
  - lib/nexmo/oas/renderer/views/open_api/_response_description_parameters.erb
353
361
  - lib/nexmo/oas/renderer/views/open_api/_response_descriptions.erb
354
362
  - lib/nexmo/oas/renderer/views/open_api/_response_fields.erb
355
363
  - lib/nexmo/oas/renderer/views/open_api/_response_tabs.erb
364
+ - lib/nexmo/oas/renderer/views/open_api/_responses.erb
356
365
  - lib/nexmo/oas/renderer/views/open_api/_tabbed_parameters.erb
366
+ - lib/nexmo/oas/renderer/views/open_api/_tabbed_single_parameter.erb
367
+ - lib/nexmo/oas/renderer/views/open_api/_webhooks.erb
357
368
  - lib/nexmo/oas/renderer/views/open_api/show.erb
358
369
  - lib/nexmo/oas/renderer/views/static/404.erb
359
370
  - nexmo-oas-renderer.gemspec