pulp_maven_client 0.14.0 → 0.15.0
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 +12 -8
- data/docs/ContentArtifactApi.md +18 -8
- data/docs/MavenMavenArtifactResponse.md +1 -1
- data/lib/pulp_maven_client/api/content_artifact_api.rb +30 -10
- data/lib/pulp_maven_client/models/maven_maven_artifact_response.rb +0 -7
- data/lib/pulp_maven_client/version.rb +1 -1
- data/lib/pulp_maven_client.rb +0 -1
- data/spec/api/content_artifact_api_spec.rb +6 -1
- metadata +2 -6
- data/docs/MavenMavenArtifact.md +0 -26
- data/lib/pulp_maven_client/models/maven_maven_artifact.rb +0 -291
- data/spec/models/maven_maven_artifact_spec.rb +0 -60
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: d45224724d8a990989192786764bc604b2a6c5f197f038c9bbf02da41155e6ad
|
|
4
|
+
data.tar.gz: a4853a052fc1ce417fc8d82c086ba2fc8d54e2c05ce29ff51a388c445a50f4d4
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 86aab0ce92617e5e0661f9d2ac0f7ab46552d560a2aaa43091422b808f1ae6a6425f907cdf52e29550b799a0d50d5572d2d02a3118222623c13ce82177cf9f5f
|
|
7
|
+
data.tar.gz: 7c4cc8d459c7ddc6ac8e618b20ca7eef0f9d59303b22a4fe4ae205478c94b6c654adbb50dcb0d639dcd7be6b1a01968b9c162c9566eda0f44f2aacc523c677d5
|
data/README.md
CHANGED
|
@@ -7,7 +7,7 @@ Fetch, Upload, Organize, and Distribute Software Packages
|
|
|
7
7
|
This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
|
|
8
8
|
|
|
9
9
|
- API version: v3
|
|
10
|
-
- Package version: 0.
|
|
10
|
+
- Package version: 0.15.0
|
|
11
11
|
- Generator version: 7.10.0
|
|
12
12
|
- Build package: org.openapitools.codegen.languages.RubyClientCodegen
|
|
13
13
|
For more information, please visit [https://pulpproject.org](https://pulpproject.org)
|
|
@@ -25,16 +25,16 @@ gem build pulp_maven_client.gemspec
|
|
|
25
25
|
Then either install the gem locally:
|
|
26
26
|
|
|
27
27
|
```shell
|
|
28
|
-
gem install ./pulp_maven_client-0.
|
|
28
|
+
gem install ./pulp_maven_client-0.15.0.gem
|
|
29
29
|
```
|
|
30
30
|
|
|
31
|
-
(for development, run `gem install --dev ./pulp_maven_client-0.
|
|
31
|
+
(for development, run `gem install --dev ./pulp_maven_client-0.15.0.gem` to install the development dependencies)
|
|
32
32
|
|
|
33
33
|
or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
|
|
34
34
|
|
|
35
35
|
Finally add this to the Gemfile:
|
|
36
36
|
|
|
37
|
-
gem 'pulp_maven_client', '~> 0.
|
|
37
|
+
gem 'pulp_maven_client', '~> 0.15.0'
|
|
38
38
|
|
|
39
39
|
### Install from Git
|
|
40
40
|
|
|
@@ -68,14 +68,19 @@ PulpMavenClient.configure do |config|
|
|
|
68
68
|
end
|
|
69
69
|
|
|
70
70
|
api_instance = PulpMavenClient::ContentArtifactApi.new
|
|
71
|
-
|
|
71
|
+
relative_path = 'relative_path_example' # String | Path where the artifact is located relative to distributions base_path
|
|
72
72
|
opts = {
|
|
73
|
-
x_task_diagnostics: ['inner_example'] # Array<String> | List of profilers to use on tasks.
|
|
73
|
+
x_task_diagnostics: ['inner_example'], # Array<String> | List of profilers to use on tasks.
|
|
74
|
+
repository: 'repository_example', # String | A URI of a repository the new content unit should be associated with.
|
|
75
|
+
overwrite: true, # Boolean | When set to true, existing content in the repository with the same unique key will be silently overwritten. When set to false, the task will fail if content would be overwritten. Only used when 'repository' is specified. Defaults to true.
|
|
76
|
+
pulp_labels: { key: 'inner_example'}, # Hash<String, String> | A dictionary of arbitrary key/value pairs used to describe a specific Content instance.
|
|
77
|
+
artifact: 'artifact_example', # String | Artifact file representing the physical content
|
|
78
|
+
file: File.new('/path/to/some/file') # File | An uploaded file that may be turned into the content unit.
|
|
74
79
|
}
|
|
75
80
|
|
|
76
81
|
begin
|
|
77
82
|
#Create a maven artifact
|
|
78
|
-
result = api_instance.create(
|
|
83
|
+
result = api_instance.create(relative_path, opts)
|
|
79
84
|
p result
|
|
80
85
|
rescue PulpMavenClient::ApiError => e
|
|
81
86
|
puts "Exception when calling ContentArtifactApi->create: #{e}"
|
|
@@ -132,7 +137,6 @@ Class | Method | HTTP request | Description
|
|
|
132
137
|
|
|
133
138
|
- [PulpMavenClient::AsyncOperationResponse](docs/AsyncOperationResponse.md)
|
|
134
139
|
- [PulpMavenClient::ContentSummaryResponse](docs/ContentSummaryResponse.md)
|
|
135
|
-
- [PulpMavenClient::MavenMavenArtifact](docs/MavenMavenArtifact.md)
|
|
136
140
|
- [PulpMavenClient::MavenMavenArtifactResponse](docs/MavenMavenArtifactResponse.md)
|
|
137
141
|
- [PulpMavenClient::MavenMavenDistribution](docs/MavenMavenDistribution.md)
|
|
138
142
|
- [PulpMavenClient::MavenMavenDistributionResponse](docs/MavenMavenDistributionResponse.md)
|
data/docs/ContentArtifactApi.md
CHANGED
|
@@ -13,7 +13,7 @@ All URIs are relative to *http://localhost:24817*
|
|
|
13
13
|
|
|
14
14
|
## create
|
|
15
15
|
|
|
16
|
-
> <MavenMavenArtifactResponse> create(
|
|
16
|
+
> <MavenMavenArtifactResponse> create(relative_path, opts)
|
|
17
17
|
|
|
18
18
|
Create a maven artifact
|
|
19
19
|
|
|
@@ -32,14 +32,19 @@ PulpMavenClient.configure do |config|
|
|
|
32
32
|
end
|
|
33
33
|
|
|
34
34
|
api_instance = PulpMavenClient::ContentArtifactApi.new
|
|
35
|
-
|
|
35
|
+
relative_path = 'relative_path_example' # String | Path where the artifact is located relative to distributions base_path
|
|
36
36
|
opts = {
|
|
37
|
-
x_task_diagnostics: ['inner_example'] # Array<String> | List of profilers to use on tasks.
|
|
37
|
+
x_task_diagnostics: ['inner_example'], # Array<String> | List of profilers to use on tasks.
|
|
38
|
+
repository: 'repository_example', # String | A URI of a repository the new content unit should be associated with.
|
|
39
|
+
overwrite: true, # Boolean | When set to true, existing content in the repository with the same unique key will be silently overwritten. When set to false, the task will fail if content would be overwritten. Only used when 'repository' is specified. Defaults to true.
|
|
40
|
+
pulp_labels: { key: 'inner_example'}, # Hash<String, String> | A dictionary of arbitrary key/value pairs used to describe a specific Content instance.
|
|
41
|
+
artifact: 'artifact_example', # String | Artifact file representing the physical content
|
|
42
|
+
file: File.new('/path/to/some/file') # File | An uploaded file that may be turned into the content unit.
|
|
38
43
|
}
|
|
39
44
|
|
|
40
45
|
begin
|
|
41
46
|
# Create a maven artifact
|
|
42
|
-
result = api_instance.create(
|
|
47
|
+
result = api_instance.create(relative_path, opts)
|
|
43
48
|
p result
|
|
44
49
|
rescue PulpMavenClient::ApiError => e
|
|
45
50
|
puts "Error when calling ContentArtifactApi->create: #{e}"
|
|
@@ -50,12 +55,12 @@ end
|
|
|
50
55
|
|
|
51
56
|
This returns an Array which contains the response data, status code and headers.
|
|
52
57
|
|
|
53
|
-
> <Array(<MavenMavenArtifactResponse>, Integer, Hash)> create_with_http_info(
|
|
58
|
+
> <Array(<MavenMavenArtifactResponse>, Integer, Hash)> create_with_http_info(relative_path, opts)
|
|
54
59
|
|
|
55
60
|
```ruby
|
|
56
61
|
begin
|
|
57
62
|
# Create a maven artifact
|
|
58
|
-
data, status_code, headers = api_instance.create_with_http_info(
|
|
63
|
+
data, status_code, headers = api_instance.create_with_http_info(relative_path, opts)
|
|
59
64
|
p status_code # => 2xx
|
|
60
65
|
p headers # => { ... }
|
|
61
66
|
p data # => <MavenMavenArtifactResponse>
|
|
@@ -68,8 +73,13 @@ end
|
|
|
68
73
|
|
|
69
74
|
| Name | Type | Description | Notes |
|
|
70
75
|
| ---- | ---- | ----------- | ----- |
|
|
71
|
-
| **
|
|
76
|
+
| **relative_path** | **String** | Path where the artifact is located relative to distributions base_path | |
|
|
72
77
|
| **x_task_diagnostics** | [**Array<String>**](String.md) | List of profilers to use on tasks. | [optional] |
|
|
78
|
+
| **repository** | **String** | A URI of a repository the new content unit should be associated with. | [optional] |
|
|
79
|
+
| **overwrite** | **Boolean** | When set to true, existing content in the repository with the same unique key will be silently overwritten. When set to false, the task will fail if content would be overwritten. Only used when 'repository' is specified. Defaults to true. | [optional] |
|
|
80
|
+
| **pulp_labels** | [**Hash<String, String>**](Hash.md) | A dictionary of arbitrary key/value pairs used to describe a specific Content instance. | [optional] |
|
|
81
|
+
| **artifact** | **String** | Artifact file representing the physical content | [optional] |
|
|
82
|
+
| **file** | **File** | An uploaded file that may be turned into the content unit. | [optional] |
|
|
73
83
|
|
|
74
84
|
### Return type
|
|
75
85
|
|
|
@@ -81,7 +91,7 @@ end
|
|
|
81
91
|
|
|
82
92
|
### HTTP request headers
|
|
83
93
|
|
|
84
|
-
- **Content-Type**:
|
|
94
|
+
- **Content-Type**: multipart/form-data, application/x-www-form-urlencoded
|
|
85
95
|
- **Accept**: application/json
|
|
86
96
|
|
|
87
97
|
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
| **pulp_last_updated** | **Time** | Timestamp of the last time this resource was updated. Note: for immutable resources - like content, repository versions, and publication - pulp_created and pulp_last_updated dates will be the same. | [optional][readonly] |
|
|
11
11
|
| **pulp_labels** | **Hash<String, String>** | A dictionary of arbitrary key/value pairs used to describe a specific Content instance. | [optional] |
|
|
12
12
|
| **vuln_report** | **String** | | [optional][readonly] |
|
|
13
|
-
| **artifact** | **String** | Artifact file representing the physical content |
|
|
13
|
+
| **artifact** | **String** | Artifact file representing the physical content | [optional] |
|
|
14
14
|
| **group_id** | **String** | Group Id of the artifact's package. | [optional][readonly] |
|
|
15
15
|
| **artifact_id** | **String** | Artifact Id of the artifact's package. | [optional][readonly] |
|
|
16
16
|
| **version** | **String** | Version of the artifact's package. | [optional][readonly] |
|
|
@@ -21,29 +21,43 @@ module PulpMavenClient
|
|
|
21
21
|
end
|
|
22
22
|
# Create a maven artifact
|
|
23
23
|
# A ViewSet for MavenArtifact.
|
|
24
|
-
# @param
|
|
24
|
+
# @param relative_path [String] Path where the artifact is located relative to distributions base_path
|
|
25
25
|
# @param [Hash] opts the optional parameters
|
|
26
26
|
# @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
|
|
27
|
+
# @option opts [String] :repository A URI of a repository the new content unit should be associated with.
|
|
28
|
+
# @option opts [Boolean] :overwrite When set to true, existing content in the repository with the same unique key will be silently overwritten. When set to false, the task will fail if content would be overwritten. Only used when 'repository' is specified. Defaults to true.
|
|
29
|
+
# @option opts [Hash<String, String>] :pulp_labels A dictionary of arbitrary key/value pairs used to describe a specific Content instance.
|
|
30
|
+
# @option opts [String] :artifact Artifact file representing the physical content
|
|
31
|
+
# @option opts [File] :file An uploaded file that may be turned into the content unit.
|
|
27
32
|
# @return [MavenMavenArtifactResponse]
|
|
28
|
-
def create(
|
|
29
|
-
data, _status_code, _headers = create_with_http_info(
|
|
33
|
+
def create(relative_path, opts = {})
|
|
34
|
+
data, _status_code, _headers = create_with_http_info(relative_path, opts)
|
|
30
35
|
data
|
|
31
36
|
end
|
|
32
37
|
|
|
33
38
|
# Create a maven artifact
|
|
34
39
|
# A ViewSet for MavenArtifact.
|
|
35
|
-
# @param
|
|
40
|
+
# @param relative_path [String] Path where the artifact is located relative to distributions base_path
|
|
36
41
|
# @param [Hash] opts the optional parameters
|
|
37
42
|
# @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
|
|
43
|
+
# @option opts [String] :repository A URI of a repository the new content unit should be associated with.
|
|
44
|
+
# @option opts [Boolean] :overwrite When set to true, existing content in the repository with the same unique key will be silently overwritten. When set to false, the task will fail if content would be overwritten. Only used when 'repository' is specified. Defaults to true.
|
|
45
|
+
# @option opts [Hash<String, String>] :pulp_labels A dictionary of arbitrary key/value pairs used to describe a specific Content instance.
|
|
46
|
+
# @option opts [String] :artifact Artifact file representing the physical content
|
|
47
|
+
# @option opts [File] :file An uploaded file that may be turned into the content unit.
|
|
38
48
|
# @return [Array<(MavenMavenArtifactResponse, Integer, Hash)>] MavenMavenArtifactResponse data, response status code and response headers
|
|
39
|
-
def create_with_http_info(
|
|
49
|
+
def create_with_http_info(relative_path, opts = {})
|
|
40
50
|
if @api_client.config.debugging
|
|
41
51
|
@api_client.config.logger.debug 'Calling API: ContentArtifactApi.create ...'
|
|
42
52
|
end
|
|
43
|
-
# verify the required parameter '
|
|
44
|
-
if @api_client.config.client_side_validation &&
|
|
45
|
-
fail ArgumentError, "Missing the required parameter '
|
|
53
|
+
# verify the required parameter 'relative_path' is set
|
|
54
|
+
if @api_client.config.client_side_validation && relative_path.nil?
|
|
55
|
+
fail ArgumentError, "Missing the required parameter 'relative_path' when calling ContentArtifactApi.create"
|
|
46
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 ContentArtifactApi.create, the character length must be great than or equal to 1.'
|
|
59
|
+
end
|
|
60
|
+
|
|
47
61
|
# resource path
|
|
48
62
|
local_var_path = '/pulp/api/v3/content/maven/artifact/'
|
|
49
63
|
|
|
@@ -55,7 +69,7 @@ module PulpMavenClient
|
|
|
55
69
|
# HTTP header 'Accept' (if needed)
|
|
56
70
|
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
57
71
|
# HTTP header 'Content-Type'
|
|
58
|
-
content_type = @api_client.select_header_content_type(['
|
|
72
|
+
content_type = @api_client.select_header_content_type(['multipart/form-data', 'application/x-www-form-urlencoded'])
|
|
59
73
|
if !content_type.nil?
|
|
60
74
|
header_params['Content-Type'] = content_type
|
|
61
75
|
end
|
|
@@ -63,9 +77,15 @@ module PulpMavenClient
|
|
|
63
77
|
|
|
64
78
|
# form parameters
|
|
65
79
|
form_params = opts[:form_params] || {}
|
|
80
|
+
form_params['relative_path'] = relative_path
|
|
81
|
+
form_params['repository'] = opts[:'repository'] if !opts[:'repository'].nil?
|
|
82
|
+
form_params['overwrite'] = opts[:'overwrite'] if !opts[:'overwrite'].nil?
|
|
83
|
+
form_params['pulp_labels'] = opts[:'pulp_labels'] if !opts[:'pulp_labels'].nil?
|
|
84
|
+
form_params['artifact'] = opts[:'artifact'] if !opts[:'artifact'].nil?
|
|
85
|
+
form_params['file'] = opts[:'file'] if !opts[:'file'].nil?
|
|
66
86
|
|
|
67
87
|
# http body (model)
|
|
68
|
-
post_body = opts[:debug_body]
|
|
88
|
+
post_body = opts[:debug_body]
|
|
69
89
|
|
|
70
90
|
# return_type
|
|
71
91
|
return_type = opts[:debug_return_type] || 'MavenMavenArtifactResponse'
|
|
@@ -135,8 +135,6 @@ module PulpMavenClient
|
|
|
135
135
|
|
|
136
136
|
if attributes.key?(:'artifact')
|
|
137
137
|
self.artifact = attributes[:'artifact']
|
|
138
|
-
else
|
|
139
|
-
self.artifact = nil
|
|
140
138
|
end
|
|
141
139
|
|
|
142
140
|
if attributes.key?(:'group_id')
|
|
@@ -161,10 +159,6 @@ module PulpMavenClient
|
|
|
161
159
|
def list_invalid_properties
|
|
162
160
|
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
163
161
|
invalid_properties = Array.new
|
|
164
|
-
if @artifact.nil?
|
|
165
|
-
invalid_properties.push('invalid value for "artifact", artifact cannot be nil.')
|
|
166
|
-
end
|
|
167
|
-
|
|
168
162
|
invalid_properties
|
|
169
163
|
end
|
|
170
164
|
|
|
@@ -172,7 +166,6 @@ module PulpMavenClient
|
|
|
172
166
|
# @return true if the model is valid
|
|
173
167
|
def valid?
|
|
174
168
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
175
|
-
return false if @artifact.nil?
|
|
176
169
|
true
|
|
177
170
|
end
|
|
178
171
|
|
data/lib/pulp_maven_client.rb
CHANGED
|
@@ -19,7 +19,6 @@ require 'pulp_maven_client/configuration'
|
|
|
19
19
|
# Models
|
|
20
20
|
require 'pulp_maven_client/models/async_operation_response'
|
|
21
21
|
require 'pulp_maven_client/models/content_summary_response'
|
|
22
|
-
require 'pulp_maven_client/models/maven_maven_artifact'
|
|
23
22
|
require 'pulp_maven_client/models/maven_maven_artifact_response'
|
|
24
23
|
require 'pulp_maven_client/models/maven_maven_distribution'
|
|
25
24
|
require 'pulp_maven_client/models/maven_maven_distribution_response'
|
|
@@ -35,9 +35,14 @@ describe 'ContentArtifactApi' do
|
|
|
35
35
|
# unit tests for create
|
|
36
36
|
# Create a maven artifact
|
|
37
37
|
# A ViewSet for MavenArtifact.
|
|
38
|
-
# @param
|
|
38
|
+
# @param relative_path Path where the artifact is located relative to distributions base_path
|
|
39
39
|
# @param [Hash] opts the optional parameters
|
|
40
40
|
# @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
|
|
41
|
+
# @option opts [String] :repository A URI of a repository the new content unit should be associated with.
|
|
42
|
+
# @option opts [Boolean] :overwrite When set to true, existing content in the repository with the same unique key will be silently overwritten. When set to false, the task will fail if content would be overwritten. Only used when 'repository' is specified. Defaults to true.
|
|
43
|
+
# @option opts [Hash<String, String>] :pulp_labels A dictionary of arbitrary key/value pairs used to describe a specific Content instance.
|
|
44
|
+
# @option opts [String] :artifact Artifact file representing the physical content
|
|
45
|
+
# @option opts [File] :file An uploaded file that may be turned into the content unit.
|
|
41
46
|
# @return [MavenMavenArtifactResponse]
|
|
42
47
|
describe 'create test' do
|
|
43
48
|
it 'should work' do
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: pulp_maven_client
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.15.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- OpenAPI-Generator
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-06-
|
|
11
|
+
date: 2026-06-26 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: faraday
|
|
@@ -92,7 +92,6 @@ files:
|
|
|
92
92
|
- docs/ContentArtifactApi.md
|
|
93
93
|
- docs/ContentSummaryResponse.md
|
|
94
94
|
- docs/DistributionsMavenApi.md
|
|
95
|
-
- docs/MavenMavenArtifact.md
|
|
96
95
|
- docs/MavenMavenArtifactResponse.md
|
|
97
96
|
- docs/MavenMavenDistribution.md
|
|
98
97
|
- docs/MavenMavenDistributionResponse.md
|
|
@@ -134,7 +133,6 @@ files:
|
|
|
134
133
|
- lib/pulp_maven_client/configuration.rb
|
|
135
134
|
- lib/pulp_maven_client/models/async_operation_response.rb
|
|
136
135
|
- lib/pulp_maven_client/models/content_summary_response.rb
|
|
137
|
-
- lib/pulp_maven_client/models/maven_maven_artifact.rb
|
|
138
136
|
- lib/pulp_maven_client/models/maven_maven_artifact_response.rb
|
|
139
137
|
- lib/pulp_maven_client/models/maven_maven_distribution.rb
|
|
140
138
|
- lib/pulp_maven_client/models/maven_maven_distribution_response.rb
|
|
@@ -171,7 +169,6 @@ files:
|
|
|
171
169
|
- spec/models/async_operation_response_spec.rb
|
|
172
170
|
- spec/models/content_summary_response_spec.rb
|
|
173
171
|
- spec/models/maven_maven_artifact_response_spec.rb
|
|
174
|
-
- spec/models/maven_maven_artifact_spec.rb
|
|
175
172
|
- spec/models/maven_maven_distribution_response_spec.rb
|
|
176
173
|
- spec/models/maven_maven_distribution_spec.rb
|
|
177
174
|
- spec/models/maven_maven_remote_response_hidden_fields_inner_spec.rb
|
|
@@ -227,7 +224,6 @@ test_files:
|
|
|
227
224
|
- spec/api/remotes_maven_api_spec.rb
|
|
228
225
|
- spec/api/repositories_maven_versions_api_spec.rb
|
|
229
226
|
- spec/api/pulp_maven_api_spec.rb
|
|
230
|
-
- spec/models/maven_maven_artifact_spec.rb
|
|
231
227
|
- spec/models/content_summary_response_spec.rb
|
|
232
228
|
- spec/models/maven_maven_repository_response_spec.rb
|
|
233
229
|
- spec/models/unset_label_spec.rb
|
data/docs/MavenMavenArtifact.md
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
# PulpMavenClient::MavenMavenArtifact
|
|
2
|
-
|
|
3
|
-
## Properties
|
|
4
|
-
|
|
5
|
-
| Name | Type | Description | Notes |
|
|
6
|
-
| ---- | ---- | ----------- | ----- |
|
|
7
|
-
| **repository** | **String** | A URI of a repository the new content unit should be associated with. | [optional] |
|
|
8
|
-
| **overwrite** | **Boolean** | When set to true, existing content in the repository with the same unique key will be silently overwritten. When set to false, the task will fail if content would be overwritten. Only used when 'repository' is specified. Defaults to true. | [optional] |
|
|
9
|
-
| **pulp_labels** | **Hash<String, String>** | A dictionary of arbitrary key/value pairs used to describe a specific Content instance. | [optional] |
|
|
10
|
-
| **artifact** | **String** | Artifact file representing the physical content | |
|
|
11
|
-
| **relative_path** | **String** | Path where the artifact is located relative to distributions base_path | |
|
|
12
|
-
|
|
13
|
-
## Example
|
|
14
|
-
|
|
15
|
-
```ruby
|
|
16
|
-
require 'pulp_maven_client'
|
|
17
|
-
|
|
18
|
-
instance = PulpMavenClient::MavenMavenArtifact.new(
|
|
19
|
-
repository: null,
|
|
20
|
-
overwrite: null,
|
|
21
|
-
pulp_labels: null,
|
|
22
|
-
artifact: null,
|
|
23
|
-
relative_path: null
|
|
24
|
-
)
|
|
25
|
-
```
|
|
26
|
-
|
|
@@ -1,291 +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
|
-
Generator version: 7.10.0
|
|
10
|
-
|
|
11
|
-
=end
|
|
12
|
-
|
|
13
|
-
require 'date'
|
|
14
|
-
require 'time'
|
|
15
|
-
|
|
16
|
-
module PulpMavenClient
|
|
17
|
-
# A Serializer for MavenArtifact.
|
|
18
|
-
class MavenMavenArtifact
|
|
19
|
-
# A URI of a repository the new content unit should be associated with.
|
|
20
|
-
attr_accessor :repository
|
|
21
|
-
|
|
22
|
-
# When set to true, existing content in the repository with the same unique key will be silently overwritten. When set to false, the task will fail if content would be overwritten. Only used when 'repository' is specified. Defaults to true.
|
|
23
|
-
attr_accessor :overwrite
|
|
24
|
-
|
|
25
|
-
# A dictionary of arbitrary key/value pairs used to describe a specific Content instance.
|
|
26
|
-
attr_accessor :pulp_labels
|
|
27
|
-
|
|
28
|
-
# Artifact file representing the physical content
|
|
29
|
-
attr_accessor :artifact
|
|
30
|
-
|
|
31
|
-
# Path where the artifact is located relative to distributions base_path
|
|
32
|
-
attr_accessor :relative_path
|
|
33
|
-
|
|
34
|
-
# Attribute mapping from ruby-style variable name to JSON key.
|
|
35
|
-
def self.attribute_map
|
|
36
|
-
{
|
|
37
|
-
:'repository' => :'repository',
|
|
38
|
-
:'overwrite' => :'overwrite',
|
|
39
|
-
:'pulp_labels' => :'pulp_labels',
|
|
40
|
-
:'artifact' => :'artifact',
|
|
41
|
-
:'relative_path' => :'relative_path'
|
|
42
|
-
}
|
|
43
|
-
end
|
|
44
|
-
|
|
45
|
-
# Returns all the JSON keys this model knows about
|
|
46
|
-
def self.acceptable_attributes
|
|
47
|
-
attribute_map.values
|
|
48
|
-
end
|
|
49
|
-
|
|
50
|
-
# Attribute type mapping.
|
|
51
|
-
def self.openapi_types
|
|
52
|
-
{
|
|
53
|
-
:'repository' => :'String',
|
|
54
|
-
:'overwrite' => :'Boolean',
|
|
55
|
-
:'pulp_labels' => :'Hash<String, String>',
|
|
56
|
-
:'artifact' => :'String',
|
|
57
|
-
:'relative_path' => :'String'
|
|
58
|
-
}
|
|
59
|
-
end
|
|
60
|
-
|
|
61
|
-
# List of attributes with nullable: true
|
|
62
|
-
def self.openapi_nullable
|
|
63
|
-
Set.new([
|
|
64
|
-
])
|
|
65
|
-
end
|
|
66
|
-
|
|
67
|
-
# Initializes the object
|
|
68
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
|
69
|
-
def initialize(attributes = {})
|
|
70
|
-
if (!attributes.is_a?(Hash))
|
|
71
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `PulpMavenClient::MavenMavenArtifact` initialize method"
|
|
72
|
-
end
|
|
73
|
-
|
|
74
|
-
# check to see if the attribute exists and convert string to symbol for hash key
|
|
75
|
-
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
76
|
-
if (!self.class.attribute_map.key?(k.to_sym))
|
|
77
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `PulpMavenClient::MavenMavenArtifact`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
78
|
-
end
|
|
79
|
-
h[k.to_sym] = v
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
if attributes.key?(:'repository')
|
|
83
|
-
self.repository = attributes[:'repository']
|
|
84
|
-
end
|
|
85
|
-
|
|
86
|
-
if attributes.key?(:'overwrite')
|
|
87
|
-
self.overwrite = attributes[:'overwrite']
|
|
88
|
-
end
|
|
89
|
-
|
|
90
|
-
if attributes.key?(:'pulp_labels')
|
|
91
|
-
if (value = attributes[:'pulp_labels']).is_a?(Hash)
|
|
92
|
-
self.pulp_labels = value
|
|
93
|
-
end
|
|
94
|
-
end
|
|
95
|
-
|
|
96
|
-
if attributes.key?(:'artifact')
|
|
97
|
-
self.artifact = attributes[:'artifact']
|
|
98
|
-
else
|
|
99
|
-
self.artifact = nil
|
|
100
|
-
end
|
|
101
|
-
|
|
102
|
-
if attributes.key?(:'relative_path')
|
|
103
|
-
self.relative_path = attributes[:'relative_path']
|
|
104
|
-
else
|
|
105
|
-
self.relative_path = nil
|
|
106
|
-
end
|
|
107
|
-
end
|
|
108
|
-
|
|
109
|
-
# Show invalid properties with the reasons. Usually used together with valid?
|
|
110
|
-
# @return Array for valid properties with the reasons
|
|
111
|
-
def list_invalid_properties
|
|
112
|
-
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
113
|
-
invalid_properties = Array.new
|
|
114
|
-
if @artifact.nil?
|
|
115
|
-
invalid_properties.push('invalid value for "artifact", artifact cannot be nil.')
|
|
116
|
-
end
|
|
117
|
-
|
|
118
|
-
if @relative_path.nil?
|
|
119
|
-
invalid_properties.push('invalid value for "relative_path", relative_path cannot be nil.')
|
|
120
|
-
end
|
|
121
|
-
|
|
122
|
-
if @relative_path.to_s.length < 1
|
|
123
|
-
invalid_properties.push('invalid value for "relative_path", the character length must be great than or equal to 1.')
|
|
124
|
-
end
|
|
125
|
-
|
|
126
|
-
invalid_properties
|
|
127
|
-
end
|
|
128
|
-
|
|
129
|
-
# Check to see if the all the properties in the model are valid
|
|
130
|
-
# @return true if the model is valid
|
|
131
|
-
def valid?
|
|
132
|
-
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
133
|
-
return false if @artifact.nil?
|
|
134
|
-
return false if @relative_path.nil?
|
|
135
|
-
return false if @relative_path.to_s.length < 1
|
|
136
|
-
true
|
|
137
|
-
end
|
|
138
|
-
|
|
139
|
-
# Custom attribute writer method with validation
|
|
140
|
-
# @param [Object] relative_path Value to be assigned
|
|
141
|
-
def relative_path=(relative_path)
|
|
142
|
-
if relative_path.nil?
|
|
143
|
-
fail ArgumentError, 'relative_path cannot be nil'
|
|
144
|
-
end
|
|
145
|
-
|
|
146
|
-
if relative_path.to_s.length < 1
|
|
147
|
-
fail ArgumentError, 'invalid value for "relative_path", the character length must be great than or equal to 1.'
|
|
148
|
-
end
|
|
149
|
-
|
|
150
|
-
@relative_path = relative_path
|
|
151
|
-
end
|
|
152
|
-
|
|
153
|
-
# Checks equality by comparing each attribute.
|
|
154
|
-
# @param [Object] Object to be compared
|
|
155
|
-
def ==(o)
|
|
156
|
-
return true if self.equal?(o)
|
|
157
|
-
self.class == o.class &&
|
|
158
|
-
repository == o.repository &&
|
|
159
|
-
overwrite == o.overwrite &&
|
|
160
|
-
pulp_labels == o.pulp_labels &&
|
|
161
|
-
artifact == o.artifact &&
|
|
162
|
-
relative_path == o.relative_path
|
|
163
|
-
end
|
|
164
|
-
|
|
165
|
-
# @see the `==` method
|
|
166
|
-
# @param [Object] Object to be compared
|
|
167
|
-
def eql?(o)
|
|
168
|
-
self == o
|
|
169
|
-
end
|
|
170
|
-
|
|
171
|
-
# Calculates hash code according to all attributes.
|
|
172
|
-
# @return [Integer] Hash code
|
|
173
|
-
def hash
|
|
174
|
-
[repository, overwrite, pulp_labels, artifact, relative_path].hash
|
|
175
|
-
end
|
|
176
|
-
|
|
177
|
-
# Builds the object from hash
|
|
178
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
|
179
|
-
# @return [Object] Returns the model itself
|
|
180
|
-
def self.build_from_hash(attributes)
|
|
181
|
-
return nil unless attributes.is_a?(Hash)
|
|
182
|
-
attributes = attributes.transform_keys(&:to_sym)
|
|
183
|
-
transformed_hash = {}
|
|
184
|
-
openapi_types.each_pair do |key, type|
|
|
185
|
-
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
186
|
-
transformed_hash["#{key}"] = nil
|
|
187
|
-
elsif type =~ /\AArray<(.*)>/i
|
|
188
|
-
# check to ensure the input is an array given that the attribute
|
|
189
|
-
# is documented as an array but the input is not
|
|
190
|
-
if attributes[attribute_map[key]].is_a?(Array)
|
|
191
|
-
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
192
|
-
end
|
|
193
|
-
elsif !attributes[attribute_map[key]].nil?
|
|
194
|
-
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
195
|
-
end
|
|
196
|
-
end
|
|
197
|
-
new(transformed_hash)
|
|
198
|
-
end
|
|
199
|
-
|
|
200
|
-
# Deserializes the data based on type
|
|
201
|
-
# @param string type Data type
|
|
202
|
-
# @param string value Value to be deserialized
|
|
203
|
-
# @return [Object] Deserialized data
|
|
204
|
-
def self._deserialize(type, value)
|
|
205
|
-
case type.to_sym
|
|
206
|
-
when :Time
|
|
207
|
-
Time.parse(value)
|
|
208
|
-
when :Date
|
|
209
|
-
Date.parse(value)
|
|
210
|
-
when :String
|
|
211
|
-
value.to_s
|
|
212
|
-
when :Integer
|
|
213
|
-
value.to_i
|
|
214
|
-
when :Float
|
|
215
|
-
value.to_f
|
|
216
|
-
when :Boolean
|
|
217
|
-
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
218
|
-
true
|
|
219
|
-
else
|
|
220
|
-
false
|
|
221
|
-
end
|
|
222
|
-
when :Object
|
|
223
|
-
# generic object (usually a Hash), return directly
|
|
224
|
-
value
|
|
225
|
-
when /\AArray<(?<inner_type>.+)>\z/
|
|
226
|
-
inner_type = Regexp.last_match[:inner_type]
|
|
227
|
-
value.map { |v| _deserialize(inner_type, v) }
|
|
228
|
-
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
229
|
-
k_type = Regexp.last_match[:k_type]
|
|
230
|
-
v_type = Regexp.last_match[:v_type]
|
|
231
|
-
{}.tap do |hash|
|
|
232
|
-
value.each do |k, v|
|
|
233
|
-
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
234
|
-
end
|
|
235
|
-
end
|
|
236
|
-
else # model
|
|
237
|
-
# models (e.g. Pet) or oneOf
|
|
238
|
-
klass = PulpMavenClient.const_get(type)
|
|
239
|
-
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
240
|
-
end
|
|
241
|
-
end
|
|
242
|
-
|
|
243
|
-
# Returns the string representation of the object
|
|
244
|
-
# @return [String] String presentation of the object
|
|
245
|
-
def to_s
|
|
246
|
-
to_hash.to_s
|
|
247
|
-
end
|
|
248
|
-
|
|
249
|
-
# to_body is an alias to to_hash (backward compatibility)
|
|
250
|
-
# @return [Hash] Returns the object in the form of hash
|
|
251
|
-
def to_body
|
|
252
|
-
to_hash
|
|
253
|
-
end
|
|
254
|
-
|
|
255
|
-
# Returns the object in the form of hash
|
|
256
|
-
# @return [Hash] Returns the object in the form of hash
|
|
257
|
-
def to_hash
|
|
258
|
-
hash = {}
|
|
259
|
-
self.class.attribute_map.each_pair do |attr, param|
|
|
260
|
-
value = self.send(attr)
|
|
261
|
-
if value.nil?
|
|
262
|
-
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
263
|
-
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
264
|
-
end
|
|
265
|
-
|
|
266
|
-
hash[param] = _to_hash(value)
|
|
267
|
-
end
|
|
268
|
-
hash
|
|
269
|
-
end
|
|
270
|
-
|
|
271
|
-
# Outputs non-array value in the form of hash
|
|
272
|
-
# For object, use to_hash. Otherwise, just return the value
|
|
273
|
-
# @param [Object] value Any valid value
|
|
274
|
-
# @return [Hash] Returns the value in the form of hash
|
|
275
|
-
def _to_hash(value)
|
|
276
|
-
if value.is_a?(Array)
|
|
277
|
-
value.compact.map { |v| _to_hash(v) }
|
|
278
|
-
elsif value.is_a?(Hash)
|
|
279
|
-
{}.tap do |hash|
|
|
280
|
-
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
281
|
-
end
|
|
282
|
-
elsif value.respond_to? :to_hash
|
|
283
|
-
value.to_hash
|
|
284
|
-
else
|
|
285
|
-
value
|
|
286
|
-
end
|
|
287
|
-
end
|
|
288
|
-
|
|
289
|
-
end
|
|
290
|
-
|
|
291
|
-
end
|
|
@@ -1,60 +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
|
-
Generator version: 7.10.0
|
|
10
|
-
|
|
11
|
-
=end
|
|
12
|
-
|
|
13
|
-
require 'spec_helper'
|
|
14
|
-
require 'json'
|
|
15
|
-
require 'date'
|
|
16
|
-
|
|
17
|
-
# Unit tests for PulpMavenClient::MavenMavenArtifact
|
|
18
|
-
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
19
|
-
# Please update as you see appropriate
|
|
20
|
-
describe PulpMavenClient::MavenMavenArtifact do
|
|
21
|
-
let(:instance) { PulpMavenClient::MavenMavenArtifact.new }
|
|
22
|
-
|
|
23
|
-
describe 'test an instance of MavenMavenArtifact' do
|
|
24
|
-
it 'should create an instance of MavenMavenArtifact' do
|
|
25
|
-
# uncomment below to test the instance creation
|
|
26
|
-
#expect(instance).to be_instance_of(PulpMavenClient::MavenMavenArtifact)
|
|
27
|
-
end
|
|
28
|
-
end
|
|
29
|
-
|
|
30
|
-
describe 'test attribute "repository"' do
|
|
31
|
-
it 'should work' do
|
|
32
|
-
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
33
|
-
end
|
|
34
|
-
end
|
|
35
|
-
|
|
36
|
-
describe 'test attribute "overwrite"' do
|
|
37
|
-
it 'should work' do
|
|
38
|
-
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
39
|
-
end
|
|
40
|
-
end
|
|
41
|
-
|
|
42
|
-
describe 'test attribute "pulp_labels"' do
|
|
43
|
-
it 'should work' do
|
|
44
|
-
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
45
|
-
end
|
|
46
|
-
end
|
|
47
|
-
|
|
48
|
-
describe 'test attribute "artifact"' do
|
|
49
|
-
it 'should work' do
|
|
50
|
-
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
51
|
-
end
|
|
52
|
-
end
|
|
53
|
-
|
|
54
|
-
describe 'test attribute "relative_path"' do
|
|
55
|
-
it 'should work' do
|
|
56
|
-
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
57
|
-
end
|
|
58
|
-
end
|
|
59
|
-
|
|
60
|
-
end
|