smplkit 2.0.11 → 2.0.13
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.
- checksums.yaml +4 -4
- data/lib/smplkit/_generated/flags/lib/smplkit_flags_client/api/flag_sources_api.rb +4 -4
- data/lib/smplkit/_generated/flags/lib/smplkit_flags_client/api/flags_api.rb +28 -28
- data/lib/smplkit/_generated/flags/lib/smplkit_flags_client/api/functions_api.rb +2 -2
- data/lib/smplkit/_generated/flags/lib/smplkit_flags_client/api/usage_api.rb +2 -2
- data/lib/smplkit/_generated/flags/lib/smplkit_flags_client/models/flag.rb +40 -10
- data/lib/smplkit/_generated/flags/lib/smplkit_flags_client/models/flag_bulk_item.rb +34 -9
- data/lib/smplkit/_generated/flags/lib/smplkit_flags_client/models/flag_bulk_request.rb +2 -0
- data/lib/smplkit/_generated/flags/lib/smplkit_flags_client/models/flag_bulk_response.rb +2 -0
- data/lib/smplkit/_generated/flags/lib/smplkit_flags_client/models/flag_environment.rb +4 -0
- data/lib/smplkit/_generated/flags/lib/smplkit_flags_client/models/flag_list_response.rb +1 -0
- data/lib/smplkit/_generated/flags/lib/smplkit_flags_client/models/flag_request.rb +165 -0
- data/lib/smplkit/_generated/flags/lib/smplkit_flags_client/models/flag_resource.rb +1 -0
- data/lib/smplkit/_generated/flags/lib/smplkit_flags_client/models/flag_response.rb +1 -0
- data/lib/smplkit/_generated/flags/lib/smplkit_flags_client/models/flag_rule.rb +3 -0
- data/lib/smplkit/_generated/flags/lib/smplkit_flags_client/models/flag_source.rb +65 -13
- data/lib/smplkit/_generated/flags/lib/smplkit_flags_client/models/flag_source_list_response.rb +1 -0
- data/lib/smplkit/_generated/flags/lib/smplkit_flags_client/models/flag_source_resource.rb +1 -0
- data/lib/smplkit/_generated/flags/lib/smplkit_flags_client/models/flag_value.rb +2 -0
- data/lib/smplkit/_generated/flags/lib/smplkit_flags_client/models/manual_review_item.rb +5 -0
- data/lib/smplkit/_generated/flags/lib/smplkit_flags_client/models/remove_references_attributes.rb +4 -0
- data/lib/smplkit/_generated/flags/lib/smplkit_flags_client/models/remove_references_request.rb +3 -0
- data/lib/smplkit/_generated/flags/lib/smplkit_flags_client/models/remove_references_result_envelope.rb +1 -0
- data/lib/smplkit/_generated/flags/lib/smplkit_flags_client/models/remove_references_result_resource.rb +1 -0
- data/lib/smplkit/_generated/flags/lib/smplkit_flags_client/models/usage_attributes.rb +4 -0
- data/lib/smplkit/_generated/flags/lib/smplkit_flags_client/models/usage_list_response.rb +1 -0
- data/lib/smplkit/_generated/flags/lib/smplkit_flags_client/models/usage_resource.rb +1 -0
- data/lib/smplkit/_generated/flags/lib/smplkit_flags_client.rb +1 -0
- data/lib/smplkit/_generated/flags/spec/api/flag_sources_api_spec.rb +2 -2
- data/lib/smplkit/_generated/flags/spec/api/flags_api_spec.rb +7 -7
- data/lib/smplkit/_generated/flags/spec/api/functions_api_spec.rb +1 -1
- data/lib/smplkit/_generated/flags/spec/api/usage_api_spec.rb +1 -1
- data/lib/smplkit/_generated/flags/spec/models/flag_bulk_item_spec.rb +4 -0
- data/lib/smplkit/_generated/flags/spec/models/flag_request_spec.rb +36 -0
- data/lib/smplkit/_generated/flags/spec/models/flag_source_spec.rb +13 -3
- data/lib/smplkit/_generated/flags/spec/models/flag_spec.rb +4 -0
- data/lib/smplkit/_generated/logging/lib/smplkit_logging_client/api/log_groups_api.rb +28 -28
- data/lib/smplkit/_generated/logging/lib/smplkit_logging_client/api/logger_sources_api.rb +4 -4
- data/lib/smplkit/_generated/logging/lib/smplkit_logging_client/api/loggers_api.rb +19 -19
- data/lib/smplkit/_generated/logging/lib/smplkit_logging_client/api/services_api.rb +2 -2
- data/lib/smplkit/_generated/logging/lib/smplkit_logging_client/api/usage_api.rb +2 -2
- data/lib/smplkit/_generated/logging/lib/smplkit_logging_client/models/log_group.rb +36 -10
- data/lib/smplkit/_generated/logging/lib/smplkit_logging_client/models/log_group_list_response.rb +1 -0
- data/lib/smplkit/_generated/logging/lib/smplkit_logging_client/models/log_group_request.rb +165 -0
- data/lib/smplkit/_generated/logging/lib/smplkit_logging_client/models/log_group_resource.rb +1 -0
- data/lib/smplkit/_generated/logging/lib/smplkit_logging_client/models/log_group_response.rb +1 -0
- data/lib/smplkit/_generated/logging/lib/smplkit_logging_client/models/logger.rb +39 -10
- data/lib/smplkit/_generated/logging/lib/smplkit_logging_client/models/logger_bulk_item.rb +6 -5
- data/lib/smplkit/_generated/logging/lib/smplkit_logging_client/models/logger_bulk_request.rb +2 -0
- data/lib/smplkit/_generated/logging/lib/smplkit_logging_client/models/logger_bulk_response.rb +2 -0
- data/lib/smplkit/_generated/logging/lib/smplkit_logging_client/models/logger_list_response.rb +1 -0
- data/lib/smplkit/_generated/logging/lib/smplkit_logging_client/models/logger_request.rb +165 -0
- data/lib/smplkit/_generated/logging/lib/smplkit_logging_client/models/logger_resource.rb +1 -0
- data/lib/smplkit/_generated/logging/lib/smplkit_logging_client/models/logger_response.rb +1 -0
- data/lib/smplkit/_generated/logging/lib/smplkit_logging_client/models/logger_source.rb +9 -0
- data/lib/smplkit/_generated/logging/lib/smplkit_logging_client/models/logger_source_list_response.rb +1 -0
- data/lib/smplkit/_generated/logging/lib/smplkit_logging_client/models/logger_source_resource.rb +1 -0
- data/lib/smplkit/_generated/logging/lib/smplkit_logging_client/models/service_list_response.rb +1 -0
- data/lib/smplkit/_generated/logging/lib/smplkit_logging_client/models/service_resource.rb +2 -0
- data/lib/smplkit/_generated/logging/lib/smplkit_logging_client/models/usage_attributes.rb +4 -0
- data/lib/smplkit/_generated/logging/lib/smplkit_logging_client/models/usage_list_response.rb +1 -0
- data/lib/smplkit/_generated/logging/lib/smplkit_logging_client/models/usage_resource.rb +1 -0
- data/lib/smplkit/_generated/logging/lib/smplkit_logging_client.rb +2 -0
- data/lib/smplkit/_generated/logging/spec/api/log_groups_api_spec.rb +7 -7
- data/lib/smplkit/_generated/logging/spec/api/logger_sources_api_spec.rb +2 -2
- data/lib/smplkit/_generated/logging/spec/api/loggers_api_spec.rb +6 -6
- data/lib/smplkit/_generated/logging/spec/api/services_api_spec.rb +1 -1
- data/lib/smplkit/_generated/logging/spec/api/usage_api_spec.rb +1 -1
- data/lib/smplkit/_generated/logging/spec/models/log_group_request_spec.rb +36 -0
- data/lib/smplkit/_generated/logging/spec/models/log_group_spec.rb +4 -0
- data/lib/smplkit/_generated/logging/spec/models/logger_request_spec.rb +36 -0
- data/lib/smplkit/_generated/logging/spec/models/logger_spec.rb +4 -0
- metadata +7 -1
|
@@ -14,29 +14,62 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module SmplkitGeneratedClient::Flags
|
|
17
|
+
# A record of an SDK observing a feature flag from a particular service and environment. The flags service auto-registers a source the first time an SDK reports a flag from a given service/environment pair and refreshes `last_seen` on every subsequent report. Each source captures the value type and default value the SDK declared in source code at that location, which makes it possible to detect when service code has drifted from the flag's authoritative configuration.
|
|
17
18
|
class FlagSource < ApiModelBase
|
|
19
|
+
# Service that declared the flag.
|
|
18
20
|
attr_accessor :service
|
|
19
21
|
|
|
22
|
+
# Environment in which the service declared the flag.
|
|
20
23
|
attr_accessor :environment
|
|
21
24
|
|
|
25
|
+
# Value type the SDK reported when registering the flag from this service/environment. May differ from the flag's authoritative `type` if the service is running stale code.
|
|
26
|
+
attr_accessor :declared_type
|
|
27
|
+
|
|
28
|
+
attr_accessor :declared_default
|
|
29
|
+
|
|
30
|
+
# When this source was first observed.
|
|
22
31
|
attr_accessor :first_observed
|
|
23
32
|
|
|
33
|
+
# Most recent time the SDK re-registered this source.
|
|
24
34
|
attr_accessor :last_seen
|
|
25
35
|
|
|
26
|
-
|
|
27
|
-
|
|
36
|
+
# When the source record was created.
|
|
28
37
|
attr_accessor :created_at
|
|
29
38
|
|
|
39
|
+
# When the source record was last modified.
|
|
30
40
|
attr_accessor :updated_at
|
|
31
41
|
|
|
42
|
+
class EnumAttributeValidator
|
|
43
|
+
attr_reader :datatype
|
|
44
|
+
attr_reader :allowable_values
|
|
45
|
+
|
|
46
|
+
def initialize(datatype, allowable_values)
|
|
47
|
+
@allowable_values = allowable_values.map do |value|
|
|
48
|
+
case datatype.to_s
|
|
49
|
+
when /Integer/i
|
|
50
|
+
value.to_i
|
|
51
|
+
when /Float/i
|
|
52
|
+
value.to_f
|
|
53
|
+
else
|
|
54
|
+
value
|
|
55
|
+
end
|
|
56
|
+
end
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
def valid?(value)
|
|
60
|
+
!value || allowable_values.include?(value)
|
|
61
|
+
end
|
|
62
|
+
end
|
|
63
|
+
|
|
32
64
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
33
65
|
def self.attribute_map
|
|
34
66
|
{
|
|
35
67
|
:'service' => :'service',
|
|
36
68
|
:'environment' => :'environment',
|
|
69
|
+
:'declared_type' => :'declared_type',
|
|
70
|
+
:'declared_default' => :'declared_default',
|
|
37
71
|
:'first_observed' => :'first_observed',
|
|
38
72
|
:'last_seen' => :'last_seen',
|
|
39
|
-
:'data' => :'data',
|
|
40
73
|
:'created_at' => :'created_at',
|
|
41
74
|
:'updated_at' => :'updated_at'
|
|
42
75
|
}
|
|
@@ -57,9 +90,10 @@ module SmplkitGeneratedClient::Flags
|
|
|
57
90
|
{
|
|
58
91
|
:'service' => :'String',
|
|
59
92
|
:'environment' => :'String',
|
|
93
|
+
:'declared_type' => :'String',
|
|
94
|
+
:'declared_default' => :'Object',
|
|
60
95
|
:'first_observed' => :'Time',
|
|
61
96
|
:'last_seen' => :'Time',
|
|
62
|
-
:'data' => :'Hash<String, Object>',
|
|
63
97
|
:'created_at' => :'Time',
|
|
64
98
|
:'updated_at' => :'Time'
|
|
65
99
|
}
|
|
@@ -68,9 +102,12 @@ module SmplkitGeneratedClient::Flags
|
|
|
68
102
|
# List of attributes with nullable: true
|
|
69
103
|
def self.openapi_nullable
|
|
70
104
|
Set.new([
|
|
105
|
+
:'service',
|
|
106
|
+
:'environment',
|
|
107
|
+
:'declared_type',
|
|
108
|
+
:'declared_default',
|
|
71
109
|
:'first_observed',
|
|
72
110
|
:'last_seen',
|
|
73
|
-
:'data',
|
|
74
111
|
:'created_at',
|
|
75
112
|
:'updated_at'
|
|
76
113
|
])
|
|
@@ -100,6 +137,14 @@ module SmplkitGeneratedClient::Flags
|
|
|
100
137
|
self.environment = attributes[:'environment']
|
|
101
138
|
end
|
|
102
139
|
|
|
140
|
+
if attributes.key?(:'declared_type')
|
|
141
|
+
self.declared_type = attributes[:'declared_type']
|
|
142
|
+
end
|
|
143
|
+
|
|
144
|
+
if attributes.key?(:'declared_default')
|
|
145
|
+
self.declared_default = attributes[:'declared_default']
|
|
146
|
+
end
|
|
147
|
+
|
|
103
148
|
if attributes.key?(:'first_observed')
|
|
104
149
|
self.first_observed = attributes[:'first_observed']
|
|
105
150
|
end
|
|
@@ -108,12 +153,6 @@ module SmplkitGeneratedClient::Flags
|
|
|
108
153
|
self.last_seen = attributes[:'last_seen']
|
|
109
154
|
end
|
|
110
155
|
|
|
111
|
-
if attributes.key?(:'data')
|
|
112
|
-
if (value = attributes[:'data']).is_a?(Hash)
|
|
113
|
-
self.data = value
|
|
114
|
-
end
|
|
115
|
-
end
|
|
116
|
-
|
|
117
156
|
if attributes.key?(:'created_at')
|
|
118
157
|
self.created_at = attributes[:'created_at']
|
|
119
158
|
end
|
|
@@ -135,9 +174,21 @@ module SmplkitGeneratedClient::Flags
|
|
|
135
174
|
# @return true if the model is valid
|
|
136
175
|
def valid?
|
|
137
176
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
177
|
+
declared_type_validator = EnumAttributeValidator.new('String', ["BOOLEAN", "STRING", "NUMERIC", "JSON"])
|
|
178
|
+
return false unless declared_type_validator.valid?(@declared_type)
|
|
138
179
|
true
|
|
139
180
|
end
|
|
140
181
|
|
|
182
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
183
|
+
# @param [Object] declared_type Object to be assigned
|
|
184
|
+
def declared_type=(declared_type)
|
|
185
|
+
validator = EnumAttributeValidator.new('String', ["BOOLEAN", "STRING", "NUMERIC", "JSON"])
|
|
186
|
+
unless validator.valid?(declared_type)
|
|
187
|
+
fail ArgumentError, "invalid value for \"declared_type\", must be one of #{validator.allowable_values}."
|
|
188
|
+
end
|
|
189
|
+
@declared_type = declared_type
|
|
190
|
+
end
|
|
191
|
+
|
|
141
192
|
# Checks equality by comparing each attribute.
|
|
142
193
|
# @param [Object] Object to be compared
|
|
143
194
|
def ==(o)
|
|
@@ -145,9 +196,10 @@ module SmplkitGeneratedClient::Flags
|
|
|
145
196
|
self.class == o.class &&
|
|
146
197
|
service == o.service &&
|
|
147
198
|
environment == o.environment &&
|
|
199
|
+
declared_type == o.declared_type &&
|
|
200
|
+
declared_default == o.declared_default &&
|
|
148
201
|
first_observed == o.first_observed &&
|
|
149
202
|
last_seen == o.last_seen &&
|
|
150
|
-
data == o.data &&
|
|
151
203
|
created_at == o.created_at &&
|
|
152
204
|
updated_at == o.updated_at
|
|
153
205
|
end
|
|
@@ -161,7 +213,7 @@ module SmplkitGeneratedClient::Flags
|
|
|
161
213
|
# Calculates hash code according to all attributes.
|
|
162
214
|
# @return [Integer] Hash code
|
|
163
215
|
def hash
|
|
164
|
-
[service, environment, first_observed, last_seen,
|
|
216
|
+
[service, environment, declared_type, declared_default, first_observed, last_seen, created_at, updated_at].hash
|
|
165
217
|
end
|
|
166
218
|
|
|
167
219
|
# Builds the object from hash
|
|
@@ -14,6 +14,7 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module SmplkitGeneratedClient::Flags
|
|
17
|
+
# JSON:API resource envelope for a flag source. `id` is the source record's UUID. Sources are not created or modified directly — the flags service registers and refreshes them in response to SDK bulk-register requests.
|
|
17
18
|
class FlagSourceResource < ApiModelBase
|
|
18
19
|
attr_accessor :id
|
|
19
20
|
|
|
@@ -14,13 +14,18 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module SmplkitGeneratedClient::Flags
|
|
17
|
+
# A flag rule that could not be safely modified by the bulk remove-references action.
|
|
17
18
|
class ManualReviewItem < ApiModelBase
|
|
19
|
+
# Key of the flag containing the rule.
|
|
18
20
|
attr_accessor :flag
|
|
19
21
|
|
|
22
|
+
# Environment containing the rule.
|
|
20
23
|
attr_accessor :environment
|
|
21
24
|
|
|
25
|
+
# Position of the rule within the environment's `rules` array.
|
|
22
26
|
attr_accessor :rule_index
|
|
23
27
|
|
|
28
|
+
# Why the rule needs manual review.
|
|
24
29
|
attr_accessor :reason
|
|
25
30
|
|
|
26
31
|
# Attribute mapping from ruby-style variable name to JSON key.
|
data/lib/smplkit/_generated/flags/lib/smplkit_flags_client/models/remove_references_attributes.rb
CHANGED
|
@@ -14,11 +14,15 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module SmplkitGeneratedClient::Flags
|
|
17
|
+
# Counts and follow-ups returned by the remove-references action.
|
|
17
18
|
class RemoveReferencesAttributes < ApiModelBase
|
|
19
|
+
# Keys of flags whose rules were modified.
|
|
18
20
|
attr_accessor :flags_modified
|
|
19
21
|
|
|
22
|
+
# Total number of rules removed across all flags.
|
|
20
23
|
attr_accessor :rules_removed
|
|
21
24
|
|
|
25
|
+
# Rules that referenced the context but could not be removed automatically (typically because the reference is inside an `and` expression where removal would broaden the rule).
|
|
22
26
|
attr_accessor :rules_needing_manual_review
|
|
23
27
|
|
|
24
28
|
# Attribute mapping from ruby-style variable name to JSON key.
|
data/lib/smplkit/_generated/flags/lib/smplkit_flags_client/models/remove_references_request.rb
CHANGED
|
@@ -14,9 +14,12 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module SmplkitGeneratedClient::Flags
|
|
17
|
+
# Inputs to the remove-references action. Exactly one of `context` or `context_type` must be provided.
|
|
17
18
|
class RemoveReferencesRequest < ApiModelBase
|
|
19
|
+
# Identifier of the context instance to remove references to, formatted as `{type}:{key}` (e.g. `customer:c-123`).
|
|
18
20
|
attr_accessor :context
|
|
19
21
|
|
|
22
|
+
# Context type to remove all references to (any attribute of this type).
|
|
20
23
|
attr_accessor :context_type
|
|
21
24
|
|
|
22
25
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
@@ -14,11 +14,15 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module SmplkitGeneratedClient::Flags
|
|
17
|
+
# Usage counter for a single metered limit.
|
|
17
18
|
class UsageAttributes < ApiModelBase
|
|
19
|
+
# Identifier of the metered limit, e.g. `flags.items`.
|
|
18
20
|
attr_accessor :limit_key
|
|
19
21
|
|
|
22
|
+
# Period the counter covers. `current` is the only supported value.
|
|
20
23
|
attr_accessor :period
|
|
21
24
|
|
|
25
|
+
# Count for the period.
|
|
22
26
|
attr_accessor :value
|
|
23
27
|
|
|
24
28
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
@@ -24,6 +24,7 @@ require 'smplkit_flags_client/models/flag_bulk_request'
|
|
|
24
24
|
require 'smplkit_flags_client/models/flag_bulk_response'
|
|
25
25
|
require 'smplkit_flags_client/models/flag_environment'
|
|
26
26
|
require 'smplkit_flags_client/models/flag_list_response'
|
|
27
|
+
require 'smplkit_flags_client/models/flag_request'
|
|
27
28
|
require 'smplkit_flags_client/models/flag_resource'
|
|
28
29
|
require 'smplkit_flags_client/models/flag_response'
|
|
29
30
|
require 'smplkit_flags_client/models/flag_rule'
|
|
@@ -34,7 +34,7 @@ describe 'FlagSourcesApi' do
|
|
|
34
34
|
|
|
35
35
|
# unit tests for list_all_flag_sources
|
|
36
36
|
# List All Flag Sources
|
|
37
|
-
# List
|
|
37
|
+
# List service/environment observations across all flags for this account. Filter by `environment` or `service` (or both) to narrow the result.
|
|
38
38
|
# @param [Hash] opts the optional parameters
|
|
39
39
|
# @option opts [String] :filter_environment
|
|
40
40
|
# @option opts [String] :filter_service
|
|
@@ -47,7 +47,7 @@ describe 'FlagSourcesApi' do
|
|
|
47
47
|
|
|
48
48
|
# unit tests for list_flag_sources
|
|
49
49
|
# List Flag Sources
|
|
50
|
-
# List
|
|
50
|
+
# List the service/environment observations recorded for a single flag.
|
|
51
51
|
# @param id
|
|
52
52
|
# @param [Hash] opts the optional parameters
|
|
53
53
|
# @return [FlagSourceListResponse]
|
|
@@ -34,7 +34,7 @@ describe 'FlagsApi' do
|
|
|
34
34
|
|
|
35
35
|
# unit tests for bulk_register_flags
|
|
36
36
|
# Bulk Register Flags
|
|
37
|
-
# Register flags discovered by an SDK.
|
|
37
|
+
# Register flags discovered by an SDK. Creates a new flag for each unreported key and refreshes the service/environment source observation on each already-known key.
|
|
38
38
|
# @param flag_bulk_request
|
|
39
39
|
# @param [Hash] opts the optional parameters
|
|
40
40
|
# @return [FlagBulkResponse]
|
|
@@ -46,8 +46,8 @@ describe 'FlagsApi' do
|
|
|
46
46
|
|
|
47
47
|
# unit tests for create_flag
|
|
48
48
|
# Create Flag
|
|
49
|
-
# Create a new feature flag. The caller provides the id (key) in the request body.
|
|
50
|
-
# @param
|
|
49
|
+
# Create a new feature flag. The caller provides the id (the flag key) in the request body.
|
|
50
|
+
# @param flag_request
|
|
51
51
|
# @param [Hash] opts the optional parameters
|
|
52
52
|
# @return [FlagResponse]
|
|
53
53
|
describe 'create_flag test' do
|
|
@@ -70,7 +70,7 @@ describe 'FlagsApi' do
|
|
|
70
70
|
|
|
71
71
|
# unit tests for get_flag
|
|
72
72
|
# Get Flag
|
|
73
|
-
#
|
|
73
|
+
# Retrieve a feature flag by its key.
|
|
74
74
|
# @param id
|
|
75
75
|
# @param [Hash] opts the optional parameters
|
|
76
76
|
# @return [FlagResponse]
|
|
@@ -82,7 +82,7 @@ describe 'FlagsApi' do
|
|
|
82
82
|
|
|
83
83
|
# unit tests for list_flags
|
|
84
84
|
# List Flags
|
|
85
|
-
# List
|
|
85
|
+
# List feature flags for this account.
|
|
86
86
|
# @param [Hash] opts the optional parameters
|
|
87
87
|
# @option opts [String] :filter_type
|
|
88
88
|
# @option opts [Boolean] :filter_managed
|
|
@@ -97,9 +97,9 @@ describe 'FlagsApi' do
|
|
|
97
97
|
|
|
98
98
|
# unit tests for update_flag
|
|
99
99
|
# Update Flag
|
|
100
|
-
# Replace a feature flag entirely.
|
|
100
|
+
# Replace a feature flag entirely. Every writable field is overwritten.
|
|
101
101
|
# @param id
|
|
102
|
-
# @param
|
|
102
|
+
# @param flag_request
|
|
103
103
|
# @param [Hash] opts the optional parameters
|
|
104
104
|
# @return [FlagResponse]
|
|
105
105
|
describe 'update_flag test' do
|
|
@@ -34,7 +34,7 @@ describe 'FunctionsApi' do
|
|
|
34
34
|
|
|
35
35
|
# unit tests for remove_references
|
|
36
36
|
# Execute Remove References
|
|
37
|
-
#
|
|
37
|
+
# Remove every rule that references a specific context across every flag. Provide exactly one of `context` (matches a single instance, formatted as `{type}:{key}`) or `context_type` (matches any attribute of that context type). Rules whose reference sits inside an AND expression are not removed automatically; they are returned in `rules_needing_manual_review` for the caller to handle.
|
|
38
38
|
# @param remove_references_request
|
|
39
39
|
# @param [Hash] opts the optional parameters
|
|
40
40
|
# @return [RemoveReferencesResultEnvelope]
|
|
@@ -34,7 +34,7 @@ describe 'UsageApi' do
|
|
|
34
34
|
|
|
35
35
|
# unit tests for list_flags_usage
|
|
36
36
|
# List Flags Usage
|
|
37
|
-
#
|
|
37
|
+
# Report current-period usage counters for this account.
|
|
38
38
|
# @param [Hash] opts the optional parameters
|
|
39
39
|
# @option opts [String] :filter_period
|
|
40
40
|
# @return [UsageListResponse]
|
|
@@ -36,6 +36,10 @@ describe SmplkitGeneratedClient::Flags::FlagBulkItem do
|
|
|
36
36
|
describe 'test attribute "type"' do
|
|
37
37
|
it 'should work' do
|
|
38
38
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
39
|
+
# validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["BOOLEAN", "STRING", "NUMERIC", "JSON"])
|
|
40
|
+
# validator.allowable_values.each do |value|
|
|
41
|
+
# expect { instance.type = value }.not_to raise_error
|
|
42
|
+
# end
|
|
39
43
|
end
|
|
40
44
|
end
|
|
41
45
|
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#smplkit Flags API
|
|
3
|
+
|
|
4
|
+
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 0.1.0
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.22.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'spec_helper'
|
|
14
|
+
require 'json'
|
|
15
|
+
require 'date'
|
|
16
|
+
|
|
17
|
+
# Unit tests for SmplkitGeneratedClient::Flags::FlagRequest
|
|
18
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
19
|
+
# Please update as you see appropriate
|
|
20
|
+
describe SmplkitGeneratedClient::Flags::FlagRequest do
|
|
21
|
+
#let(:instance) { SmplkitGeneratedClient::Flags::FlagRequest.new }
|
|
22
|
+
|
|
23
|
+
describe 'test an instance of FlagRequest' do
|
|
24
|
+
it 'should create an instance of FlagRequest' do
|
|
25
|
+
# uncomment below to test the instance creation
|
|
26
|
+
#expect(instance).to be_instance_of(SmplkitGeneratedClient::Flags::FlagRequest)
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
describe 'test attribute "data"' do
|
|
31
|
+
it 'should work' do
|
|
32
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
end
|
|
@@ -39,19 +39,29 @@ describe SmplkitGeneratedClient::Flags::FlagSource do
|
|
|
39
39
|
end
|
|
40
40
|
end
|
|
41
41
|
|
|
42
|
-
describe 'test attribute "
|
|
42
|
+
describe 'test attribute "declared_type"' do
|
|
43
43
|
it 'should work' do
|
|
44
44
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
45
|
+
# validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["BOOLEAN", "STRING", "NUMERIC", "JSON"])
|
|
46
|
+
# validator.allowable_values.each do |value|
|
|
47
|
+
# expect { instance.declared_type = value }.not_to raise_error
|
|
48
|
+
# end
|
|
45
49
|
end
|
|
46
50
|
end
|
|
47
51
|
|
|
48
|
-
describe 'test attribute "
|
|
52
|
+
describe 'test attribute "declared_default"' do
|
|
49
53
|
it 'should work' do
|
|
50
54
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
51
55
|
end
|
|
52
56
|
end
|
|
53
57
|
|
|
54
|
-
describe 'test attribute "
|
|
58
|
+
describe 'test attribute "first_observed"' do
|
|
59
|
+
it 'should work' do
|
|
60
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
61
|
+
end
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
describe 'test attribute "last_seen"' do
|
|
55
65
|
it 'should work' do
|
|
56
66
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
57
67
|
end
|
|
@@ -42,6 +42,10 @@ describe SmplkitGeneratedClient::Flags::Flag do
|
|
|
42
42
|
describe 'test attribute "type"' do
|
|
43
43
|
it 'should work' do
|
|
44
44
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
45
|
+
# validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["BOOLEAN", "STRING", "NUMERIC", "JSON"])
|
|
46
|
+
# validator.allowable_values.each do |value|
|
|
47
|
+
# expect { instance.type = value }.not_to raise_error
|
|
48
|
+
# end
|
|
45
49
|
end
|
|
46
50
|
end
|
|
47
51
|
|
|
@@ -20,27 +20,27 @@ module SmplkitGeneratedClient::Logging
|
|
|
20
20
|
@api_client = api_client
|
|
21
21
|
end
|
|
22
22
|
# Create Log Group
|
|
23
|
-
# Create a
|
|
24
|
-
# @param
|
|
23
|
+
# Create a log group. The caller may supply a key in `data.id`; if omitted, the server generates one from `name`.
|
|
24
|
+
# @param log_group_request [LogGroupRequest]
|
|
25
25
|
# @param [Hash] opts the optional parameters
|
|
26
26
|
# @return [LogGroupResponse]
|
|
27
|
-
def create_log_group(
|
|
28
|
-
data, _status_code, _headers = create_log_group_with_http_info(
|
|
27
|
+
def create_log_group(log_group_request, opts = {})
|
|
28
|
+
data, _status_code, _headers = create_log_group_with_http_info(log_group_request, opts)
|
|
29
29
|
data
|
|
30
30
|
end
|
|
31
31
|
|
|
32
32
|
# Create Log Group
|
|
33
|
-
# Create a
|
|
34
|
-
# @param
|
|
33
|
+
# Create a log group. The caller may supply a key in `data.id`; if omitted, the server generates one from `name`.
|
|
34
|
+
# @param log_group_request [LogGroupRequest]
|
|
35
35
|
# @param [Hash] opts the optional parameters
|
|
36
36
|
# @return [Array<(LogGroupResponse, Integer, Hash)>] LogGroupResponse data, response status code and response headers
|
|
37
|
-
def create_log_group_with_http_info(
|
|
37
|
+
def create_log_group_with_http_info(log_group_request, opts = {})
|
|
38
38
|
if @api_client.config.debugging
|
|
39
39
|
@api_client.config.logger.debug 'Calling API: LogGroupsApi.create_log_group ...'
|
|
40
40
|
end
|
|
41
|
-
# verify the required parameter '
|
|
42
|
-
if @api_client.config.client_side_validation &&
|
|
43
|
-
fail ArgumentError, "Missing the required parameter '
|
|
41
|
+
# verify the required parameter 'log_group_request' is set
|
|
42
|
+
if @api_client.config.client_side_validation && log_group_request.nil?
|
|
43
|
+
fail ArgumentError, "Missing the required parameter 'log_group_request' when calling LogGroupsApi.create_log_group"
|
|
44
44
|
end
|
|
45
45
|
# resource path
|
|
46
46
|
local_var_path = '/api/v1/log_groups'
|
|
@@ -62,7 +62,7 @@ module SmplkitGeneratedClient::Logging
|
|
|
62
62
|
form_params = opts[:form_params] || {}
|
|
63
63
|
|
|
64
64
|
# http body (model)
|
|
65
|
-
post_body = opts[:debug_body] || @api_client.object_to_http_body(
|
|
65
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(log_group_request)
|
|
66
66
|
|
|
67
67
|
# return_type
|
|
68
68
|
return_type = opts[:debug_return_type] || 'LogGroupResponse'
|
|
@@ -88,7 +88,7 @@ module SmplkitGeneratedClient::Logging
|
|
|
88
88
|
end
|
|
89
89
|
|
|
90
90
|
# Delete Log Group
|
|
91
|
-
# Delete a log group
|
|
91
|
+
# Delete a log group. Loggers that referenced this group are detached; they remain in the account with no group assignment.
|
|
92
92
|
# @param id [String]
|
|
93
93
|
# @param [Hash] opts the optional parameters
|
|
94
94
|
# @return [nil]
|
|
@@ -98,7 +98,7 @@ module SmplkitGeneratedClient::Logging
|
|
|
98
98
|
end
|
|
99
99
|
|
|
100
100
|
# Delete Log Group
|
|
101
|
-
# Delete a log group
|
|
101
|
+
# Delete a log group. Loggers that referenced this group are detached; they remain in the account with no group assignment.
|
|
102
102
|
# @param id [String]
|
|
103
103
|
# @param [Hash] opts the optional parameters
|
|
104
104
|
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
@@ -151,7 +151,7 @@ module SmplkitGeneratedClient::Logging
|
|
|
151
151
|
end
|
|
152
152
|
|
|
153
153
|
# Get Log Group
|
|
154
|
-
#
|
|
154
|
+
# Retrieve a log group by its key.
|
|
155
155
|
# @param id [String]
|
|
156
156
|
# @param [Hash] opts the optional parameters
|
|
157
157
|
# @return [LogGroupResponse]
|
|
@@ -161,7 +161,7 @@ module SmplkitGeneratedClient::Logging
|
|
|
161
161
|
end
|
|
162
162
|
|
|
163
163
|
# Get Log Group
|
|
164
|
-
#
|
|
164
|
+
# Retrieve a log group by its key.
|
|
165
165
|
# @param id [String]
|
|
166
166
|
# @param [Hash] opts the optional parameters
|
|
167
167
|
# @return [Array<(LogGroupResponse, Integer, Hash)>] LogGroupResponse data, response status code and response headers
|
|
@@ -214,7 +214,7 @@ module SmplkitGeneratedClient::Logging
|
|
|
214
214
|
end
|
|
215
215
|
|
|
216
216
|
# List Log Groups
|
|
217
|
-
# List
|
|
217
|
+
# List log groups for this account.
|
|
218
218
|
# @param [Hash] opts the optional parameters
|
|
219
219
|
# @return [LogGroupListResponse]
|
|
220
220
|
def list_log_groups(opts = {})
|
|
@@ -223,7 +223,7 @@ module SmplkitGeneratedClient::Logging
|
|
|
223
223
|
end
|
|
224
224
|
|
|
225
225
|
# List Log Groups
|
|
226
|
-
# List
|
|
226
|
+
# List log groups for this account.
|
|
227
227
|
# @param [Hash] opts the optional parameters
|
|
228
228
|
# @return [Array<(LogGroupListResponse, Integer, Hash)>] LogGroupListResponse data, response status code and response headers
|
|
229
229
|
def list_log_groups_with_http_info(opts = {})
|
|
@@ -271,23 +271,23 @@ module SmplkitGeneratedClient::Logging
|
|
|
271
271
|
end
|
|
272
272
|
|
|
273
273
|
# Update Log Group
|
|
274
|
-
# Replace a log group
|
|
274
|
+
# Replace a log group. Every writable field is overwritten.
|
|
275
275
|
# @param id [String]
|
|
276
|
-
# @param
|
|
276
|
+
# @param log_group_request [LogGroupRequest]
|
|
277
277
|
# @param [Hash] opts the optional parameters
|
|
278
278
|
# @return [LogGroupResponse]
|
|
279
|
-
def update_log_group(id,
|
|
280
|
-
data, _status_code, _headers = update_log_group_with_http_info(id,
|
|
279
|
+
def update_log_group(id, log_group_request, opts = {})
|
|
280
|
+
data, _status_code, _headers = update_log_group_with_http_info(id, log_group_request, opts)
|
|
281
281
|
data
|
|
282
282
|
end
|
|
283
283
|
|
|
284
284
|
# Update Log Group
|
|
285
|
-
# Replace a log group
|
|
285
|
+
# Replace a log group. Every writable field is overwritten.
|
|
286
286
|
# @param id [String]
|
|
287
|
-
# @param
|
|
287
|
+
# @param log_group_request [LogGroupRequest]
|
|
288
288
|
# @param [Hash] opts the optional parameters
|
|
289
289
|
# @return [Array<(LogGroupResponse, Integer, Hash)>] LogGroupResponse data, response status code and response headers
|
|
290
|
-
def update_log_group_with_http_info(id,
|
|
290
|
+
def update_log_group_with_http_info(id, log_group_request, opts = {})
|
|
291
291
|
if @api_client.config.debugging
|
|
292
292
|
@api_client.config.logger.debug 'Calling API: LogGroupsApi.update_log_group ...'
|
|
293
293
|
end
|
|
@@ -295,9 +295,9 @@ module SmplkitGeneratedClient::Logging
|
|
|
295
295
|
if @api_client.config.client_side_validation && id.nil?
|
|
296
296
|
fail ArgumentError, "Missing the required parameter 'id' when calling LogGroupsApi.update_log_group"
|
|
297
297
|
end
|
|
298
|
-
# verify the required parameter '
|
|
299
|
-
if @api_client.config.client_side_validation &&
|
|
300
|
-
fail ArgumentError, "Missing the required parameter '
|
|
298
|
+
# verify the required parameter 'log_group_request' is set
|
|
299
|
+
if @api_client.config.client_side_validation && log_group_request.nil?
|
|
300
|
+
fail ArgumentError, "Missing the required parameter 'log_group_request' when calling LogGroupsApi.update_log_group"
|
|
301
301
|
end
|
|
302
302
|
# resource path
|
|
303
303
|
local_var_path = '/api/v1/log_groups/{id}'.sub('{id}', CGI.escape(id.to_s))
|
|
@@ -319,7 +319,7 @@ module SmplkitGeneratedClient::Logging
|
|
|
319
319
|
form_params = opts[:form_params] || {}
|
|
320
320
|
|
|
321
321
|
# http body (model)
|
|
322
|
-
post_body = opts[:debug_body] || @api_client.object_to_http_body(
|
|
322
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(log_group_request)
|
|
323
323
|
|
|
324
324
|
# return_type
|
|
325
325
|
return_type = opts[:debug_return_type] || 'LogGroupResponse'
|