ree_lib 1.0.6 → 1.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -3
- data/lib/ree_lib/packages/ree_swagger/package/ree_swagger/dto/endpoint_dto.rb +1 -0
- data/lib/ree_lib/packages/ree_swagger/package/ree_swagger/functions/build_endpoint_schema.rb +5 -2
- data/lib/ree_lib/packages/ree_swagger/spec/functions/build_endpoint_schema_spec.rb +8 -2
- data/lib/ree_lib/packages/ree_swagger/spec/functions/build_schema_spec.rb +1 -0
- data/lib/ree_lib/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: 956fffa1a41176330384decf8f4f3b45ce70801785ea5498a07e0cb0afdd6b0f
|
4
|
+
data.tar.gz: 4745a3465a5ad18a6353ba21a8ef62b13991cd3cfc0fde7bf05ec41c7e561433
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: afd9719357108c5bff745a3112c581f333de679e0ac9d41e02624d43f006584cdfec1080f40047be3fcfb816ea74275509ca2a841e718c06463e489d32e7a473
|
7
|
+
data.tar.gz: 398d3fc0469aa20e71d37eaaf6422c76f8a0a86d155d548199bff1867a27612f0602ea7919715efd1aaf4f479417a2f03e2254d2e9ff4ba09b97fd2d1250632a
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
ree_lib (1.0.
|
4
|
+
ree_lib (1.0.7)
|
5
5
|
binding_of_caller (~> 1.0.0)
|
6
6
|
i18n (~> 1.12.0)
|
7
7
|
loofah (~> 2.18.0)
|
@@ -36,8 +36,6 @@ GEM
|
|
36
36
|
crass (~> 1.0.2)
|
37
37
|
nokogiri (>= 1.5.9)
|
38
38
|
msgpack (1.5.4)
|
39
|
-
nokogiri (1.13.8-x86_64-darwin)
|
40
|
-
racc (~> 1.4)
|
41
39
|
nokogiri (1.13.8-x86_64-linux)
|
42
40
|
racc (~> 1.4)
|
43
41
|
oj (3.13.19)
|
data/lib/ree_lib/packages/ree_swagger/package/ree_swagger/functions/build_endpoint_schema.rb
CHANGED
@@ -14,7 +14,7 @@ class ReeSwagger::BuildEndpointSchema
|
|
14
14
|
METHODS_WITH_BODY = [:post, :put, :patch].freeze
|
15
15
|
MissingCasterError = Class.new(StandardError)
|
16
16
|
|
17
|
-
contract(EndpointDto =>
|
17
|
+
contract(EndpointDto => PathDto)
|
18
18
|
def call(endpoint)
|
19
19
|
path_params = []
|
20
20
|
|
@@ -103,12 +103,15 @@ class ReeSwagger::BuildEndpointSchema
|
|
103
103
|
responses: responses
|
104
104
|
}
|
105
105
|
|
106
|
+
method_schema[:summary] = endpoint.summary if endpoint.summary
|
107
|
+
method_schema[:description] = endpoint.description if endpoint.description
|
108
|
+
|
106
109
|
method_schema[:parameters] = parameters if parameters
|
107
110
|
method_schema[:requestBody] = request_body if request_body
|
108
111
|
|
109
112
|
schema = {endpoint.method => method_schema}
|
110
113
|
|
111
|
-
|
114
|
+
PathDto.new(
|
112
115
|
path: path,
|
113
116
|
schema: schema
|
114
117
|
)
|
@@ -66,7 +66,8 @@ RSpec.describe :build_endpoint_schema do
|
|
66
66
|
caster: caster,
|
67
67
|
serializer: serializer,
|
68
68
|
response_status: 200,
|
69
|
-
description:
|
69
|
+
description: "description",
|
70
|
+
summary: "summary",
|
70
71
|
errors: [
|
71
72
|
ReeSwagger::ErrorDto.new(
|
72
73
|
status: 400,
|
@@ -139,7 +140,9 @@ RSpec.describe :build_endpoint_schema do
|
|
139
140
|
401 => {
|
140
141
|
description: "- 401 error",
|
141
142
|
}
|
142
|
-
}
|
143
|
+
},
|
144
|
+
summary: "summary",
|
145
|
+
description: "description",
|
143
146
|
}
|
144
147
|
}
|
145
148
|
))
|
@@ -165,6 +168,7 @@ RSpec.describe :build_endpoint_schema do
|
|
165
168
|
serializer: nil,
|
166
169
|
response_status: 200,
|
167
170
|
description: nil,
|
171
|
+
summary: nil,
|
168
172
|
errors: []
|
169
173
|
))
|
170
174
|
|
@@ -224,6 +228,7 @@ RSpec.describe :build_endpoint_schema do
|
|
224
228
|
serializer: nil,
|
225
229
|
response_status: 200,
|
226
230
|
description: nil,
|
231
|
+
summary: nil,
|
227
232
|
errors: []
|
228
233
|
))
|
229
234
|
}.to raise_error(
|
@@ -245,6 +250,7 @@ RSpec.describe :build_endpoint_schema do
|
|
245
250
|
serializer: nil,
|
246
251
|
response_status: 200,
|
247
252
|
description: nil,
|
253
|
+
summary: nil,
|
248
254
|
errors: []
|
249
255
|
))
|
250
256
|
}.to raise_error(
|
data/lib/ree_lib/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ree_lib
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ruslan Gatiyatov
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-08-
|
11
|
+
date: 2022-08-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ree
|