pack_api 1.0.6 → 1.0.8

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: 60e98dc35dc970a330d8389e332c79e0b88a0286260603f1a06607be9aeae8f8
4
- data.tar.gz: 8f5293317ca533dfa471394a47967eb8a8d3af568e1d3f27fe544cd9251c304b
3
+ metadata.gz: 784af200098fcaa5ffa86674a586c11a9a3410f17b2658a46833d73272600f2f
4
+ data.tar.gz: 38b3eb6db6c72f6873ba9252fba69928fa56ee6357db5bc082deac4d00261e07
5
5
  SHA512:
6
- metadata.gz: ff0d306e37c0e1bd186cad1c71bfe992c41f22f9f2717aa4072b70734e4a1ad867af985e8732085eb1c8e2a3410ec9cc39a62496e62e26b5bf1816245b9cf79e
7
- data.tar.gz: 339a131ff33b1e817d1c18b7ac1ca948a5bc3355837d90f4f9b7a8596da88a0452decacbf518d23f525f27a91cc44d8c23e100dcf1b5c6753cbdd0a409d8b7dd
6
+ metadata.gz: 135a73317b615ed864d254c68ffaef8e52c80abfdfbed77a15fa6867c11474fd9bb93524899698b5d4981e8e6cf089c4e65cc6be6bddf0c51214e3c0567d9052
7
+ data.tar.gz: 29b2b95cab2ae33092c383b03992ccc3c3f0e464c54235c06e9ee3425b11d12ab7a1c830450a4b4320158d555e977c7da8e32485a178661271e585b2dac1d21a
@@ -87,9 +87,9 @@ module PackAPI::Mapping
87
87
  def normalize_association_reference(api_attribute, model_attribute)
88
88
  if accepts_nested_attributes_for?(model_attribute)
89
89
  api_attribute
90
- elsif resource_association?(model_attribute)
90
+ elsif resource_association?(model_attribute) && !model_attribute.to_s.end_with?('_id')
91
91
  normalize_resource_association_reference(api_attribute)
92
- elsif collection_association?(model_attribute)
92
+ elsif collection_association?(model_attribute) && !model_attribute.to_s.end_with?('_ids')
93
93
  normalize_collection_association_reference(api_attribute)
94
94
  else
95
95
  api_attribute
@@ -3,10 +3,9 @@
3
3
  module PackAPI::Types
4
4
  class BaseType < Dry::Struct
5
5
  @optional_attributes = []
6
- @filterable_attributes = {}
7
6
 
8
7
  def self.inherited(subclass)
9
- subclass.instance_variable_set(:@optional_attributes, [])
8
+ subclass.instance_variable_set(:@optional_attributes, @optional_attributes.dup)
10
9
  super
11
10
  end
12
11
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module PackAPI
4
- VERSION = "1.0.6"
4
+ VERSION = "1.0.8"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pack_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.6
4
+ version: 1.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Flytedesk