active_json_schema 0.1.0 → 0.1.1
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.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6be2809c96e9242ac62081da7140052fd55d4aa8f58c889a99a3e18554c58b7b
|
4
|
+
data.tar.gz: 9030d26a2b56bd4a8208f5f6edf338decc41e8adfd1535eace3e4329234550d0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 31215b8f56b4ab78a8adadeed9bbd3760e624fee016670e897a9f9c36abe35f65a12eb8fe486704962d3394a0a067f0e13db4f813ebdf1f3bdfedcd4d298368b
|
7
|
+
data.tar.gz: f7840b4dd8161270cb66c3c48ead1e0826e12abc36a958d4ca02e651cb528acf0a0509ea2b071d8305c188cfc3796f29360dd7307e5457ae508709a6aeb2c11d
|
@@ -29,12 +29,6 @@ class ConvertsToJsonSchemaWithRefs
|
|
29
29
|
private
|
30
30
|
|
31
31
|
def properties_for(model_class, only, associations)
|
32
|
-
puts "properties_for(...)"
|
33
|
-
puts "model_class: #{model_class}"
|
34
|
-
puts "only: #{only}"
|
35
|
-
puts "associations: #{associations}"
|
36
|
-
puts
|
37
|
-
|
38
32
|
properties = {}
|
39
33
|
|
40
34
|
model_class.columns_hash.each do |column_name, column_info|
|
@@ -43,11 +37,8 @@ class ConvertsToJsonSchemaWithRefs
|
|
43
37
|
properties[column_name] = column_to_json_property(column_info)
|
44
38
|
end
|
45
39
|
|
46
|
-
puts "associations.each do |association_name, options|"
|
47
40
|
associations.each do |association_name, options|
|
48
|
-
puts "association_name: #{association_name}"
|
49
41
|
association = model_class.reflect_on_association(association_name)
|
50
|
-
puts "association: #{association}"
|
51
42
|
next unless association
|
52
43
|
|
53
44
|
definition_name = association.klass.name.underscore
|
@@ -72,9 +63,6 @@ class ConvertsToJsonSchemaWithRefs
|
|
72
63
|
end
|
73
64
|
|
74
65
|
def generate_definition(model_class, options)
|
75
|
-
puts "generate_definition(...)"
|
76
|
-
puts "model_class: #{model_class}"
|
77
|
-
puts "options: #{options}"
|
78
66
|
only = options[:only]
|
79
67
|
nested_associations = options[:associations] || {}
|
80
68
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: active_json_schema
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kaleb Lape
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-10-
|
11
|
+
date: 2024-10-09 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: ActiveJsonSchema extends ActiveRecord models to generate JSON Schema
|
14
14
|
representations, including support for associations.
|