From 0eaec7ad1b876a7b783ff2433ccb60f108a1c795 Mon Sep 17 00:00:00 2001 From: Kaushal Kapasi Date: Tue, 7 Jun 2022 16:36:19 -0400 Subject: [PATCH] add variationName and variationKey to Feature model. allows for easy identification of which variation of a given feature is being served to the user --- .travis.yml | 2 +- README.md | 8 ++--- .../models/feature.rb | 32 ++++++++++++++++++- lib/devcycle-ruby-server-sdk/version.rb | 2 +- 4 files changed, 37 insertions(+), 7 deletions(-) diff --git a/.travis.yml b/.travis.yml index b71bffa..f0f51d0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,4 +11,4 @@ script: - bundle install --path vendor/bundle - bundle exec rspec - gem build devcycle-ruby-server-sdk.gemspec - - gem install ./devcycle-ruby-server-sdk-1.0.1.gem + - gem install ./devcycle-ruby-server-sdk-1.1.1.gem diff --git a/README.md b/README.md index a6786ba..b188708 100644 --- a/README.md +++ b/README.md @@ -151,16 +151,16 @@ gem build devcycle-ruby-server-sdk.gemspec Then either install the gem locally: ```shell -gem install ./devcycle-ruby-server-sdk-1.0.0.gem +gem install ./devcycle-ruby-server-sdk-1.1.1.gem ``` -(for development, run `gem install --dev ./devcycle-ruby-server-sdk-1.0.0.gem` to install the development dependencies) +(for development, run `gem install --dev ./devcycle-ruby-server-sdk-1.1.1.gem` to install the development dependencies) or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/). Finally add this to the Gemfile: - gem 'devcycle-ruby-server-sdk', '~> 1.0.0' + gem 'devcycle-ruby-server-sdk', '~> 1.1.1' #### About this Package @@ -168,5 +168,5 @@ Finally add this to the Gemfile: This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: - API version: 1.0.0 -- Package version: 1.0.0 +- Package version: 1.1.1 - Build package: org.openapitools.codegen.languages.RubyClientCodegen \ No newline at end of file diff --git a/lib/devcycle-ruby-server-sdk/models/feature.rb b/lib/devcycle-ruby-server-sdk/models/feature.rb index 2078ca7..55f5992 100644 --- a/lib/devcycle-ruby-server-sdk/models/feature.rb +++ b/lib/devcycle-ruby-server-sdk/models/feature.rb @@ -27,6 +27,12 @@ class Feature # Bucketed feature variation attr_accessor :_variation + # Bucketed feature variation key + attr_accessor :variationKey + + # Bucketed feature variation name + attr_accessor :variationName + # Evaluation reasoning attr_accessor :eval_reason @@ -59,6 +65,8 @@ def self.attribute_map :'key' => :'key', :'type' => :'type', :'_variation' => :'_variation', + :'variationKey' => :'variationKey', + :'variationName' => :'variationName', :'eval_reason' => :'evalReason' } end @@ -75,6 +83,8 @@ def self.openapi_types :'key' => :'String', :'type' => :'String', :'_variation' => :'String', + :'variationKey' => :'String', + :'variationName' => :'String', :'eval_reason' => :'String' } end @@ -116,6 +126,14 @@ def initialize(attributes = {}) self._variation = attributes[:'_variation'] end + if attributes.key?(:'variationKey') + self.variationKey = attributes[:'variationKey'] + end + + if attributes.key?(:'variationName') + self.variationName = attributes[:'variationName'] + end + if attributes.key?(:'eval_reason') self.eval_reason = attributes[:'eval_reason'] end @@ -141,6 +159,14 @@ def list_invalid_properties invalid_properties.push('invalid value for "_variation", _variation cannot be nil.') end + if @variationKey.nil? + invalid_properties.push('invalid value for "variationKey", variationKey cannot be nil.') + end + + if @variationName.nil? + invalid_properties.push('invalid value for "variationName", variationName cannot be nil.') + end + invalid_properties end @@ -153,6 +179,8 @@ def valid? type_validator = EnumAttributeValidator.new('String', ["release", "experiment", "permission", "ops"]) return false unless type_validator.valid?(@type) return false if @_variation.nil? + return false if @variationKey.nil? + return false if @variationName.nil? true end @@ -175,6 +203,8 @@ def ==(o) key == o.key && type == o.type && _variation == o._variation && + variationKey == o.variationKey && + variationName == o.variationName && eval_reason == o.eval_reason end @@ -187,7 +217,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [_id, key, type, _variation, eval_reason].hash + [_id, key, type, _variation, variationKey, variationName, eval_reason].hash end # Builds the object from hash diff --git a/lib/devcycle-ruby-server-sdk/version.rb b/lib/devcycle-ruby-server-sdk/version.rb index 39ab1cc..1683a53 100644 --- a/lib/devcycle-ruby-server-sdk/version.rb +++ b/lib/devcycle-ruby-server-sdk/version.rb @@ -11,5 +11,5 @@ =end module DevCycle - VERSION = '1.1.0' + VERSION = '1.1.1' end