grape-oas 1.0.1 → 1.0.2

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: 54679fa806e8eae3cbff18605ccd3dd7e188e7a2cf774d92ea233172fefc94ef
4
- data.tar.gz: ee59342a9d6c9be4bb79cf081beaaf833fae65bdfbaf12b619765eb37d1119a8
3
+ metadata.gz: e0520e8f719a37c5e33b330a681a9e8da8b1c3a9b921aa245ef328d716bf2bd9
4
+ data.tar.gz: aa612915b60e40933256692bb9ad33b2dcf77bc1f68c52d2a9c32cd0befc0bff
5
5
  SHA512:
6
- metadata.gz: 21f0ab789f3812daa0fa3971d2bb9ad9693351ee2178c1a2ac9c3f3e706f51023c1bf67bdb220098a74af19cd3eb90c42521a8bdc9992ef7af8594089e58c897
7
- data.tar.gz: b6eef41e2c1eac91c3c41aa4e225f55a7650908d64133ec816e1e2c7bb3461282146020e6a181cc30156b85d11259ea2ae3aee50184e8b471420dbf0cd7df2ec
6
+ metadata.gz: 312f2f0c9dfae0735187b4b7e6ab1969c619e36d58b74e094d990354fdc827a809b49a2ab7ec910bb1e67ac586b9fa4da54742b2f2cd449cca289832e88e5ae3
7
+ data.tar.gz: 0e94d7856bc9e94c354b56196f8a77a1689f17281298dc56810de7792fc4d91988fe38f4943a98c9dbf855dae644a36ca01df376a3176210c6d1ef5764ff1db0
data/CHANGELOG.md CHANGED
@@ -6,6 +6,13 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
8
 
9
+
10
+ ## [1.0.2] - 2025-12-15
11
+
12
+ ### Fixes
13
+
14
+ - [#14](https://github.com/numbata/grape-oas/pull/14): Fix Response and ParamSchemaBuilder to use introspector registry instead of directly instantiating EntityIntrospector - [@numbata](https://github.com/numbata).
15
+
9
16
  ## [1.0.1] - 2025-12-15
10
17
 
11
18
  ### Fixes
data/grape-oas.gemspec CHANGED
@@ -21,7 +21,7 @@ Gem::Specification.new do |spec|
21
21
  "changelog_uri" => "#{spec.homepage}/blob/main/CHANGELOG.md",
22
22
  "documentation_uri" => "#{spec.homepage}#readme",
23
23
  "bug_tracker_uri" => "#{spec.homepage}/issues",
24
- "rubygems_mfa_required" => "true",
24
+ "rubygems_mfa_required" => "true"
25
25
  }
26
26
 
27
27
  spec.files = Dir["lib/**/*", "*.md", "LICENSE.txt", "grape-oas.gemspec"]
@@ -54,27 +54,27 @@ module GrapeOAS
54
54
 
55
55
  def build_entity_array_schema(spec, raw_type, doc_type)
56
56
  entity_type = resolve_entity_class(extract_entity_type_from_array(spec, raw_type, doc_type))
57
- items = entity_type ? Introspectors::EntityIntrospector.new(entity_type).build_schema : nil
57
+ items = entity_type ? GrapeOAS.introspectors.build_schema(entity_type, stack: [], registry: {}) : nil
58
58
  items ||= ApiModel::Schema.new(type: sanitize_type(extract_entity_type_from_array(spec, raw_type)))
59
59
  ApiModel::Schema.new(type: Constants::SchemaTypes::ARRAY, items: items)
60
60
  end
61
61
 
62
62
  def build_doc_entity_array_schema(doc_type)
63
63
  entity_class = resolve_entity_class(doc_type)
64
- items = Introspectors::EntityIntrospector.new(entity_class).build_schema
64
+ items = GrapeOAS.introspectors.build_schema(entity_class, stack: [], registry: {})
65
65
  ApiModel::Schema.new(type: Constants::SchemaTypes::ARRAY, items: items)
66
66
  end
67
67
 
68
68
  def build_entity_schema(type)
69
69
  entity_class = resolve_entity_class(type)
70
- Introspectors::EntityIntrospector.new(entity_class).build_schema
70
+ GrapeOAS.introspectors.build_schema(entity_class, stack: [], registry: {})
71
71
  end
72
72
 
73
73
  def build_elements_array_schema(spec)
74
74
  items_type = spec[:elements]
75
75
  entity = resolve_entity_class(items_type)
76
76
  items_schema = if entity
77
- Introspectors::EntityIntrospector.new(entity).build_schema
77
+ GrapeOAS.introspectors.build_schema(entity, stack: [], registry: {})
78
78
  else
79
79
  ApiModel::Schema.new(type: sanitize_type(items_type))
80
80
  end
@@ -183,7 +183,7 @@ module GrapeOAS
183
183
  def build_schema(entity_class)
184
184
  return GrapeOAS::ApiModel::Schema.new(type: Constants::SchemaTypes::STRING) unless entity_class
185
185
 
186
- GrapeOAS::Introspectors::EntityIntrospector.new(entity_class).build_schema
186
+ GrapeOAS.introspectors.build_schema(entity_class, stack: [], registry: {})
187
187
  end
188
188
 
189
189
  # Wraps schema with root element if configured via route_setting :swagger, root: true/'name'
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module GrapeOAS
4
- VERSION = "1.0.1"
4
+ VERSION = "1.0.2"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: grape-oas
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrei Subbota