json-schema-docs 0.2.3 → 0.2.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/json-schema-docs/generator.rb +4 -4
- data/lib/json-schema-docs/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 684cd18461ad682ef182cf8d2c6408c7a1bc2b7bf9ffaafddfbd17e2bb1fb2cc
|
4
|
+
data.tar.gz: cc0ec2b04b37b844ad53bab5320a7dcf76253c948ee509885dcc582aca23f2ea
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 95abddf165facc04ba809711137759fd201e2f9c1f75b9c49962866d0e2e3047a8a28008fd4c363d3ebdc9df55b79f315df5ba8ebd1824cf385a0eaf8e08b67f
|
7
|
+
data.tar.gz: e49c01747fcaea115cda8d4492724213c5e3e6cedebb75335e92639afaf4583b3082175158fbde6d5b63e33f00b6d875f0a49b71d65015dadd280cb733923b5d
|
@@ -48,7 +48,7 @@ module JsonSchemaDocs
|
|
48
48
|
opts[:schemata] = schemata
|
49
49
|
|
50
50
|
contents = layout.result(OpenStruct.new(opts).instance_eval { binding })
|
51
|
-
write_file(type, resource, contents)
|
51
|
+
write_file(type, resource, schemata['title'], contents)
|
52
52
|
end
|
53
53
|
end
|
54
54
|
|
@@ -56,7 +56,7 @@ module JsonSchemaDocs
|
|
56
56
|
landing_page = instance_variable_get("@json_schema_#{name}_landing_page")
|
57
57
|
|
58
58
|
unless landing_page.nil?
|
59
|
-
write_file(:landing_page, name.to_s, landing_page, trim: false)
|
59
|
+
write_file(:landing_page, name.to_s, nil, landing_page, trim: false)
|
60
60
|
end
|
61
61
|
end
|
62
62
|
|
@@ -73,7 +73,7 @@ module JsonSchemaDocs
|
|
73
73
|
|
74
74
|
private
|
75
75
|
|
76
|
-
def write_file(type, name, contents, trim: true)
|
76
|
+
def write_file(type, name, title, contents, trim: true)
|
77
77
|
if type == :landing_page
|
78
78
|
if name == 'index'
|
79
79
|
path = @options[:output_dir]
|
@@ -89,7 +89,7 @@ module JsonSchemaDocs
|
|
89
89
|
|
90
90
|
FileUtils.mkdir_p(path)
|
91
91
|
|
92
|
-
meta = { type: type, title:
|
92
|
+
meta = { type: type, title: title, name: name }
|
93
93
|
if has_yaml?(contents)
|
94
94
|
# Split data
|
95
95
|
frontmatter, contents = split_into_metadata_and_contents(contents)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: json-schema-docs
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Garen Torikian
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-09-
|
11
|
+
date: 2019-09-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: prmd
|