ory-keto-client 0.5.3.alpha1 → 0.6.0.alpha1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +1 -1
- data/README.md +22 -31
- data/docs/AddOryAccessControlPolicyRoleMembersBody.md +8 -7
- data/docs/AuthorizationResult.md +8 -7
- data/docs/EnginesApi.md +319 -129
- data/docs/ExpandTree.md +22 -0
- data/docs/GetCheckResponse.md +18 -0
- data/docs/GetRelationTuplesResponse.md +20 -0
- data/docs/HealthApi.md +50 -15
- data/docs/HealthNotReadyStatus.md +8 -7
- data/docs/HealthStatus.md +8 -7
- data/docs/InlineResponse400.md +28 -0
- data/docs/InlineResponse500.md +18 -17
- data/docs/InternalRelationTuple.md +24 -0
- data/docs/OryAccessControlPolicy.md +20 -19
- data/docs/OryAccessControlPolicyAllowedInput.md +14 -13
- data/docs/OryAccessControlPolicyRole.md +10 -9
- data/docs/PatchDelta.md +20 -0
- data/docs/ReadApi.md +297 -0
- data/docs/Version.md +8 -7
- data/docs/VersionApi.md +26 -9
- data/docs/WriteApi.md +212 -0
- data/lib/ory-keto-client.rb +10 -9
- data/lib/ory-keto-client/api/engines_api.rb +46 -35
- data/lib/ory-keto-client/api/health_api.rb +10 -8
- data/lib/ory-keto-client/api/read_api.rb +324 -0
- data/lib/ory-keto-client/api/version_api.rb +6 -5
- data/lib/ory-keto-client/api/write_api.rb +225 -0
- data/lib/ory-keto-client/api_client.rb +50 -46
- data/lib/ory-keto-client/api_error.rb +2 -2
- data/lib/ory-keto-client/configuration.rb +34 -7
- data/lib/ory-keto-client/models/add_ory_access_control_policy_role_members_body.rb +20 -8
- data/lib/ory-keto-client/models/authorization_result.rb +20 -8
- data/lib/ory-keto-client/models/expand_tree.rb +282 -0
- data/lib/ory-keto-client/models/get_check_response.rb +225 -0
- data/lib/ory-keto-client/models/get_relation_tuples_response.rb +230 -0
- data/lib/ory-keto-client/models/health_not_ready_status.rb +20 -8
- data/lib/ory-keto-client/models/health_status.rb +20 -8
- data/lib/ory-keto-client/models/inline_response400.rb +265 -0
- data/lib/ory-keto-client/models/inline_response500.rb +21 -9
- data/lib/ory-keto-client/models/internal_relation_tuple.rb +268 -0
- data/lib/ory-keto-client/models/ory_access_control_policy.rb +22 -12
- data/lib/ory-keto-client/models/ory_access_control_policy_allowed_input.rb +22 -12
- data/lib/ory-keto-client/models/ory_access_control_policy_role.rb +20 -8
- data/lib/ory-keto-client/models/patch_delta.rb +227 -0
- data/lib/ory-keto-client/models/version.rb +20 -8
- data/lib/ory-keto-client/version.rb +3 -3
- data/ory-keto-client.gemspec +4 -5
- data/spec/api/read_api_spec.rb +94 -0
- data/spec/api/write_api_spec.rb +74 -0
- data/spec/api_client_spec.rb +4 -4
- data/spec/configuration_spec.rb +3 -3
- data/spec/models/expand_tree_spec.rb +50 -0
- data/spec/models/get_check_response_spec.rb +34 -0
- data/spec/models/get_relation_tuples_response_spec.rb +40 -0
- data/spec/models/inline_response400_spec.rb +64 -0
- data/spec/models/internal_relation_tuple_spec.rb +52 -0
- data/spec/models/patch_delta_spec.rb +40 -0
- data/spec/spec_helper.rb +3 -3
- metadata +90 -78
@@ -3,14 +3,15 @@
|
|
3
3
|
|
4
4
|
#Ory Keto is a cloud native access control server providing best-practice patterns (RBAC, ABAC, ACL, AWS IAM Policies, Kubernetes Roles, ...) via REST APIs.
|
5
5
|
|
6
|
-
The version of the OpenAPI document:
|
6
|
+
The version of the OpenAPI document: v0.0.0-alpha.58
|
7
7
|
Contact: hi@ory.sh
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version:
|
9
|
+
OpenAPI Generator version: 5.0.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
13
13
|
require 'date'
|
14
|
+
require 'time'
|
14
15
|
|
15
16
|
module OryHydraClient
|
16
17
|
# oryAccessControlPolicyRole represents a group of users that share the same role. A role could be an administrator, a moderator, a regular user or some other sort of role.
|
@@ -29,6 +30,11 @@ module OryHydraClient
|
|
29
30
|
}
|
30
31
|
end
|
31
32
|
|
33
|
+
# Returns all the JSON keys this model knows about
|
34
|
+
def self.acceptable_attributes
|
35
|
+
attribute_map.values
|
36
|
+
end
|
37
|
+
|
32
38
|
# Attribute type mapping.
|
33
39
|
def self.openapi_types
|
34
40
|
{
|
@@ -116,7 +122,9 @@ module OryHydraClient
|
|
116
122
|
def build_from_hash(attributes)
|
117
123
|
return nil unless attributes.is_a?(Hash)
|
118
124
|
self.class.openapi_types.each_pair do |key, type|
|
119
|
-
if
|
125
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
126
|
+
self.send("#{key}=", nil)
|
127
|
+
elsif type =~ /\AArray<(.*)>/i
|
120
128
|
# check to ensure the input is an array given that the attribute
|
121
129
|
# is documented as an array but the input is not
|
122
130
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
@@ -124,7 +132,7 @@ module OryHydraClient
|
|
124
132
|
end
|
125
133
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
126
134
|
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
127
|
-
end
|
135
|
+
end
|
128
136
|
end
|
129
137
|
|
130
138
|
self
|
@@ -136,8 +144,8 @@ module OryHydraClient
|
|
136
144
|
# @return [Object] Deserialized data
|
137
145
|
def _deserialize(type, value)
|
138
146
|
case type.to_sym
|
139
|
-
when :
|
140
|
-
|
147
|
+
when :Time
|
148
|
+
Time.parse(value)
|
141
149
|
when :Date
|
142
150
|
Date.parse(value)
|
143
151
|
when :String
|
@@ -167,7 +175,9 @@ module OryHydraClient
|
|
167
175
|
end
|
168
176
|
end
|
169
177
|
else # model
|
170
|
-
|
178
|
+
# models (e.g. Pet) or oneOf
|
179
|
+
klass = OryHydraClient.const_get(type)
|
180
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
171
181
|
end
|
172
182
|
end
|
173
183
|
|
@@ -193,7 +203,7 @@ module OryHydraClient
|
|
193
203
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
194
204
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
195
205
|
end
|
196
|
-
|
206
|
+
|
197
207
|
hash[param] = _to_hash(value)
|
198
208
|
end
|
199
209
|
hash
|
@@ -216,5 +226,7 @@ module OryHydraClient
|
|
216
226
|
value
|
217
227
|
end
|
218
228
|
end
|
229
|
+
|
219
230
|
end
|
231
|
+
|
220
232
|
end
|
@@ -0,0 +1,227 @@
|
|
1
|
+
=begin
|
2
|
+
#ORY Keto
|
3
|
+
|
4
|
+
#Ory Keto is a cloud native access control server providing best-practice patterns (RBAC, ABAC, ACL, AWS IAM Policies, Kubernetes Roles, ...) via REST APIs.
|
5
|
+
|
6
|
+
The version of the OpenAPI document: v0.6.0-alpha.1
|
7
|
+
Contact: hi@ory.sh
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 5.0.0
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
require 'time'
|
15
|
+
|
16
|
+
module OryHydraClient
|
17
|
+
class PatchDelta
|
18
|
+
attr_accessor :action
|
19
|
+
|
20
|
+
attr_accessor :relation_tuple
|
21
|
+
|
22
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
23
|
+
def self.attribute_map
|
24
|
+
{
|
25
|
+
:'action' => :'action',
|
26
|
+
:'relation_tuple' => :'relation_tuple'
|
27
|
+
}
|
28
|
+
end
|
29
|
+
|
30
|
+
# Returns all the JSON keys this model knows about
|
31
|
+
def self.acceptable_attributes
|
32
|
+
attribute_map.values
|
33
|
+
end
|
34
|
+
|
35
|
+
# Attribute type mapping.
|
36
|
+
def self.openapi_types
|
37
|
+
{
|
38
|
+
:'action' => :'String',
|
39
|
+
:'relation_tuple' => :'InternalRelationTuple'
|
40
|
+
}
|
41
|
+
end
|
42
|
+
|
43
|
+
# List of attributes with nullable: true
|
44
|
+
def self.openapi_nullable
|
45
|
+
Set.new([
|
46
|
+
])
|
47
|
+
end
|
48
|
+
|
49
|
+
# Initializes the object
|
50
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
51
|
+
def initialize(attributes = {})
|
52
|
+
if (!attributes.is_a?(Hash))
|
53
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `OryHydraClient::PatchDelta` initialize method"
|
54
|
+
end
|
55
|
+
|
56
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
57
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
58
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
59
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `OryHydraClient::PatchDelta`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
60
|
+
end
|
61
|
+
h[k.to_sym] = v
|
62
|
+
}
|
63
|
+
|
64
|
+
if attributes.key?(:'action')
|
65
|
+
self.action = attributes[:'action']
|
66
|
+
end
|
67
|
+
|
68
|
+
if attributes.key?(:'relation_tuple')
|
69
|
+
self.relation_tuple = attributes[:'relation_tuple']
|
70
|
+
end
|
71
|
+
end
|
72
|
+
|
73
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
74
|
+
# @return Array for valid properties with the reasons
|
75
|
+
def list_invalid_properties
|
76
|
+
invalid_properties = Array.new
|
77
|
+
invalid_properties
|
78
|
+
end
|
79
|
+
|
80
|
+
# Check to see if the all the properties in the model are valid
|
81
|
+
# @return true if the model is valid
|
82
|
+
def valid?
|
83
|
+
true
|
84
|
+
end
|
85
|
+
|
86
|
+
# Checks equality by comparing each attribute.
|
87
|
+
# @param [Object] Object to be compared
|
88
|
+
def ==(o)
|
89
|
+
return true if self.equal?(o)
|
90
|
+
self.class == o.class &&
|
91
|
+
action == o.action &&
|
92
|
+
relation_tuple == o.relation_tuple
|
93
|
+
end
|
94
|
+
|
95
|
+
# @see the `==` method
|
96
|
+
# @param [Object] Object to be compared
|
97
|
+
def eql?(o)
|
98
|
+
self == o
|
99
|
+
end
|
100
|
+
|
101
|
+
# Calculates hash code according to all attributes.
|
102
|
+
# @return [Integer] Hash code
|
103
|
+
def hash
|
104
|
+
[action, relation_tuple].hash
|
105
|
+
end
|
106
|
+
|
107
|
+
# Builds the object from hash
|
108
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
109
|
+
# @return [Object] Returns the model itself
|
110
|
+
def self.build_from_hash(attributes)
|
111
|
+
new.build_from_hash(attributes)
|
112
|
+
end
|
113
|
+
|
114
|
+
# Builds the object from hash
|
115
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
116
|
+
# @return [Object] Returns the model itself
|
117
|
+
def build_from_hash(attributes)
|
118
|
+
return nil unless attributes.is_a?(Hash)
|
119
|
+
self.class.openapi_types.each_pair do |key, type|
|
120
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
121
|
+
self.send("#{key}=", nil)
|
122
|
+
elsif type =~ /\AArray<(.*)>/i
|
123
|
+
# check to ensure the input is an array given that the attribute
|
124
|
+
# is documented as an array but the input is not
|
125
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
126
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
127
|
+
end
|
128
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
129
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
130
|
+
end
|
131
|
+
end
|
132
|
+
|
133
|
+
self
|
134
|
+
end
|
135
|
+
|
136
|
+
# Deserializes the data based on type
|
137
|
+
# @param string type Data type
|
138
|
+
# @param string value Value to be deserialized
|
139
|
+
# @return [Object] Deserialized data
|
140
|
+
def _deserialize(type, value)
|
141
|
+
case type.to_sym
|
142
|
+
when :Time
|
143
|
+
Time.parse(value)
|
144
|
+
when :Date
|
145
|
+
Date.parse(value)
|
146
|
+
when :String
|
147
|
+
value.to_s
|
148
|
+
when :Integer
|
149
|
+
value.to_i
|
150
|
+
when :Float
|
151
|
+
value.to_f
|
152
|
+
when :Boolean
|
153
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
154
|
+
true
|
155
|
+
else
|
156
|
+
false
|
157
|
+
end
|
158
|
+
when :Object
|
159
|
+
# generic object (usually a Hash), return directly
|
160
|
+
value
|
161
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
162
|
+
inner_type = Regexp.last_match[:inner_type]
|
163
|
+
value.map { |v| _deserialize(inner_type, v) }
|
164
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
165
|
+
k_type = Regexp.last_match[:k_type]
|
166
|
+
v_type = Regexp.last_match[:v_type]
|
167
|
+
{}.tap do |hash|
|
168
|
+
value.each do |k, v|
|
169
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
170
|
+
end
|
171
|
+
end
|
172
|
+
else # model
|
173
|
+
# models (e.g. Pet) or oneOf
|
174
|
+
klass = OryHydraClient.const_get(type)
|
175
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
176
|
+
end
|
177
|
+
end
|
178
|
+
|
179
|
+
# Returns the string representation of the object
|
180
|
+
# @return [String] String presentation of the object
|
181
|
+
def to_s
|
182
|
+
to_hash.to_s
|
183
|
+
end
|
184
|
+
|
185
|
+
# to_body is an alias to to_hash (backward compatibility)
|
186
|
+
# @return [Hash] Returns the object in the form of hash
|
187
|
+
def to_body
|
188
|
+
to_hash
|
189
|
+
end
|
190
|
+
|
191
|
+
# Returns the object in the form of hash
|
192
|
+
# @return [Hash] Returns the object in the form of hash
|
193
|
+
def to_hash
|
194
|
+
hash = {}
|
195
|
+
self.class.attribute_map.each_pair do |attr, param|
|
196
|
+
value = self.send(attr)
|
197
|
+
if value.nil?
|
198
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
199
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
200
|
+
end
|
201
|
+
|
202
|
+
hash[param] = _to_hash(value)
|
203
|
+
end
|
204
|
+
hash
|
205
|
+
end
|
206
|
+
|
207
|
+
# Outputs non-array value in the form of hash
|
208
|
+
# For object, use to_hash. Otherwise, just return the value
|
209
|
+
# @param [Object] value Any valid value
|
210
|
+
# @return [Hash] Returns the value in the form of hash
|
211
|
+
def _to_hash(value)
|
212
|
+
if value.is_a?(Array)
|
213
|
+
value.compact.map { |v| _to_hash(v) }
|
214
|
+
elsif value.is_a?(Hash)
|
215
|
+
{}.tap do |hash|
|
216
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
217
|
+
end
|
218
|
+
elsif value.respond_to? :to_hash
|
219
|
+
value.to_hash
|
220
|
+
else
|
221
|
+
value
|
222
|
+
end
|
223
|
+
end
|
224
|
+
|
225
|
+
end
|
226
|
+
|
227
|
+
end
|
@@ -3,14 +3,15 @@
|
|
3
3
|
|
4
4
|
#Ory Keto is a cloud native access control server providing best-practice patterns (RBAC, ABAC, ACL, AWS IAM Policies, Kubernetes Roles, ...) via REST APIs.
|
5
5
|
|
6
|
-
The version of the OpenAPI document:
|
6
|
+
The version of the OpenAPI document: v0.6.0-alpha.1
|
7
7
|
Contact: hi@ory.sh
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version:
|
9
|
+
OpenAPI Generator version: 5.0.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
13
13
|
require 'date'
|
14
|
+
require 'time'
|
14
15
|
|
15
16
|
module OryHydraClient
|
16
17
|
class Version
|
@@ -24,6 +25,11 @@ module OryHydraClient
|
|
24
25
|
}
|
25
26
|
end
|
26
27
|
|
28
|
+
# Returns all the JSON keys this model knows about
|
29
|
+
def self.acceptable_attributes
|
30
|
+
attribute_map.values
|
31
|
+
end
|
32
|
+
|
27
33
|
# Attribute type mapping.
|
28
34
|
def self.openapi_types
|
29
35
|
{
|
@@ -103,7 +109,9 @@ module OryHydraClient
|
|
103
109
|
def build_from_hash(attributes)
|
104
110
|
return nil unless attributes.is_a?(Hash)
|
105
111
|
self.class.openapi_types.each_pair do |key, type|
|
106
|
-
if
|
112
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
113
|
+
self.send("#{key}=", nil)
|
114
|
+
elsif type =~ /\AArray<(.*)>/i
|
107
115
|
# check to ensure the input is an array given that the attribute
|
108
116
|
# is documented as an array but the input is not
|
109
117
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
@@ -111,7 +119,7 @@ module OryHydraClient
|
|
111
119
|
end
|
112
120
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
113
121
|
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
114
|
-
end
|
122
|
+
end
|
115
123
|
end
|
116
124
|
|
117
125
|
self
|
@@ -123,8 +131,8 @@ module OryHydraClient
|
|
123
131
|
# @return [Object] Deserialized data
|
124
132
|
def _deserialize(type, value)
|
125
133
|
case type.to_sym
|
126
|
-
when :
|
127
|
-
|
134
|
+
when :Time
|
135
|
+
Time.parse(value)
|
128
136
|
when :Date
|
129
137
|
Date.parse(value)
|
130
138
|
when :String
|
@@ -154,7 +162,9 @@ module OryHydraClient
|
|
154
162
|
end
|
155
163
|
end
|
156
164
|
else # model
|
157
|
-
|
165
|
+
# models (e.g. Pet) or oneOf
|
166
|
+
klass = OryHydraClient.const_get(type)
|
167
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
158
168
|
end
|
159
169
|
end
|
160
170
|
|
@@ -180,7 +190,7 @@ module OryHydraClient
|
|
180
190
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
181
191
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
182
192
|
end
|
183
|
-
|
193
|
+
|
184
194
|
hash[param] = _to_hash(value)
|
185
195
|
end
|
186
196
|
hash
|
@@ -203,5 +213,7 @@ module OryHydraClient
|
|
203
213
|
value
|
204
214
|
end
|
205
215
|
end
|
216
|
+
|
206
217
|
end
|
218
|
+
|
207
219
|
end
|
@@ -3,13 +3,13 @@
|
|
3
3
|
|
4
4
|
#Ory Keto is a cloud native access control server providing best-practice patterns (RBAC, ABAC, ACL, AWS IAM Policies, Kubernetes Roles, ...) via REST APIs.
|
5
5
|
|
6
|
-
The version of the OpenAPI document:
|
6
|
+
The version of the OpenAPI document: 0.6.0.alpha1
|
7
7
|
Contact: hi@ory.sh
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version:
|
9
|
+
OpenAPI Generator version: 5.0.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
13
13
|
module OryHydraClient
|
14
|
-
VERSION = '0.
|
14
|
+
VERSION = '0.6.0.alpha1'
|
15
15
|
end
|
data/ory-keto-client.gemspec
CHANGED
@@ -5,10 +5,10 @@
|
|
5
5
|
|
6
6
|
#Ory Keto is a cloud native access control server providing best-practice patterns (RBAC, ABAC, ACL, AWS IAM Policies, Kubernetes Roles, ...) via REST APIs.
|
7
7
|
|
8
|
-
The version of the OpenAPI document:
|
8
|
+
The version of the OpenAPI document: v0.6.0-alpha.1
|
9
9
|
Contact: hi@ory.sh
|
10
10
|
Generated by: https://openapi-generator.tech
|
11
|
-
OpenAPI Generator version:
|
11
|
+
OpenAPI Generator version: 5.0.0
|
12
12
|
|
13
13
|
=end
|
14
14
|
|
@@ -24,11 +24,10 @@ Gem::Specification.new do |s|
|
|
24
24
|
s.homepage = "https://www.ory.sh"
|
25
25
|
s.summary = "ORY Keto Ruby Gem"
|
26
26
|
s.description = "Ory Keto is a cloud native access control server providing best-practice patterns (RBAC, ABAC, ACL, AWS IAM Policies, Kubernetes Roles, ...) via REST APIs."
|
27
|
-
s.license =
|
28
|
-
s.required_ruby_version = ">=
|
27
|
+
s.license = "Apache-2.0"
|
28
|
+
s.required_ruby_version = ">= 2.4"
|
29
29
|
|
30
30
|
s.add_runtime_dependency 'typhoeus', '~> 1.0', '>= 1.0.1'
|
31
|
-
s.add_runtime_dependency 'json', '~> 2.1', '>= 2.1.0'
|
32
31
|
|
33
32
|
s.add_development_dependency 'rspec', '~> 3.6', '>= 3.6.0'
|
34
33
|
|
@@ -0,0 +1,94 @@
|
|
1
|
+
=begin
|
2
|
+
#ORY Keto
|
3
|
+
|
4
|
+
#Ory Keto is a cloud native access control server providing best-practice patterns (RBAC, ABAC, ACL, AWS IAM Policies, Kubernetes Roles, ...) via REST APIs.
|
5
|
+
|
6
|
+
The version of the OpenAPI document: v0.6.0-alpha.1
|
7
|
+
Contact: hi@ory.sh
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 5.0.0
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'spec_helper'
|
14
|
+
require 'json'
|
15
|
+
|
16
|
+
# Unit tests for OryHydraClient::ReadApi
|
17
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
18
|
+
# Please update as you see appropriate
|
19
|
+
describe 'ReadApi' do
|
20
|
+
before do
|
21
|
+
# run before each test
|
22
|
+
@api_instance = OryHydraClient::ReadApi.new
|
23
|
+
end
|
24
|
+
|
25
|
+
after do
|
26
|
+
# run after each test
|
27
|
+
end
|
28
|
+
|
29
|
+
describe 'test an instance of ReadApi' do
|
30
|
+
it 'should create an instance of ReadApi' do
|
31
|
+
expect(@api_instance).to be_instance_of(OryHydraClient::ReadApi)
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
# unit tests for get_check
|
36
|
+
# Check a relation tuple
|
37
|
+
# To learn how relation tuples and the check works, head over to [the documentation](../concepts/relation-tuples.mdx).
|
38
|
+
# @param namespace Namespace of the Relation Tuple
|
39
|
+
# @param object Object of the Relation Tuple
|
40
|
+
# @param relation Relation of the Relation Tuple
|
41
|
+
# @param [Hash] opts the optional parameters
|
42
|
+
# @option opts [String] :subject Subject of the Relation Tuple The subject follows the subject string encoding format.
|
43
|
+
# @return [GetCheckResponse]
|
44
|
+
describe 'get_check test' do
|
45
|
+
it 'should work' do
|
46
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
50
|
+
# unit tests for get_expand
|
51
|
+
# Expand a Relation Tuple
|
52
|
+
# Use this endpoint to expand a relation tuple.
|
53
|
+
# @param namespace Namespace of the Relation Tuple
|
54
|
+
# @param object Object of the Relation Tuple
|
55
|
+
# @param relation Relation of the Relation Tuple
|
56
|
+
# @param [Hash] opts the optional parameters
|
57
|
+
# @option opts [Integer] :max_depth
|
58
|
+
# @return [ExpandTree]
|
59
|
+
describe 'get_expand test' do
|
60
|
+
it 'should work' do
|
61
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
62
|
+
end
|
63
|
+
end
|
64
|
+
|
65
|
+
# unit tests for get_relation_tuples
|
66
|
+
# Query relation tuples
|
67
|
+
# Get all relation tuples that match the query. Only the namespace field is required.
|
68
|
+
# @param namespace
|
69
|
+
# @param [Hash] opts the optional parameters
|
70
|
+
# @option opts [String] :object
|
71
|
+
# @option opts [String] :relation
|
72
|
+
# @option opts [String] :subject
|
73
|
+
# @option opts [String] :page_token
|
74
|
+
# @option opts [Integer] :page_size
|
75
|
+
# @return [GetRelationTuplesResponse]
|
76
|
+
describe 'get_relation_tuples test' do
|
77
|
+
it 'should work' do
|
78
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
79
|
+
end
|
80
|
+
end
|
81
|
+
|
82
|
+
# unit tests for post_check
|
83
|
+
# Check a relation tuple
|
84
|
+
# To learn how relation tuples and the check works, head over to [the documentation](../concepts/relation-tuples.mdx).
|
85
|
+
# @param [Hash] opts the optional parameters
|
86
|
+
# @option opts [InternalRelationTuple] :payload
|
87
|
+
# @return [GetCheckResponse]
|
88
|
+
describe 'post_check test' do
|
89
|
+
it 'should work' do
|
90
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
91
|
+
end
|
92
|
+
end
|
93
|
+
|
94
|
+
end
|