rokka_client_codegen 0.0.1

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 (84) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +7 -0
  3. data/LICENSE +21 -0
  4. data/README.md +123 -0
  5. data/Rakefile +8 -0
  6. data/config.json +5 -0
  7. data/docs/AdminApi.md +398 -0
  8. data/docs/ListSourceImagesResponse.md +11 -0
  9. data/docs/ListStacksResponse.md +8 -0
  10. data/docs/Membership.md +11 -0
  11. data/docs/Organization.md +14 -0
  12. data/docs/OrganizationDefinition.md +10 -0
  13. data/docs/OrganizationOptions.md +10 -0
  14. data/docs/Role.md +8 -0
  15. data/docs/SourceImage.md +24 -0
  16. data/docs/SourceimagesApi.md +1032 -0
  17. data/docs/Stack.md +14 -0
  18. data/docs/StackDefinition.md +10 -0
  19. data/docs/StackExpression.md +9 -0
  20. data/docs/StackExpressionOverrides.md +8 -0
  21. data/docs/StackOperation.md +9 -0
  22. data/docs/StackOperationDescription.md +11 -0
  23. data/docs/StackOptions.md +8 -0
  24. data/docs/StacksApi.md +329 -0
  25. data/docs/User.md +11 -0
  26. data/docs/UserDefinition.md +9 -0
  27. data/examples/createstack.rb +33 -0
  28. data/examples/liststacks.rb +19 -0
  29. data/examples/setsubjectarea.rb +37 -0
  30. data/examples/uploadimage.rb +28 -0
  31. data/generate.sh +3 -0
  32. data/git_push.sh +55 -0
  33. data/lib/rokka_client_codegen.rb +59 -0
  34. data/lib/rokka_client_codegen/api/admin_api.rb +439 -0
  35. data/lib/rokka_client_codegen/api/sourceimages_api.rb +1225 -0
  36. data/lib/rokka_client_codegen/api/stacks_api.rb +371 -0
  37. data/lib/rokka_client_codegen/api_client.rb +389 -0
  38. data/lib/rokka_client_codegen/api_error.rb +38 -0
  39. data/lib/rokka_client_codegen/configuration.rb +209 -0
  40. data/lib/rokka_client_codegen/models/list_source_images_response.rb +217 -0
  41. data/lib/rokka_client_codegen/models/list_stacks_response.rb +190 -0
  42. data/lib/rokka_client_codegen/models/membership.rb +215 -0
  43. data/lib/rokka_client_codegen/models/organization.rb +264 -0
  44. data/lib/rokka_client_codegen/models/organization_definition.rb +211 -0
  45. data/lib/rokka_client_codegen/models/organization_options.rb +208 -0
  46. data/lib/rokka_client_codegen/models/role.rb +194 -0
  47. data/lib/rokka_client_codegen/models/source_image.rb +333 -0
  48. data/lib/rokka_client_codegen/models/stack.rb +246 -0
  49. data/lib/rokka_client_codegen/models/stack_definition.rb +217 -0
  50. data/lib/rokka_client_codegen/models/stack_expression.rb +207 -0
  51. data/lib/rokka_client_codegen/models/stack_expression_overrides.rb +188 -0
  52. data/lib/rokka_client_codegen/models/stack_operation.rb +203 -0
  53. data/lib/rokka_client_codegen/models/stack_operation_description.rb +231 -0
  54. data/lib/rokka_client_codegen/models/stack_options.rb +193 -0
  55. data/lib/rokka_client_codegen/models/user.rb +216 -0
  56. data/lib/rokka_client_codegen/models/user_definition.rb +204 -0
  57. data/lib/rokka_client_codegen/version.rb +15 -0
  58. data/patches/README.patch +59 -0
  59. data/patches/sourceimage_hash_long_hash.patch +62 -0
  60. data/rokka_client_codegen.gemspec +45 -0
  61. data/spec/api/admin_api_spec.rb +125 -0
  62. data/spec/api/sourceimages_api_spec.rb +274 -0
  63. data/spec/api/stacks_api_spec.rb +110 -0
  64. data/spec/api_client_spec.rb +226 -0
  65. data/spec/configuration_spec.rb +42 -0
  66. data/spec/models/list_source_images_response_spec.rb +60 -0
  67. data/spec/models/list_stacks_response_spec.rb +42 -0
  68. data/spec/models/membership_spec.rb +60 -0
  69. data/spec/models/organization_definition_spec.rb +54 -0
  70. data/spec/models/organization_options_spec.rb +54 -0
  71. data/spec/models/organization_spec.rb +78 -0
  72. data/spec/models/role_spec.rb +42 -0
  73. data/spec/models/source_image_spec.rb +138 -0
  74. data/spec/models/stack_definition_spec.rb +54 -0
  75. data/spec/models/stack_expression_overrides_spec.rb +42 -0
  76. data/spec/models/stack_expression_spec.rb +48 -0
  77. data/spec/models/stack_operation_description_spec.rb +60 -0
  78. data/spec/models/stack_operation_spec.rb +48 -0
  79. data/spec/models/stack_options_spec.rb +42 -0
  80. data/spec/models/stack_spec.rb +78 -0
  81. data/spec/models/user_definition_spec.rb +48 -0
  82. data/spec/models/user_spec.rb +60 -0
  83. data/spec/spec_helper.rb +111 -0
  84. metadata +330 -0
data/docs/Stack.md ADDED
@@ -0,0 +1,14 @@
1
+ # RokkaClientCodegen::Stack
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **name** | **String** | | [optional]
7
+ **organization** | **String** | | [optional]
8
+ **created** | **DateTime** | | [optional]
9
+ **stack_operations** | [**Array<StackOperation>**](StackOperation.md) | | [optional]
10
+ **stack_options** | **Object** | | [optional]
11
+ **stack_expressions** | [**Array<StackExpression>**](StackExpression.md) | | [optional]
12
+ **link** | **String** | | [optional]
13
+
14
+
@@ -0,0 +1,10 @@
1
+ # RokkaClientCodegen::StackDefinition
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **stack_operations** | [**Array<StackOperation>**](StackOperation.md) | Collection of stack operations |
7
+ **stack_options** | **Object** | | [optional]
8
+ **stack_expressions** | [**Array<StackExpression>**](StackExpression.md) | Collection of stack expressions | [optional]
9
+
10
+
@@ -0,0 +1,9 @@
1
+ # RokkaClientCodegen::StackExpression
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **expression** | **String** | |
7
+ **overrides** | [**StackExpressionOverrides**](StackExpressionOverrides.md) | |
8
+
9
+
@@ -0,0 +1,8 @@
1
+ # RokkaClientCodegen::StackExpressionOverrides
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **options** | **Object** | | [optional]
7
+
8
+
@@ -0,0 +1,9 @@
1
+ # RokkaClientCodegen::StackOperation
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **name** | **String** | |
7
+ **options** | **Object** | Stack operations options as key-value pairs | [optional]
8
+
9
+
@@ -0,0 +1,11 @@
1
+ # RokkaClientCodegen::StackOperationDescription
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **properties** | **Hash<String, Object>** | |
7
+ **description** | **String** | |
8
+ **required** | **Array<String>** | | [optional]
9
+ **one_of** | **Array<String>** | | [optional]
10
+
11
+
@@ -0,0 +1,8 @@
1
+ # RokkaClientCodegen::StackOptions
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **properties** | **Object** | |
7
+
8
+
data/docs/StacksApi.md ADDED
@@ -0,0 +1,329 @@
1
+ # RokkaClientCodegen::StacksApi
2
+
3
+ All URIs are relative to *https://api.rokka.io*
4
+
5
+ Method | HTTP request | Description
6
+ ------------- | ------------- | -------------
7
+ [**create_stack**](StacksApi.md#create_stack) | **PUT** /stacks/{organization}/{name} | Create a new stack.
8
+ [**delete_stack**](StacksApi.md#delete_stack) | **DELETE** /stacks/{organization}/{name} | Delete a stack.
9
+ [**get_stack**](StacksApi.md#get_stack) | **GET** /stacks/{organization}/{name} | Get a single stack.
10
+ [**list_operations**](StacksApi.md#list_operations) | **GET** /operations | Listing all available operations that can be used in stacks.
11
+ [**list_stack_options**](StacksApi.md#list_stack_options) | **GET** /stackoptions | List all available options that can be set on stacks.
12
+ [**list_stacks**](StacksApi.md#list_stacks) | **GET** /stacks/{organization} | Get all stacks of an organization.
13
+
14
+
15
+ # **create_stack**
16
+ > Stack create_stack(stack_definition, organization, name, opts)
17
+
18
+ Create a new stack.
19
+
20
+ ### Example
21
+ ```ruby
22
+ # load the gem
23
+ require 'rokka_client_codegen'
24
+ # setup authorization
25
+ RokkaClientCodegen.configure do |config|
26
+ # Configure API key authorization: ApiKeyAuth
27
+ config.api_key['api-key'] = 'YOUR API KEY'
28
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
29
+ #config.api_key_prefix['api-key'] = 'Bearer'
30
+ end
31
+
32
+ api_instance = RokkaClientCodegen::StacksApi.new
33
+
34
+ stack_definition = RokkaClientCodegen::StackDefinition.new # StackDefinition | Stack operations and options definition. See https://rokka.io/documentation/references/stacks.html for explanations how to define stacks.
35
+
36
+ organization = "organization_example" # String |
37
+
38
+ name = "name_example" # String |
39
+
40
+ opts = {
41
+ overwrite: false # BOOLEAN | Whether to overwrite the stack if it already exists
42
+ }
43
+
44
+ begin
45
+ #Create a new stack.
46
+ result = api_instance.create_stack(stack_definition, organization, name, opts)
47
+ p result
48
+ rescue RokkaClientCodegen::ApiError => e
49
+ puts "Exception when calling StacksApi->create_stack: #{e}"
50
+ end
51
+ ```
52
+
53
+ ### Parameters
54
+
55
+ Name | Type | Description | Notes
56
+ ------------- | ------------- | ------------- | -------------
57
+ **stack_definition** | [**StackDefinition**](StackDefinition.md)| Stack operations and options definition. See https://rokka.io/documentation/references/stacks.html for explanations how to define stacks. |
58
+ **organization** | **String**| |
59
+ **name** | **String**| |
60
+ **overwrite** | **BOOLEAN**| Whether to overwrite the stack if it already exists | [optional] [default to false]
61
+
62
+ ### Return type
63
+
64
+ [**Stack**](Stack.md)
65
+
66
+ ### Authorization
67
+
68
+ [ApiKeyAuth](../README.md#ApiKeyAuth)
69
+
70
+ ### HTTP request headers
71
+
72
+ - **Content-Type**: Not defined
73
+ - **Accept**: Not defined
74
+
75
+
76
+
77
+ # **delete_stack**
78
+ > delete_stack(organization, name)
79
+
80
+ Delete a stack.
81
+
82
+ ### Example
83
+ ```ruby
84
+ # load the gem
85
+ require 'rokka_client_codegen'
86
+ # setup authorization
87
+ RokkaClientCodegen.configure do |config|
88
+ # Configure API key authorization: ApiKeyAuth
89
+ config.api_key['api-key'] = 'YOUR API KEY'
90
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
91
+ #config.api_key_prefix['api-key'] = 'Bearer'
92
+ end
93
+
94
+ api_instance = RokkaClientCodegen::StacksApi.new
95
+
96
+ organization = "organization_example" # String |
97
+
98
+ name = "name_example" # String |
99
+
100
+
101
+ begin
102
+ #Delete a stack.
103
+ api_instance.delete_stack(organization, name)
104
+ rescue RokkaClientCodegen::ApiError => e
105
+ puts "Exception when calling StacksApi->delete_stack: #{e}"
106
+ end
107
+ ```
108
+
109
+ ### Parameters
110
+
111
+ Name | Type | Description | Notes
112
+ ------------- | ------------- | ------------- | -------------
113
+ **organization** | **String**| |
114
+ **name** | **String**| |
115
+
116
+ ### Return type
117
+
118
+ nil (empty response body)
119
+
120
+ ### Authorization
121
+
122
+ [ApiKeyAuth](../README.md#ApiKeyAuth)
123
+
124
+ ### HTTP request headers
125
+
126
+ - **Content-Type**: Not defined
127
+ - **Accept**: Not defined
128
+
129
+
130
+
131
+ # **get_stack**
132
+ > Stack get_stack(organization, name)
133
+
134
+ Get a single stack.
135
+
136
+ ### Example
137
+ ```ruby
138
+ # load the gem
139
+ require 'rokka_client_codegen'
140
+ # setup authorization
141
+ RokkaClientCodegen.configure do |config|
142
+ # Configure API key authorization: ApiKeyAuth
143
+ config.api_key['api-key'] = 'YOUR API KEY'
144
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
145
+ #config.api_key_prefix['api-key'] = 'Bearer'
146
+ end
147
+
148
+ api_instance = RokkaClientCodegen::StacksApi.new
149
+
150
+ organization = "organization_example" # String |
151
+
152
+ name = "name_example" # String |
153
+
154
+
155
+ begin
156
+ #Get a single stack.
157
+ result = api_instance.get_stack(organization, name)
158
+ p result
159
+ rescue RokkaClientCodegen::ApiError => e
160
+ puts "Exception when calling StacksApi->get_stack: #{e}"
161
+ end
162
+ ```
163
+
164
+ ### Parameters
165
+
166
+ Name | Type | Description | Notes
167
+ ------------- | ------------- | ------------- | -------------
168
+ **organization** | **String**| |
169
+ **name** | **String**| |
170
+
171
+ ### Return type
172
+
173
+ [**Stack**](Stack.md)
174
+
175
+ ### Authorization
176
+
177
+ [ApiKeyAuth](../README.md#ApiKeyAuth)
178
+
179
+ ### HTTP request headers
180
+
181
+ - **Content-Type**: Not defined
182
+ - **Accept**: Not defined
183
+
184
+
185
+
186
+ # **list_operations**
187
+ > Hash<String, StackOperationDescription> list_operations
188
+
189
+ Listing all available operations that can be used in stacks.
190
+
191
+ ### Example
192
+ ```ruby
193
+ # load the gem
194
+ require 'rokka_client_codegen'
195
+ # setup authorization
196
+ RokkaClientCodegen.configure do |config|
197
+ # Configure API key authorization: ApiKeyAuth
198
+ config.api_key['api-key'] = 'YOUR API KEY'
199
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
200
+ #config.api_key_prefix['api-key'] = 'Bearer'
201
+ end
202
+
203
+ api_instance = RokkaClientCodegen::StacksApi.new
204
+
205
+ begin
206
+ #Listing all available operations that can be used in stacks.
207
+ result = api_instance.list_operations
208
+ p result
209
+ rescue RokkaClientCodegen::ApiError => e
210
+ puts "Exception when calling StacksApi->list_operations: #{e}"
211
+ end
212
+ ```
213
+
214
+ ### Parameters
215
+ This endpoint does not need any parameter.
216
+
217
+ ### Return type
218
+
219
+ [**Hash<String, StackOperationDescription>**](StackOperationDescription.md)
220
+
221
+ ### Authorization
222
+
223
+ [ApiKeyAuth](../README.md#ApiKeyAuth)
224
+
225
+ ### HTTP request headers
226
+
227
+ - **Content-Type**: Not defined
228
+ - **Accept**: Not defined
229
+
230
+
231
+
232
+ # **list_stack_options**
233
+ > StackOptions list_stack_options
234
+
235
+ List all available options that can be set on stacks.
236
+
237
+ ### Example
238
+ ```ruby
239
+ # load the gem
240
+ require 'rokka_client_codegen'
241
+ # setup authorization
242
+ RokkaClientCodegen.configure do |config|
243
+ # Configure API key authorization: ApiKeyAuth
244
+ config.api_key['api-key'] = 'YOUR API KEY'
245
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
246
+ #config.api_key_prefix['api-key'] = 'Bearer'
247
+ end
248
+
249
+ api_instance = RokkaClientCodegen::StacksApi.new
250
+
251
+ begin
252
+ #List all available options that can be set on stacks.
253
+ result = api_instance.list_stack_options
254
+ p result
255
+ rescue RokkaClientCodegen::ApiError => e
256
+ puts "Exception when calling StacksApi->list_stack_options: #{e}"
257
+ end
258
+ ```
259
+
260
+ ### Parameters
261
+ This endpoint does not need any parameter.
262
+
263
+ ### Return type
264
+
265
+ [**StackOptions**](StackOptions.md)
266
+
267
+ ### Authorization
268
+
269
+ [ApiKeyAuth](../README.md#ApiKeyAuth)
270
+
271
+ ### HTTP request headers
272
+
273
+ - **Content-Type**: Not defined
274
+ - **Accept**: Not defined
275
+
276
+
277
+
278
+ # **list_stacks**
279
+ > ListStacksResponse list_stacks(organization)
280
+
281
+ Get all stacks of an organization.
282
+
283
+ ### Example
284
+ ```ruby
285
+ # load the gem
286
+ require 'rokka_client_codegen'
287
+ # setup authorization
288
+ RokkaClientCodegen.configure do |config|
289
+ # Configure API key authorization: ApiKeyAuth
290
+ config.api_key['api-key'] = 'YOUR API KEY'
291
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
292
+ #config.api_key_prefix['api-key'] = 'Bearer'
293
+ end
294
+
295
+ api_instance = RokkaClientCodegen::StacksApi.new
296
+
297
+ organization = "organization_example" # String |
298
+
299
+
300
+ begin
301
+ #Get all stacks of an organization.
302
+ result = api_instance.list_stacks(organization)
303
+ p result
304
+ rescue RokkaClientCodegen::ApiError => e
305
+ puts "Exception when calling StacksApi->list_stacks: #{e}"
306
+ end
307
+ ```
308
+
309
+ ### Parameters
310
+
311
+ Name | Type | Description | Notes
312
+ ------------- | ------------- | ------------- | -------------
313
+ **organization** | **String**| |
314
+
315
+ ### Return type
316
+
317
+ [**ListStacksResponse**](ListStacksResponse.md)
318
+
319
+ ### Authorization
320
+
321
+ [ApiKeyAuth](../README.md#ApiKeyAuth)
322
+
323
+ ### HTTP request headers
324
+
325
+ - **Content-Type**: Not defined
326
+ - **Accept**: Not defined
327
+
328
+
329
+
data/docs/User.md ADDED
@@ -0,0 +1,11 @@
1
+ # RokkaClientCodegen::User
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **id** | **String** | | [optional]
7
+ **email** | **String** | Can be changed (v2) | [optional]
8
+ **api_key** | **String** | | [optional]
9
+ **api_secret** | **String** | | [optional]
10
+
11
+
@@ -0,0 +1,9 @@
1
+ # RokkaClientCodegen::UserDefinition
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **email** | **String** | Unique email for the new user |
7
+ **organization** | **String** | If set, a new organization with that name will be created | [optional]
8
+
9
+
@@ -0,0 +1,33 @@
1
+ # Load the gem
2
+ require 'rokka_client_codegen'
3
+
4
+ # Setup authorization
5
+ RokkaClientCodegen.configure do |config|
6
+ # Configure API key authorization: ApiKeyAuth
7
+ config.api_key['api-key'] = 'YOUR_API_KEY'
8
+ end
9
+
10
+ organization = 'test'
11
+ api_instance = RokkaClientCodegen::StacksApi.new
12
+
13
+ stack_definition = RokkaClientCodegen::StackDefinition.new # StackDefinition | Stack operations and options definition. See https://rokka.io/documentation/references/stacks.html for explanations how to define stacks.
14
+
15
+ operation = RokkaClientCodegen::StackOperation.new
16
+ operation.name="resize"
17
+ operation.options={:width => 500, :height => 500}
18
+
19
+ stack_definition.stack_operations = [operation]
20
+ stack_definition.stack_options = {:autoformat => true}
21
+ name = "foo"
22
+
23
+ opts = {
24
+ overwrite: true # BOOLEAN | Whether to overwrite the stack if it already exists
25
+ }
26
+
27
+ begin
28
+ #Create a new stack.
29
+ result = api_instance.create_stack(stack_definition, organization, name, opts)
30
+ p result
31
+ rescue RokkaClientCodegen::ApiError => e
32
+ puts "Exception when calling: #{e}"
33
+ end