ory-kratos-client 0.2.1.alpha1 → 0.5.2.alpha1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (150) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +1 -1
  3. data/README.md +84 -52
  4. data/docs/AdminApi.md +244 -86
  5. data/docs/CommonApi.md +54 -6
  6. data/docs/CompleteSelfServiceLoginFlowWithPasswordMethod.md +21 -0
  7. data/docs/CompleteSelfServiceRecoveryFlowWithLinkMethod.md +19 -0
  8. data/docs/CompleteSelfServiceSettingsFlowWithPasswordMethod.md +19 -0
  9. data/docs/CompleteSelfServiceVerificationFlowWithLinkMethod.md +19 -0
  10. data/docs/CreateIdentity.md +19 -0
  11. data/docs/CreateRecoveryLink.md +19 -0
  12. data/docs/ErrorContainer.md +2 -2
  13. data/docs/Form.md +2 -2
  14. data/docs/FormField.md +4 -4
  15. data/docs/GenericErrorPayload.md +1 -1
  16. data/docs/Identity.md +9 -7
  17. data/docs/LoginFlow.md +33 -0
  18. data/docs/LoginFlowMethod.md +19 -0
  19. data/docs/LoginFlowMethodConfig.md +25 -0
  20. data/docs/LoginRequest.md +2 -0
  21. data/docs/LoginRequestMethodConfig.md +2 -2
  22. data/docs/LoginViaApiResponse.md +19 -0
  23. data/docs/Message.md +23 -0
  24. data/docs/ProviderCredentialsConfig.md +19 -0
  25. data/docs/PublicApi.md +726 -151
  26. data/docs/RecoveryAddress.md +21 -0
  27. data/docs/RecoveryFlow.md +33 -0
  28. data/docs/RecoveryFlowMethod.md +19 -0
  29. data/docs/RecoveryFlowMethodConfig.md +23 -0
  30. data/docs/RecoveryLink.md +19 -0
  31. data/docs/RecoveryRequest.md +31 -0
  32. data/docs/RecoveryRequestMethod.md +19 -0
  33. data/docs/RegistrationFlow.md +31 -0
  34. data/docs/RegistrationFlowMethod.md +19 -0
  35. data/docs/RegistrationFlowMethodConfig.md +25 -0
  36. data/docs/RegistrationRequest.md +3 -1
  37. data/docs/RegistrationRequestMethodConfig.md +2 -2
  38. data/docs/RegistrationViaApiResponse.md +21 -0
  39. data/docs/RequestMethodConfig.md +2 -2
  40. data/docs/RevokeSession.md +17 -0
  41. data/docs/Session.md +6 -4
  42. data/docs/SettingsFlow.md +35 -0
  43. data/docs/SettingsFlowMethod.md +19 -0
  44. data/docs/SettingsFlowMethodConfig.md +23 -0
  45. data/docs/SettingsRequest.md +4 -2
  46. data/docs/SettingsViaApiResponse.md +19 -0
  47. data/docs/UpdateIdentity.md +19 -0
  48. data/docs/VerifiableAddress.md +3 -3
  49. data/docs/VerificationFlow.md +33 -0
  50. data/docs/VerificationFlowMethod.md +19 -0
  51. data/docs/VerificationFlowMethodConfig.md +23 -0
  52. data/docs/VerificationRequest.md +2 -0
  53. data/lib/ory-kratos-client.rb +31 -16
  54. data/lib/ory-kratos-client/api/admin_api.rb +321 -130
  55. data/lib/ory-kratos-client/api/common_api.rb +75 -12
  56. data/lib/ory-kratos-client/api/health_api.rb +2 -2
  57. data/lib/ory-kratos-client/api/public_api.rb +896 -246
  58. data/lib/ory-kratos-client/api/version_api.rb +2 -2
  59. data/lib/ory-kratos-client/api_client.rb +10 -7
  60. data/lib/ory-kratos-client/api_error.rb +2 -2
  61. data/lib/ory-kratos-client/configuration.rb +9 -2
  62. data/lib/ory-kratos-client/models/complete_self_service_browser_settings_strategy_profile_flow_payload.rb +2 -2
  63. data/lib/ory-kratos-client/models/complete_self_service_login_flow_with_password_method.rb +227 -0
  64. data/lib/ory-kratos-client/models/complete_self_service_recovery_flow_with_link_method.rb +217 -0
  65. data/lib/ory-kratos-client/models/complete_self_service_settings_flow_with_password_method.rb +222 -0
  66. data/lib/ory-kratos-client/models/complete_self_service_verification_flow_with_link_method.rb +217 -0
  67. data/lib/ory-kratos-client/models/create_identity.rb +227 -0
  68. data/lib/ory-kratos-client/models/create_recovery_link.rb +238 -0
  69. data/lib/ory-kratos-client/models/error_container.rb +13 -2
  70. data/lib/ory-kratos-client/models/form.rb +14 -15
  71. data/lib/ory-kratos-client/models/form_field.rb +11 -17
  72. data/lib/ory-kratos-client/models/generic_error.rb +2 -2
  73. data/lib/ory-kratos-client/models/generic_error_payload.rb +4 -6
  74. data/lib/ory-kratos-client/models/health_not_ready_status.rb +2 -2
  75. data/lib/ory-kratos-client/models/health_status.rb +2 -2
  76. data/lib/ory-kratos-client/models/identity.rb +53 -35
  77. data/lib/ory-kratos-client/models/login_flow.rb +315 -0
  78. data/lib/ory-kratos-client/models/login_flow_method.rb +226 -0
  79. data/lib/ory-kratos-client/models/login_flow_method_config.rb +267 -0
  80. data/lib/ory-kratos-client/models/login_request.rb +14 -3
  81. data/lib/ory-kratos-client/models/login_request_method.rb +2 -2
  82. data/lib/ory-kratos-client/models/login_request_method_config.rb +14 -15
  83. data/lib/ory-kratos-client/models/login_via_api_response.rb +227 -0
  84. data/lib/ory-kratos-client/models/message.rb +234 -0
  85. data/lib/ory-kratos-client/models/provider_credentials_config.rb +215 -0
  86. data/lib/ory-kratos-client/models/recovery_address.rb +239 -0
  87. data/lib/ory-kratos-client/models/recovery_flow.rb +319 -0
  88. data/lib/ory-kratos-client/models/recovery_flow_method.rb +226 -0
  89. data/lib/ory-kratos-client/models/recovery_flow_method_config.rb +255 -0
  90. data/lib/ory-kratos-client/models/recovery_link.rb +222 -0
  91. data/lib/ory-kratos-client/models/recovery_request.rb +309 -0
  92. data/lib/ory-kratos-client/models/recovery_request_method.rb +216 -0
  93. data/lib/ory-kratos-client/models/registration_flow.rb +304 -0
  94. data/lib/ory-kratos-client/models/registration_flow_method.rb +226 -0
  95. data/lib/ory-kratos-client/models/registration_flow_method_config.rb +267 -0
  96. data/lib/ory-kratos-client/models/registration_request.rb +14 -8
  97. data/lib/ory-kratos-client/models/registration_request_method.rb +2 -2
  98. data/lib/ory-kratos-client/models/registration_request_method_config.rb +14 -15
  99. data/lib/ory-kratos-client/models/registration_via_api_response.rb +236 -0
  100. data/lib/ory-kratos-client/models/request_method_config.rb +14 -15
  101. data/lib/ory-kratos-client/models/revoke_session.rb +212 -0
  102. data/lib/ory-kratos-client/models/session.rb +29 -20
  103. data/lib/ory-kratos-client/models/settings_flow.rb +333 -0
  104. data/lib/ory-kratos-client/models/settings_flow_method.rb +226 -0
  105. data/lib/ory-kratos-client/models/settings_flow_method_config.rb +255 -0
  106. data/lib/ory-kratos-client/models/settings_request.rb +24 -14
  107. data/lib/ory-kratos-client/models/settings_request_method.rb +2 -2
  108. data/lib/ory-kratos-client/models/settings_via_api_response.rb +226 -0
  109. data/lib/ory-kratos-client/models/update_identity.rb +222 -0
  110. data/lib/ory-kratos-client/models/verifiable_address.rb +17 -17
  111. data/lib/ory-kratos-client/models/verification_flow.rb +299 -0
  112. data/lib/ory-kratos-client/models/verification_flow_method.rb +226 -0
  113. data/lib/ory-kratos-client/models/verification_flow_method_config.rb +255 -0
  114. data/lib/ory-kratos-client/models/verification_request.rb +14 -3
  115. data/lib/ory-kratos-client/models/version.rb +2 -2
  116. data/lib/ory-kratos-client/version.rb +3 -3
  117. data/ory-kratos-client.gemspec +2 -2
  118. data/spec/models/complete_self_service_login_flow_with_password_method_spec.rb +53 -0
  119. data/spec/models/complete_self_service_recovery_flow_with_link_method_spec.rb +47 -0
  120. data/spec/models/complete_self_service_settings_flow_with_password_method_spec.rb +47 -0
  121. data/spec/models/complete_self_service_verification_flow_with_link_method_spec.rb +47 -0
  122. data/spec/models/create_identity_spec.rb +47 -0
  123. data/spec/models/create_recovery_link_spec.rb +47 -0
  124. data/spec/models/login_flow_method_config_spec.rb +65 -0
  125. data/spec/models/login_flow_method_spec.rb +47 -0
  126. data/spec/models/login_flow_spec.rb +89 -0
  127. data/spec/models/login_via_api_response_spec.rb +47 -0
  128. data/spec/models/message_spec.rb +59 -0
  129. data/spec/models/provider_credentials_config_spec.rb +47 -0
  130. data/spec/models/recovery_address_spec.rb +53 -0
  131. data/spec/models/recovery_flow_method_config_spec.rb +59 -0
  132. data/spec/models/recovery_flow_method_spec.rb +47 -0
  133. data/spec/models/recovery_flow_spec.rb +89 -0
  134. data/spec/models/recovery_link_spec.rb +47 -0
  135. data/spec/models/recovery_request_method_spec.rb +47 -0
  136. data/spec/models/recovery_request_spec.rb +83 -0
  137. data/spec/models/registration_flow_method_config_spec.rb +65 -0
  138. data/spec/models/registration_flow_method_spec.rb +47 -0
  139. data/spec/models/registration_flow_spec.rb +83 -0
  140. data/spec/models/registration_via_api_response_spec.rb +53 -0
  141. data/spec/models/revoke_session_spec.rb +41 -0
  142. data/spec/models/settings_flow_method_config_spec.rb +59 -0
  143. data/spec/models/settings_flow_method_spec.rb +47 -0
  144. data/spec/models/settings_flow_spec.rb +95 -0
  145. data/spec/models/settings_via_api_response_spec.rb +47 -0
  146. data/spec/models/update_identity_spec.rb +47 -0
  147. data/spec/models/verification_flow_method_config_spec.rb +59 -0
  148. data/spec/models/verification_flow_method_spec.rb +47 -0
  149. data/spec/models/verification_flow_spec.rb +89 -0
  150. metadata +150 -22
@@ -0,0 +1,238 @@
1
+ =begin
2
+ #Ory Kratos
3
+
4
+ #Welcome to the ORY Kratos HTTP API documentation!
5
+
6
+ The version of the OpenAPI document: v0.5.2-alpha.1
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 4.3.1
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module OryHydraClient
16
+ class CreateRecoveryLink
17
+ # Link Expires In The recovery link will expire at that point in time. Defaults to the configuration value of `selfservice.flows.recovery.request_lifespan`.
18
+ attr_accessor :expires_in
19
+
20
+ attr_accessor :identity_id
21
+
22
+ # Attribute mapping from ruby-style variable name to JSON key.
23
+ def self.attribute_map
24
+ {
25
+ :'expires_in' => :'expires_in',
26
+ :'identity_id' => :'identity_id'
27
+ }
28
+ end
29
+
30
+ # Attribute type mapping.
31
+ def self.openapi_types
32
+ {
33
+ :'expires_in' => :'String',
34
+ :'identity_id' => :'String'
35
+ }
36
+ end
37
+
38
+ # List of attributes with nullable: true
39
+ def self.openapi_nullable
40
+ Set.new([
41
+ ])
42
+ end
43
+
44
+ # Initializes the object
45
+ # @param [Hash] attributes Model attributes in the form of hash
46
+ def initialize(attributes = {})
47
+ if (!attributes.is_a?(Hash))
48
+ fail ArgumentError, "The input argument (attributes) must be a hash in `OryHydraClient::CreateRecoveryLink` initialize method"
49
+ end
50
+
51
+ # check to see if the attribute exists and convert string to symbol for hash key
52
+ attributes = attributes.each_with_object({}) { |(k, v), h|
53
+ if (!self.class.attribute_map.key?(k.to_sym))
54
+ fail ArgumentError, "`#{k}` is not a valid attribute in `OryHydraClient::CreateRecoveryLink`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
55
+ end
56
+ h[k.to_sym] = v
57
+ }
58
+
59
+ if attributes.key?(:'expires_in')
60
+ self.expires_in = attributes[:'expires_in']
61
+ end
62
+
63
+ if attributes.key?(:'identity_id')
64
+ self.identity_id = attributes[:'identity_id']
65
+ end
66
+ end
67
+
68
+ # Show invalid properties with the reasons. Usually used together with valid?
69
+ # @return Array for valid properties with the reasons
70
+ def list_invalid_properties
71
+ invalid_properties = Array.new
72
+ pattern = Regexp.new(/^[0-9]+(ns|us|ms|s|m|h)$/)
73
+ if !@expires_in.nil? && @expires_in !~ pattern
74
+ invalid_properties.push("invalid value for \"expires_in\", must conform to the pattern #{pattern}.")
75
+ end
76
+
77
+ if @identity_id.nil?
78
+ invalid_properties.push('invalid value for "identity_id", identity_id cannot be nil.')
79
+ end
80
+
81
+ invalid_properties
82
+ end
83
+
84
+ # Check to see if the all the properties in the model are valid
85
+ # @return true if the model is valid
86
+ def valid?
87
+ return false if !@expires_in.nil? && @expires_in !~ Regexp.new(/^[0-9]+(ns|us|ms|s|m|h)$/)
88
+ return false if @identity_id.nil?
89
+ true
90
+ end
91
+
92
+ # Custom attribute writer method with validation
93
+ # @param [Object] expires_in Value to be assigned
94
+ def expires_in=(expires_in)
95
+ pattern = Regexp.new(/^[0-9]+(ns|us|ms|s|m|h)$/)
96
+ if !expires_in.nil? && expires_in !~ pattern
97
+ fail ArgumentError, "invalid value for \"expires_in\", must conform to the pattern #{pattern}."
98
+ end
99
+
100
+ @expires_in = expires_in
101
+ end
102
+
103
+ # Checks equality by comparing each attribute.
104
+ # @param [Object] Object to be compared
105
+ def ==(o)
106
+ return true if self.equal?(o)
107
+ self.class == o.class &&
108
+ expires_in == o.expires_in &&
109
+ identity_id == o.identity_id
110
+ end
111
+
112
+ # @see the `==` method
113
+ # @param [Object] Object to be compared
114
+ def eql?(o)
115
+ self == o
116
+ end
117
+
118
+ # Calculates hash code according to all attributes.
119
+ # @return [Integer] Hash code
120
+ def hash
121
+ [expires_in, identity_id].hash
122
+ end
123
+
124
+ # Builds the object from hash
125
+ # @param [Hash] attributes Model attributes in the form of hash
126
+ # @return [Object] Returns the model itself
127
+ def self.build_from_hash(attributes)
128
+ new.build_from_hash(attributes)
129
+ end
130
+
131
+ # Builds the object from hash
132
+ # @param [Hash] attributes Model attributes in the form of hash
133
+ # @return [Object] Returns the model itself
134
+ def build_from_hash(attributes)
135
+ return nil unless attributes.is_a?(Hash)
136
+ self.class.openapi_types.each_pair do |key, type|
137
+ if type =~ /\AArray<(.*)>/i
138
+ # check to ensure the input is an array given that the attribute
139
+ # is documented as an array but the input is not
140
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
141
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
142
+ end
143
+ elsif !attributes[self.class.attribute_map[key]].nil?
144
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
145
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
146
+ end
147
+
148
+ self
149
+ end
150
+
151
+ # Deserializes the data based on type
152
+ # @param string type Data type
153
+ # @param string value Value to be deserialized
154
+ # @return [Object] Deserialized data
155
+ def _deserialize(type, value)
156
+ case type.to_sym
157
+ when :DateTime
158
+ DateTime.parse(value)
159
+ when :Date
160
+ Date.parse(value)
161
+ when :String
162
+ value.to_s
163
+ when :Integer
164
+ value.to_i
165
+ when :Float
166
+ value.to_f
167
+ when :Boolean
168
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
169
+ true
170
+ else
171
+ false
172
+ end
173
+ when :Object
174
+ # generic object (usually a Hash), return directly
175
+ value
176
+ when /\AArray<(?<inner_type>.+)>\z/
177
+ inner_type = Regexp.last_match[:inner_type]
178
+ value.map { |v| _deserialize(inner_type, v) }
179
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
180
+ k_type = Regexp.last_match[:k_type]
181
+ v_type = Regexp.last_match[:v_type]
182
+ {}.tap do |hash|
183
+ value.each do |k, v|
184
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
185
+ end
186
+ end
187
+ else # model
188
+ OryHydraClient.const_get(type).build_from_hash(value)
189
+ end
190
+ end
191
+
192
+ # Returns the string representation of the object
193
+ # @return [String] String presentation of the object
194
+ def to_s
195
+ to_hash.to_s
196
+ end
197
+
198
+ # to_body is an alias to to_hash (backward compatibility)
199
+ # @return [Hash] Returns the object in the form of hash
200
+ def to_body
201
+ to_hash
202
+ end
203
+
204
+ # Returns the object in the form of hash
205
+ # @return [Hash] Returns the object in the form of hash
206
+ def to_hash
207
+ hash = {}
208
+ self.class.attribute_map.each_pair do |attr, param|
209
+ value = self.send(attr)
210
+ if value.nil?
211
+ is_nullable = self.class.openapi_nullable.include?(attr)
212
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
213
+ end
214
+
215
+ hash[param] = _to_hash(value)
216
+ end
217
+ hash
218
+ end
219
+
220
+ # Outputs non-array value in the form of hash
221
+ # For object, use to_hash. Otherwise, just return the value
222
+ # @param [Object] value Any valid value
223
+ # @return [Hash] Returns the value in the form of hash
224
+ def _to_hash(value)
225
+ if value.is_a?(Array)
226
+ value.compact.map { |v| _to_hash(v) }
227
+ elsif value.is_a?(Hash)
228
+ {}.tap do |hash|
229
+ value.each { |k, v| hash[k] = _to_hash(v) }
230
+ end
231
+ elsif value.respond_to? :to_hash
232
+ value.to_hash
233
+ else
234
+ value
235
+ end
236
+ end
237
+ end
238
+ end
@@ -3,10 +3,10 @@
3
3
 
4
4
  #Welcome to the ORY Kratos HTTP API documentation!
5
5
 
6
- The version of the OpenAPI document: latest
6
+ The version of the OpenAPI document: v0.5.2-alpha.1
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.2.3
9
+ OpenAPI Generator version: 4.3.1
10
10
 
11
11
  =end
12
12
 
@@ -14,6 +14,7 @@ require 'date'
14
14
 
15
15
  module OryHydraClient
16
16
  class ErrorContainer
17
+ # Errors in the container
17
18
  attr_accessor :errors
18
19
 
19
20
  attr_accessor :id
@@ -68,12 +69,22 @@ module OryHydraClient
68
69
  # @return Array for valid properties with the reasons
69
70
  def list_invalid_properties
70
71
  invalid_properties = Array.new
72
+ if @errors.nil?
73
+ invalid_properties.push('invalid value for "errors", errors cannot be nil.')
74
+ end
75
+
76
+ if @id.nil?
77
+ invalid_properties.push('invalid value for "id", id cannot be nil.')
78
+ end
79
+
71
80
  invalid_properties
72
81
  end
73
82
 
74
83
  # Check to see if the all the properties in the model are valid
75
84
  # @return true if the model is valid
76
85
  def valid?
86
+ return false if @errors.nil?
87
+ return false if @id.nil?
77
88
  true
78
89
  end
79
90
 
@@ -3,10 +3,10 @@
3
3
 
4
4
  #Welcome to the ORY Kratos HTTP API documentation!
5
5
 
6
- The version of the OpenAPI document: latest
6
+ The version of the OpenAPI document: v0.4.6-alpha.1
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.2.3
9
+ OpenAPI Generator version: 4.3.1
10
10
 
11
11
  =end
12
12
 
@@ -18,12 +18,11 @@ module OryHydraClient
18
18
  # Action should be used as the form action URL `<form action=\"{{ .Action }}\" method=\"post\">`.
19
19
  attr_accessor :action
20
20
 
21
- # Errors contains all form errors. These will be duplicates of the individual field errors.
22
- attr_accessor :errors
23
-
24
21
  # Fields contains multiple fields
25
22
  attr_accessor :fields
26
23
 
24
+ attr_accessor :messages
25
+
27
26
  # Method is the form method (e.g. POST)
28
27
  attr_accessor :method
29
28
 
@@ -31,8 +30,8 @@ module OryHydraClient
31
30
  def self.attribute_map
32
31
  {
33
32
  :'action' => :'action',
34
- :'errors' => :'errors',
35
33
  :'fields' => :'fields',
34
+ :'messages' => :'messages',
36
35
  :'method' => :'method'
37
36
  }
38
37
  end
@@ -41,8 +40,8 @@ module OryHydraClient
41
40
  def self.openapi_types
42
41
  {
43
42
  :'action' => :'String',
44
- :'errors' => :'Array<Error>',
45
43
  :'fields' => :'Array<FormField>',
44
+ :'messages' => :'Array<Message>',
46
45
  :'method' => :'String'
47
46
  }
48
47
  end
@@ -72,18 +71,18 @@ module OryHydraClient
72
71
  self.action = attributes[:'action']
73
72
  end
74
73
 
75
- if attributes.key?(:'errors')
76
- if (value = attributes[:'errors']).is_a?(Array)
77
- self.errors = value
78
- end
79
- end
80
-
81
74
  if attributes.key?(:'fields')
82
75
  if (value = attributes[:'fields']).is_a?(Array)
83
76
  self.fields = value
84
77
  end
85
78
  end
86
79
 
80
+ if attributes.key?(:'messages')
81
+ if (value = attributes[:'messages']).is_a?(Array)
82
+ self.messages = value
83
+ end
84
+ end
85
+
87
86
  if attributes.key?(:'method')
88
87
  self.method = attributes[:'method']
89
88
  end
@@ -123,8 +122,8 @@ module OryHydraClient
123
122
  return true if self.equal?(o)
124
123
  self.class == o.class &&
125
124
  action == o.action &&
126
- errors == o.errors &&
127
125
  fields == o.fields &&
126
+ messages == o.messages &&
128
127
  method == o.method
129
128
  end
130
129
 
@@ -137,7 +136,7 @@ module OryHydraClient
137
136
  # Calculates hash code according to all attributes.
138
137
  # @return [Integer] Hash code
139
138
  def hash
140
- [action, errors, fields, method].hash
139
+ [action, fields, messages, method].hash
141
140
  end
142
141
 
143
142
  # Builds the object from hash
@@ -3,10 +3,10 @@
3
3
 
4
4
  #Welcome to the ORY Kratos HTTP API documentation!
5
5
 
6
- The version of the OpenAPI document: latest
6
+ The version of the OpenAPI document: v0.5.2-alpha.1
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.2.3
9
+ OpenAPI Generator version: 4.3.1
10
10
 
11
11
  =end
12
12
 
@@ -15,11 +15,10 @@ require 'date'
15
15
  module OryHydraClient
16
16
  # Field represents a HTML Form Field
17
17
  class FormField
18
- # Disabled is the equivalent of `<input disabled=\"{{.Disabled}}\">`
18
+ # Disabled is the equivalent of `<input {{if .Disabled}}disabled{{end}}\">`
19
19
  attr_accessor :disabled
20
20
 
21
- # Errors contains all validation errors this particular field has caused.
22
- attr_accessor :errors
21
+ attr_accessor :messages
23
22
 
24
23
  # Name is the equivalent of `<input name=\"{{.Name}}\">`
25
24
  attr_accessor :name
@@ -40,7 +39,7 @@ module OryHydraClient
40
39
  def self.attribute_map
41
40
  {
42
41
  :'disabled' => :'disabled',
43
- :'errors' => :'errors',
42
+ :'messages' => :'messages',
44
43
  :'name' => :'name',
45
44
  :'pattern' => :'pattern',
46
45
  :'required' => :'required',
@@ -53,7 +52,7 @@ module OryHydraClient
53
52
  def self.openapi_types
54
53
  {
55
54
  :'disabled' => :'Boolean',
56
- :'errors' => :'Array<Error>',
55
+ :'messages' => :'Array<Message>',
57
56
  :'name' => :'String',
58
57
  :'pattern' => :'String',
59
58
  :'required' => :'Boolean',
@@ -87,9 +86,9 @@ module OryHydraClient
87
86
  self.disabled = attributes[:'disabled']
88
87
  end
89
88
 
90
- if attributes.key?(:'errors')
91
- if (value = attributes[:'errors']).is_a?(Array)
92
- self.errors = value
89
+ if attributes.key?(:'messages')
90
+ if (value = attributes[:'messages']).is_a?(Array)
91
+ self.messages = value
93
92
  end
94
93
  end
95
94
 
@@ -122,10 +121,6 @@ module OryHydraClient
122
121
  invalid_properties.push('invalid value for "name", name cannot be nil.')
123
122
  end
124
123
 
125
- if @required.nil?
126
- invalid_properties.push('invalid value for "required", required cannot be nil.')
127
- end
128
-
129
124
  if @type.nil?
130
125
  invalid_properties.push('invalid value for "type", type cannot be nil.')
131
126
  end
@@ -137,7 +132,6 @@ module OryHydraClient
137
132
  # @return true if the model is valid
138
133
  def valid?
139
134
  return false if @name.nil?
140
- return false if @required.nil?
141
135
  return false if @type.nil?
142
136
  true
143
137
  end
@@ -148,7 +142,7 @@ module OryHydraClient
148
142
  return true if self.equal?(o)
149
143
  self.class == o.class &&
150
144
  disabled == o.disabled &&
151
- errors == o.errors &&
145
+ messages == o.messages &&
152
146
  name == o.name &&
153
147
  pattern == o.pattern &&
154
148
  required == o.required &&
@@ -165,7 +159,7 @@ module OryHydraClient
165
159
  # Calculates hash code according to all attributes.
166
160
  # @return [Integer] Hash code
167
161
  def hash
168
- [disabled, errors, name, pattern, required, type, value].hash
162
+ [disabled, messages, name, pattern, required, type, value].hash
169
163
  end
170
164
 
171
165
  # Builds the object from hash