pulp_npm_client 0.1.0a3 → 0.1.0a4

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.
Files changed (94) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +1 -1
  3. data/README.md +8 -8
  4. data/docs/ContentPackagesApi.md +6 -4
  5. data/docs/DistributionsNpmApi.md +3 -3
  6. data/docs/NpmNpmDistribution.md +1 -3
  7. data/docs/NpmNpmDistributionResponse.md +1 -3
  8. data/docs/NpmNpmRemote.md +10 -8
  9. data/docs/NpmNpmRemoteResponse.md +8 -6
  10. data/docs/NpmNpmRepository.md +3 -1
  11. data/docs/NpmNpmRepositoryResponse.md +3 -1
  12. data/docs/NpmPackage.md +2 -0
  13. data/docs/PatchednpmNpmDistribution.md +1 -3
  14. data/docs/PatchednpmNpmRemote.md +10 -8
  15. data/docs/PatchednpmNpmRepository.md +3 -1
  16. data/docs/PulpNpmPackagesApi.md +1 -1
  17. data/docs/RemotesNpmApi.md +3 -3
  18. data/docs/Repair.md +17 -0
  19. data/docs/RepositoriesNpmApi.md +3 -3
  20. data/docs/RepositoriesNpmVersionsApi.md +7 -7
  21. data/docs/RepositoryAddRemoveContent.md +2 -2
  22. data/docs/RepositoryVersionResponse.md +2 -0
  23. data/lib/pulp_npm_client/api/content_packages_api.rb +23 -4
  24. data/lib/pulp_npm_client/api/distributions_npm_api.rb +8 -4
  25. data/lib/pulp_npm_client/api/pulp_npm_packages_api.rb +1 -1
  26. data/lib/pulp_npm_client/api/remotes_npm_api.rb +8 -4
  27. data/lib/pulp_npm_client/api/repositories_npm_api.rb +8 -4
  28. data/lib/pulp_npm_client/api/repositories_npm_versions_api.rb +17 -13
  29. data/lib/pulp_npm_client/api_client.rb +13 -12
  30. data/lib/pulp_npm_client/api_error.rb +1 -1
  31. data/lib/pulp_npm_client/configuration.rb +11 -3
  32. data/lib/pulp_npm_client/models/async_operation_response.rb +1 -1
  33. data/lib/pulp_npm_client/models/content_summary_response.rb +1 -1
  34. data/lib/pulp_npm_client/models/npm_npm_distribution.rb +44 -17
  35. data/lib/pulp_npm_client/models/npm_npm_distribution_response.rb +6 -17
  36. data/lib/pulp_npm_client/models/npm_npm_remote.rb +180 -10
  37. data/lib/pulp_npm_client/models/npm_npm_remote_response.rb +20 -8
  38. data/lib/pulp_npm_client/models/npm_npm_repository.rb +63 -2
  39. data/lib/pulp_npm_client/models/npm_npm_repository_response.rb +29 -2
  40. data/lib/pulp_npm_client/models/npm_package.rb +69 -2
  41. data/lib/pulp_npm_client/models/npm_package_response.rb +1 -1
  42. data/lib/pulp_npm_client/models/paginated_repository_version_response_list.rb +1 -1
  43. data/lib/pulp_npm_client/models/paginatednpm_npm_distribution_response_list.rb +1 -1
  44. data/lib/pulp_npm_client/models/paginatednpm_npm_remote_response_list.rb +1 -1
  45. data/lib/pulp_npm_client/models/paginatednpm_npm_repository_response_list.rb +1 -1
  46. data/lib/pulp_npm_client/models/paginatednpm_package_response_list.rb +1 -1
  47. data/lib/pulp_npm_client/models/patchednpm_npm_distribution.rb +36 -17
  48. data/lib/pulp_npm_client/models/patchednpm_npm_remote.rb +172 -10
  49. data/lib/pulp_npm_client/models/patchednpm_npm_repository.rb +59 -2
  50. data/lib/pulp_npm_client/models/policy_enum.rb +1 -1
  51. data/lib/pulp_npm_client/models/{repository_version.rb → repair.rb} +14 -13
  52. data/lib/pulp_npm_client/models/repository_add_remove_content.rb +3 -3
  53. data/lib/pulp_npm_client/models/repository_sync_url.rb +1 -1
  54. data/lib/pulp_npm_client/models/repository_version_response.rb +11 -2
  55. data/lib/pulp_npm_client/version.rb +2 -2
  56. data/lib/pulp_npm_client.rb +2 -3
  57. data/pulp_npm_client.gemspec +2 -2
  58. data/spec/api/content_packages_api_spec.rb +3 -2
  59. data/spec/api/distributions_npm_api_spec.rb +2 -2
  60. data/spec/api/pulp_npm_packages_api_spec.rb +1 -1
  61. data/spec/api/remotes_npm_api_spec.rb +2 -2
  62. data/spec/api/repositories_npm_api_spec.rb +2 -2
  63. data/spec/api/repositories_npm_versions_api_spec.rb +3 -3
  64. data/spec/api_client_spec.rb +2 -2
  65. data/spec/configuration_spec.rb +4 -4
  66. data/spec/models/async_operation_response_spec.rb +1 -1
  67. data/spec/models/content_summary_response_spec.rb +1 -1
  68. data/spec/models/npm_npm_distribution_response_spec.rb +1 -7
  69. data/spec/models/npm_npm_distribution_spec.rb +1 -7
  70. data/spec/models/npm_npm_remote_response_spec.rb +7 -1
  71. data/spec/models/npm_npm_remote_spec.rb +7 -1
  72. data/spec/models/npm_npm_repository_response_spec.rb +7 -1
  73. data/spec/models/npm_npm_repository_spec.rb +7 -1
  74. data/spec/models/npm_package_response_spec.rb +1 -1
  75. data/spec/models/npm_package_spec.rb +7 -1
  76. data/spec/models/paginated_repository_version_response_list_spec.rb +1 -1
  77. data/spec/models/paginatednpm_npm_distribution_response_list_spec.rb +1 -1
  78. data/spec/models/paginatednpm_npm_remote_response_list_spec.rb +1 -1
  79. data/spec/models/paginatednpm_npm_repository_response_list_spec.rb +1 -1
  80. data/spec/models/paginatednpm_package_response_list_spec.rb +1 -1
  81. data/spec/models/patchednpm_npm_distribution_spec.rb +1 -7
  82. data/spec/models/patchednpm_npm_remote_spec.rb +7 -1
  83. data/spec/models/patchednpm_npm_repository_spec.rb +7 -1
  84. data/spec/models/policy_enum_spec.rb +1 -1
  85. data/spec/models/{repository_version_spec.rb → repair_spec.rb} +8 -8
  86. data/spec/models/repository_add_remove_content_spec.rb +1 -1
  87. data/spec/models/repository_sync_url_spec.rb +1 -1
  88. data/spec/models/repository_version_response_spec.rb +7 -1
  89. data/spec/spec_helper.rb +1 -1
  90. metadata +37 -35
  91. data/docs/ContentSummary.md +0 -21
  92. data/docs/RepositoryVersion.md +0 -17
  93. data/lib/pulp_npm_client/models/content_summary.rb +0 -246
  94. data/spec/models/content_summary_spec.rb +0 -53
metadata CHANGED
@@ -1,29 +1,35 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pulp_npm_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0a3
4
+ version: 0.1.0a4
5
5
  platform: ruby
6
6
  authors:
7
7
  - OpenAPI-Generator
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-03-17 00:00:00.000000000 Z
11
+ date: 2022-06-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ">="
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '0.17'
20
+ - - "<"
18
21
  - !ruby/object:Gem::Version
19
- version: 0.14.0
22
+ version: 1.9.0
20
23
  type: :runtime
21
24
  prerelease: false
22
25
  version_requirements: !ruby/object:Gem::Requirement
23
26
  requirements:
24
- - - ">="
27
+ - - "~>"
28
+ - !ruby/object:Gem::Version
29
+ version: '0.17'
30
+ - - "<"
25
31
  - !ruby/object:Gem::Version
26
- version: 0.14.0
32
+ version: 1.9.0
27
33
  - !ruby/object:Gem::Dependency
28
34
  name: json
29
35
  requirement: !ruby/object:Gem::Requirement
@@ -76,7 +82,6 @@ files:
76
82
  - Rakefile
77
83
  - docs/AsyncOperationResponse.md
78
84
  - docs/ContentPackagesApi.md
79
- - docs/ContentSummary.md
80
85
  - docs/ContentSummaryResponse.md
81
86
  - docs/DistributionsNpmApi.md
82
87
  - docs/NpmNpmDistribution.md
@@ -98,11 +103,11 @@ files:
98
103
  - docs/PolicyEnum.md
99
104
  - docs/PulpNpmPackagesApi.md
100
105
  - docs/RemotesNpmApi.md
106
+ - docs/Repair.md
101
107
  - docs/RepositoriesNpmApi.md
102
108
  - docs/RepositoriesNpmVersionsApi.md
103
109
  - docs/RepositoryAddRemoveContent.md
104
110
  - docs/RepositorySyncURL.md
105
- - docs/RepositoryVersion.md
106
111
  - docs/RepositoryVersionResponse.md
107
112
  - git_push.sh
108
113
  - lib/pulp_npm_client.rb
@@ -116,7 +121,6 @@ files:
116
121
  - lib/pulp_npm_client/api_error.rb
117
122
  - lib/pulp_npm_client/configuration.rb
118
123
  - lib/pulp_npm_client/models/async_operation_response.rb
119
- - lib/pulp_npm_client/models/content_summary.rb
120
124
  - lib/pulp_npm_client/models/content_summary_response.rb
121
125
  - lib/pulp_npm_client/models/npm_npm_distribution.rb
122
126
  - lib/pulp_npm_client/models/npm_npm_distribution_response.rb
@@ -135,9 +139,9 @@ files:
135
139
  - lib/pulp_npm_client/models/patchednpm_npm_remote.rb
136
140
  - lib/pulp_npm_client/models/patchednpm_npm_repository.rb
137
141
  - lib/pulp_npm_client/models/policy_enum.rb
142
+ - lib/pulp_npm_client/models/repair.rb
138
143
  - lib/pulp_npm_client/models/repository_add_remove_content.rb
139
144
  - lib/pulp_npm_client/models/repository_sync_url.rb
140
- - lib/pulp_npm_client/models/repository_version.rb
141
145
  - lib/pulp_npm_client/models/repository_version_response.rb
142
146
  - lib/pulp_npm_client/version.rb
143
147
  - pulp_npm_client.gemspec
@@ -151,7 +155,6 @@ files:
151
155
  - spec/configuration_spec.rb
152
156
  - spec/models/async_operation_response_spec.rb
153
157
  - spec/models/content_summary_response_spec.rb
154
- - spec/models/content_summary_spec.rb
155
158
  - spec/models/npm_npm_distribution_response_spec.rb
156
159
  - spec/models/npm_npm_distribution_spec.rb
157
160
  - spec/models/npm_npm_remote_response_spec.rb
@@ -169,10 +172,10 @@ files:
169
172
  - spec/models/patchednpm_npm_remote_spec.rb
170
173
  - spec/models/patchednpm_npm_repository_spec.rb
171
174
  - spec/models/policy_enum_spec.rb
175
+ - spec/models/repair_spec.rb
172
176
  - spec/models/repository_add_remove_content_spec.rb
173
177
  - spec/models/repository_sync_url_spec.rb
174
178
  - spec/models/repository_version_response_spec.rb
175
- - spec/models/repository_version_spec.rb
176
179
  - spec/spec_helper.rb
177
180
  homepage: https://openapi-generator.tech
178
181
  licenses:
@@ -193,41 +196,40 @@ required_rubygems_version: !ruby/object:Gem::Requirement
193
196
  - !ruby/object:Gem::Version
194
197
  version: 1.3.1
195
198
  requirements: []
196
- rubygems_version: 3.0.3
199
+ rubygems_version: 3.0.3.1
197
200
  signing_key:
198
201
  specification_version: 4
199
202
  summary: Pulp 3 API Ruby Gem
200
203
  test_files:
204
+ - spec/api/remotes_npm_api_spec.rb
205
+ - spec/api/pulp_npm_packages_api_spec.rb
201
206
  - spec/api/distributions_npm_api_spec.rb
202
207
  - spec/api/repositories_npm_versions_api_spec.rb
203
- - spec/api/repositories_npm_api_spec.rb
204
208
  - spec/api/content_packages_api_spec.rb
205
- - spec/api/remotes_npm_api_spec.rb
206
- - spec/api/pulp_npm_packages_api_spec.rb
209
+ - spec/api/repositories_npm_api_spec.rb
207
210
  - spec/api_client_spec.rb
208
211
  - spec/configuration_spec.rb
209
- - spec/models/content_summary_spec.rb
210
- - spec/models/async_operation_response_spec.rb
211
- - spec/models/npm_npm_remote_response_spec.rb
212
- - spec/models/paginatednpm_npm_remote_response_list_spec.rb
213
- - spec/models/npm_npm_distribution_response_spec.rb
214
- - spec/models/npm_package_response_spec.rb
215
- - spec/models/npm_package_spec.rb
212
+ - spec/models/paginated_repository_version_response_list_spec.rb
216
213
  - spec/models/paginatednpm_package_response_list_spec.rb
217
- - spec/models/policy_enum_spec.rb
218
- - spec/models/paginatednpm_npm_distribution_response_list_spec.rb
219
- - spec/models/content_summary_response_spec.rb
214
+ - spec/models/paginatednpm_npm_repository_response_list_spec.rb
215
+ - spec/models/repair_spec.rb
216
+ - spec/models/npm_npm_remote_spec.rb
220
217
  - spec/models/patchednpm_npm_remote_spec.rb
221
- - spec/models/patchednpm_npm_repository_spec.rb
222
- - spec/models/repository_version_spec.rb
223
- - spec/models/paginated_repository_version_response_list_spec.rb
218
+ - spec/models/npm_npm_repository_response_spec.rb
219
+ - spec/models/patchednpm_npm_distribution_spec.rb
220
+ - spec/models/content_summary_response_spec.rb
224
221
  - spec/models/repository_add_remove_content_spec.rb
225
- - spec/models/npm_npm_distribution_spec.rb
226
- - spec/models/npm_npm_remote_spec.rb
227
- - spec/models/repository_version_response_spec.rb
222
+ - spec/models/policy_enum_spec.rb
228
223
  - spec/models/npm_npm_repository_spec.rb
224
+ - spec/models/patchednpm_npm_repository_spec.rb
225
+ - spec/models/npm_npm_distribution_spec.rb
226
+ - spec/models/async_operation_response_spec.rb
229
227
  - spec/models/repository_sync_url_spec.rb
230
- - spec/models/npm_npm_repository_response_spec.rb
231
- - spec/models/paginatednpm_npm_repository_response_list_spec.rb
232
- - spec/models/patchednpm_npm_distribution_spec.rb
228
+ - spec/models/paginatednpm_npm_distribution_response_list_spec.rb
229
+ - spec/models/npm_package_response_spec.rb
230
+ - spec/models/npm_npm_remote_response_spec.rb
231
+ - spec/models/repository_version_response_spec.rb
232
+ - spec/models/npm_package_spec.rb
233
+ - spec/models/paginatednpm_npm_remote_response_list_spec.rb
234
+ - spec/models/npm_npm_distribution_response_spec.rb
233
235
  - spec/spec_helper.rb
@@ -1,21 +0,0 @@
1
- # PulpNpmClient::ContentSummary
2
-
3
- ## Properties
4
-
5
- Name | Type | Description | Notes
6
- ------------ | ------------- | ------------- | -------------
7
- **added** | **Hash&lt;String, Object&gt;** | |
8
- **removed** | **Hash&lt;String, Object&gt;** | |
9
- **present** | **Hash&lt;String, Object&gt;** | |
10
-
11
- ## Code Sample
12
-
13
- ```ruby
14
- require 'PulpNpmClient'
15
-
16
- instance = PulpNpmClient::ContentSummary.new(added: null,
17
- removed: null,
18
- present: null)
19
- ```
20
-
21
-
@@ -1,17 +0,0 @@
1
- # PulpNpmClient::RepositoryVersion
2
-
3
- ## Properties
4
-
5
- Name | Type | Description | Notes
6
- ------------ | ------------- | ------------- | -------------
7
- **base_version** | **String** | A repository version whose content was used as the initial set of content for this repository version | [optional]
8
-
9
- ## Code Sample
10
-
11
- ```ruby
12
- require 'PulpNpmClient'
13
-
14
- instance = PulpNpmClient::RepositoryVersion.new(base_version: null)
15
- ```
16
-
17
-
@@ -1,246 +0,0 @@
1
- =begin
2
- #Pulp 3 API
3
-
4
- #Fetch, Upload, Organize, and Distribute Software Packages
5
-
6
- The version of the OpenAPI document: v3
7
- Contact: pulp-list@redhat.com
8
- Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.2.3
10
-
11
- =end
12
-
13
- require 'date'
14
-
15
- module PulpNpmClient
16
- # Serializer for the RepositoryVersion content summary
17
- class ContentSummary
18
- attr_accessor :added
19
-
20
- attr_accessor :removed
21
-
22
- attr_accessor :present
23
-
24
- # Attribute mapping from ruby-style variable name to JSON key.
25
- def self.attribute_map
26
- {
27
- :'added' => :'added',
28
- :'removed' => :'removed',
29
- :'present' => :'present'
30
- }
31
- end
32
-
33
- # Attribute type mapping.
34
- def self.openapi_types
35
- {
36
- :'added' => :'Hash<String, Object>',
37
- :'removed' => :'Hash<String, Object>',
38
- :'present' => :'Hash<String, Object>'
39
- }
40
- end
41
-
42
- # List of attributes with nullable: true
43
- def self.openapi_nullable
44
- Set.new([
45
- ])
46
- end
47
-
48
- # Initializes the object
49
- # @param [Hash] attributes Model attributes in the form of hash
50
- def initialize(attributes = {})
51
- if (!attributes.is_a?(Hash))
52
- fail ArgumentError, "The input argument (attributes) must be a hash in `PulpNpmClient::ContentSummary` initialize method"
53
- end
54
-
55
- # check to see if the attribute exists and convert string to symbol for hash key
56
- attributes = attributes.each_with_object({}) { |(k, v), h|
57
- if (!self.class.attribute_map.key?(k.to_sym))
58
- fail ArgumentError, "`#{k}` is not a valid attribute in `PulpNpmClient::ContentSummary`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
59
- end
60
- h[k.to_sym] = v
61
- }
62
-
63
- if attributes.key?(:'added')
64
- if (value = attributes[:'added']).is_a?(Hash)
65
- self.added = value
66
- end
67
- end
68
-
69
- if attributes.key?(:'removed')
70
- if (value = attributes[:'removed']).is_a?(Hash)
71
- self.removed = value
72
- end
73
- end
74
-
75
- if attributes.key?(:'present')
76
- if (value = attributes[:'present']).is_a?(Hash)
77
- self.present = value
78
- end
79
- end
80
- end
81
-
82
- # Show invalid properties with the reasons. Usually used together with valid?
83
- # @return Array for valid properties with the reasons
84
- def list_invalid_properties
85
- invalid_properties = Array.new
86
- if @added.nil?
87
- invalid_properties.push('invalid value for "added", added cannot be nil.')
88
- end
89
-
90
- if @removed.nil?
91
- invalid_properties.push('invalid value for "removed", removed cannot be nil.')
92
- end
93
-
94
- if @present.nil?
95
- invalid_properties.push('invalid value for "present", present cannot be nil.')
96
- end
97
-
98
- invalid_properties
99
- end
100
-
101
- # Check to see if the all the properties in the model are valid
102
- # @return true if the model is valid
103
- def valid?
104
- return false if @added.nil?
105
- return false if @removed.nil?
106
- return false if @present.nil?
107
- true
108
- end
109
-
110
- # Checks equality by comparing each attribute.
111
- # @param [Object] Object to be compared
112
- def ==(o)
113
- return true if self.equal?(o)
114
- self.class == o.class &&
115
- added == o.added &&
116
- removed == o.removed &&
117
- present == o.present
118
- end
119
-
120
- # @see the `==` method
121
- # @param [Object] Object to be compared
122
- def eql?(o)
123
- self == o
124
- end
125
-
126
- # Calculates hash code according to all attributes.
127
- # @return [Integer] Hash code
128
- def hash
129
- [added, removed, present].hash
130
- end
131
-
132
- # Builds the object from hash
133
- # @param [Hash] attributes Model attributes in the form of hash
134
- # @return [Object] Returns the model itself
135
- def self.build_from_hash(attributes)
136
- new.build_from_hash(attributes)
137
- end
138
-
139
- # Builds the object from hash
140
- # @param [Hash] attributes Model attributes in the form of hash
141
- # @return [Object] Returns the model itself
142
- def build_from_hash(attributes)
143
- return nil unless attributes.is_a?(Hash)
144
- self.class.openapi_types.each_pair do |key, type|
145
- if type =~ /\AArray<(.*)>/i
146
- # check to ensure the input is an array given that the attribute
147
- # is documented as an array but the input is not
148
- if attributes[self.class.attribute_map[key]].is_a?(Array)
149
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
150
- end
151
- elsif !attributes[self.class.attribute_map[key]].nil?
152
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
153
- end # or else data not found in attributes(hash), not an issue as the data can be optional
154
- end
155
-
156
- self
157
- end
158
-
159
- # Deserializes the data based on type
160
- # @param string type Data type
161
- # @param string value Value to be deserialized
162
- # @return [Object] Deserialized data
163
- def _deserialize(type, value)
164
- case type.to_sym
165
- when :DateTime
166
- DateTime.parse(value)
167
- when :Date
168
- Date.parse(value)
169
- when :String
170
- value.to_s
171
- when :Integer
172
- value.to_i
173
- when :Float
174
- value.to_f
175
- when :Boolean
176
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
177
- true
178
- else
179
- false
180
- end
181
- when :Object
182
- # generic object (usually a Hash), return directly
183
- value
184
- when /\AArray<(?<inner_type>.+)>\z/
185
- inner_type = Regexp.last_match[:inner_type]
186
- value.map { |v| _deserialize(inner_type, v) }
187
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
188
- k_type = Regexp.last_match[:k_type]
189
- v_type = Regexp.last_match[:v_type]
190
- {}.tap do |hash|
191
- value.each do |k, v|
192
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
193
- end
194
- end
195
- else # model
196
- PulpNpmClient.const_get(type).build_from_hash(value)
197
- end
198
- end
199
-
200
- # Returns the string representation of the object
201
- # @return [String] String presentation of the object
202
- def to_s
203
- to_hash.to_s
204
- end
205
-
206
- # to_body is an alias to to_hash (backward compatibility)
207
- # @return [Hash] Returns the object in the form of hash
208
- def to_body
209
- to_hash
210
- end
211
-
212
- # Returns the object in the form of hash
213
- # @return [Hash] Returns the object in the form of hash
214
- def to_hash
215
- hash = {}
216
- self.class.attribute_map.each_pair do |attr, param|
217
- value = self.send(attr)
218
- if value.nil?
219
- is_nullable = self.class.openapi_nullable.include?(attr)
220
- next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
221
- end
222
-
223
- hash[param] = _to_hash(value)
224
- end
225
- hash
226
- end
227
-
228
- # Outputs non-array value in the form of hash
229
- # For object, use to_hash. Otherwise, just return the value
230
- # @param [Object] value Any valid value
231
- # @return [Hash] Returns the value in the form of hash
232
- def _to_hash(value)
233
- if value.is_a?(Array)
234
- value.compact.map { |v| _to_hash(v) }
235
- elsif value.is_a?(Hash)
236
- {}.tap do |hash|
237
- value.each { |k, v| hash[k] = _to_hash(v) }
238
- end
239
- elsif value.respond_to? :to_hash
240
- value.to_hash
241
- else
242
- value
243
- end
244
- end
245
- end
246
- end
@@ -1,53 +0,0 @@
1
- =begin
2
- #Pulp 3 API
3
-
4
- #Fetch, Upload, Organize, and Distribute Software Packages
5
-
6
- The version of the OpenAPI document: v3
7
- Contact: pulp-list@redhat.com
8
- Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.2.3
10
-
11
- =end
12
-
13
- require 'spec_helper'
14
- require 'json'
15
- require 'date'
16
-
17
- # Unit tests for PulpNpmClient::ContentSummary
18
- # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
- # Please update as you see appropriate
20
- describe 'ContentSummary' do
21
- before do
22
- # run before each test
23
- @instance = PulpNpmClient::ContentSummary.new
24
- end
25
-
26
- after do
27
- # run after each test
28
- end
29
-
30
- describe 'test an instance of ContentSummary' do
31
- it 'should create an instance of ContentSummary' do
32
- expect(@instance).to be_instance_of(PulpNpmClient::ContentSummary)
33
- end
34
- end
35
- describe 'test attribute "added"' do
36
- it 'should work' do
37
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
38
- end
39
- end
40
-
41
- describe 'test attribute "removed"' do
42
- it 'should work' do
43
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
44
- end
45
- end
46
-
47
- describe 'test attribute "present"' do
48
- it 'should work' do
49
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
50
- end
51
- end
52
-
53
- end