acos_jekyll_openapi_helper 1.4.3 → 1.4.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/acos_jekyll_openapi.rb +15 -5
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2a40bc0f1850def91fb789ae62bab398bab43f3cc726a32b5ff0392c2b33760a
|
4
|
+
data.tar.gz: bf8e2c0fa31c6ffef260e92c49594b5a64a79cbf12deb32293814c0524370d85
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c4ac0ef5edb9422156548e2881fd5f0058077d98bd26f7d164cc7627189734b0157a737bd19df8ab5dfd83b69ba067c43e88af9e3818a0160eb37896af257031
|
7
|
+
data.tar.gz: cfd15f06fce7bdcede9032945ace499cd2d7bfe87e8e28d75b982601b178fa33a4ac3716e7010c7f05243d8b358ed90fbe175b964c94fa9e8a931b9ccfca26da
|
data/lib/acos_jekyll_openapi.rb
CHANGED
@@ -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
|
-
|
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
|