-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
SWI-3149 Update to Generator Version 7.0.0 (#107)
* SWI-3149 Update to Generator Version 7.0.0 * update tests * fix tests again
- Loading branch information
Showing
109 changed files
with
1,236 additions
and
1,437 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
6.5.0 | ||
7.0.0-SNAPSHOT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,7 @@ | |
The version of the OpenAPI document: 1.0.0 | ||
Contact: [email protected] | ||
Generated by: https://openapi-generator.tech | ||
OpenAPI Generator version: 6.5.0 | ||
OpenAPI Generator version: 7.0.0-SNAPSHOT | ||
=end | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ | |
The version of the OpenAPI document: 1.0.0 | ||
Contact: [email protected] | ||
Generated by: https://openapi-generator.tech | ||
OpenAPI Generator version: 6.5.0 | ||
OpenAPI Generator version: 7.0.0-SNAPSHOT | ||
=end | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ | |
The version of the OpenAPI document: 1.0.0 | ||
Contact: [email protected] | ||
Generated by: https://openapi-generator.tech | ||
OpenAPI Generator version: 6.5.0 | ||
OpenAPI Generator version: 7.0.0-SNAPSHOT | ||
=end | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ | |
The version of the OpenAPI document: 1.0.0 | ||
Contact: [email protected] | ||
Generated by: https://openapi-generator.tech | ||
OpenAPI Generator version: 6.5.0 | ||
OpenAPI Generator version: 7.0.0-SNAPSHOT | ||
=end | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ | |
The version of the OpenAPI document: 1.0.0 | ||
Contact: [email protected] | ||
Generated by: https://openapi-generator.tech | ||
OpenAPI Generator version: 6.5.0 | ||
OpenAPI Generator version: 7.0.0-SNAPSHOT | ||
=end | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ | |
The version of the OpenAPI document: 1.0.0 | ||
Contact: [email protected] | ||
Generated by: https://openapi-generator.tech | ||
OpenAPI Generator version: 6.5.0 | ||
OpenAPI Generator version: 7.0.0-SNAPSHOT | ||
=end | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ | |
The version of the OpenAPI document: 1.0.0 | ||
Contact: [email protected] | ||
Generated by: https://openapi-generator.tech | ||
OpenAPI Generator version: 6.5.0 | ||
OpenAPI Generator version: 7.0.0-SNAPSHOT | ||
=end | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ | |
The version of the OpenAPI document: 1.0.0 | ||
Contact: [email protected] | ||
Generated by: https://openapi-generator.tech | ||
OpenAPI Generator version: 6.5.0 | ||
OpenAPI Generator version: 7.0.0-SNAPSHOT | ||
=end | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ | |
The version of the OpenAPI document: 1.0.0 | ||
Contact: [email protected] | ||
Generated by: https://openapi-generator.tech | ||
OpenAPI Generator version: 6.5.0 | ||
OpenAPI Generator version: 7.0.0-SNAPSHOT | ||
=end | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ | |
The version of the OpenAPI document: 1.0.0 | ||
Contact: [email protected] | ||
Generated by: https://openapi-generator.tech | ||
OpenAPI Generator version: 6.5.0 | ||
OpenAPI Generator version: 7.0.0-SNAPSHOT | ||
=end | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ | |
The version of the OpenAPI document: 1.0.0 | ||
Contact: [email protected] | ||
Generated by: https://openapi-generator.tech | ||
OpenAPI Generator version: 6.5.0 | ||
OpenAPI Generator version: 7.0.0-SNAPSHOT | ||
=end | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ | |
The version of the OpenAPI document: 1.0.0 | ||
Contact: [email protected] | ||
Generated by: https://openapi-generator.tech | ||
OpenAPI Generator version: 6.5.0 | ||
OpenAPI Generator version: 7.0.0-SNAPSHOT | ||
=end | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ | |
The version of the OpenAPI document: 1.0.0 | ||
Contact: [email protected] | ||
Generated by: https://openapi-generator.tech | ||
OpenAPI Generator version: 6.5.0 | ||
OpenAPI Generator version: 7.0.0-SNAPSHOT | ||
=end | ||
|
||
|
@@ -151,7 +151,7 @@ def initialize | |
@scheme = 'http' | ||
@host = 'localhost' | ||
@base_path = '' | ||
@server_index = 0 | ||
@server_index = nil | ||
@server_operation_index = {} | ||
@server_variables = {} | ||
@server_operation_variables = {} | ||
|
@@ -204,10 +204,12 @@ def base_path=(base_path) | |
|
||
# Returns base URL for specified operation based on server settings | ||
def base_url(operation = nil) | ||
index = server_operation_index.fetch(operation, server_index) | ||
return "#{scheme}://#{[host, base_path].join('/').gsub(/\/+/, '/')}".sub(/\/+\z/, '') if index == nil | ||
|
||
server_url(index, server_operation_variables.fetch(operation, server_variables), operation_server_settings[operation]) | ||
if operation_server_settings.key?(operation) then | ||
index = server_operation_index.fetch(operation, server_index) | ||
server_url(index.nil? ? 0 : index, server_operation_variables.fetch(operation, server_variables), operation_server_settings[operation]) | ||
else | ||
server_index.nil? ? "#{scheme}://#{[host, base_path].join('/').gsub(/\/+/, '/')}".sub(/\/+\z/, '') : server_url(server_index, server_variables, nil) | ||
end | ||
end | ||
|
||
# Gets API key (with prefix if set). | ||
|
@@ -479,8 +481,8 @@ def server_url(index, variables = {}, servers = nil) | |
servers = server_settings if servers == nil | ||
|
||
# check array index out of bound | ||
if (index < 0 || index >= servers.size) | ||
fail ArgumentError, "Invalid index #{index} when selecting the server. Must be less than #{servers.size}" | ||
if (index.nil? || index < 0 || index >= servers.size) | ||
fail ArgumentError, "Invalid index #{index} when selecting the server. Must not be nil and must be less than #{servers.size}" | ||
end | ||
|
||
server = servers[index] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ | |
The version of the OpenAPI document: 1.0.0 | ||
Contact: [email protected] | ||
Generated by: https://openapi-generator.tech | ||
OpenAPI Generator version: 6.5.0 | ||
OpenAPI Generator version: 7.0.0-SNAPSHOT | ||
=end | ||
|
||
|
@@ -75,13 +75,15 @@ def initialize(attributes = {}) | |
# Show invalid properties with the reasons. Usually used together with valid? | ||
# @return Array for valid properties with the reasons | ||
def list_invalid_properties | ||
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' | ||
invalid_properties = Array.new | ||
invalid_properties | ||
end | ||
|
||
# Check to see if the all the properties in the model are valid | ||
# @return true if the model is valid | ||
def valid? | ||
warn '[DEPRECATED] the `valid?` method is obsolete' | ||
true | ||
end | ||
|
||
|
@@ -110,37 +112,30 @@ def hash | |
# @param [Hash] attributes Model attributes in the form of hash | ||
# @return [Object] Returns the model itself | ||
def self.build_from_hash(attributes) | ||
new.build_from_hash(attributes) | ||
end | ||
|
||
# Builds the object from hash | ||
# @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) | ||
attributes = attributes.transform_keys(&:to_sym) | ||
self.class.openapi_types.each_pair do |key, type| | ||
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) | ||
self.send("#{key}=", nil) | ||
transformed_hash = {} | ||
openapi_types.each_pair do |key, type| | ||
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? | ||
transformed_hash["#{key}"] = nil | ||
elsif type =~ /\AArray<(.*)>/i | ||
# check to ensure the input is an array given that 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) }) | ||
if attributes[attribute_map[key]].is_a?(Array) | ||
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } | ||
end | ||
elsif !attributes[self.class.attribute_map[key]].nil? | ||
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) | ||
elsif !attributes[attribute_map[key]].nil? | ||
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) | ||
end | ||
end | ||
|
||
self | ||
new(transformed_hash) | ||
end | ||
|
||
# Deserializes the data based on type | ||
# @param string type Data type | ||
# @param string value Value to be deserialized | ||
# @return [Object] Deserialized data | ||
def _deserialize(type, value) | ||
def self._deserialize(type, value) | ||
case type.to_sym | ||
when :Time | ||
Time.parse(value) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ | |
The version of the OpenAPI document: 1.0.0 | ||
Contact: [email protected] | ||
Generated by: https://openapi-generator.tech | ||
OpenAPI Generator version: 6.5.0 | ||
OpenAPI Generator version: 7.0.0-SNAPSHOT | ||
=end | ||
|
||
|
@@ -208,13 +208,15 @@ def initialize(attributes = {}) | |
# Show invalid properties with the reasons. Usually used together with valid? | ||
# @return Array for valid properties with the reasons | ||
def list_invalid_properties | ||
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' | ||
invalid_properties = Array.new | ||
invalid_properties | ||
end | ||
|
||
# Check to see if the all the properties in the model are valid | ||
# @return true if the model is valid | ||
def valid? | ||
warn '[DEPRECATED] the `valid?` method is obsolete' | ||
true | ||
end | ||
|
||
|
@@ -255,37 +257,30 @@ def hash | |
# @param [Hash] attributes Model attributes in the form of hash | ||
# @return [Object] Returns the model itself | ||
def self.build_from_hash(attributes) | ||
new.build_from_hash(attributes) | ||
end | ||
|
||
# Builds the object from hash | ||
# @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) | ||
attributes = attributes.transform_keys(&:to_sym) | ||
self.class.openapi_types.each_pair do |key, type| | ||
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) | ||
self.send("#{key}=", nil) | ||
transformed_hash = {} | ||
openapi_types.each_pair do |key, type| | ||
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? | ||
transformed_hash["#{key}"] = nil | ||
elsif type =~ /\AArray<(.*)>/i | ||
# check to ensure the input is an array given that 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) }) | ||
if attributes[attribute_map[key]].is_a?(Array) | ||
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } | ||
end | ||
elsif !attributes[self.class.attribute_map[key]].nil? | ||
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) | ||
elsif !attributes[attribute_map[key]].nil? | ||
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) | ||
end | ||
end | ||
|
||
self | ||
new(transformed_hash) | ||
end | ||
|
||
# Deserializes the data based on type | ||
# @param string type Data type | ||
# @param string value Value to be deserialized | ||
# @return [Object] Deserialized data | ||
def _deserialize(type, value) | ||
def self._deserialize(type, value) | ||
case type.to_sym | ||
when :Time | ||
Time.parse(value) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ | |
The version of the OpenAPI document: 1.0.0 | ||
Contact: [email protected] | ||
Generated by: https://openapi-generator.tech | ||
OpenAPI Generator version: 6.5.0 | ||
OpenAPI Generator version: 7.0.0-SNAPSHOT | ||
=end | ||
|
||
|
@@ -228,13 +228,15 @@ def initialize(attributes = {}) | |
# Show invalid properties with the reasons. Usually used together with valid? | ||
# @return Array for valid properties with the reasons | ||
def list_invalid_properties | ||
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' | ||
invalid_properties = Array.new | ||
invalid_properties | ||
end | ||
|
||
# Check to see if the all the properties in the model are valid | ||
# @return true if the model is valid | ||
def valid? | ||
warn '[DEPRECATED] the `valid?` method is obsolete' | ||
true | ||
end | ||
|
||
|
@@ -277,37 +279,30 @@ def hash | |
# @param [Hash] attributes Model attributes in the form of hash | ||
# @return [Object] Returns the model itself | ||
def self.build_from_hash(attributes) | ||
new.build_from_hash(attributes) | ||
end | ||
|
||
# Builds the object from hash | ||
# @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) | ||
attributes = attributes.transform_keys(&:to_sym) | ||
self.class.openapi_types.each_pair do |key, type| | ||
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) | ||
self.send("#{key}=", nil) | ||
transformed_hash = {} | ||
openapi_types.each_pair do |key, type| | ||
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? | ||
transformed_hash["#{key}"] = nil | ||
elsif type =~ /\AArray<(.*)>/i | ||
# check to ensure the input is an array given that 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) }) | ||
if attributes[attribute_map[key]].is_a?(Array) | ||
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } | ||
end | ||
elsif !attributes[self.class.attribute_map[key]].nil? | ||
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) | ||
elsif !attributes[attribute_map[key]].nil? | ||
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) | ||
end | ||
end | ||
|
||
self | ||
new(transformed_hash) | ||
end | ||
|
||
# Deserializes the data based on type | ||
# @param string type Data type | ||
# @param string value Value to be deserialized | ||
# @return [Object] Deserialized data | ||
def _deserialize(type, value) | ||
def self._deserialize(type, value) | ||
case type.to_sym | ||
when :Time | ||
Time.parse(value) | ||
|
Oops, something went wrong.