lib/dkron-rb/models/status.rb in dkron-rb-0.9.2 vs lib/dkron-rb/models/status.rb in dkron-rb-0.10.0

- old
+ new

@@ -1,26 +1,15 @@ =begin #Dkron REST API #You can communicate with Dkron using a RESTful JSON API over HTTP. Dkron nodes usually listen on port `8080` for API requests. All examples in this section assume that you've found a running leader at `localhost:8080`. Dkron implements a RESTful JSON API over HTTP to communicate with software clients. Dkron listens in port `8080` by default. All examples in this section assume that you're using the default port. Default API responses are unformatted JSON add the `pretty=true` param to format the response. -OpenAPI spec version: 0.9.2 +OpenAPI spec version: 0.10.0 Generated by: https://github.com/swagger-api/swagger-codegen.git +Swagger Codegen version: 2.3.1 -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - -http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. - =end require 'date' module Dkron @@ -48,11 +37,11 @@ attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v} end # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properies with the reasons + # @return Array for valid properties with the reasons def list_invalid_properties invalid_properties = Array.new return invalid_properties end @@ -85,11 +74,11 @@ # @param [Hash] attributes Model attributes in the form of hash # @return [Object] Returns the model itself def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.swagger_types.each_pair do |key, type| - if type =~ /^Array<(.*)>/i + if type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } ) end @@ -116,21 +105,21 @@ when :Integer value.to_i when :Float value.to_f when :BOOLEAN - if value.to_s =~ /^(true|t|yes|y|1)$/i + if value.to_s =~ /\A(true|t|yes|y|1)\z/i true else false end when :Object # generic object (usually a Hash), return directly value when /\AArray<(?<inner_type>.+)>\z/ inner_type = Regexp.last_match[:inner_type] value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?<k_type>.+), (?<v_type>.+)>\z/ + when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/ k_type = Regexp.last_match[:k_type] v_type = Regexp.last_match[:v_type] {}.tap do |hash| value.each do |k, v| hash[_deserialize(k_type, k)] = _deserialize(v_type, v)