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:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e0520e8f719a37c5e33b330a681a9e8da8b1c3a9b921aa245ef328d716bf2bd9
|
|
4
|
+
data.tar.gz: aa612915b60e40933256692bb9ad33b2dcf77bc1f68c52d2a9c32cd0befc0bff
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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 ?
|
|
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 =
|
|
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
|
-
|
|
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
|
-
|
|
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
|
|
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'
|
data/lib/grape_oas/version.rb
CHANGED