acos_jekyll_openapi_helper 1.4.3 → 1.4.4

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 (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/acos_jekyll_openapi.rb +15 -5
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d00cea2080b6f56489bd291fc1f99f40b15d24fb4239069eeb1cac49ad3e80d4
4
- data.tar.gz: f9f43ac742804cf156780fc0c9b728f6aa552783067c680d5955efb45578c67e
3
+ metadata.gz: 2a40bc0f1850def91fb789ae62bab398bab43f3cc726a32b5ff0392c2b33760a
4
+ data.tar.gz: bf8e2c0fa31c6ffef260e92c49594b5a64a79cbf12deb32293814c0524370d85
5
5
  SHA512:
6
- metadata.gz: 690fb0719009b4690a8173b4fa4c23ab6bc644f536fbc3f58210b5694e8d4e474bb6d549699fc1f56d77705b9b5ea1b5dbfb428d4132cf6854babee6c02d2b82
7
- data.tar.gz: 5e5ae160424c995101aa7efb7e0fe9a85a45eb0cc53998a049f5127357cadd0eb2858d40b5cc92fdc26657bd1751465080c074d3d67baa7d8f5630a35d7ae6e8
6
+ metadata.gz: c4ac0ef5edb9422156548e2881fd5f0058077d98bd26f7d164cc7627189734b0157a737bd19df8ab5dfd83b69ba067c43e88af9e3818a0160eb37896af257031
7
+ data.tar.gz: cfd15f06fce7bdcede9032945ace499cd2d7bfe87e8e28d75b982601b178fa33a4ac3716e7010c7f05243d8b358ed90fbe175b964c94fa9e8a931b9ccfca26da
@@ -60,10 +60,20 @@ class AcosOpenApiHelper::PageEngine
60
60
  puts "Document title : %s" % docTitle
61
61
  sidebar = "%s_sidebar" % docFile
62
62
  menu = AcosOpenApiHelper::SidebarMenu.new()
63
+
64
+ if File.exists?("%s/%s_index.md" % [@output_path, docFile] )
65
+ _indexMenu = AcosOpenApiHelper::MenuItem.new("Overview %s " % docTitle, "%s_index" % docFile)
66
+ menu.add(_indexMenu)
67
+ cnt = cnt + 1
68
+ else
69
+ puts "No index file found for %s" % docFile
70
+ end
71
+
63
72
  @data['paths'].each do |path|
64
73
  _path = path[0] #path of swagger method
65
74
  _methods = @data['paths'][_path]
66
- writer = AcosOpenApiHelper::PageCreator.new(_path, @basePath, @output_path, @swaggerfile, sidebar, docFile)
75
+ #(path, basePath, output_path, swaggerfile, sidebar, docFile, component)
76
+ writer = AcosOpenApiHelper::PageCreator.new(_path, @basePath, @output_path, @swaggerfile, sidebar, docFile, _components)
67
77
  writer.write
68
78
  _permalink = AcosOpenApiHelper::PermalinkGenerator.create(_path, @swaggerfile)
69
79
  _menuItem = AcosOpenApiHelper::MenuItem.new(_path, _permalink)
@@ -180,11 +190,10 @@ class AcosOpenApiHelper::FileNameGenerator
180
190
  def fileName
181
191
  @docFileName
182
192
  end
183
-
184
193
  end
185
194
 
186
195
  class AcosOpenApiHelper::PageCreator
187
- def initialize(path, basePath, output_path, swaggerfile, sidebar, docFile)
196
+ def initialize(path, basePath, output_path, swaggerfile, sidebar, docFile, component)
188
197
  # puts "Initialize intput %s, %s, %s, %s" % [path, output_path, swaggerfile, sidebar]
189
198
  @path = path
190
199
  @output_path = output_path
@@ -208,6 +217,8 @@ class AcosOpenApiHelper::PageCreator
208
217
  "swaggerfile: %s" % @swaggerfileBase,
209
218
  "swaggerpath: paths",
210
219
  "swaggerkey: %s" % @path,
220
+ "swagger_components: %s" % component,
221
+ "components_file: %s" % docFile,
211
222
  "---",
212
223
  "{\% include swagger_json/get_path.md \%}"
213
224
  ]
@@ -246,5 +257,4 @@ class AcosOpenApiHelper::PageCreator
246
257
  f.puts(contentLines)
247
258
  end
248
259
  end
249
- end
250
-
260
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: acos_jekyll_openapi_helper
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.3
4
+ version: 1.4.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Acos AS