moonlogs-ruby 0.5.12 → 0.6.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (63) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +16 -13
  3. data/docs/DefaultApi.md +12 -12
  4. data/docs/InlineResponse200.md +1 -1
  5. data/docs/InlineResponse2001.md +1 -1
  6. data/docs/InlineResponse2005.md +1 -1
  7. data/docs/InlineResponse2006.md +1 -1
  8. data/docs/OneOfUserRequestRole.md +6 -0
  9. data/docs/OneOfUserResponseRole.md +6 -0
  10. data/docs/SchemaRequest.md +13 -0
  11. data/docs/SchemaResponse.md +14 -0
  12. data/docs/UserRequest.md +14 -0
  13. data/docs/UserResponse.md +15 -0
  14. data/lib/moonlogs-ruby/api/default_api.rb +14 -14
  15. data/lib/moonlogs-ruby/api_client.rb +1 -1
  16. data/lib/moonlogs-ruby/api_error.rb +1 -1
  17. data/lib/moonlogs-ruby/configuration.rb +1 -1
  18. data/lib/moonlogs-ruby/models/api_token.rb +1 -1
  19. data/lib/moonlogs-ruby/models/credentials.rb +1 -1
  20. data/lib/moonlogs-ruby/models/inline_response_200.rb +1 -1
  21. data/lib/moonlogs-ruby/models/inline_response_200_1.rb +1 -1
  22. data/lib/moonlogs-ruby/models/inline_response_200_10.rb +1 -1
  23. data/lib/moonlogs-ruby/models/inline_response_200_11.rb +1 -1
  24. data/lib/moonlogs-ruby/models/inline_response_200_12.rb +1 -1
  25. data/lib/moonlogs-ruby/models/inline_response_200_13.rb +1 -1
  26. data/lib/moonlogs-ruby/models/inline_response_200_2.rb +1 -1
  27. data/lib/moonlogs-ruby/models/inline_response_200_3.rb +1 -1
  28. data/lib/moonlogs-ruby/models/inline_response_200_4.rb +1 -1
  29. data/lib/moonlogs-ruby/models/inline_response_200_5.rb +1 -1
  30. data/lib/moonlogs-ruby/models/inline_response_200_6.rb +1 -1
  31. data/lib/moonlogs-ruby/models/inline_response_200_7.rb +1 -1
  32. data/lib/moonlogs-ruby/models/inline_response_200_8.rb +1 -1
  33. data/lib/moonlogs-ruby/models/inline_response_200_9.rb +1 -1
  34. data/lib/moonlogs-ruby/models/level.rb +1 -1
  35. data/lib/moonlogs-ruby/models/meta.rb +1 -1
  36. data/lib/moonlogs-ruby/models/one_of_record_request_level.rb +1 -1
  37. data/lib/moonlogs-ruby/models/one_of_record_response_level.rb +1 -1
  38. data/lib/moonlogs-ruby/models/one_of_user_request_role.rb +197 -0
  39. data/lib/moonlogs-ruby/models/one_of_user_response_role.rb +197 -0
  40. data/lib/moonlogs-ruby/models/one_of_user_role.rb +1 -1
  41. data/lib/moonlogs-ruby/models/record_request.rb +1 -1
  42. data/lib/moonlogs-ruby/models/record_response.rb +1 -1
  43. data/lib/moonlogs-ruby/models/role.rb +1 -1
  44. data/lib/moonlogs-ruby/models/schema.rb +1 -1
  45. data/lib/moonlogs-ruby/models/schema_field.rb +1 -1
  46. data/lib/moonlogs-ruby/models/schema_kind.rb +1 -1
  47. data/lib/moonlogs-ruby/models/schema_request.rb +284 -0
  48. data/lib/moonlogs-ruby/models/schema_response.rb +298 -0
  49. data/lib/moonlogs-ruby/models/session.rb +1 -1
  50. data/lib/moonlogs-ruby/models/tag.rb +1 -1
  51. data/lib/moonlogs-ruby/models/user.rb +1 -1
  52. data/lib/moonlogs-ruby/models/user_request.rb +291 -0
  53. data/lib/moonlogs-ruby/models/user_response.rb +315 -0
  54. data/lib/moonlogs-ruby/version.rb +2 -2
  55. data/lib/moonlogs-ruby.rb +7 -4
  56. data/moonlogs-ruby.gemspec +1 -1
  57. data/spec/models/one_of_user_request_role_spec.rb +34 -0
  58. data/spec/models/one_of_user_response_role_spec.rb +34 -0
  59. data/spec/models/schema_request_spec.rb +76 -0
  60. data/spec/models/schema_response_spec.rb +82 -0
  61. data/spec/models/user_request_spec.rb +82 -0
  62. data/spec/models/user_response_spec.rb +88 -0
  63. metadata +26 -2
@@ -0,0 +1,291 @@
1
+ =begin
2
+ #Moonlogs
3
+
4
+ #Moonlogs API
5
+
6
+ OpenAPI spec version: 0.6.1
7
+ Contact: shalpack@gmail.com
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 3.0.52
10
+ =end
11
+
12
+ require 'date'
13
+
14
+ module MoonlogsRuby
15
+ class UserRequest
16
+ attr_accessor :name
17
+
18
+ attr_accessor :email
19
+
20
+ attr_accessor :password
21
+
22
+ attr_accessor :password_digest
23
+
24
+ attr_accessor :role
25
+
26
+ attr_accessor :tags
27
+
28
+ attr_accessor :token
29
+
30
+ attr_accessor :is_revoked
31
+
32
+ # Attribute mapping from ruby-style variable name to JSON key.
33
+ def self.attribute_map
34
+ {
35
+ :'name' => :'name',
36
+ :'email' => :'email',
37
+ :'password' => :'password',
38
+ :'password_digest' => :'password_digest',
39
+ :'role' => :'role',
40
+ :'tags' => :'tags',
41
+ :'token' => :'token',
42
+ :'is_revoked' => :'is_revoked'
43
+ }
44
+ end
45
+
46
+ # Attribute type mapping.
47
+ def self.openapi_types
48
+ {
49
+ :'name' => :'Object',
50
+ :'email' => :'Object',
51
+ :'password' => :'Object',
52
+ :'password_digest' => :'Object',
53
+ :'role' => :'Object',
54
+ :'tags' => :'Object',
55
+ :'token' => :'Object',
56
+ :'is_revoked' => :'Object'
57
+ }
58
+ end
59
+
60
+ # List of attributes with nullable: true
61
+ def self.openapi_nullable
62
+ Set.new([
63
+ ])
64
+ end
65
+
66
+ # Initializes the object
67
+ # @param [Hash] attributes Model attributes in the form of hash
68
+ def initialize(attributes = {})
69
+ if (!attributes.is_a?(Hash))
70
+ fail ArgumentError, "The input argument (attributes) must be a hash in `MoonlogsRuby::UserRequest` initialize method"
71
+ end
72
+
73
+ # check to see if the attribute exists and convert string to symbol for hash key
74
+ attributes = attributes.each_with_object({}) { |(k, v), h|
75
+ if (!self.class.attribute_map.key?(k.to_sym))
76
+ fail ArgumentError, "`#{k}` is not a valid attribute in `MoonlogsRuby::UserRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
77
+ end
78
+ h[k.to_sym] = v
79
+ }
80
+
81
+ if attributes.key?(:'name')
82
+ self.name = attributes[:'name']
83
+ end
84
+
85
+ if attributes.key?(:'email')
86
+ self.email = attributes[:'email']
87
+ end
88
+
89
+ if attributes.key?(:'password')
90
+ self.password = attributes[:'password']
91
+ end
92
+
93
+ if attributes.key?(:'password_digest')
94
+ self.password_digest = attributes[:'password_digest']
95
+ end
96
+
97
+ if attributes.key?(:'role')
98
+ self.role = attributes[:'role']
99
+ end
100
+
101
+ if attributes.key?(:'tags')
102
+ if (value = attributes[:'tags']).is_a?(Array)
103
+ self.tags = value
104
+ end
105
+ end
106
+
107
+ if attributes.key?(:'token')
108
+ self.token = attributes[:'token']
109
+ end
110
+
111
+ if attributes.key?(:'is_revoked')
112
+ self.is_revoked = attributes[:'is_revoked']
113
+ end
114
+ end
115
+
116
+ # Show invalid properties with the reasons. Usually used together with valid?
117
+ # @return Array for valid properties with the reasons
118
+ def list_invalid_properties
119
+ invalid_properties = Array.new
120
+ if @name.nil?
121
+ invalid_properties.push('invalid value for "name", name cannot be nil.')
122
+ end
123
+
124
+ if @email.nil?
125
+ invalid_properties.push('invalid value for "email", email cannot be nil.')
126
+ end
127
+
128
+ if @password.nil?
129
+ invalid_properties.push('invalid value for "password", password cannot be nil.')
130
+ end
131
+
132
+ if @role.nil?
133
+ invalid_properties.push('invalid value for "role", role cannot be nil.')
134
+ end
135
+
136
+ invalid_properties
137
+ end
138
+
139
+ # Check to see if the all the properties in the model are valid
140
+ # @return true if the model is valid
141
+ def valid?
142
+ return false if @name.nil?
143
+ return false if @email.nil?
144
+ return false if @password.nil?
145
+ return false if @role.nil?
146
+ true
147
+ end
148
+
149
+ # Checks equality by comparing each attribute.
150
+ # @param [Object] Object to be compared
151
+ def ==(o)
152
+ return true if self.equal?(o)
153
+ self.class == o.class &&
154
+ name == o.name &&
155
+ email == o.email &&
156
+ password == o.password &&
157
+ password_digest == o.password_digest &&
158
+ role == o.role &&
159
+ tags == o.tags &&
160
+ token == o.token &&
161
+ is_revoked == o.is_revoked
162
+ end
163
+
164
+ # @see the `==` method
165
+ # @param [Object] Object to be compared
166
+ def eql?(o)
167
+ self == o
168
+ end
169
+
170
+ # Calculates hash code according to all attributes.
171
+ # @return [Integer] Hash code
172
+ def hash
173
+ [name, email, password, password_digest, role, tags, token, is_revoked].hash
174
+ end
175
+
176
+ # Builds the object from hash
177
+ # @param [Hash] attributes Model attributes in the form of hash
178
+ # @return [Object] Returns the model itself
179
+ def self.build_from_hash(attributes)
180
+ new.build_from_hash(attributes)
181
+ end
182
+
183
+ # Builds the object from hash
184
+ # @param [Hash] attributes Model attributes in the form of hash
185
+ # @return [Object] Returns the model itself
186
+ def build_from_hash(attributes)
187
+ return nil unless attributes.is_a?(Hash)
188
+ self.class.openapi_types.each_pair do |key, type|
189
+ if type =~ /\AArray<(.*)>/i
190
+ # check to ensure the input is an array given that the attribute
191
+ # is documented as an array but the input is not
192
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
193
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
194
+ end
195
+ elsif !attributes[self.class.attribute_map[key]].nil?
196
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
197
+ elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
198
+ self.send("#{key}=", nil)
199
+ end
200
+ end
201
+
202
+ self
203
+ end
204
+
205
+ # Deserializes the data based on type
206
+ # @param string type Data type
207
+ # @param string value Value to be deserialized
208
+ # @return [Object] Deserialized data
209
+ def _deserialize(type, value)
210
+ case type.to_sym
211
+ when :DateTime
212
+ DateTime.parse(value)
213
+ when :Date
214
+ Date.parse(value)
215
+ when :String
216
+ value.to_s
217
+ when :Integer
218
+ value.to_i
219
+ when :Float
220
+ value.to_f
221
+ when :Boolean
222
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
223
+ true
224
+ else
225
+ false
226
+ end
227
+ when :Object
228
+ # generic object (usually a Hash), return directly
229
+ value
230
+ when /\AArray<(?<inner_type>.+)>\z/
231
+ inner_type = Regexp.last_match[:inner_type]
232
+ value.map { |v| _deserialize(inner_type, v) }
233
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
234
+ k_type = Regexp.last_match[:k_type]
235
+ v_type = Regexp.last_match[:v_type]
236
+ {}.tap do |hash|
237
+ value.each do |k, v|
238
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
239
+ end
240
+ end
241
+ else # model
242
+ MoonlogsRuby.const_get(type).build_from_hash(value)
243
+ end
244
+ end
245
+
246
+ # Returns the string representation of the object
247
+ # @return [String] String presentation of the object
248
+ def to_s
249
+ to_hash.to_s
250
+ end
251
+
252
+ # to_body is an alias to to_hash (backward compatibility)
253
+ # @return [Hash] Returns the object in the form of hash
254
+ def to_body
255
+ to_hash
256
+ end
257
+
258
+ # Returns the object in the form of hash
259
+ # @return [Hash] Returns the object in the form of hash
260
+ def to_hash
261
+ hash = {}
262
+ self.class.attribute_map.each_pair do |attr, param|
263
+ value = self.send(attr)
264
+ if value.nil?
265
+ is_nullable = self.class.openapi_nullable.include?(attr)
266
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
267
+ end
268
+
269
+ hash[param] = _to_hash(value)
270
+ end
271
+ hash
272
+ end
273
+
274
+ # Outputs non-array value in the form of hash
275
+ # For object, use to_hash. Otherwise, just return the value
276
+ # @param [Object] value Any valid value
277
+ # @return [Hash] Returns the value in the form of hash
278
+ def _to_hash(value)
279
+ if value.is_a?(Array)
280
+ value.compact.map { |v| _to_hash(v) }
281
+ elsif value.is_a?(Hash)
282
+ {}.tap do |hash|
283
+ value.each { |k, v| hash[k] = _to_hash(v) }
284
+ end
285
+ elsif value.respond_to? :to_hash
286
+ value.to_hash
287
+ else
288
+ value
289
+ end
290
+ end end
291
+ end
@@ -0,0 +1,315 @@
1
+ =begin
2
+ #Moonlogs
3
+
4
+ #Moonlogs API
5
+
6
+ OpenAPI spec version: 0.6.1
7
+ Contact: shalpack@gmail.com
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 3.0.52
10
+ =end
11
+
12
+ require 'date'
13
+
14
+ module MoonlogsRuby
15
+ class UserResponse
16
+ attr_accessor :id
17
+
18
+ attr_accessor :name
19
+
20
+ attr_accessor :email
21
+
22
+ attr_accessor :password
23
+
24
+ attr_accessor :password_digest
25
+
26
+ attr_accessor :role
27
+
28
+ attr_accessor :tags
29
+
30
+ attr_accessor :token
31
+
32
+ attr_accessor :is_revoked
33
+
34
+ # Attribute mapping from ruby-style variable name to JSON key.
35
+ def self.attribute_map
36
+ {
37
+ :'id' => :'id',
38
+ :'name' => :'name',
39
+ :'email' => :'email',
40
+ :'password' => :'password',
41
+ :'password_digest' => :'password_digest',
42
+ :'role' => :'role',
43
+ :'tags' => :'tags',
44
+ :'token' => :'token',
45
+ :'is_revoked' => :'is_revoked'
46
+ }
47
+ end
48
+
49
+ # Attribute type mapping.
50
+ def self.openapi_types
51
+ {
52
+ :'id' => :'Object',
53
+ :'name' => :'Object',
54
+ :'email' => :'Object',
55
+ :'password' => :'Object',
56
+ :'password_digest' => :'Object',
57
+ :'role' => :'Object',
58
+ :'tags' => :'Object',
59
+ :'token' => :'Object',
60
+ :'is_revoked' => :'Object'
61
+ }
62
+ end
63
+
64
+ # List of attributes with nullable: true
65
+ def self.openapi_nullable
66
+ Set.new([
67
+ ])
68
+ end
69
+
70
+ # Initializes the object
71
+ # @param [Hash] attributes Model attributes in the form of hash
72
+ def initialize(attributes = {})
73
+ if (!attributes.is_a?(Hash))
74
+ fail ArgumentError, "The input argument (attributes) must be a hash in `MoonlogsRuby::UserResponse` initialize method"
75
+ end
76
+
77
+ # check to see if the attribute exists and convert string to symbol for hash key
78
+ attributes = attributes.each_with_object({}) { |(k, v), h|
79
+ if (!self.class.attribute_map.key?(k.to_sym))
80
+ fail ArgumentError, "`#{k}` is not a valid attribute in `MoonlogsRuby::UserResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
81
+ end
82
+ h[k.to_sym] = v
83
+ }
84
+
85
+ if attributes.key?(:'id')
86
+ self.id = attributes[:'id']
87
+ end
88
+
89
+ if attributes.key?(:'name')
90
+ self.name = attributes[:'name']
91
+ end
92
+
93
+ if attributes.key?(:'email')
94
+ self.email = attributes[:'email']
95
+ end
96
+
97
+ if attributes.key?(:'password')
98
+ self.password = attributes[:'password']
99
+ end
100
+
101
+ if attributes.key?(:'password_digest')
102
+ self.password_digest = attributes[:'password_digest']
103
+ end
104
+
105
+ if attributes.key?(:'role')
106
+ self.role = attributes[:'role']
107
+ end
108
+
109
+ if attributes.key?(:'tags')
110
+ if (value = attributes[:'tags']).is_a?(Array)
111
+ self.tags = value
112
+ end
113
+ end
114
+
115
+ if attributes.key?(:'token')
116
+ self.token = attributes[:'token']
117
+ end
118
+
119
+ if attributes.key?(:'is_revoked')
120
+ self.is_revoked = attributes[:'is_revoked']
121
+ end
122
+ end
123
+
124
+ # Show invalid properties with the reasons. Usually used together with valid?
125
+ # @return Array for valid properties with the reasons
126
+ def list_invalid_properties
127
+ invalid_properties = Array.new
128
+ if @id.nil?
129
+ invalid_properties.push('invalid value for "id", id cannot be nil.')
130
+ end
131
+
132
+ if @name.nil?
133
+ invalid_properties.push('invalid value for "name", name cannot be nil.')
134
+ end
135
+
136
+ if @email.nil?
137
+ invalid_properties.push('invalid value for "email", email cannot be nil.')
138
+ end
139
+
140
+ if @password.nil?
141
+ invalid_properties.push('invalid value for "password", password cannot be nil.')
142
+ end
143
+
144
+ if @role.nil?
145
+ invalid_properties.push('invalid value for "role", role cannot be nil.')
146
+ end
147
+
148
+ if @tags.nil?
149
+ invalid_properties.push('invalid value for "tags", tags cannot be nil.')
150
+ end
151
+
152
+ if @is_revoked.nil?
153
+ invalid_properties.push('invalid value for "is_revoked", is_revoked cannot be nil.')
154
+ end
155
+
156
+ invalid_properties
157
+ end
158
+
159
+ # Check to see if the all the properties in the model are valid
160
+ # @return true if the model is valid
161
+ def valid?
162
+ return false if @id.nil?
163
+ return false if @name.nil?
164
+ return false if @email.nil?
165
+ return false if @password.nil?
166
+ return false if @role.nil?
167
+ return false if @tags.nil?
168
+ return false if @is_revoked.nil?
169
+ true
170
+ end
171
+
172
+ # Checks equality by comparing each attribute.
173
+ # @param [Object] Object to be compared
174
+ def ==(o)
175
+ return true if self.equal?(o)
176
+ self.class == o.class &&
177
+ id == o.id &&
178
+ name == o.name &&
179
+ email == o.email &&
180
+ password == o.password &&
181
+ password_digest == o.password_digest &&
182
+ role == o.role &&
183
+ tags == o.tags &&
184
+ token == o.token &&
185
+ is_revoked == o.is_revoked
186
+ end
187
+
188
+ # @see the `==` method
189
+ # @param [Object] Object to be compared
190
+ def eql?(o)
191
+ self == o
192
+ end
193
+
194
+ # Calculates hash code according to all attributes.
195
+ # @return [Integer] Hash code
196
+ def hash
197
+ [id, name, email, password, password_digest, role, tags, token, is_revoked].hash
198
+ end
199
+
200
+ # Builds the object from hash
201
+ # @param [Hash] attributes Model attributes in the form of hash
202
+ # @return [Object] Returns the model itself
203
+ def self.build_from_hash(attributes)
204
+ new.build_from_hash(attributes)
205
+ end
206
+
207
+ # Builds the object from hash
208
+ # @param [Hash] attributes Model attributes in the form of hash
209
+ # @return [Object] Returns the model itself
210
+ def build_from_hash(attributes)
211
+ return nil unless attributes.is_a?(Hash)
212
+ self.class.openapi_types.each_pair do |key, type|
213
+ if type =~ /\AArray<(.*)>/i
214
+ # check to ensure the input is an array given that the attribute
215
+ # is documented as an array but the input is not
216
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
217
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
218
+ end
219
+ elsif !attributes[self.class.attribute_map[key]].nil?
220
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
221
+ elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
222
+ self.send("#{key}=", nil)
223
+ end
224
+ end
225
+
226
+ self
227
+ end
228
+
229
+ # Deserializes the data based on type
230
+ # @param string type Data type
231
+ # @param string value Value to be deserialized
232
+ # @return [Object] Deserialized data
233
+ def _deserialize(type, value)
234
+ case type.to_sym
235
+ when :DateTime
236
+ DateTime.parse(value)
237
+ when :Date
238
+ Date.parse(value)
239
+ when :String
240
+ value.to_s
241
+ when :Integer
242
+ value.to_i
243
+ when :Float
244
+ value.to_f
245
+ when :Boolean
246
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
247
+ true
248
+ else
249
+ false
250
+ end
251
+ when :Object
252
+ # generic object (usually a Hash), return directly
253
+ value
254
+ when /\AArray<(?<inner_type>.+)>\z/
255
+ inner_type = Regexp.last_match[:inner_type]
256
+ value.map { |v| _deserialize(inner_type, v) }
257
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
258
+ k_type = Regexp.last_match[:k_type]
259
+ v_type = Regexp.last_match[:v_type]
260
+ {}.tap do |hash|
261
+ value.each do |k, v|
262
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
263
+ end
264
+ end
265
+ else # model
266
+ MoonlogsRuby.const_get(type).build_from_hash(value)
267
+ end
268
+ end
269
+
270
+ # Returns the string representation of the object
271
+ # @return [String] String presentation of the object
272
+ def to_s
273
+ to_hash.to_s
274
+ end
275
+
276
+ # to_body is an alias to to_hash (backward compatibility)
277
+ # @return [Hash] Returns the object in the form of hash
278
+ def to_body
279
+ to_hash
280
+ end
281
+
282
+ # Returns the object in the form of hash
283
+ # @return [Hash] Returns the object in the form of hash
284
+ def to_hash
285
+ hash = {}
286
+ self.class.attribute_map.each_pair do |attr, param|
287
+ value = self.send(attr)
288
+ if value.nil?
289
+ is_nullable = self.class.openapi_nullable.include?(attr)
290
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
291
+ end
292
+
293
+ hash[param] = _to_hash(value)
294
+ end
295
+ hash
296
+ end
297
+
298
+ # Outputs non-array value in the form of hash
299
+ # For object, use to_hash. Otherwise, just return the value
300
+ # @param [Object] value Any valid value
301
+ # @return [Hash] Returns the value in the form of hash
302
+ def _to_hash(value)
303
+ if value.is_a?(Array)
304
+ value.compact.map { |v| _to_hash(v) }
305
+ elsif value.is_a?(Hash)
306
+ {}.tap do |hash|
307
+ value.each { |k, v| hash[k] = _to_hash(v) }
308
+ end
309
+ elsif value.respond_to? :to_hash
310
+ value.to_hash
311
+ else
312
+ value
313
+ end
314
+ end end
315
+ end
@@ -3,12 +3,12 @@
3
3
 
4
4
  #Moonlogs API
5
5
 
6
- OpenAPI spec version: 0.5.12
6
+ OpenAPI spec version: 0.6.1
7
7
  Contact: shalpack@gmail.com
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 3.0.52
10
10
  =end
11
11
 
12
12
  module MoonlogsRuby
13
- VERSION = '0.5.12'
13
+ VERSION = '0.6.1'
14
14
  end
data/lib/moonlogs-ruby.rb CHANGED
@@ -3,7 +3,7 @@
3
3
 
4
4
  #Moonlogs API
5
5
 
6
- OpenAPI spec version: 0.5.12
6
+ OpenAPI spec version: 0.6.1
7
7
  Contact: shalpack@gmail.com
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 3.0.52
@@ -36,16 +36,19 @@ require 'moonlogs-ruby/models/level'
36
36
  require 'moonlogs-ruby/models/meta'
37
37
  require 'moonlogs-ruby/models/one_of_record_request_level'
38
38
  require 'moonlogs-ruby/models/one_of_record_response_level'
39
- require 'moonlogs-ruby/models/one_of_user_role'
39
+ require 'moonlogs-ruby/models/one_of_user_request_role'
40
+ require 'moonlogs-ruby/models/one_of_user_response_role'
40
41
  require 'moonlogs-ruby/models/record_request'
41
42
  require 'moonlogs-ruby/models/record_response'
42
43
  require 'moonlogs-ruby/models/role'
43
- require 'moonlogs-ruby/models/schema'
44
44
  require 'moonlogs-ruby/models/schema_field'
45
45
  require 'moonlogs-ruby/models/schema_kind'
46
+ require 'moonlogs-ruby/models/schema_request'
47
+ require 'moonlogs-ruby/models/schema_response'
46
48
  require 'moonlogs-ruby/models/session'
47
49
  require 'moonlogs-ruby/models/tag'
48
- require 'moonlogs-ruby/models/user'
50
+ require 'moonlogs-ruby/models/user_request'
51
+ require 'moonlogs-ruby/models/user_response'
49
52
 
50
53
  # APIs
51
54
  require 'moonlogs-ruby/api/default_api'
@@ -5,7 +5,7 @@
5
5
 
6
6
  #Moonlogs API
7
7
 
8
- OpenAPI spec version: 0.5.12
8
+ OpenAPI spec version: 0.6.1
9
9
  Contact: shalpack@gmail.com
10
10
  Generated by: https://github.com/swagger-api/swagger-codegen.git
11
11
  Swagger Codegen version: 3.0.52
@@ -0,0 +1,34 @@
1
+ =begin
2
+ #Moonlogs
3
+
4
+ #Moonlogs API
5
+
6
+ OpenAPI spec version: 0.6.1
7
+ Contact: shalpack@gmail.com
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 3.0.52
10
+ =end
11
+
12
+ require 'spec_helper'
13
+ require 'json'
14
+ require 'date'
15
+
16
+ # Unit tests for MoonlogsRuby::OneOfUserRequestRole
17
+ # Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
18
+ # Please update as you see appropriate
19
+ describe 'OneOfUserRequestRole' do
20
+ before do
21
+ # run before each test
22
+ @instance = MoonlogsRuby::OneOfUserRequestRole.new
23
+ end
24
+
25
+ after do
26
+ # run after each test
27
+ end
28
+
29
+ describe 'test an instance of OneOfUserRequestRole' do
30
+ it 'should create an instance of OneOfUserRequestRole' do
31
+ expect(@instance).to be_instance_of(MoonlogsRuby::OneOfUserRequestRole)
32
+ end
33
+ end
34
+ end