schema_builder 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: 34f99843493703facd287b3ea5ac299ad7b462394182ee8880753cbdd62603d1
4
- data.tar.gz: ab0dd50868be32927ea67d8da8e9781e29700943a0716f169173d55033e16a9a
3
+ metadata.gz: 0d35a3bd716fe257bfbc22fd93a175e55930205ed0fec9b0f0856621a0c72ac0
4
+ data.tar.gz: 9d875d6e74ba351225996b581b170d09f17a08443441cff1df0e190f0d802ff1
5
5
  SHA512:
6
- metadata.gz: 02c93c8bb8cf3daa715ec73d8fe6c5c13dbd1c38529a27f62f8bfc8e3ab7b6a8c1ba6f769228d5465c4487034203b0b0150c1f9bd19aa3366175e3109b012088
7
- data.tar.gz: ef00d4b8541113ca6d4b13b38f85b78ba8fb06def5b3d2bee16a6dab3e0e004c0a441b2d7e1670af455fd4388e2ad421057be907f66b3a0013ada2bfa26d0505
6
+ metadata.gz: 6a5121903a756577a8fdc7665d9f789bb036806025b3da767b0f2489dc520580bf58ce2c6a9e990bcc233b8a593299576ae5662d38663699a9205674e5b05452
7
+ data.tar.gz: aba2add0c9a105efc88d25df747a16ba56f453bf6bfe46a7d2a6cf825b1237ac16401ae990ddfbf76a2a92c287fa44eaa3ef21ef6c5dc6f849844fe82b340808
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- schema_builder (0.1.0)
4
+ schema_builder (0.1.1)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -1,8 +1,8 @@
1
1
  # json_schema.rb
2
2
  require 'json'
3
3
 
4
- # Define the JSONSchema class
5
- class JSONSchema
4
+ # Define the SchemaBuilder class
5
+ class SchemaBuilder
6
6
  # Initialize the class with the object and included fields
7
7
  def initialize(object, included)
8
8
  @object = object
@@ -36,7 +36,7 @@ class JSONSchema
36
36
  included_object = @included[item[:type]][item[:id]]
37
37
 
38
38
  # Generate a schema for the included object
39
- JSONSchema.new(included_object, @included).generate
39
+ SchemaBuilder.new(included_object, @included).generate
40
40
  end
41
41
  else
42
42
  # Nested object - generate a schema for it
@@ -44,7 +44,7 @@ class JSONSchema
44
44
  included_object = @included[value[:data][:type]][value[:data][:id]]
45
45
 
46
46
  # Generate a schema for the included object
47
- schema[:properties][property][:properties] = JSONSchema.new(included_object, @included).generate
47
+ schema[:properties][property][:properties] = SchemaBuilder.new(included_object, @included).generate
48
48
  end
49
49
 
50
50
  # Return the generated schema
@@ -53,8 +53,8 @@ class JSONSchema
53
53
  end
54
54
  end
55
55
 
56
- # # Define the JSONSchema gem module
57
- # module JSONSchema
56
+ # # Define the SchemaBuilder gem module
57
+ # module SchemaBuilder
58
58
  # # Define the gem version
59
59
  # VERSION = '1.0.0'
60
60
 
@@ -64,8 +64,8 @@ end
64
64
  # # Define the gem lib directory
65
65
  # LIB_DIR = File.join(ROOT_DIR, 'lib')
66
66
 
67
- # # Load the JSONSchema class
68
- # autoload :JSONSchema, File.join(LIB_DIR, 'json_schema')
67
+ # # Load the SchemaBuilder class
68
+ # autoload :SchemaBuilder, File.join(LIB_DIR, 'json_schema')
69
69
 
70
70
  # # Define the gem bin directory
71
71
  # BIN_DIR = File.join(ROOT_DIR, 'bin')
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SchemaBuilder
4
- VERSION = "0.1.0"
4
+ VERSION = "0.1.1"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: schema_builder
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - arikarim
@@ -41,7 +41,7 @@ files:
41
41
  - README.md
42
42
  - Rakefile
43
43
  - lib/schema_builder.rb
44
- - lib/schema_builder/builder.rb
44
+ - lib/schema_builder/schema_builder.rb
45
45
  - lib/schema_builder/version.rb
46
46
  - schema_builder.gemspec
47
47
  - sig/schema_builder.rbs