rspec-rails-api 0.8.0 → 0.8.2

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: bb2d9a9837952843bbacdc2b355dd3e1625060a114f609cf1f3396e33b5132d2
4
- data.tar.gz: f9f914d1a513f6a6453477cfa68f79b0842f7a6002a5ce55a97bd7705d068749
3
+ metadata.gz: 331b6d7af2333dde18fea74c45a4e07b01fae9d276540298eed0e7505423ae51
4
+ data.tar.gz: 1691d15f501cd1d9fd56059b3fea6c9c5b40e2fa21e29c5912ca30c34713b4ce
5
5
  SHA512:
6
- metadata.gz: a4514ec049d648ccd1ad00a441a0f1dd208f53b7e1a769efcbb46e8feb0b086cf0b336da138b643986292f1f04d0afe0827f2784f5faa2e7cb5ed4746d611c0d
7
- data.tar.gz: a9c1959eaa5596f6b1501fe11f0a325481efa074b6163edbd7f922bf423130f3171f19c3158d317514a54adeea6ffb29f9b8fcc4287e3c25165a217ec0397f37
6
+ metadata.gz: ef79c2fba59a70e1dbd9406360aa321bd59d289da466963cb54c74078dd1b60ad632e711491dfd4e869ce0fe912e8b4d0f30cdf125333ea49bb20691f3f354a9
7
+ data.tar.gz: bdc2ec91fcea8cd0b3a27bef42f9d83e7a6527c7ad3b4f096066f78eec50fccec35c2db23dbd067f5353dc4d1fed1ee5baf3a70118194a053538cca6f9f951ce
data/CHANGELOG.md CHANGED
@@ -18,6 +18,18 @@ Maintenance, in case of rework, dependencies change
18
18
 
19
19
  ## [Unreleased]
20
20
 
21
+ ## [0.8.2] - 2024-11-22
22
+
23
+ ### Fixed
24
+
25
+ - Fixed documentation generation of object's attributes when they are not passed as reference.
26
+
27
+ ## [0.8.1] - 2024-10-16
28
+
29
+ ### Fixed
30
+
31
+ - Fixed expansion of nested object attributes defined with a symbol
32
+
21
33
  ## [0.8.0] - 2024-09-28
22
34
 
23
35
  ### Added
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rspec-rails-api (0.8.0)
4
+ rspec-rails-api (0.8.2)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -41,9 +41,11 @@ module RSpec
41
41
  next unless %i[array object].include? config[:type]
42
42
 
43
43
  attribute = config[:attributes]
44
- next unless attribute.is_a? Symbol
45
-
46
- hash[field][:attributes] = expand_attribute attribute, entities
44
+ hash[field][:attributes] = if attribute.is_a? Symbol
45
+ expand_attribute attribute, entities
46
+ elsif @fields[field].attributes
47
+ @fields[field].attributes.expand_with entities
48
+ end
47
49
  end
48
50
  end
49
51
 
@@ -234,6 +234,8 @@ module RSpec
234
234
  property[:items] = { type: field.attributes }
235
235
  elsif field.type == :object && field.attributes.is_a?(Symbol)
236
236
  property = { '$ref' => "#/components/schemas/#{field.attributes}" }
237
+ elsif field.type == :object && field.attributes
238
+ property = { type: :object, properties: process_entity(field.attributes)[:properties] }
237
239
  elsif field.type == :array && field.attributes.is_a?(Symbol)
238
240
  property = { type: :array, items: { '$ref' => "#/components/schemas/#{field.attributes}" } }
239
241
  elsif field.type == :array && field.attributes
@@ -3,7 +3,7 @@
3
3
  module RSpec
4
4
  module Rails
5
5
  module Api
6
- VERSION = '0.8.0'
6
+ VERSION = '0.8.2'
7
7
  end
8
8
  end
9
9
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rspec-rails-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.0
4
+ version: 0.8.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Manuel Tancoigne
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-09-28 00:00:00.000000000 Z
11
+ date: 2024-11-22 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: |
14
14
  Create acceptance tests to check the Rails API responses and generate
@@ -69,7 +69,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
69
69
  - !ruby/object:Gem::Version
70
70
  version: '0'
71
71
  requirements: []
72
- rubygems_version: 3.4.15
72
+ rubygems_version: 3.3.7
73
73
  signing_key:
74
74
  specification_version: 4
75
75
  summary: Tests standard Rails API responses and generate doc