pulp_gem_client 0.6.0 → 0.6.2
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 +4 -4
- data/README.md +11 -8
- data/docs/AsyncOperationResponse.md +8 -7
- data/docs/ContentGemApi.md +118 -66
- data/docs/ContentSummaryResponse.md +12 -11
- data/docs/DistributionsGemApi.md +388 -183
- data/docs/GemGemContentResponse.md +32 -29
- data/docs/GemGemDistribution.md +22 -21
- data/docs/GemGemDistributionResponse.md +34 -29
- data/docs/GemGemPublication.md +10 -9
- data/docs/GemGemPublicationResponse.md +18 -15
- data/docs/GemGemRemote.md +54 -53
- data/docs/GemGemRemoteResponse.md +54 -51
- data/docs/GemGemRemoteResponseHiddenFieldsInner.md +20 -0
- data/docs/GemGemRepository.md +16 -15
- data/docs/GemGemRepositoryResponse.md +28 -25
- data/docs/MyPermissionsResponse.md +8 -7
- data/docs/NestedRole.md +12 -11
- data/docs/NestedRoleResponse.md +12 -11
- data/docs/ObjectRolesResponse.md +8 -7
- data/docs/PaginatedRepositoryVersionResponseList.md +14 -13
- data/docs/PaginatedgemGemContentResponseList.md +14 -13
- data/docs/PaginatedgemGemDistributionResponseList.md +14 -13
- data/docs/PaginatedgemGemPublicationResponseList.md +14 -13
- data/docs/PaginatedgemGemRemoteResponseList.md +14 -13
- data/docs/PaginatedgemGemRepositoryResponseList.md +14 -13
- data/docs/PatchedgemGemDistribution.md +22 -21
- data/docs/PatchedgemGemRemote.md +54 -53
- data/docs/PatchedgemGemRepository.md +16 -15
- data/docs/PolicyEnum.md +4 -5
- data/docs/PublicationsGemApi.md +271 -132
- data/docs/RemotesGemApi.md +392 -185
- data/docs/Repair.md +8 -7
- data/docs/RepositoriesGemApi.md +449 -210
- data/docs/RepositoriesGemVersionsApi.md +155 -83
- data/docs/RepositoryAddRemoveContent.md +12 -11
- data/docs/RepositorySyncURL.md +10 -9
- data/docs/RepositoryVersionResponse.md +22 -19
- data/docs/SetLabel.md +10 -9
- data/docs/SetLabelResponse.md +10 -9
- data/docs/UnsetLabel.md +8 -7
- data/docs/UnsetLabelResponse.md +10 -9
- data/lib/pulp_gem_client/api/content_gem_api.rb +31 -22
- data/lib/pulp_gem_client/api/distributions_gem_api.rb +94 -58
- data/lib/pulp_gem_client/api/publications_gem_api.rb +81 -58
- data/lib/pulp_gem_client/api/remotes_gem_api.rb +109 -70
- data/lib/pulp_gem_client/api/repositories_gem_api.rb +116 -72
- data/lib/pulp_gem_client/api/repositories_gem_versions_api.rb +50 -37
- data/lib/pulp_gem_client/api_client.rb +137 -102
- data/lib/pulp_gem_client/api_error.rb +2 -1
- data/lib/pulp_gem_client/configuration.rb +162 -21
- data/lib/pulp_gem_client/models/async_operation_response.rb +32 -22
- data/lib/pulp_gem_client/models/content_summary_response.rb +36 -22
- data/lib/pulp_gem_client/models/gem_gem_content_response.rb +45 -25
- data/lib/pulp_gem_client/models/gem_gem_distribution.rb +34 -22
- data/lib/pulp_gem_client/models/gem_gem_distribution_response.rb +57 -25
- data/lib/pulp_gem_client/models/gem_gem_publication.rb +30 -22
- data/lib/pulp_gem_client/models/gem_gem_publication_response.rb +43 -25
- data/lib/pulp_gem_client/models/gem_gem_remote.rb +56 -22
- data/lib/pulp_gem_client/models/gem_gem_remote_response.rb +70 -26
- data/lib/pulp_gem_client/models/{gem_gem_remote_response_hidden_fields.rb → gem_gem_remote_response_hidden_fields_inner.rb} +37 -25
- data/lib/pulp_gem_client/models/gem_gem_repository.rb +32 -22
- data/lib/pulp_gem_client/models/gem_gem_repository_response.rb +45 -25
- data/lib/pulp_gem_client/models/my_permissions_response.rb +32 -22
- data/lib/pulp_gem_client/models/nested_role.rb +32 -22
- data/lib/pulp_gem_client/models/nested_role_response.rb +32 -22
- data/lib/pulp_gem_client/models/object_roles_response.rb +32 -22
- data/lib/pulp_gem_client/models/paginated_repository_version_response_list.rb +34 -22
- data/lib/pulp_gem_client/models/paginatedgem_gem_content_response_list.rb +34 -22
- data/lib/pulp_gem_client/models/paginatedgem_gem_distribution_response_list.rb +34 -22
- data/lib/pulp_gem_client/models/paginatedgem_gem_publication_response_list.rb +34 -22
- data/lib/pulp_gem_client/models/paginatedgem_gem_remote_response_list.rb +34 -22
- data/lib/pulp_gem_client/models/paginatedgem_gem_repository_response_list.rb +34 -22
- data/lib/pulp_gem_client/models/patchedgem_gem_distribution.rb +40 -24
- data/lib/pulp_gem_client/models/patchedgem_gem_remote.rb +62 -24
- data/lib/pulp_gem_client/models/patchedgem_gem_repository.rb +35 -23
- data/lib/pulp_gem_client/models/policy_enum.rb +8 -4
- data/lib/pulp_gem_client/models/repair.rb +30 -22
- data/lib/pulp_gem_client/models/repository_add_remove_content.rb +31 -23
- data/lib/pulp_gem_client/models/repository_sync_url.rb +30 -22
- data/lib/pulp_gem_client/models/repository_version_response.rb +44 -26
- data/lib/pulp_gem_client/models/set_label.rb +34 -22
- data/lib/pulp_gem_client/models/set_label_response.rb +34 -22
- data/lib/pulp_gem_client/models/unset_label.rb +32 -22
- data/lib/pulp_gem_client/models/unset_label_response.rb +32 -22
- data/lib/pulp_gem_client/version.rb +2 -2
- data/lib/pulp_gem_client.rb +2 -3
- data/pulp_gem_client.gemspec +9 -6
- data/spec/api/content_gem_api_spec.rb +9 -8
- data/spec/api/distributions_gem_api_spec.rb +15 -14
- data/spec/api/publications_gem_api_spec.rb +22 -20
- data/spec/api/remotes_gem_api_spec.rb +22 -20
- data/spec/api/repositories_gem_api_spec.rb +19 -18
- data/spec/api/repositories_gem_versions_api_spec.rb +16 -14
- data/spec/models/async_operation_response_spec.rb +7 -12
- data/spec/models/content_summary_response_spec.rb +9 -14
- data/spec/models/gem_gem_content_response_spec.rb +24 -23
- data/spec/models/gem_gem_distribution_response_spec.rb +30 -23
- data/spec/models/gem_gem_distribution_spec.rb +14 -19
- data/spec/models/gem_gem_publication_response_spec.rb +17 -16
- data/spec/models/gem_gem_publication_spec.rb +8 -13
- data/spec/models/{gem_gem_remote_response_hidden_fields_spec.rb → gem_gem_remote_response_hidden_fields_inner_spec.rb} +11 -16
- data/spec/models/gem_gem_remote_response_spec.rb +35 -34
- data/spec/models/gem_gem_remote_spec.rb +30 -35
- data/spec/models/gem_gem_repository_response_spec.rb +22 -21
- data/spec/models/gem_gem_repository_spec.rb +11 -16
- data/spec/models/my_permissions_response_spec.rb +7 -12
- data/spec/models/nested_role_response_spec.rb +9 -14
- data/spec/models/nested_role_spec.rb +9 -14
- data/spec/models/object_roles_response_spec.rb +7 -12
- data/spec/models/paginated_repository_version_response_list_spec.rb +10 -15
- data/spec/models/paginatedgem_gem_content_response_list_spec.rb +10 -15
- data/spec/models/paginatedgem_gem_distribution_response_list_spec.rb +10 -15
- data/spec/models/paginatedgem_gem_publication_response_list_spec.rb +10 -15
- data/spec/models/paginatedgem_gem_remote_response_list_spec.rb +10 -15
- data/spec/models/paginatedgem_gem_repository_response_list_spec.rb +10 -15
- data/spec/models/patchedgem_gem_distribution_spec.rb +14 -19
- data/spec/models/patchedgem_gem_remote_spec.rb +30 -35
- data/spec/models/patchedgem_gem_repository_spec.rb +11 -16
- data/spec/models/policy_enum_spec.rb +6 -11
- data/spec/models/repair_spec.rb +7 -12
- data/spec/models/repository_add_remove_content_spec.rb +9 -14
- data/spec/models/repository_sync_url_spec.rb +8 -13
- data/spec/models/repository_version_response_spec.rb +19 -18
- data/spec/models/set_label_response_spec.rb +8 -13
- data/spec/models/set_label_spec.rb +8 -13
- data/spec/models/unset_label_response_spec.rb +8 -13
- data/spec/models/unset_label_spec.rb +7 -12
- data/spec/spec_helper.rb +1 -1
- metadata +80 -60
- data/docs/GemGemContent.md +0 -21
- data/docs/GemGemRemoteResponseHiddenFields.md +0 -19
- data/lib/pulp_gem_client/models/gem_gem_content.rb +0 -228
- data/spec/api_client_spec.rb +0 -188
- data/spec/configuration_spec.rb +0 -42
- data/spec/models/gem_gem_content_spec.rb +0 -53
|
@@ -6,11 +6,12 @@
|
|
|
6
6
|
The version of the OpenAPI document: v3
|
|
7
7
|
Contact: pulp-list@redhat.com
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
|
-
|
|
9
|
+
Generator version: 7.10.0
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
13
13
|
require 'date'
|
|
14
|
+
require 'time'
|
|
14
15
|
|
|
15
16
|
module PulpGemClient
|
|
16
17
|
# Serializer for synchronously setting a label.
|
|
@@ -27,6 +28,11 @@ module PulpGemClient
|
|
|
27
28
|
}
|
|
28
29
|
end
|
|
29
30
|
|
|
31
|
+
# Returns all the JSON keys this model knows about
|
|
32
|
+
def self.acceptable_attributes
|
|
33
|
+
attribute_map.values
|
|
34
|
+
end
|
|
35
|
+
|
|
30
36
|
# Attribute type mapping.
|
|
31
37
|
def self.openapi_types
|
|
32
38
|
{
|
|
@@ -59,16 +65,21 @@ module PulpGemClient
|
|
|
59
65
|
|
|
60
66
|
if attributes.key?(:'key')
|
|
61
67
|
self.key = attributes[:'key']
|
|
68
|
+
else
|
|
69
|
+
self.key = nil
|
|
62
70
|
end
|
|
63
71
|
|
|
64
72
|
if attributes.key?(:'value')
|
|
65
73
|
self.value = attributes[:'value']
|
|
74
|
+
else
|
|
75
|
+
self.value = nil
|
|
66
76
|
end
|
|
67
77
|
end
|
|
68
78
|
|
|
69
79
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
70
80
|
# @return Array for valid properties with the reasons
|
|
71
81
|
def list_invalid_properties
|
|
82
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
72
83
|
invalid_properties = Array.new
|
|
73
84
|
if @key.nil?
|
|
74
85
|
invalid_properties.push('invalid value for "key", key cannot be nil.')
|
|
@@ -85,6 +96,7 @@ module PulpGemClient
|
|
|
85
96
|
# Check to see if the all the properties in the model are valid
|
|
86
97
|
# @return true if the model is valid
|
|
87
98
|
def valid?
|
|
99
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
88
100
|
return false if @key.nil?
|
|
89
101
|
return false if @key !~ Regexp.new(/^[-a-zA-Z0-9_]+$/)
|
|
90
102
|
true
|
|
@@ -130,37 +142,33 @@ module PulpGemClient
|
|
|
130
142
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
131
143
|
# @return [Object] Returns the model itself
|
|
132
144
|
def self.build_from_hash(attributes)
|
|
133
|
-
new.build_from_hash(attributes)
|
|
134
|
-
end
|
|
135
|
-
|
|
136
|
-
# Builds the object from hash
|
|
137
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
|
138
|
-
# @return [Object] Returns the model itself
|
|
139
|
-
def build_from_hash(attributes)
|
|
140
145
|
return nil unless attributes.is_a?(Hash)
|
|
141
|
-
|
|
142
|
-
|
|
146
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
147
|
+
transformed_hash = {}
|
|
148
|
+
openapi_types.each_pair do |key, type|
|
|
149
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
150
|
+
transformed_hash["#{key}"] = nil
|
|
151
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
143
152
|
# check to ensure the input is an array given that the attribute
|
|
144
153
|
# is documented as an array but the input is not
|
|
145
|
-
if attributes[
|
|
146
|
-
|
|
154
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
155
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
147
156
|
end
|
|
148
|
-
elsif !attributes[
|
|
149
|
-
|
|
150
|
-
end
|
|
157
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
158
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
159
|
+
end
|
|
151
160
|
end
|
|
152
|
-
|
|
153
|
-
self
|
|
161
|
+
new(transformed_hash)
|
|
154
162
|
end
|
|
155
163
|
|
|
156
164
|
# Deserializes the data based on type
|
|
157
165
|
# @param string type Data type
|
|
158
166
|
# @param string value Value to be deserialized
|
|
159
167
|
# @return [Object] Deserialized data
|
|
160
|
-
def _deserialize(type, value)
|
|
168
|
+
def self._deserialize(type, value)
|
|
161
169
|
case type.to_sym
|
|
162
|
-
when :
|
|
163
|
-
|
|
170
|
+
when :Time
|
|
171
|
+
Time.parse(value)
|
|
164
172
|
when :Date
|
|
165
173
|
Date.parse(value)
|
|
166
174
|
when :String
|
|
@@ -190,7 +198,9 @@ module PulpGemClient
|
|
|
190
198
|
end
|
|
191
199
|
end
|
|
192
200
|
else # model
|
|
193
|
-
|
|
201
|
+
# models (e.g. Pet) or oneOf
|
|
202
|
+
klass = PulpGemClient.const_get(type)
|
|
203
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
194
204
|
end
|
|
195
205
|
end
|
|
196
206
|
|
|
@@ -216,7 +226,7 @@ module PulpGemClient
|
|
|
216
226
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
217
227
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
218
228
|
end
|
|
219
|
-
|
|
229
|
+
|
|
220
230
|
hash[param] = _to_hash(value)
|
|
221
231
|
end
|
|
222
232
|
hash
|
|
@@ -239,5 +249,7 @@ module PulpGemClient
|
|
|
239
249
|
value
|
|
240
250
|
end
|
|
241
251
|
end
|
|
252
|
+
|
|
242
253
|
end
|
|
254
|
+
|
|
243
255
|
end
|
|
@@ -6,11 +6,12 @@
|
|
|
6
6
|
The version of the OpenAPI document: v3
|
|
7
7
|
Contact: pulp-list@redhat.com
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
|
-
|
|
9
|
+
Generator version: 7.10.0
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
13
13
|
require 'date'
|
|
14
|
+
require 'time'
|
|
14
15
|
|
|
15
16
|
module PulpGemClient
|
|
16
17
|
# Serializer for synchronously setting a label.
|
|
@@ -24,6 +25,11 @@ module PulpGemClient
|
|
|
24
25
|
}
|
|
25
26
|
end
|
|
26
27
|
|
|
28
|
+
# Returns all the JSON keys this model knows about
|
|
29
|
+
def self.acceptable_attributes
|
|
30
|
+
attribute_map.values
|
|
31
|
+
end
|
|
32
|
+
|
|
27
33
|
# Attribute type mapping.
|
|
28
34
|
def self.openapi_types
|
|
29
35
|
{
|
|
@@ -54,12 +60,15 @@ module PulpGemClient
|
|
|
54
60
|
|
|
55
61
|
if attributes.key?(:'key')
|
|
56
62
|
self.key = attributes[:'key']
|
|
63
|
+
else
|
|
64
|
+
self.key = nil
|
|
57
65
|
end
|
|
58
66
|
end
|
|
59
67
|
|
|
60
68
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
61
69
|
# @return Array for valid properties with the reasons
|
|
62
70
|
def list_invalid_properties
|
|
71
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
63
72
|
invalid_properties = Array.new
|
|
64
73
|
if @key.nil?
|
|
65
74
|
invalid_properties.push('invalid value for "key", key cannot be nil.')
|
|
@@ -80,6 +89,7 @@ module PulpGemClient
|
|
|
80
89
|
# Check to see if the all the properties in the model are valid
|
|
81
90
|
# @return true if the model is valid
|
|
82
91
|
def valid?
|
|
92
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
83
93
|
return false if @key.nil?
|
|
84
94
|
return false if @key.to_s.length < 1
|
|
85
95
|
return false if @key !~ Regexp.new(/^[-a-zA-Z0-9_]+$/)
|
|
@@ -129,37 +139,33 @@ module PulpGemClient
|
|
|
129
139
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
130
140
|
# @return [Object] Returns the model itself
|
|
131
141
|
def self.build_from_hash(attributes)
|
|
132
|
-
new.build_from_hash(attributes)
|
|
133
|
-
end
|
|
134
|
-
|
|
135
|
-
# Builds the object from hash
|
|
136
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
|
137
|
-
# @return [Object] Returns the model itself
|
|
138
|
-
def build_from_hash(attributes)
|
|
139
142
|
return nil unless attributes.is_a?(Hash)
|
|
140
|
-
|
|
141
|
-
|
|
143
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
144
|
+
transformed_hash = {}
|
|
145
|
+
openapi_types.each_pair do |key, type|
|
|
146
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
147
|
+
transformed_hash["#{key}"] = nil
|
|
148
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
142
149
|
# check to ensure the input is an array given that the attribute
|
|
143
150
|
# is documented as an array but the input is not
|
|
144
|
-
if attributes[
|
|
145
|
-
|
|
151
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
152
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
146
153
|
end
|
|
147
|
-
elsif !attributes[
|
|
148
|
-
|
|
149
|
-
end
|
|
154
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
155
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
156
|
+
end
|
|
150
157
|
end
|
|
151
|
-
|
|
152
|
-
self
|
|
158
|
+
new(transformed_hash)
|
|
153
159
|
end
|
|
154
160
|
|
|
155
161
|
# Deserializes the data based on type
|
|
156
162
|
# @param string type Data type
|
|
157
163
|
# @param string value Value to be deserialized
|
|
158
164
|
# @return [Object] Deserialized data
|
|
159
|
-
def _deserialize(type, value)
|
|
165
|
+
def self._deserialize(type, value)
|
|
160
166
|
case type.to_sym
|
|
161
|
-
when :
|
|
162
|
-
|
|
167
|
+
when :Time
|
|
168
|
+
Time.parse(value)
|
|
163
169
|
when :Date
|
|
164
170
|
Date.parse(value)
|
|
165
171
|
when :String
|
|
@@ -189,7 +195,9 @@ module PulpGemClient
|
|
|
189
195
|
end
|
|
190
196
|
end
|
|
191
197
|
else # model
|
|
192
|
-
|
|
198
|
+
# models (e.g. Pet) or oneOf
|
|
199
|
+
klass = PulpGemClient.const_get(type)
|
|
200
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
193
201
|
end
|
|
194
202
|
end
|
|
195
203
|
|
|
@@ -215,7 +223,7 @@ module PulpGemClient
|
|
|
215
223
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
216
224
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
217
225
|
end
|
|
218
|
-
|
|
226
|
+
|
|
219
227
|
hash[param] = _to_hash(value)
|
|
220
228
|
end
|
|
221
229
|
hash
|
|
@@ -238,5 +246,7 @@ module PulpGemClient
|
|
|
238
246
|
value
|
|
239
247
|
end
|
|
240
248
|
end
|
|
249
|
+
|
|
241
250
|
end
|
|
251
|
+
|
|
242
252
|
end
|
|
@@ -6,11 +6,12 @@
|
|
|
6
6
|
The version of the OpenAPI document: v3
|
|
7
7
|
Contact: pulp-list@redhat.com
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
|
-
|
|
9
|
+
Generator version: 7.10.0
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
13
13
|
require 'date'
|
|
14
|
+
require 'time'
|
|
14
15
|
|
|
15
16
|
module PulpGemClient
|
|
16
17
|
# Serializer for synchronously setting a label.
|
|
@@ -27,6 +28,11 @@ module PulpGemClient
|
|
|
27
28
|
}
|
|
28
29
|
end
|
|
29
30
|
|
|
31
|
+
# Returns all the JSON keys this model knows about
|
|
32
|
+
def self.acceptable_attributes
|
|
33
|
+
attribute_map.values
|
|
34
|
+
end
|
|
35
|
+
|
|
30
36
|
# Attribute type mapping.
|
|
31
37
|
def self.openapi_types
|
|
32
38
|
{
|
|
@@ -58,6 +64,8 @@ module PulpGemClient
|
|
|
58
64
|
|
|
59
65
|
if attributes.key?(:'key')
|
|
60
66
|
self.key = attributes[:'key']
|
|
67
|
+
else
|
|
68
|
+
self.key = nil
|
|
61
69
|
end
|
|
62
70
|
|
|
63
71
|
if attributes.key?(:'value')
|
|
@@ -68,6 +76,7 @@ module PulpGemClient
|
|
|
68
76
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
69
77
|
# @return Array for valid properties with the reasons
|
|
70
78
|
def list_invalid_properties
|
|
79
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
71
80
|
invalid_properties = Array.new
|
|
72
81
|
if @key.nil?
|
|
73
82
|
invalid_properties.push('invalid value for "key", key cannot be nil.')
|
|
@@ -84,6 +93,7 @@ module PulpGemClient
|
|
|
84
93
|
# Check to see if the all the properties in the model are valid
|
|
85
94
|
# @return true if the model is valid
|
|
86
95
|
def valid?
|
|
96
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
87
97
|
return false if @key.nil?
|
|
88
98
|
return false if @key !~ Regexp.new(/^[-a-zA-Z0-9_]+$/)
|
|
89
99
|
true
|
|
@@ -129,37 +139,33 @@ module PulpGemClient
|
|
|
129
139
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
130
140
|
# @return [Object] Returns the model itself
|
|
131
141
|
def self.build_from_hash(attributes)
|
|
132
|
-
new.build_from_hash(attributes)
|
|
133
|
-
end
|
|
134
|
-
|
|
135
|
-
# Builds the object from hash
|
|
136
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
|
137
|
-
# @return [Object] Returns the model itself
|
|
138
|
-
def build_from_hash(attributes)
|
|
139
142
|
return nil unless attributes.is_a?(Hash)
|
|
140
|
-
|
|
141
|
-
|
|
143
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
144
|
+
transformed_hash = {}
|
|
145
|
+
openapi_types.each_pair do |key, type|
|
|
146
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
147
|
+
transformed_hash["#{key}"] = nil
|
|
148
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
142
149
|
# check to ensure the input is an array given that the attribute
|
|
143
150
|
# is documented as an array but the input is not
|
|
144
|
-
if attributes[
|
|
145
|
-
|
|
151
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
152
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
146
153
|
end
|
|
147
|
-
elsif !attributes[
|
|
148
|
-
|
|
149
|
-
end
|
|
154
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
155
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
156
|
+
end
|
|
150
157
|
end
|
|
151
|
-
|
|
152
|
-
self
|
|
158
|
+
new(transformed_hash)
|
|
153
159
|
end
|
|
154
160
|
|
|
155
161
|
# Deserializes the data based on type
|
|
156
162
|
# @param string type Data type
|
|
157
163
|
# @param string value Value to be deserialized
|
|
158
164
|
# @return [Object] Deserialized data
|
|
159
|
-
def _deserialize(type, value)
|
|
165
|
+
def self._deserialize(type, value)
|
|
160
166
|
case type.to_sym
|
|
161
|
-
when :
|
|
162
|
-
|
|
167
|
+
when :Time
|
|
168
|
+
Time.parse(value)
|
|
163
169
|
when :Date
|
|
164
170
|
Date.parse(value)
|
|
165
171
|
when :String
|
|
@@ -189,7 +195,9 @@ module PulpGemClient
|
|
|
189
195
|
end
|
|
190
196
|
end
|
|
191
197
|
else # model
|
|
192
|
-
|
|
198
|
+
# models (e.g. Pet) or oneOf
|
|
199
|
+
klass = PulpGemClient.const_get(type)
|
|
200
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
193
201
|
end
|
|
194
202
|
end
|
|
195
203
|
|
|
@@ -215,7 +223,7 @@ module PulpGemClient
|
|
|
215
223
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
216
224
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
217
225
|
end
|
|
218
|
-
|
|
226
|
+
|
|
219
227
|
hash[param] = _to_hash(value)
|
|
220
228
|
end
|
|
221
229
|
hash
|
|
@@ -238,5 +246,7 @@ module PulpGemClient
|
|
|
238
246
|
value
|
|
239
247
|
end
|
|
240
248
|
end
|
|
249
|
+
|
|
241
250
|
end
|
|
251
|
+
|
|
242
252
|
end
|
|
@@ -6,10 +6,10 @@
|
|
|
6
6
|
The version of the OpenAPI document: v3
|
|
7
7
|
Contact: pulp-list@redhat.com
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
|
-
|
|
9
|
+
Generator version: 7.10.0
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
13
13
|
module PulpGemClient
|
|
14
|
-
VERSION = '0.6.
|
|
14
|
+
VERSION = '0.6.2'
|
|
15
15
|
end
|
data/lib/pulp_gem_client.rb
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
The version of the OpenAPI document: v3
|
|
7
7
|
Contact: pulp-list@redhat.com
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
|
-
|
|
9
|
+
Generator version: 7.10.0
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
@@ -19,7 +19,6 @@ require 'pulp_gem_client/configuration'
|
|
|
19
19
|
# Models
|
|
20
20
|
require 'pulp_gem_client/models/async_operation_response'
|
|
21
21
|
require 'pulp_gem_client/models/content_summary_response'
|
|
22
|
-
require 'pulp_gem_client/models/gem_gem_content'
|
|
23
22
|
require 'pulp_gem_client/models/gem_gem_content_response'
|
|
24
23
|
require 'pulp_gem_client/models/gem_gem_distribution'
|
|
25
24
|
require 'pulp_gem_client/models/gem_gem_distribution_response'
|
|
@@ -27,7 +26,7 @@ require 'pulp_gem_client/models/gem_gem_publication'
|
|
|
27
26
|
require 'pulp_gem_client/models/gem_gem_publication_response'
|
|
28
27
|
require 'pulp_gem_client/models/gem_gem_remote'
|
|
29
28
|
require 'pulp_gem_client/models/gem_gem_remote_response'
|
|
30
|
-
require 'pulp_gem_client/models/
|
|
29
|
+
require 'pulp_gem_client/models/gem_gem_remote_response_hidden_fields_inner'
|
|
31
30
|
require 'pulp_gem_client/models/gem_gem_repository'
|
|
32
31
|
require 'pulp_gem_client/models/gem_gem_repository_response'
|
|
33
32
|
require 'pulp_gem_client/models/my_permissions_response'
|
data/pulp_gem_client.gemspec
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
The version of the OpenAPI document: v3
|
|
9
9
|
Contact: pulp-list@redhat.com
|
|
10
10
|
Generated by: https://openapi-generator.tech
|
|
11
|
-
|
|
11
|
+
Generator version: 7.10.0
|
|
12
12
|
|
|
13
13
|
=end
|
|
14
14
|
|
|
@@ -24,11 +24,14 @@ Gem::Specification.new do |s|
|
|
|
24
24
|
s.homepage = "https://github.com/pulp/pulp_gem"
|
|
25
25
|
s.summary = "Pulp 3 API Ruby Gem"
|
|
26
26
|
s.description = "Fetch, Upload, Organize, and Distribute Software Packages"
|
|
27
|
-
s.license =
|
|
28
|
-
s.required_ruby_version = ">=
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
s.add_runtime_dependency '
|
|
27
|
+
s.license = "GPLv2+"
|
|
28
|
+
s.required_ruby_version = ">= 2.7"
|
|
29
|
+
s.metadata = {}
|
|
30
|
+
|
|
31
|
+
s.add_runtime_dependency 'faraday-net_http', '>= 2.0', '< 3.1'
|
|
32
|
+
s.add_runtime_dependency 'faraday', '>= 1.0.1', '< 2.9'
|
|
33
|
+
s.add_runtime_dependency 'faraday-multipart'
|
|
34
|
+
s.add_runtime_dependency 'marcel'
|
|
32
35
|
|
|
33
36
|
s.add_development_dependency 'rspec', '~> 3.6', '>= 3.6.0'
|
|
34
37
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
The version of the OpenAPI document: v3
|
|
7
7
|
Contact: pulp-list@redhat.com
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
|
-
|
|
9
|
+
Generator version: 7.10.0
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
@@ -42,7 +42,7 @@ describe 'ContentGemApi' do
|
|
|
42
42
|
# @return [AsyncOperationResponse]
|
|
43
43
|
describe 'create test' do
|
|
44
44
|
it 'should work' do
|
|
45
|
-
# assertion here. ref: https://
|
|
45
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
46
46
|
end
|
|
47
47
|
end
|
|
48
48
|
|
|
@@ -57,19 +57,20 @@ describe 'ContentGemApi' do
|
|
|
57
57
|
# @option opts [Array<String>] :ordering Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `pulp_type` - Pulp type * `-pulp_type` - Pulp type (descending) * `upstream_id` - Upstream id * `-upstream_id` - Upstream id (descending) * `timestamp_of_interest` - Timestamp of interest * `-timestamp_of_interest` - Timestamp of interest (descending) * `name` - Name * `-name` - Name (descending) * `version` - Version * `-version` - Version (descending) * `platform` - Platform * `-platform` - Platform (descending) * `checksum` - Checksum * `-checksum` - Checksum (descending) * `prerelease` - Prerelease * `-prerelease` - Prerelease (descending) * `dependencies` - Dependencies * `-dependencies` - Dependencies (descending) * `required_ruby_version` - Required ruby version * `-required_ruby_version` - Required ruby version (descending) * `required_rubygems_version` - Required rubygems version * `-required_rubygems_version` - Required rubygems version (descending) * `pk` - Pk * `-pk` - Pk (descending)
|
|
58
58
|
# @option opts [Float] :orphaned_for Minutes Content has been orphaned for. -1 uses ORPHAN_PROTECTION_TIME.
|
|
59
59
|
# @option opts [Boolean] :prerelease Filter results where prerelease matches value
|
|
60
|
+
# @option opts [Array<String>] :prn__in Multiple values may be separated by commas.
|
|
60
61
|
# @option opts [Array<String>] :pulp_href__in Multiple values may be separated by commas.
|
|
61
62
|
# @option opts [Array<String>] :pulp_id__in Multiple values may be separated by commas.
|
|
62
|
-
# @option opts [String] :q
|
|
63
|
-
# @option opts [String] :repository_version Repository Version referenced by HREF
|
|
64
|
-
# @option opts [String] :repository_version_added Repository Version referenced by HREF
|
|
65
|
-
# @option opts [String] :repository_version_removed Repository Version referenced by HREF
|
|
63
|
+
# @option opts [String] :q Filter results by using NOT, AND and OR operations on other filters
|
|
64
|
+
# @option opts [String] :repository_version Repository Version referenced by HREF/PRN
|
|
65
|
+
# @option opts [String] :repository_version_added Repository Version referenced by HREF/PRN
|
|
66
|
+
# @option opts [String] :repository_version_removed Repository Version referenced by HREF/PRN
|
|
66
67
|
# @option opts [String] :version Filter results where version matches value
|
|
67
68
|
# @option opts [Array<String>] :fields A list of fields to include in the response.
|
|
68
69
|
# @option opts [Array<String>] :exclude_fields A list of fields to exclude from the response.
|
|
69
70
|
# @return [PaginatedgemGemContentResponseList]
|
|
70
71
|
describe 'list test' do
|
|
71
72
|
it 'should work' do
|
|
72
|
-
# assertion here. ref: https://
|
|
73
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
73
74
|
end
|
|
74
75
|
end
|
|
75
76
|
|
|
@@ -83,7 +84,7 @@ describe 'ContentGemApi' do
|
|
|
83
84
|
# @return [GemGemContentResponse]
|
|
84
85
|
describe 'read test' do
|
|
85
86
|
it 'should work' do
|
|
86
|
-
# assertion here. ref: https://
|
|
87
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
87
88
|
end
|
|
88
89
|
end
|
|
89
90
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
The version of the OpenAPI document: v3
|
|
7
7
|
Contact: pulp-list@redhat.com
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
|
-
|
|
9
|
+
Generator version: 7.10.0
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
@@ -41,7 +41,7 @@ describe 'DistributionsGemApi' do
|
|
|
41
41
|
# @return [NestedRoleResponse]
|
|
42
42
|
describe 'add_role test' do
|
|
43
43
|
it 'should work' do
|
|
44
|
-
# assertion here. ref: https://
|
|
44
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
45
45
|
end
|
|
46
46
|
end
|
|
47
47
|
|
|
@@ -53,7 +53,7 @@ describe 'DistributionsGemApi' do
|
|
|
53
53
|
# @return [AsyncOperationResponse]
|
|
54
54
|
describe 'create test' do
|
|
55
55
|
it 'should work' do
|
|
56
|
-
# assertion here. ref: https://
|
|
56
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
57
57
|
end
|
|
58
58
|
end
|
|
59
59
|
|
|
@@ -65,7 +65,7 @@ describe 'DistributionsGemApi' do
|
|
|
65
65
|
# @return [AsyncOperationResponse]
|
|
66
66
|
describe 'delete test' do
|
|
67
67
|
it 'should work' do
|
|
68
|
-
# assertion here. ref: https://
|
|
68
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
69
69
|
end
|
|
70
70
|
end
|
|
71
71
|
|
|
@@ -89,10 +89,11 @@ describe 'DistributionsGemApi' do
|
|
|
89
89
|
# @option opts [String] :name__startswith Filter results where name starts with value
|
|
90
90
|
# @option opts [Integer] :offset The initial index from which to return the results.
|
|
91
91
|
# @option opts [Array<String>] :ordering Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `pulp_type` - Pulp type * `-pulp_type` - Pulp type (descending) * `name` - Name * `-name` - Name (descending) * `pulp_labels` - Pulp labels * `-pulp_labels` - Pulp labels (descending) * `base_path` - Base path * `-base_path` - Base path (descending) * `hidden` - Hidden * `-hidden` - Hidden (descending) * `pk` - Pk * `-pk` - Pk (descending)
|
|
92
|
+
# @option opts [Array<String>] :prn__in Multiple values may be separated by commas.
|
|
92
93
|
# @option opts [Array<String>] :pulp_href__in Multiple values may be separated by commas.
|
|
93
94
|
# @option opts [Array<String>] :pulp_id__in Multiple values may be separated by commas.
|
|
94
95
|
# @option opts [String] :pulp_label_select Filter labels by search string
|
|
95
|
-
# @option opts [String] :q
|
|
96
|
+
# @option opts [String] :q Filter results by using NOT, AND and OR operations on other filters
|
|
96
97
|
# @option opts [String] :repository Filter results where repository matches value
|
|
97
98
|
# @option opts [Array<String>] :repository__in Filter results where repository is in a comma-separated list of values
|
|
98
99
|
# @option opts [String] :with_content Filter distributions based on the content served by them
|
|
@@ -101,7 +102,7 @@ describe 'DistributionsGemApi' do
|
|
|
101
102
|
# @return [PaginatedgemGemDistributionResponseList]
|
|
102
103
|
describe 'list test' do
|
|
103
104
|
it 'should work' do
|
|
104
|
-
# assertion here. ref: https://
|
|
105
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
105
106
|
end
|
|
106
107
|
end
|
|
107
108
|
|
|
@@ -115,7 +116,7 @@ describe 'DistributionsGemApi' do
|
|
|
115
116
|
# @return [ObjectRolesResponse]
|
|
116
117
|
describe 'list_roles test' do
|
|
117
118
|
it 'should work' do
|
|
118
|
-
# assertion here. ref: https://
|
|
119
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
119
120
|
end
|
|
120
121
|
end
|
|
121
122
|
|
|
@@ -129,7 +130,7 @@ describe 'DistributionsGemApi' do
|
|
|
129
130
|
# @return [MyPermissionsResponse]
|
|
130
131
|
describe 'my_permissions test' do
|
|
131
132
|
it 'should work' do
|
|
132
|
-
# assertion here. ref: https://
|
|
133
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
133
134
|
end
|
|
134
135
|
end
|
|
135
136
|
|
|
@@ -142,7 +143,7 @@ describe 'DistributionsGemApi' do
|
|
|
142
143
|
# @return [AsyncOperationResponse]
|
|
143
144
|
describe 'partial_update test' do
|
|
144
145
|
it 'should work' do
|
|
145
|
-
# assertion here. ref: https://
|
|
146
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
146
147
|
end
|
|
147
148
|
end
|
|
148
149
|
|
|
@@ -156,7 +157,7 @@ describe 'DistributionsGemApi' do
|
|
|
156
157
|
# @return [GemGemDistributionResponse]
|
|
157
158
|
describe 'read test' do
|
|
158
159
|
it 'should work' do
|
|
159
|
-
# assertion here. ref: https://
|
|
160
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
160
161
|
end
|
|
161
162
|
end
|
|
162
163
|
|
|
@@ -169,7 +170,7 @@ describe 'DistributionsGemApi' do
|
|
|
169
170
|
# @return [NestedRoleResponse]
|
|
170
171
|
describe 'remove_role test' do
|
|
171
172
|
it 'should work' do
|
|
172
|
-
# assertion here. ref: https://
|
|
173
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
173
174
|
end
|
|
174
175
|
end
|
|
175
176
|
|
|
@@ -182,7 +183,7 @@ describe 'DistributionsGemApi' do
|
|
|
182
183
|
# @return [SetLabelResponse]
|
|
183
184
|
describe 'set_label test' do
|
|
184
185
|
it 'should work' do
|
|
185
|
-
# assertion here. ref: https://
|
|
186
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
186
187
|
end
|
|
187
188
|
end
|
|
188
189
|
|
|
@@ -195,7 +196,7 @@ describe 'DistributionsGemApi' do
|
|
|
195
196
|
# @return [UnsetLabelResponse]
|
|
196
197
|
describe 'unset_label test' do
|
|
197
198
|
it 'should work' do
|
|
198
|
-
# assertion here. ref: https://
|
|
199
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
199
200
|
end
|
|
200
201
|
end
|
|
201
202
|
|
|
@@ -208,7 +209,7 @@ describe 'DistributionsGemApi' do
|
|
|
208
209
|
# @return [AsyncOperationResponse]
|
|
209
210
|
describe 'update test' do
|
|
210
211
|
it 'should work' do
|
|
211
|
-
# assertion here. ref: https://
|
|
212
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
212
213
|
end
|
|
213
214
|
end
|
|
214
215
|
|