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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6435a1a89e1206bbb9256d8b3f51c8b65116c7f4587c7a39da3e9abe1be80927
4
- data.tar.gz: 2803a3779d1c97ba0f03d46d747dfdec525305f5a5949db87f1c9a4f1396b825
3
+ metadata.gz: 956fffa1a41176330384decf8f4f3b45ce70801785ea5498a07e0cb0afdd6b0f
4
+ data.tar.gz: 4745a3465a5ad18a6353ba21a8ef62b13991cd3cfc0fde7bf05ec41c7e561433
5
5
  SHA512:
6
- metadata.gz: d374c9f45acc8d5ba2c06b8646fe3959235b7270ae5d95738b26017622a475c06dd5666592ac80e57a7a0217a3086fe8e474c1480a623352eee91e1340df467b
7
- data.tar.gz: 8b173afe2cdcc4b65f0b5424c9ed621c3f351206566ca801eb9edd1555ba8ff48532fcaa3f53407ecc78976b8c3a652ab4c0fb5e1555d2bbb63851b0b6a69911
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.6)
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)
@@ -9,6 +9,7 @@ class ReeSwagger::EndpointDto
9
9
  path: String,
10
10
  caster: Nilor[ReeMapper::Mapper],
11
11
  serializer: Nilor[ReeMapper::Mapper],
12
+ summary: Nilor[String],
12
13
  description: Nilor[String],
13
14
  response_status: Integer,
14
15
  response_description: Nilor[String],
@@ -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 => ReeSwagger::PathDto)
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
- ReeSwagger::PathDto.new(
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: nil,
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(
@@ -13,6 +13,7 @@ RSpec.describe :build_schema do
13
13
  serializer: nil,
14
14
  response_status: 200,
15
15
  description: nil,
16
+ summary: nil,
16
17
  errors: []
17
18
  )]
18
19
  )
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ReeLib
4
- VERSION = "1.0.6"
4
+ VERSION = "1.0.7"
5
5
  end
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.6
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-05 00:00:00.000000000 Z
11
+ date: 2022-08-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ree