clowder-common-ruby 0.5.1 → 0.5.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2eb27069341b3726423c02088d23f56a4dcb659044ead344028da876a7dfb01a
4
- data.tar.gz: d816b9eb821d8bb5a6841c804168dad27ff2627596a91fd5fc172d97ebc7178a
3
+ metadata.gz: 61b61e259c602a080f9d48fb7e8cc882a26f44b417cbef0e87ef9221a8aeadd7
4
+ data.tar.gz: 8d96ffcc6aa8ca9c8bc1f3a8e08b024ea414245bee9ddd1cba601a260e060863
5
5
  SHA512:
6
- metadata.gz: 591aaa8a7be6e2fbcc7119a74de0c94cb95d8dbce2555db27784d62d2245561824b77393d5b29028c43a6008165fa7eee8d572a5bc1adf017b0df776a36efa44
7
- data.tar.gz: 1fcaf4ad4eefedd3cfbba5f00e2757a0d0c0a7fa47d3e0c53245d3ba50de8dea039363e72f72cceee30b68e5b3802e1681ca5ba24079e2739fbf3ba4027b76e8
6
+ metadata.gz: e587863b43ba08253de33f6afceae753303bcc0cb28acf825ab2b87d822250f388413f5c0541a2b1d6af6f9c6effb6449c5a1f1b309b328f90f4b24496288d3e
7
+ data.tar.gz: 0255e4bf01b4b83fb7a876e1d6264cbe7915543e2a871f36f3b08c75e6024c4d0f8d6af1f3273c6efc292b0c2261b24ae099fe8e3ae181f858bc0cb5144a31de
@@ -82,11 +82,18 @@ class RubyClassConverter
82
82
  init_function << "\n"
83
83
  value.properties.each_pair do |k, v|
84
84
  if v.send(:type) == "array"
85
- klass = v.items.send("$ref").rpartition('/').last
86
- init_function << " @#{k} = []\n"
87
- init_function << " attributes.fetch(:#{k.to_sym}, []).each do |attr|\n"
88
- init_function << " @#{k} << #{klass}.new(attr)\n"
89
- init_function << " end\n"
85
+ if v.items.send("$ref")
86
+ klass = v.items.send("$ref").rpartition('/').last
87
+ init_function << " @#{k} = []\n"
88
+ init_function << " attributes.fetch(:#{k.to_sym}, []).each do |attr|\n"
89
+ init_function << " @#{k} << #{klass}.new(attr)\n"
90
+ init_function << " end\n"
91
+ else
92
+ init_function << " @#{k} = []\n"
93
+ init_function << " attributes.fetch(:#{k.to_sym}, []).each do |attr|\n"
94
+ init_function << " @#{k} << attr\n"
95
+ init_function << " end\n"
96
+ end
90
97
  elsif v.send('$ref')
91
98
  klass = v.send('$ref').rpartition('/').last
92
99
  init_function << " @#{k} = #{klass}.new(attributes.fetch(:#{k.to_sym}, {}))\n"
data/bin/schema.json CHANGED
@@ -201,16 +201,19 @@
201
201
  "description": "SASL Configuration for Kafka",
202
202
  "properties": {
203
203
  "username": {
204
+ "description": "Broker SASL username",
204
205
  "type": "string"
205
206
  },
206
207
  "password": {
208
+ "description": "Broker SASL password",
207
209
  "type": "string"
208
210
  },
209
211
  "securityProtocol": {
210
- "description": "Deprecated: Use the top level securityProtocol field instead",
212
+ "description": "Broker security protocol, expect one of either: SASL_SSL, SSL. DEPRECATED, use the top level securityProtocol field instead",
211
213
  "type": "string"
212
214
  },
213
215
  "saslMechanism": {
216
+ "description": "Broker SASL mechanism, expect: SCRAM-SHA-512",
214
217
  "type": "string"
215
218
  }
216
219
  },
@@ -222,22 +225,26 @@
222
225
  "description": "Broker Configuration",
223
226
  "properties": {
224
227
  "hostname": {
228
+ "description": "Hostname of kafka broker",
225
229
  "type": "string"
226
230
  },
227
231
  "port": {
232
+ "description": "Port of kafka broker",
228
233
  "type": "integer"
229
234
  },
230
235
  "cacert": {
236
+ "description": "CA certificate trust list for broker in PEM format. If absent, client should use OS default trust list",
231
237
  "type": "string"
232
238
  },
233
239
  "authtype": {
234
240
  "type": "string",
235
- "enum": ["mtls", "sasl"]
241
+ "enum": ["sasl"]
236
242
  },
237
243
  "sasl": {
238
244
  "$ref": "#/definitions/KafkaSASLConfig"
239
245
  },
240
246
  "securityProtocol": {
247
+ "description": "Broker security procotol, expect one of either: SASL_SSL, SSL",
241
248
  "type": "string"
242
249
  }
243
250
  },
@@ -482,7 +489,15 @@
482
489
  "type": "integer"
483
490
  },
484
491
  "apiPath": {
485
- "description": "The top level api path that the app should serve from /api/<apiPath>"
492
+ "description": "The top level api path that the app should serve from /api/<apiPath> (deprecated, use apiPaths)",
493
+ "type": "string"
494
+ },
495
+ "apiPaths": {
496
+ "description": "The list of API paths (each matching format: '/api/some-path/') that this app will serve requests from",
497
+ "type": "array",
498
+ "items": {
499
+ "type": "string"
500
+ }
486
501
  }
487
502
  },
488
503
  "required": [
@@ -390,6 +390,7 @@ module ClowderCommonRuby
390
390
  end
391
391
 
392
392
  class DependencyEndpoint < OpenStruct
393
+ attr_accessor :apiPaths
393
394
 
394
395
  def initialize(attributes)
395
396
  super
@@ -400,6 +401,10 @@ module ClowderCommonRuby
400
401
  h[k.to_sym] = v
401
402
  end
402
403
 
404
+ @apiPaths = []
405
+ attributes.fetch(:apiPaths, []).each do |attr|
406
+ @apiPaths << attr
407
+ end
403
408
  end
404
409
 
405
410
  def valid_keys
@@ -410,6 +415,7 @@ module ClowderCommonRuby
410
415
  keys << :app
411
416
  keys << :tlsPort
412
417
  keys << :apiPath
418
+ keys << :apiPaths
413
419
  end
414
420
  end
415
421
  end
@@ -1,3 +1,3 @@
1
1
  module ClowderCommonRuby
2
- VERSION = '0.5.1'.freeze # Patch version is being automatically bumped
2
+ VERSION = '0.5.3'.freeze # Patch version is being automatically bumped
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: clowder-common-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.1
4
+ version: 0.5.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Red Hat Developers
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-10-06 00:00:00.000000000 Z
11
+ date: 2023-11-03 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: This is a ruby interface for preparing Clowder variables.
14
14
  email: