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
@@ -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
- OpenAPI Generator version: 4.2.3
9
+ OpenAPI Generator version: 4.3.1
10
10
 
11
11
  =end
12
12
 
@@ -28,6 +28,7 @@ module PulpNpmClient
28
28
  # @option opts [String] :artifact Artifact file representing the physical content
29
29
  # @option opts [File] :file An uploaded file that may be turned into the artifact of the content unit.
30
30
  # @option opts [String] :repository A URI of a repository the new content unit should be associated with.
31
+ # @option opts [String] :upload An uncommitted upload that may be turned into the artifact of the content unit.
31
32
  # @return [NpmPackageResponse]
32
33
  def create(relative_path, name, version, opts = {})
33
34
  data, _status_code, _headers = create_with_http_info(relative_path, name, version, opts)
@@ -43,6 +44,7 @@ module PulpNpmClient
43
44
  # @option opts [String] :artifact Artifact file representing the physical content
44
45
  # @option opts [File] :file An uploaded file that may be turned into the artifact of the content unit.
45
46
  # @option opts [String] :repository A URI of a repository the new content unit should be associated with.
47
+ # @option opts [String] :upload An uncommitted upload that may be turned into the artifact of the content unit.
46
48
  # @return [Array<(NpmPackageResponse, Integer, Hash)>] NpmPackageResponse data, response status code and response headers
47
49
  def create_with_http_info(relative_path, name, version, opts = {})
48
50
  if @api_client.config.debugging
@@ -52,14 +54,26 @@ module PulpNpmClient
52
54
  if @api_client.config.client_side_validation && relative_path.nil?
53
55
  fail ArgumentError, "Missing the required parameter 'relative_path' when calling ContentPackagesApi.create"
54
56
  end
57
+ if @api_client.config.client_side_validation && relative_path.to_s.length < 1
58
+ fail ArgumentError, 'invalid value for "relative_path" when calling ContentPackagesApi.create, the character length must be great than or equal to 1.'
59
+ end
60
+
55
61
  # verify the required parameter 'name' is set
56
62
  if @api_client.config.client_side_validation && name.nil?
57
63
  fail ArgumentError, "Missing the required parameter 'name' when calling ContentPackagesApi.create"
58
64
  end
65
+ if @api_client.config.client_side_validation && name.to_s.length < 1
66
+ fail ArgumentError, 'invalid value for "name" when calling ContentPackagesApi.create, the character length must be great than or equal to 1.'
67
+ end
68
+
59
69
  # verify the required parameter 'version' is set
60
70
  if @api_client.config.client_side_validation && version.nil?
61
71
  fail ArgumentError, "Missing the required parameter 'version' when calling ContentPackagesApi.create"
62
72
  end
73
+ if @api_client.config.client_side_validation && version.to_s.length < 1
74
+ fail ArgumentError, 'invalid value for "version" when calling ContentPackagesApi.create, the character length must be great than or equal to 1.'
75
+ end
76
+
63
77
  # resource path
64
78
  local_var_path = '/pulp/api/v3/content/npm/packages/'
65
79
 
@@ -81,6 +95,7 @@ module PulpNpmClient
81
95
  form_params['artifact'] = opts[:'artifact'] if !opts[:'artifact'].nil?
82
96
  form_params['file'] = opts[:'file'] if !opts[:'file'].nil?
83
97
  form_params['repository'] = opts[:'repository'] if !opts[:'repository'].nil?
98
+ form_params['upload'] = opts[:'upload'] if !opts[:'upload'].nil?
84
99
 
85
100
  # http body (model)
86
101
  post_body = opts[:body]
@@ -114,7 +129,7 @@ module PulpNpmClient
114
129
  # @option opts [String] :name Filter results where name matches value
115
130
  # @option opts [Array<String>] :name__in Filter results where name is in a comma-separated list of values
116
131
  # @option opts [Integer] :offset The initial index from which to return the results.
117
- # @option opts [String] :ordering Which field to use when ordering the results.
132
+ # @option opts [Array<String>] :ordering Ordering
118
133
  # @option opts [String] :repository_version Repository Version referenced by HREF
119
134
  # @option opts [String] :repository_version_added Repository Version referenced by HREF
120
135
  # @option opts [String] :repository_version_removed Repository Version referenced by HREF
@@ -133,7 +148,7 @@ module PulpNpmClient
133
148
  # @option opts [String] :name Filter results where name matches value
134
149
  # @option opts [Array<String>] :name__in Filter results where name is in a comma-separated list of values
135
150
  # @option opts [Integer] :offset The initial index from which to return the results.
136
- # @option opts [String] :ordering Which field to use when ordering the results.
151
+ # @option opts [Array<String>] :ordering Ordering
137
152
  # @option opts [String] :repository_version Repository Version referenced by HREF
138
153
  # @option opts [String] :repository_version_added Repository Version referenced by HREF
139
154
  # @option opts [String] :repository_version_removed Repository Version referenced by HREF
@@ -144,6 +159,10 @@ module PulpNpmClient
144
159
  if @api_client.config.debugging
145
160
  @api_client.config.logger.debug 'Calling API: ContentPackagesApi.list ...'
146
161
  end
162
+ allowable_values = ["-_artifacts", "-content_ptr", "-contentartifact", "-group_roles", "-name", "-pk", "-pulp_created", "-pulp_id", "-pulp_labels", "-pulp_last_updated", "-pulp_type", "-repositories", "-timestamp_of_interest", "-upstream_id", "-user_roles", "-version", "-version_memberships", "_artifacts", "content_ptr", "contentartifact", "group_roles", "name", "pk", "pulp_created", "pulp_id", "pulp_labels", "pulp_last_updated", "pulp_type", "repositories", "timestamp_of_interest", "upstream_id", "user_roles", "version", "version_memberships"]
163
+ if @api_client.config.client_side_validation && opts[:'ordering'] && !opts[:'ordering'].all? { |item| allowable_values.include?(item) }
164
+ fail ArgumentError, "invalid value for \"ordering\", must include one of #{allowable_values}"
165
+ end
147
166
  # resource path
148
167
  local_var_path = '/pulp/api/v3/content/npm/packages/'
149
168
 
@@ -153,7 +172,7 @@ module PulpNpmClient
153
172
  query_params[:'name'] = opts[:'name'] if !opts[:'name'].nil?
154
173
  query_params[:'name__in'] = @api_client.build_collection_param(opts[:'name__in'], :csv) if !opts[:'name__in'].nil?
155
174
  query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
156
- query_params[:'ordering'] = opts[:'ordering'] if !opts[:'ordering'].nil?
175
+ query_params[:'ordering'] = @api_client.build_collection_param(opts[:'ordering'], :csv) if !opts[:'ordering'].nil?
157
176
  query_params[:'repository_version'] = opts[:'repository_version'] if !opts[:'repository_version'].nil?
158
177
  query_params[:'repository_version_added'] = opts[:'repository_version_added'] if !opts[:'repository_version_added'].nil?
159
178
  query_params[:'repository_version_removed'] = opts[:'repository_version_removed'] if !opts[:'repository_version_removed'].nil?
@@ -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
- OpenAPI Generator version: 4.2.3
9
+ OpenAPI Generator version: 4.3.1
10
10
 
11
11
  =end
12
12
 
@@ -159,7 +159,7 @@ module PulpNpmClient
159
159
  # @option opts [Array<String>] :name__in Filter results where name is in a comma-separated list of values
160
160
  # @option opts [String] :name__startswith Filter results where name starts with value
161
161
  # @option opts [Integer] :offset The initial index from which to return the results.
162
- # @option opts [String] :ordering Which field to use when ordering the results.
162
+ # @option opts [Array<String>] :ordering Ordering
163
163
  # @option opts [String] :pulp_label_select Filter labels by search string
164
164
  # @option opts [String] :fields A list of fields to include in the response.
165
165
  # @option opts [String] :exclude_fields A list of fields to exclude from the response.
@@ -183,7 +183,7 @@ module PulpNpmClient
183
183
  # @option opts [Array<String>] :name__in Filter results where name is in a comma-separated list of values
184
184
  # @option opts [String] :name__startswith Filter results where name starts with value
185
185
  # @option opts [Integer] :offset The initial index from which to return the results.
186
- # @option opts [String] :ordering Which field to use when ordering the results.
186
+ # @option opts [Array<String>] :ordering Ordering
187
187
  # @option opts [String] :pulp_label_select Filter labels by search string
188
188
  # @option opts [String] :fields A list of fields to include in the response.
189
189
  # @option opts [String] :exclude_fields A list of fields to exclude from the response.
@@ -192,6 +192,10 @@ module PulpNpmClient
192
192
  if @api_client.config.debugging
193
193
  @api_client.config.logger.debug 'Calling API: DistributionsNpmApi.list ...'
194
194
  end
195
+ allowable_values = ["-base_path", "-content_guard", "-group_roles", "-name", "-npm_npmdistribution", "-pk", "-publication", "-pulp_created", "-pulp_id", "-pulp_labels", "-pulp_last_updated", "-pulp_type", "-remote", "-repository", "-repository_version", "-user_roles", "base_path", "content_guard", "group_roles", "name", "npm_npmdistribution", "pk", "publication", "pulp_created", "pulp_id", "pulp_labels", "pulp_last_updated", "pulp_type", "remote", "repository", "repository_version", "user_roles"]
196
+ if @api_client.config.client_side_validation && opts[:'ordering'] && !opts[:'ordering'].all? { |item| allowable_values.include?(item) }
197
+ fail ArgumentError, "invalid value for \"ordering\", must include one of #{allowable_values}"
198
+ end
195
199
  # resource path
196
200
  local_var_path = '/pulp/api/v3/distributions/npm/npm/'
197
201
 
@@ -208,7 +212,7 @@ module PulpNpmClient
208
212
  query_params[:'name__in'] = @api_client.build_collection_param(opts[:'name__in'], :csv) if !opts[:'name__in'].nil?
209
213
  query_params[:'name__startswith'] = opts[:'name__startswith'] if !opts[:'name__startswith'].nil?
210
214
  query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
211
- query_params[:'ordering'] = opts[:'ordering'] if !opts[:'ordering'].nil?
215
+ query_params[:'ordering'] = @api_client.build_collection_param(opts[:'ordering'], :csv) if !opts[:'ordering'].nil?
212
216
  query_params[:'pulp_label_select'] = opts[:'pulp_label_select'] if !opts[:'pulp_label_select'].nil?
213
217
  query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].nil?
214
218
  query_params[:'exclude_fields'] = opts[:'exclude_fields'] if !opts[:'exclude_fields'].nil?
@@ -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
- OpenAPI Generator version: 4.2.3
9
+ OpenAPI Generator version: 4.3.1
10
10
 
11
11
  =end
12
12
 
@@ -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
- OpenAPI Generator version: 4.2.3
9
+ OpenAPI Generator version: 4.3.1
10
10
 
11
11
  =end
12
12
 
@@ -155,7 +155,7 @@ module PulpNpmClient
155
155
  # @option opts [Array<String>] :name__in Filter results where name is in a comma-separated list of values
156
156
  # @option opts [String] :name__startswith Filter results where name starts with value
157
157
  # @option opts [Integer] :offset The initial index from which to return the results.
158
- # @option opts [String] :ordering Which field to use when ordering the results.
158
+ # @option opts [Array<String>] :ordering Ordering
159
159
  # @option opts [String] :pulp_label_select Filter labels by search string
160
160
  # @option opts [DateTime] :pulp_last_updated ISO 8601 formatted dates are supported
161
161
  # @option opts [DateTime] :pulp_last_updated__gt Filter results where pulp_last_updated is greater than value
@@ -181,7 +181,7 @@ module PulpNpmClient
181
181
  # @option opts [Array<String>] :name__in Filter results where name is in a comma-separated list of values
182
182
  # @option opts [String] :name__startswith Filter results where name starts with value
183
183
  # @option opts [Integer] :offset The initial index from which to return the results.
184
- # @option opts [String] :ordering Which field to use when ordering the results.
184
+ # @option opts [Array<String>] :ordering Ordering
185
185
  # @option opts [String] :pulp_label_select Filter labels by search string
186
186
  # @option opts [DateTime] :pulp_last_updated ISO 8601 formatted dates are supported
187
187
  # @option opts [DateTime] :pulp_last_updated__gt Filter results where pulp_last_updated is greater than value
@@ -196,6 +196,10 @@ module PulpNpmClient
196
196
  if @api_client.config.debugging
197
197
  @api_client.config.logger.debug 'Calling API: RemotesNpmApi.list ...'
198
198
  end
199
+ allowable_values = ["-alternatecontentsource", "-basedistribution", "-ca_cert", "-client_cert", "-client_key", "-connect_timeout", "-distribution", "-download_concurrency", "-group_roles", "-headers", "-max_retries", "-name", "-npm_npmremote", "-password", "-pk", "-policy", "-proxy_password", "-proxy_url", "-proxy_username", "-pulp_created", "-pulp_id", "-pulp_labels", "-pulp_last_updated", "-pulp_type", "-rate_limit", "-remoteartifact", "-repository", "-sock_connect_timeout", "-sock_read_timeout", "-tls_validation", "-total_timeout", "-url", "-user_roles", "-username", "alternatecontentsource", "basedistribution", "ca_cert", "client_cert", "client_key", "connect_timeout", "distribution", "download_concurrency", "group_roles", "headers", "max_retries", "name", "npm_npmremote", "password", "pk", "policy", "proxy_password", "proxy_url", "proxy_username", "pulp_created", "pulp_id", "pulp_labels", "pulp_last_updated", "pulp_type", "rate_limit", "remoteartifact", "repository", "sock_connect_timeout", "sock_read_timeout", "tls_validation", "total_timeout", "url", "user_roles", "username"]
200
+ if @api_client.config.client_side_validation && opts[:'ordering'] && !opts[:'ordering'].all? { |item| allowable_values.include?(item) }
201
+ fail ArgumentError, "invalid value for \"ordering\", must include one of #{allowable_values}"
202
+ end
199
203
  # resource path
200
204
  local_var_path = '/pulp/api/v3/remotes/npm/npm/'
201
205
 
@@ -208,7 +212,7 @@ module PulpNpmClient
208
212
  query_params[:'name__in'] = @api_client.build_collection_param(opts[:'name__in'], :csv) if !opts[:'name__in'].nil?
209
213
  query_params[:'name__startswith'] = opts[:'name__startswith'] if !opts[:'name__startswith'].nil?
210
214
  query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
211
- query_params[:'ordering'] = opts[:'ordering'] if !opts[:'ordering'].nil?
215
+ query_params[:'ordering'] = @api_client.build_collection_param(opts[:'ordering'], :csv) if !opts[:'ordering'].nil?
212
216
  query_params[:'pulp_label_select'] = opts[:'pulp_label_select'] if !opts[:'pulp_label_select'].nil?
213
217
  query_params[:'pulp_last_updated'] = opts[:'pulp_last_updated'] if !opts[:'pulp_last_updated'].nil?
214
218
  query_params[:'pulp_last_updated__gt'] = opts[:'pulp_last_updated__gt'] if !opts[:'pulp_last_updated__gt'].nil?
@@ -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
- OpenAPI Generator version: 4.2.3
9
+ OpenAPI Generator version: 4.3.1
10
10
 
11
11
  =end
12
12
 
@@ -155,7 +155,7 @@ module PulpNpmClient
155
155
  # @option opts [Array<String>] :name__in Filter results where name is in a comma-separated list of values
156
156
  # @option opts [String] :name__startswith Filter results where name starts with value
157
157
  # @option opts [Integer] :offset The initial index from which to return the results.
158
- # @option opts [String] :ordering Which field to use when ordering the results.
158
+ # @option opts [Array<String>] :ordering Ordering
159
159
  # @option opts [String] :pulp_label_select Filter labels by search string
160
160
  # @option opts [String] :fields A list of fields to include in the response.
161
161
  # @option opts [String] :exclude_fields A list of fields to exclude from the response.
@@ -175,7 +175,7 @@ module PulpNpmClient
175
175
  # @option opts [Array<String>] :name__in Filter results where name is in a comma-separated list of values
176
176
  # @option opts [String] :name__startswith Filter results where name starts with value
177
177
  # @option opts [Integer] :offset The initial index from which to return the results.
178
- # @option opts [String] :ordering Which field to use when ordering the results.
178
+ # @option opts [Array<String>] :ordering Ordering
179
179
  # @option opts [String] :pulp_label_select Filter labels by search string
180
180
  # @option opts [String] :fields A list of fields to include in the response.
181
181
  # @option opts [String] :exclude_fields A list of fields to exclude from the response.
@@ -184,6 +184,10 @@ module PulpNpmClient
184
184
  if @api_client.config.debugging
185
185
  @api_client.config.logger.debug 'Calling API: RepositoriesNpmApi.list ...'
186
186
  end
187
+ allowable_values = ["-alternatecontentsourcepath", "-content", "-core_pulp_exporter", "-description", "-distributions", "-group_roles", "-name", "-next_version", "-npm_npmrepository", "-pk", "-pulp_created", "-pulp_id", "-pulp_labels", "-pulp_last_updated", "-pulp_type", "-pulpimporterrepository", "-remote", "-repositorycontent", "-retain_repo_versions", "-user_hidden", "-user_roles", "-versions", "alternatecontentsourcepath", "content", "core_pulp_exporter", "description", "distributions", "group_roles", "name", "next_version", "npm_npmrepository", "pk", "pulp_created", "pulp_id", "pulp_labels", "pulp_last_updated", "pulp_type", "pulpimporterrepository", "remote", "repositorycontent", "retain_repo_versions", "user_hidden", "user_roles", "versions"]
188
+ if @api_client.config.client_side_validation && opts[:'ordering'] && !opts[:'ordering'].all? { |item| allowable_values.include?(item) }
189
+ fail ArgumentError, "invalid value for \"ordering\", must include one of #{allowable_values}"
190
+ end
187
191
  # resource path
188
192
  local_var_path = '/pulp/api/v3/repositories/npm/npm/'
189
193
 
@@ -196,7 +200,7 @@ module PulpNpmClient
196
200
  query_params[:'name__in'] = @api_client.build_collection_param(opts[:'name__in'], :csv) if !opts[:'name__in'].nil?
197
201
  query_params[:'name__startswith'] = opts[:'name__startswith'] if !opts[:'name__startswith'].nil?
198
202
  query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
199
- query_params[:'ordering'] = opts[:'ordering'] if !opts[:'ordering'].nil?
203
+ query_params[:'ordering'] = @api_client.build_collection_param(opts[:'ordering'], :csv) if !opts[:'ordering'].nil?
200
204
  query_params[:'pulp_label_select'] = opts[:'pulp_label_select'] if !opts[:'pulp_label_select'].nil?
201
205
  query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].nil?
202
206
  query_params[:'exclude_fields'] = opts[:'exclude_fields'] if !opts[:'exclude_fields'].nil?
@@ -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
- OpenAPI Generator version: 4.2.3
9
+ OpenAPI Generator version: 4.3.1
10
10
 
11
11
  =end
12
12
 
@@ -95,7 +95,7 @@ module PulpNpmClient
95
95
  # @option opts [Integer] :number__lte Filter results where number is less than or equal to value
96
96
  # @option opts [Array<Integer>] :number__range Filter results where number is between two comma separated values
97
97
  # @option opts [Integer] :offset The initial index from which to return the results.
98
- # @option opts [String] :ordering Which field to use when ordering the results.
98
+ # @option opts [Array<String>] :ordering Ordering
99
99
  # @option opts [DateTime] :pulp_created ISO 8601 formatted dates are supported
100
100
  # @option opts [DateTime] :pulp_created__gt Filter results where pulp_created is greater than value
101
101
  # @option opts [DateTime] :pulp_created__gte Filter results where pulp_created is greater than or equal to value
@@ -124,7 +124,7 @@ module PulpNpmClient
124
124
  # @option opts [Integer] :number__lte Filter results where number is less than or equal to value
125
125
  # @option opts [Array<Integer>] :number__range Filter results where number is between two comma separated values
126
126
  # @option opts [Integer] :offset The initial index from which to return the results.
127
- # @option opts [String] :ordering Which field to use when ordering the results.
127
+ # @option opts [Array<String>] :ordering Ordering
128
128
  # @option opts [DateTime] :pulp_created ISO 8601 formatted dates are supported
129
129
  # @option opts [DateTime] :pulp_created__gt Filter results where pulp_created is greater than value
130
130
  # @option opts [DateTime] :pulp_created__gte Filter results where pulp_created is greater than or equal to value
@@ -142,6 +142,10 @@ module PulpNpmClient
142
142
  if @api_client.config.client_side_validation && npm_npm_repository_href.nil?
143
143
  fail ArgumentError, "Missing the required parameter 'npm_npm_repository_href' when calling RepositoriesNpmVersionsApi.list"
144
144
  end
145
+ allowable_values = ["-added_memberships", "-base_version", "-complete", "-counts", "-distribution", "-group_roles", "-number", "-pk", "-publication", "-pulp_created", "-pulp_id", "-pulp_labels", "-pulp_last_updated", "-removed_memberships", "-repository", "-user_roles", "-versions", "added_memberships", "base_version", "complete", "counts", "distribution", "group_roles", "number", "pk", "publication", "pulp_created", "pulp_id", "pulp_labels", "pulp_last_updated", "removed_memberships", "repository", "user_roles", "versions"]
146
+ if @api_client.config.client_side_validation && opts[:'ordering'] && !opts[:'ordering'].all? { |item| allowable_values.include?(item) }
147
+ fail ArgumentError, "invalid value for \"ordering\", must include one of #{allowable_values}"
148
+ end
145
149
  # resource path
146
150
  local_var_path = '{npm_npm_repository_href}versions/'.sub('{' + 'npm_npm_repository_href' + '}', CGI.escape(npm_npm_repository_href.to_s).gsub('%2F', '/'))
147
151
 
@@ -157,7 +161,7 @@ module PulpNpmClient
157
161
  query_params[:'number__lte'] = opts[:'number__lte'] if !opts[:'number__lte'].nil?
158
162
  query_params[:'number__range'] = @api_client.build_collection_param(opts[:'number__range'], :csv) if !opts[:'number__range'].nil?
159
163
  query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
160
- query_params[:'ordering'] = opts[:'ordering'] if !opts[:'ordering'].nil?
164
+ query_params[:'ordering'] = @api_client.build_collection_param(opts[:'ordering'], :csv) if !opts[:'ordering'].nil?
161
165
  query_params[:'pulp_created'] = opts[:'pulp_created'] if !opts[:'pulp_created'].nil?
162
166
  query_params[:'pulp_created__gt'] = opts[:'pulp_created__gt'] if !opts[:'pulp_created__gt'].nil?
163
167
  query_params[:'pulp_created__gte'] = opts[:'pulp_created__gte'] if !opts[:'pulp_created__gte'].nil?
@@ -270,20 +274,20 @@ module PulpNpmClient
270
274
 
271
275
  # Trigger an asynchronous task to repair a repository version.
272
276
  # @param npm_npm_repository_version_href [String]
273
- # @param repository_version [RepositoryVersion]
277
+ # @param repair [Repair]
274
278
  # @param [Hash] opts the optional parameters
275
279
  # @return [AsyncOperationResponse]
276
- def repair(npm_npm_repository_version_href, repository_version, opts = {})
277
- data, _status_code, _headers = repair_with_http_info(npm_npm_repository_version_href, repository_version, opts)
280
+ def repair(npm_npm_repository_version_href, repair, opts = {})
281
+ data, _status_code, _headers = repair_with_http_info(npm_npm_repository_version_href, repair, opts)
278
282
  data
279
283
  end
280
284
 
281
285
  # Trigger an asynchronous task to repair a repository version.
282
286
  # @param npm_npm_repository_version_href [String]
283
- # @param repository_version [RepositoryVersion]
287
+ # @param repair [Repair]
284
288
  # @param [Hash] opts the optional parameters
285
289
  # @return [Array<(AsyncOperationResponse, Integer, Hash)>] AsyncOperationResponse data, response status code and response headers
286
- def repair_with_http_info(npm_npm_repository_version_href, repository_version, opts = {})
290
+ def repair_with_http_info(npm_npm_repository_version_href, repair, opts = {})
287
291
  if @api_client.config.debugging
288
292
  @api_client.config.logger.debug 'Calling API: RepositoriesNpmVersionsApi.repair ...'
289
293
  end
@@ -291,9 +295,9 @@ module PulpNpmClient
291
295
  if @api_client.config.client_side_validation && npm_npm_repository_version_href.nil?
292
296
  fail ArgumentError, "Missing the required parameter 'npm_npm_repository_version_href' when calling RepositoriesNpmVersionsApi.repair"
293
297
  end
294
- # verify the required parameter 'repository_version' is set
295
- if @api_client.config.client_side_validation && repository_version.nil?
296
- fail ArgumentError, "Missing the required parameter 'repository_version' when calling RepositoriesNpmVersionsApi.repair"
298
+ # verify the required parameter 'repair' is set
299
+ if @api_client.config.client_side_validation && repair.nil?
300
+ fail ArgumentError, "Missing the required parameter 'repair' when calling RepositoriesNpmVersionsApi.repair"
297
301
  end
298
302
  # resource path
299
303
  local_var_path = '{npm_npm_repository_version_href}repair/'.sub('{' + 'npm_npm_repository_version_href' + '}', CGI.escape(npm_npm_repository_version_href.to_s).gsub('%2F', '/'))
@@ -312,7 +316,7 @@ module PulpNpmClient
312
316
  form_params = opts[:form_params] || {}
313
317
 
314
318
  # http body (model)
315
- post_body = opts[:body] || @api_client.object_to_http_body(repository_version)
319
+ post_body = opts[:body] || @api_client.object_to_http_body(repair)
316
320
 
317
321
  # return_type
318
322
  return_type = opts[:return_type] || 'AsyncOperationResponse'
@@ -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
- OpenAPI Generator version: 4.2.3
9
+ OpenAPI Generator version: 4.3.1
10
10
 
11
11
  =end
12
12
 
@@ -53,8 +53,10 @@ module PulpNpmClient
53
53
  :client_cert => @config.ssl_client_cert,
54
54
  :client_key => @config.ssl_client_key
55
55
  }
56
-
57
- connection = Faraday.new(:url => config.base_url, :ssl => ssl_options) do |conn|
56
+ request_options = {
57
+ :params_encoder => @config.params_encoder
58
+ }
59
+ connection = Faraday.new(:url => config.base_url, :ssl => ssl_options, :request => request_options) do |conn|
58
60
  conn.basic_auth(config.username, config.password)
59
61
  if opts[:header_params]["Content-Type"] == "multipart/form-data"
60
62
  conn.request :multipart
@@ -116,9 +118,6 @@ module PulpNpmClient
116
118
  update_params_for_auth! header_params, query_params, opts[:auth_names]
117
119
 
118
120
  req_opts = {
119
- :method => http_method,
120
- :headers => header_params,
121
- :params => query_params,
122
121
  :params_encoding => @config.params_encoding,
123
122
  :timeout => @config.timeout,
124
123
  :verbose => @config.debugging
@@ -126,13 +125,13 @@ module PulpNpmClient
126
125
 
127
126
  if [:post, :patch, :put, :delete].include?(http_method)
128
127
  req_body = build_request_body(header_params, form_params, opts[:body])
129
- req_opts.update :body => req_body
130
128
  if @config.debugging
131
129
  @config.logger.debug "HTTP request body param ~BEGIN~\n#{req_body}\n~END~\n"
132
130
  end
133
131
  end
134
132
  request.headers = header_params
135
133
  request.body = req_body
134
+ request.options = OpenStruct.new(req_opts)
136
135
  request.url url
137
136
  request.params = query_params
138
137
  download_file(request) if opts[:return_type] == 'File'
@@ -285,11 +284,13 @@ module PulpNpmClient
285
284
  tempfile.write(chunk)
286
285
  end
287
286
  request.on_complete do |response|
288
- tempfile.close if tempfile
289
- @config.logger.info "Temp file written to #{tempfile.path}, please copy the file to a proper folder "\
290
- "with e.g. `FileUtils.cp(tempfile.path, '/new/file/path')` otherwise the temp file "\
291
- "will be deleted automatically with GC. It's also recommended to delete the temp file "\
292
- "explicitly with `tempfile.delete`"
287
+ if tempfile
288
+ tempfile.close
289
+ @config.logger.info "Temp file written to #{tempfile.path}, please copy the file to a proper folder "\
290
+ "with e.g. `FileUtils.cp(tempfile.path, '/new/file/path')` otherwise the temp file "\
291
+ "will be deleted automatically with GC. It's also recommended to delete the temp file "\
292
+ "explicitly with `tempfile.delete`"
293
+ end
293
294
  end
294
295
  end
295
296
 
@@ -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
- OpenAPI Generator version: 4.2.3
9
+ OpenAPI Generator version: 4.3.1
10
10
 
11
11
  =end
12
12
 
@@ -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
- OpenAPI Generator version: 4.2.3
9
+ OpenAPI Generator version: 4.3.1
10
10
 
11
11
  =end
12
12
 
@@ -109,6 +109,12 @@ module PulpNpmClient
109
109
  # Client private key file (for client certificate)
110
110
  attr_accessor :ssl_client_key
111
111
 
112
+ # Set this to customize parameters encoder of array parameter.
113
+ # Default to nil. Faraday uses NestedParamsEncoder when nil.
114
+ #
115
+ # @see The params_encoder option of Faraday. Related source code:
116
+ # https://github.com/lostisland/faraday/tree/main/lib/faraday/encoders
117
+ attr_accessor :params_encoder
112
118
  # Set this to customize parameters encoding of array parameter with multi collectionFormat.
113
119
  # Default to nil.
114
120
  #
@@ -121,7 +127,7 @@ module PulpNpmClient
121
127
  attr_accessor :force_ending_format
122
128
 
123
129
  def initialize
124
- @scheme = 'http'
130
+ @scheme = 'https'
125
131
  @host = 'pulp'
126
132
  @base_path = ''
127
133
  @api_key = {}
@@ -133,6 +139,8 @@ module PulpNpmClient
133
139
  @ssl_ca_file = nil
134
140
  @ssl_client_cert = nil
135
141
  @ssl_client_key = nil
142
+ @params_encoder = nil
143
+ @timeout = 60
136
144
  @debugging = false
137
145
  @inject_format = false
138
146
  @force_ending_format = false
@@ -202,7 +210,7 @@ module PulpNpmClient
202
210
  def server_settings
203
211
  [
204
212
  {
205
- url: "http://pulp/",
213
+ url: "https://pulp/",
206
214
  description: "No description provided",
207
215
  }
208
216
  ]
@@ -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
- OpenAPI Generator version: 4.2.3
9
+ OpenAPI Generator version: 4.3.1
10
10
 
11
11
  =end
12
12
 
@@ -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
- OpenAPI Generator version: 4.2.3
9
+ OpenAPI Generator version: 4.3.1
10
10
 
11
11
  =end
12
12
 
@@ -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
- OpenAPI Generator version: 4.2.3
9
+ OpenAPI Generator version: 4.3.1
10
10
 
11
11
  =end
12
12
 
@@ -29,9 +29,6 @@ module PulpNpmClient
29
29
  # The latest RepositoryVersion for this Repository will be served.
30
30
  attr_accessor :repository
31
31
 
32
- # RepositoryVersion to be served
33
- attr_accessor :repository_version
34
-
35
32
  # Attribute mapping from ruby-style variable name to JSON key.
36
33
  def self.attribute_map
37
34
  {
@@ -39,8 +36,7 @@ module PulpNpmClient
39
36
  :'content_guard' => :'content_guard',
40
37
  :'pulp_labels' => :'pulp_labels',
41
38
  :'name' => :'name',
42
- :'repository' => :'repository',
43
- :'repository_version' => :'repository_version'
39
+ :'repository' => :'repository'
44
40
  }
45
41
  end
46
42
 
@@ -51,8 +47,7 @@ module PulpNpmClient
51
47
  :'content_guard' => :'String',
52
48
  :'pulp_labels' => :'Object',
53
49
  :'name' => :'String',
54
- :'repository' => :'String',
55
- :'repository_version' => :'String'
50
+ :'repository' => :'String'
56
51
  }
57
52
  end
58
53
 
@@ -60,8 +55,7 @@ module PulpNpmClient
60
55
  def self.openapi_nullable
61
56
  Set.new([
62
57
  :'content_guard',
63
- :'repository',
64
- :'repository_version'
58
+ :'repository'
65
59
  ])
66
60
  end
67
61
 
@@ -99,10 +93,6 @@ module PulpNpmClient
99
93
  if attributes.key?(:'repository')
100
94
  self.repository = attributes[:'repository']
101
95
  end
102
-
103
- if attributes.key?(:'repository_version')
104
- self.repository_version = attributes[:'repository_version']
105
- end
106
96
  end
107
97
 
108
98
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -113,10 +103,18 @@ module PulpNpmClient
113
103
  invalid_properties.push('invalid value for "base_path", base_path cannot be nil.')
114
104
  end
115
105
 
106
+ if @base_path.to_s.length < 1
107
+ invalid_properties.push('invalid value for "base_path", the character length must be great than or equal to 1.')
108
+ end
109
+
116
110
  if @name.nil?
117
111
  invalid_properties.push('invalid value for "name", name cannot be nil.')
118
112
  end
119
113
 
114
+ if @name.to_s.length < 1
115
+ invalid_properties.push('invalid value for "name", the character length must be great than or equal to 1.')
116
+ end
117
+
120
118
  invalid_properties
121
119
  end
122
120
 
@@ -124,10 +122,40 @@ module PulpNpmClient
124
122
  # @return true if the model is valid
125
123
  def valid?
126
124
  return false if @base_path.nil?
125
+ return false if @base_path.to_s.length < 1
127
126
  return false if @name.nil?
127
+ return false if @name.to_s.length < 1
128
128
  true
129
129
  end
130
130
 
131
+ # Custom attribute writer method with validation
132
+ # @param [Object] base_path Value to be assigned
133
+ def base_path=(base_path)
134
+ if base_path.nil?
135
+ fail ArgumentError, 'base_path cannot be nil'
136
+ end
137
+
138
+ if base_path.to_s.length < 1
139
+ fail ArgumentError, 'invalid value for "base_path", the character length must be great than or equal to 1.'
140
+ end
141
+
142
+ @base_path = base_path
143
+ end
144
+
145
+ # Custom attribute writer method with validation
146
+ # @param [Object] name Value to be assigned
147
+ def name=(name)
148
+ if name.nil?
149
+ fail ArgumentError, 'name cannot be nil'
150
+ end
151
+
152
+ if name.to_s.length < 1
153
+ fail ArgumentError, 'invalid value for "name", the character length must be great than or equal to 1.'
154
+ end
155
+
156
+ @name = name
157
+ end
158
+
131
159
  # Checks equality by comparing each attribute.
132
160
  # @param [Object] Object to be compared
133
161
  def ==(o)
@@ -137,8 +165,7 @@ module PulpNpmClient
137
165
  content_guard == o.content_guard &&
138
166
  pulp_labels == o.pulp_labels &&
139
167
  name == o.name &&
140
- repository == o.repository &&
141
- repository_version == o.repository_version
168
+ repository == o.repository
142
169
  end
143
170
 
144
171
  # @see the `==` method
@@ -150,7 +177,7 @@ module PulpNpmClient
150
177
  # Calculates hash code according to all attributes.
151
178
  # @return [Integer] Hash code
152
179
  def hash
153
- [base_path, content_guard, pulp_labels, name, repository, repository_version].hash
180
+ [base_path, content_guard, pulp_labels, name, repository].hash
154
181
  end
155
182
 
156
183
  # Builds the object from hash