sdksio-apimatic-sdk 3.0.0 → 3.0.1
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/LICENSE +1 -1
- data/README.md +165 -77
- data/bin/console +15 -0
- data/lib/apimatic_api/api_helper.rb +10 -10
- data/lib/apimatic_api/client.rb +108 -96
- data/lib/apimatic_api/configuration.rb +198 -125
- data/lib/apimatic_api/controllers/api_validation_external_apis_controller.rb +90 -84
- data/lib/apimatic_api/controllers/api_validation_v2_external_apis_controller.rb +89 -0
- data/lib/apimatic_api/controllers/base_controller.rb +55 -66
- data/lib/apimatic_api/controllers/code_generation_external_apis_controller.rb +201 -178
- data/lib/apimatic_api/controllers/docs_portal_generation_async_controller.rb +110 -0
- data/lib/apimatic_api/controllers/docs_portal_management_controller.rb +56 -198
- data/lib/apimatic_api/controllers/sdk_generation_async_controller.rb +112 -0
- data/lib/apimatic_api/controllers/transformation_controller.rb +180 -174
- data/lib/apimatic_api/exceptions/api_exception.rb +21 -10
- data/lib/apimatic_api/exceptions/bad_request_response_sdk_exception.rb +46 -0
- data/lib/apimatic_api/exceptions/internal_server_error_response_exception.rb +46 -0
- data/lib/apimatic_api/exceptions/problem_details_exception.rb +74 -0
- data/lib/apimatic_api/exceptions/unauthorized_response_exception.rb +46 -0
- data/lib/apimatic_api/http/api_response.rb +19 -0
- data/lib/apimatic_api/http/auth/custom_header_authentication.rb +48 -38
- data/lib/apimatic_api/http/http_call_back.rb +10 -10
- data/lib/apimatic_api/http/http_method_enum.rb +10 -10
- data/lib/apimatic_api/http/http_request.rb +10 -10
- data/lib/apimatic_api/http/http_response.rb +10 -10
- data/lib/apimatic_api/http/proxy_settings.rb +22 -0
- data/lib/apimatic_api/logging/configuration/api_logging_configuration.rb +186 -0
- data/lib/apimatic_api/logging/sdk_logger.rb +17 -0
- data/lib/apimatic_api/models/accept.rb +26 -0
- data/lib/apimatic_api/models/api_validation_summary.rb +100 -75
- data/lib/apimatic_api/models/base_model.rb +110 -62
- data/lib/apimatic_api/models/content_type.rb +26 -0
- data/lib/apimatic_api/models/export_formats.rb +85 -60
- data/lib/apimatic_api/models/generate_sdk_via_url_request.rb +85 -59
- data/lib/apimatic_api/models/line_info.rb +105 -0
- data/lib/apimatic_api/models/links.rb +82 -0
- data/lib/apimatic_api/models/platforms.rb +57 -39
- data/lib/apimatic_api/models/portal_generation_async_response.rb +68 -0
- data/lib/apimatic_api/models/portal_generation_status_response.rb +70 -0
- data/lib/apimatic_api/models/sdk_generation_async_response.rb +68 -0
- data/lib/apimatic_api/models/sdk_generation_status_response.rb +70 -0
- data/lib/apimatic_api/models/sdk_languages.rb +56 -0
- data/lib/apimatic_api/models/status.rb +48 -0
- data/lib/apimatic_api/models/transform_via_url_request.rb +85 -60
- data/lib/apimatic_api/models/transformation.rb +180 -152
- data/lib/apimatic_api/models/user_code_generation.rb +167 -140
- data/lib/apimatic_api/models/validate_api_result.rb +82 -0
- data/lib/apimatic_api/models/validation_entry.rb +143 -0
- data/lib/apimatic_api/models/validation_summary.rb +145 -0
- data/lib/apimatic_api/utilities/date_time_helper.rb +11 -11
- data/lib/apimatic_api/utilities/file_wrapper.rb +28 -16
- data/lib/apimatic_api.rb +79 -86
- metadata +39 -89
- data/lib/apimatic_api/controllers/api_validation_imported_apis_controller.rb +0 -74
- data/lib/apimatic_api/controllers/apis_management_controller.rb +0 -260
- data/lib/apimatic_api/controllers/code_generation_imported_apis_controller.rb +0 -136
- data/lib/apimatic_api/models/api_entity.rb +0 -220
- data/lib/apimatic_api/models/api_entity_code_generation.rb +0 -131
- data/lib/apimatic_api/models/api_entity_identifier.rb +0 -48
- data/lib/apimatic_api/models/attributes.rb +0 -48
- data/lib/apimatic_api/models/auth_scope.rb +0 -75
- data/lib/apimatic_api/models/authentication.rb +0 -112
- data/lib/apimatic_api/models/code_gen_settings.rb +0 -541
- data/lib/apimatic_api/models/code_generation.rb +0 -122
- data/lib/apimatic_api/models/docs_validation_summary.rb +0 -75
- data/lib/apimatic_api/models/endpoints_group.rb +0 -57
- data/lib/apimatic_api/models/environment.rb +0 -79
- data/lib/apimatic_api/models/field.rb +0 -156
- data/lib/apimatic_api/models/generate_on_prem_portal_via_build_input_request_body.rb +0 -48
- data/lib/apimatic_api/models/generate_sdk_via_file_request_body.rb +0 -61
- data/lib/apimatic_api/models/import_api_version_via_url_request.rb +0 -64
- data/lib/apimatic_api/models/import_api_via_file_request_body.rb +0 -51
- data/lib/apimatic_api/models/import_api_via_url_request.rb +0 -49
- data/lib/apimatic_api/models/import_new_api_version_via_file_request_body.rb +0 -66
- data/lib/apimatic_api/models/import_validation_summary.rb +0 -75
- data/lib/apimatic_api/models/inplace_api_import_binary_file.rb +0 -51
- data/lib/apimatic_api/models/inplace_import_api_via_url_request.rb +0 -49
- data/lib/apimatic_api/models/meta_data.rb +0 -70
- data/lib/apimatic_api/models/parameter.rb +0 -165
- data/lib/apimatic_api/models/paramter_format_details.rb +0 -48
- data/lib/apimatic_api/models/platforms_template.rb +0 -49
- data/lib/apimatic_api/models/server.rb +0 -69
- data/lib/apimatic_api/models/server_configuration.rb +0 -105
- data/lib/apimatic_api/models/test_gen_settings.rb +0 -70
- data/lib/apimatic_api/models/transform_via_file_request_body.rb +0 -61
- data/lib/apimatic_api/models/user_code_generation_requirements.rb +0 -57
- data/lib/apimatic_api/models/validate_api_via_file_request_body.rb +0 -51
- data/test/controllers/controller_test_base.rb +0 -29
- data/test/controllers/test_api_validation_external_apis_controller.rb +0 -144
- data/test/controllers/test_api_validation_imported_apis_controller.rb +0 -2971
- data/test/controllers/test_code_generation_external_apis_controller.rb +0 -32
- data/test/controllers/test_docs_portal_management_controller.rb +0 -94
- data/test/controllers/test_transformation_controller.rb +0 -32
- data/test/http_response_catcher.rb +0 -19
|
@@ -1,62 +1,110 @@
|
|
|
1
|
-
# apimatic_api
|
|
2
|
-
#
|
|
3
|
-
# This file was automatically generated by APIMATIC
|
|
4
|
-
#
|
|
5
|
-
|
|
6
|
-
module ApimaticApi
|
|
7
|
-
# Base model.
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
hash
|
|
60
|
-
end
|
|
61
|
-
|
|
62
|
-
|
|
1
|
+
# apimatic_api
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0 (
|
|
4
|
+
# https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module ApimaticApi
|
|
7
|
+
# Base model.
|
|
8
|
+
# rubocop:disable all
|
|
9
|
+
class BaseModel < CoreLibrary::BaseModel
|
|
10
|
+
# Returns a Hash representation of the current object.
|
|
11
|
+
def to_hash
|
|
12
|
+
# validating the model being serialized
|
|
13
|
+
self.class.validate(self) if self.class.respond_to?(:validate)
|
|
14
|
+
|
|
15
|
+
hash = {}
|
|
16
|
+
instance_variables.each do |name|
|
|
17
|
+
value = instance_variable_get(name)
|
|
18
|
+
name = name[1..]
|
|
19
|
+
if name == 'additional_properties'
|
|
20
|
+
additional_properties = process_additional_properties(value, self.class.names)
|
|
21
|
+
hash.merge!(additional_properties)
|
|
22
|
+
else
|
|
23
|
+
key = self.class.names.key?(name) ? self.class.names[name] : name
|
|
24
|
+
optional_fields = self.class.optionals
|
|
25
|
+
nullable_fields = self.class.nullables
|
|
26
|
+
if value.nil?
|
|
27
|
+
next unless nullable_fields.include?(name)
|
|
28
|
+
|
|
29
|
+
if !optional_fields.include?(name) && !nullable_fields.include?(name)
|
|
30
|
+
raise ArgumentError,
|
|
31
|
+
"`#{name}` cannot be nil in `#{self.class}`. Please specify a valid value."
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
hash[key] = nil
|
|
36
|
+
unless value.nil?
|
|
37
|
+
if respond_to?("to_custom_#{name}")
|
|
38
|
+
if (value.instance_of? Array) || (value.instance_of? Hash)
|
|
39
|
+
params = [hash, key]
|
|
40
|
+
hash[key] = send("to_custom_#{name}", *params)
|
|
41
|
+
else
|
|
42
|
+
hash[key] = send("to_custom_#{name}")
|
|
43
|
+
end
|
|
44
|
+
elsif respond_to?("to_union_type_#{name}")
|
|
45
|
+
hash[key] = send("to_union_type_#{name}")
|
|
46
|
+
elsif value.instance_of? Array
|
|
47
|
+
hash[key] = value.map { |v| v.is_a?(BaseModel) ? v.to_hash : v }
|
|
48
|
+
elsif value.instance_of? Hash
|
|
49
|
+
hash[key] = {}
|
|
50
|
+
value.each do |k, v|
|
|
51
|
+
hash[key][k] = v.is_a?(BaseModel) ? v.to_hash : v
|
|
52
|
+
end
|
|
53
|
+
else
|
|
54
|
+
hash[key] = value.is_a?(BaseModel) ? value.to_hash : value
|
|
55
|
+
end
|
|
56
|
+
end
|
|
57
|
+
end
|
|
58
|
+
end
|
|
59
|
+
hash
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
# Processes additional properties, ensuring no conflicts with existing properties.
|
|
63
|
+
def process_additional_properties(additional_properties, existing_prop_names)
|
|
64
|
+
hash = {}
|
|
65
|
+
additional_properties.each do |name, value|
|
|
66
|
+
check_for_conflict(name, existing_prop_names)
|
|
67
|
+
|
|
68
|
+
hash[name] = if value.is_a?(Array)
|
|
69
|
+
process_array(value)
|
|
70
|
+
elsif value.is_a?(Hash)
|
|
71
|
+
process_hash(value)
|
|
72
|
+
else
|
|
73
|
+
process_basic_value(value)
|
|
74
|
+
end
|
|
75
|
+
end
|
|
76
|
+
hash
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
# Checks if an additional property conflicts with a model's existing property.
|
|
80
|
+
def check_for_conflict(name, existing_prop_names)
|
|
81
|
+
return unless existing_prop_names.key?(name)
|
|
82
|
+
|
|
83
|
+
raise ArgumentError, "An additional property key, '#{name}' conflicts with one of the model's properties"
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
# Processes an array of values, recursively calling `to_hash` on BaseModel objects.
|
|
87
|
+
def process_array(value)
|
|
88
|
+
value.map { |v| v.is_a?(BaseModel) ? v.to_hash : v }
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
# Processes a hash of values, recursively calling `to_hash` on BaseModel objects.
|
|
92
|
+
def process_hash(value)
|
|
93
|
+
value.transform_values do |v|
|
|
94
|
+
v.is_a?(BaseModel) ? v.to_hash : v
|
|
95
|
+
end
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
# Processes a basic value (non-array, non-hash).
|
|
99
|
+
def process_basic_value(value)
|
|
100
|
+
value.is_a?(BaseModel) ? value.to_hash : value
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
# Returns a JSON representation of the curent object.
|
|
104
|
+
def to_json(options = {})
|
|
105
|
+
hash = to_hash
|
|
106
|
+
hash.to_json(options)
|
|
107
|
+
end
|
|
108
|
+
end
|
|
109
|
+
# rubocop:enable all
|
|
110
|
+
end
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# apimatic_api
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0 (
|
|
4
|
+
# https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module ApimaticApi
|
|
7
|
+
# Content-Type.
|
|
8
|
+
class ContentType
|
|
9
|
+
CONTENT_TYPE = [
|
|
10
|
+
# TODO: Write general description for ENUM_MULTIPARTFORMDATA
|
|
11
|
+
ENUM_MULTIPARTFORMDATA = 'multipart/form-data'.freeze
|
|
12
|
+
].freeze
|
|
13
|
+
|
|
14
|
+
def self.validate(value)
|
|
15
|
+
return false if value.nil?
|
|
16
|
+
|
|
17
|
+
CONTENT_TYPE.include?(value)
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
def self.from_value(value, default_value = ENUM_MULTIPARTFORMDATA)
|
|
21
|
+
return default_value if value.nil?
|
|
22
|
+
|
|
23
|
+
default_value
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
end
|
|
@@ -1,60 +1,85 @@
|
|
|
1
|
-
# apimatic_api
|
|
2
|
-
#
|
|
3
|
-
# This file was automatically generated by APIMATIC
|
|
4
|
-
#
|
|
5
|
-
|
|
6
|
-
module ApimaticApi
|
|
7
|
-
# The structure contains API specification formats that Transformer can
|
|
8
|
-
# convert to.
|
|
9
|
-
class ExportFormats
|
|
10
|
-
EXPORT_FORMATS = [
|
|
11
|
-
# TODO: Write general description for APIMATIC
|
|
12
|
-
APIMATIC = 'APIMATIC'.freeze,
|
|
13
|
-
|
|
14
|
-
# TODO: Write general description for WADL2009
|
|
15
|
-
WADL2009 = 'WADL2009'.freeze,
|
|
16
|
-
|
|
17
|
-
# TODO: Write general description for WSDL
|
|
18
|
-
WSDL = 'WSDL'.freeze,
|
|
19
|
-
|
|
20
|
-
# TODO: Write general description for SWAGGER10
|
|
21
|
-
SWAGGER10 = 'Swagger10'.freeze,
|
|
22
|
-
|
|
23
|
-
# TODO: Write general description for SWAGGER20
|
|
24
|
-
SWAGGER20 = 'Swagger20'.freeze,
|
|
25
|
-
|
|
26
|
-
# TODO: Write general description for SWAGGERYAML
|
|
27
|
-
SWAGGERYAML = 'SwaggerYaml'.freeze,
|
|
28
|
-
|
|
29
|
-
# OpenAPI v3.0 (JSON)
|
|
30
|
-
OAS3 = 'OpenApi3Json'.freeze,
|
|
31
|
-
|
|
32
|
-
# TODO: Write general description for OPENAPI3YAML
|
|
33
|
-
OPENAPI3YAML = 'OpenApi3Yaml'.freeze,
|
|
34
|
-
|
|
35
|
-
# TODO: Write general description for APIBLUEPRINT
|
|
36
|
-
APIBLUEPRINT = 'APIBluePrint'.freeze,
|
|
37
|
-
|
|
38
|
-
# TODO: Write general description for RAML
|
|
39
|
-
RAML = 'RAML'.freeze,
|
|
40
|
-
|
|
41
|
-
# TODO: Write general description for RAML10
|
|
42
|
-
RAML10 = 'RAML10'.freeze,
|
|
43
|
-
|
|
44
|
-
# TODO: Write general description for POSTMAN10
|
|
45
|
-
POSTMAN10 = 'Postman10'.freeze,
|
|
46
|
-
|
|
47
|
-
# TODO: Write general description for POSTMAN20
|
|
48
|
-
POSTMAN20 = 'Postman20'.freeze,
|
|
49
|
-
|
|
50
|
-
# TODO: Write general description for GRAPHQLSCHEMA
|
|
51
|
-
GRAPHQLSCHEMA = 'GraphQlSchema'.freeze
|
|
52
|
-
].freeze
|
|
53
|
-
|
|
54
|
-
def self.validate(value)
|
|
55
|
-
return false if value.nil?
|
|
56
|
-
|
|
57
|
-
EXPORT_FORMATS.include?(value)
|
|
58
|
-
end
|
|
59
|
-
|
|
60
|
-
|
|
1
|
+
# apimatic_api
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0 (
|
|
4
|
+
# https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module ApimaticApi
|
|
7
|
+
# The structure contains API specification formats that Transformer can
|
|
8
|
+
# convert to.
|
|
9
|
+
class ExportFormats
|
|
10
|
+
EXPORT_FORMATS = [
|
|
11
|
+
# TODO: Write general description for APIMATIC
|
|
12
|
+
APIMATIC = 'APIMATIC'.freeze,
|
|
13
|
+
|
|
14
|
+
# TODO: Write general description for WADL2009
|
|
15
|
+
WADL2009 = 'WADL2009'.freeze,
|
|
16
|
+
|
|
17
|
+
# TODO: Write general description for WSDL
|
|
18
|
+
WSDL = 'WSDL'.freeze,
|
|
19
|
+
|
|
20
|
+
# TODO: Write general description for SWAGGER10
|
|
21
|
+
SWAGGER10 = 'Swagger10'.freeze,
|
|
22
|
+
|
|
23
|
+
# TODO: Write general description for SWAGGER20
|
|
24
|
+
SWAGGER20 = 'Swagger20'.freeze,
|
|
25
|
+
|
|
26
|
+
# TODO: Write general description for SWAGGERYAML
|
|
27
|
+
SWAGGERYAML = 'SwaggerYaml'.freeze,
|
|
28
|
+
|
|
29
|
+
# OpenAPI v3.0 (JSON)
|
|
30
|
+
OAS3 = 'OpenApi3Json'.freeze,
|
|
31
|
+
|
|
32
|
+
# TODO: Write general description for OPENAPI3YAML
|
|
33
|
+
OPENAPI3YAML = 'OpenApi3Yaml'.freeze,
|
|
34
|
+
|
|
35
|
+
# TODO: Write general description for APIBLUEPRINT
|
|
36
|
+
APIBLUEPRINT = 'APIBluePrint'.freeze,
|
|
37
|
+
|
|
38
|
+
# TODO: Write general description for RAML
|
|
39
|
+
RAML = 'RAML'.freeze,
|
|
40
|
+
|
|
41
|
+
# TODO: Write general description for RAML10
|
|
42
|
+
RAML10 = 'RAML10'.freeze,
|
|
43
|
+
|
|
44
|
+
# TODO: Write general description for POSTMAN10
|
|
45
|
+
POSTMAN10 = 'Postman10'.freeze,
|
|
46
|
+
|
|
47
|
+
# TODO: Write general description for POSTMAN20
|
|
48
|
+
POSTMAN20 = 'Postman20'.freeze,
|
|
49
|
+
|
|
50
|
+
# TODO: Write general description for GRAPHQLSCHEMA
|
|
51
|
+
GRAPHQLSCHEMA = 'GraphQlSchema'.freeze
|
|
52
|
+
].freeze
|
|
53
|
+
|
|
54
|
+
def self.validate(value)
|
|
55
|
+
return false if value.nil?
|
|
56
|
+
|
|
57
|
+
EXPORT_FORMATS.include?(value)
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
def self.from_value(value, default_value = APIMATIC)
|
|
61
|
+
return default_value if value.nil?
|
|
62
|
+
|
|
63
|
+
str = value.to_s.strip
|
|
64
|
+
|
|
65
|
+
case str.downcase
|
|
66
|
+
when 'apimatic' then APIMATIC
|
|
67
|
+
when 'wadl2009' then WADL2009
|
|
68
|
+
when 'wsdl' then WSDL
|
|
69
|
+
when 'swagger10' then SWAGGER10
|
|
70
|
+
when 'swagger20' then SWAGGER20
|
|
71
|
+
when 'swaggeryaml' then SWAGGERYAML
|
|
72
|
+
when 'oas3' then OAS3
|
|
73
|
+
when 'openapi3yaml' then OPENAPI3YAML
|
|
74
|
+
when 'apiblueprint' then APIBLUEPRINT
|
|
75
|
+
when 'raml' then RAML
|
|
76
|
+
when 'raml10' then RAML10
|
|
77
|
+
when 'postman10' then POSTMAN10
|
|
78
|
+
when 'postman20' then POSTMAN20
|
|
79
|
+
when 'graphqlschema' then GRAPHQLSCHEMA
|
|
80
|
+
else
|
|
81
|
+
default_value
|
|
82
|
+
end
|
|
83
|
+
end
|
|
84
|
+
end
|
|
85
|
+
end
|
|
@@ -1,59 +1,85 @@
|
|
|
1
|
-
# apimatic_api
|
|
2
|
-
#
|
|
3
|
-
# This file was automatically generated by APIMATIC
|
|
4
|
-
#
|
|
5
|
-
|
|
6
|
-
module ApimaticApi
|
|
7
|
-
# GenerateSdkViaUrlRequest Model.
|
|
8
|
-
class GenerateSdkViaUrlRequest < BaseModel
|
|
9
|
-
SKIP = Object.new
|
|
10
|
-
private_constant :SKIP
|
|
11
|
-
|
|
12
|
-
# The URL for the API specification file.<br><br>**Note:** This URL should
|
|
13
|
-
# be publicly accessible.
|
|
14
|
-
# @return [String]
|
|
15
|
-
attr_accessor :url
|
|
16
|
-
|
|
17
|
-
# The structure contains platforms that APIMatic CodeGen can generate SDKs
|
|
18
|
-
# and Docs in.
|
|
19
|
-
# @return [Platforms]
|
|
20
|
-
attr_accessor :template
|
|
21
|
-
|
|
22
|
-
# A mapping from model property names to API property names.
|
|
23
|
-
def self.names
|
|
24
|
-
@_hash = {} if @_hash.nil?
|
|
25
|
-
@_hash['url'] = 'url'
|
|
26
|
-
@_hash['template'] = 'template'
|
|
27
|
-
@_hash
|
|
28
|
-
end
|
|
29
|
-
|
|
30
|
-
# An array for optional fields
|
|
31
|
-
def self.optionals
|
|
32
|
-
[]
|
|
33
|
-
end
|
|
34
|
-
|
|
35
|
-
# An array for nullable fields
|
|
36
|
-
def self.nullables
|
|
37
|
-
[]
|
|
38
|
-
end
|
|
39
|
-
|
|
40
|
-
def initialize(url
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
#
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
1
|
+
# apimatic_api
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0 (
|
|
4
|
+
# https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module ApimaticApi
|
|
7
|
+
# GenerateSdkViaUrlRequest Model.
|
|
8
|
+
class GenerateSdkViaUrlRequest < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# The URL for the API specification file.<br><br>**Note:** This URL should
|
|
13
|
+
# be publicly accessible.
|
|
14
|
+
# @return [String]
|
|
15
|
+
attr_accessor :url
|
|
16
|
+
|
|
17
|
+
# The structure contains platforms that APIMatic CodeGen can generate SDKs
|
|
18
|
+
# and Docs in.
|
|
19
|
+
# @return [Platforms]
|
|
20
|
+
attr_accessor :template
|
|
21
|
+
|
|
22
|
+
# A mapping from model property names to API property names.
|
|
23
|
+
def self.names
|
|
24
|
+
@_hash = {} if @_hash.nil?
|
|
25
|
+
@_hash['url'] = 'url'
|
|
26
|
+
@_hash['template'] = 'template'
|
|
27
|
+
@_hash
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
# An array for optional fields
|
|
31
|
+
def self.optionals
|
|
32
|
+
[]
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
# An array for nullable fields
|
|
36
|
+
def self.nullables
|
|
37
|
+
[]
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
def initialize(url:, template: Platforms::CS_NET_STANDARD_LIB,
|
|
41
|
+
additional_properties: nil)
|
|
42
|
+
# Add additional model properties to the instance
|
|
43
|
+
additional_properties = {} if additional_properties.nil?
|
|
44
|
+
|
|
45
|
+
@url = url
|
|
46
|
+
@template = template
|
|
47
|
+
@additional_properties = additional_properties
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
# Creates an instance of the object from a hash.
|
|
51
|
+
def self.from_hash(hash)
|
|
52
|
+
return nil unless hash
|
|
53
|
+
|
|
54
|
+
# Extract variables from the hash.
|
|
55
|
+
url = hash.key?('url') ? hash['url'] : nil
|
|
56
|
+
template = hash['template'] ||= Platforms::CS_NET_STANDARD_LIB
|
|
57
|
+
|
|
58
|
+
# Create a new hash for additional properties, removing known properties.
|
|
59
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
60
|
+
|
|
61
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
62
|
+
new_hash, proc { |value| value }
|
|
63
|
+
)
|
|
64
|
+
|
|
65
|
+
# Create object from extracted values.
|
|
66
|
+
GenerateSdkViaUrlRequest.new(url: url,
|
|
67
|
+
template: template,
|
|
68
|
+
additional_properties: additional_properties)
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
# Provides a human-readable string representation of the object.
|
|
72
|
+
def to_s
|
|
73
|
+
class_name = self.class.name.split('::').last
|
|
74
|
+
"<#{class_name} url: #{@url}, template: #{@template}, additional_properties:"\
|
|
75
|
+
" #{@additional_properties}>"
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
79
|
+
def inspect
|
|
80
|
+
class_name = self.class.name.split('::').last
|
|
81
|
+
"<#{class_name} url: #{@url.inspect}, template: #{@template.inspect},"\
|
|
82
|
+
" additional_properties: #{@additional_properties}>"
|
|
83
|
+
end
|
|
84
|
+
end
|
|
85
|
+
end
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
# apimatic_api
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0 (
|
|
4
|
+
# https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module ApimaticApi
|
|
7
|
+
# LineInfo Model.
|
|
8
|
+
class LineInfo < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# TODO: Write general description for this method
|
|
13
|
+
# @return [Integer]
|
|
14
|
+
attr_accessor :start_line_number
|
|
15
|
+
|
|
16
|
+
# TODO: Write general description for this method
|
|
17
|
+
# @return [Integer]
|
|
18
|
+
attr_accessor :start_line_position
|
|
19
|
+
|
|
20
|
+
# TODO: Write general description for this method
|
|
21
|
+
# @return [Integer]
|
|
22
|
+
attr_accessor :end_line_number
|
|
23
|
+
|
|
24
|
+
# TODO: Write general description for this method
|
|
25
|
+
# @return [Integer]
|
|
26
|
+
attr_accessor :end_line_position
|
|
27
|
+
|
|
28
|
+
# A mapping from model property names to API property names.
|
|
29
|
+
def self.names
|
|
30
|
+
@_hash = {} if @_hash.nil?
|
|
31
|
+
@_hash['start_line_number'] = 'startLineNumber'
|
|
32
|
+
@_hash['start_line_position'] = 'startLinePosition'
|
|
33
|
+
@_hash['end_line_number'] = 'endLineNumber'
|
|
34
|
+
@_hash['end_line_position'] = 'endLinePosition'
|
|
35
|
+
@_hash
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
# An array for optional fields
|
|
39
|
+
def self.optionals
|
|
40
|
+
[]
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
# An array for nullable fields
|
|
44
|
+
def self.nullables
|
|
45
|
+
[]
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
def initialize(start_line_number:, start_line_position:, end_line_number:,
|
|
49
|
+
end_line_position:, additional_properties: nil)
|
|
50
|
+
# Add additional model properties to the instance
|
|
51
|
+
additional_properties = {} if additional_properties.nil?
|
|
52
|
+
|
|
53
|
+
@start_line_number = start_line_number
|
|
54
|
+
@start_line_position = start_line_position
|
|
55
|
+
@end_line_number = end_line_number
|
|
56
|
+
@end_line_position = end_line_position
|
|
57
|
+
@additional_properties = additional_properties
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
# Creates an instance of the object from a hash.
|
|
61
|
+
def self.from_hash(hash)
|
|
62
|
+
return nil unless hash
|
|
63
|
+
|
|
64
|
+
# Extract variables from the hash.
|
|
65
|
+
start_line_number =
|
|
66
|
+
hash.key?('startLineNumber') ? hash['startLineNumber'] : nil
|
|
67
|
+
start_line_position =
|
|
68
|
+
hash.key?('startLinePosition') ? hash['startLinePosition'] : nil
|
|
69
|
+
end_line_number = hash.key?('endLineNumber') ? hash['endLineNumber'] : nil
|
|
70
|
+
end_line_position =
|
|
71
|
+
hash.key?('endLinePosition') ? hash['endLinePosition'] : nil
|
|
72
|
+
|
|
73
|
+
# Create a new hash for additional properties, removing known properties.
|
|
74
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
75
|
+
|
|
76
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
77
|
+
new_hash, proc { |value| value }
|
|
78
|
+
)
|
|
79
|
+
|
|
80
|
+
# Create object from extracted values.
|
|
81
|
+
LineInfo.new(start_line_number: start_line_number,
|
|
82
|
+
start_line_position: start_line_position,
|
|
83
|
+
end_line_number: end_line_number,
|
|
84
|
+
end_line_position: end_line_position,
|
|
85
|
+
additional_properties: additional_properties)
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
# Provides a human-readable string representation of the object.
|
|
89
|
+
def to_s
|
|
90
|
+
class_name = self.class.name.split('::').last
|
|
91
|
+
"<#{class_name} start_line_number: #{@start_line_number}, start_line_position:"\
|
|
92
|
+
" #{@start_line_position}, end_line_number: #{@end_line_number}, end_line_position:"\
|
|
93
|
+
" #{@end_line_position}, additional_properties: #{@additional_properties}>"
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
97
|
+
def inspect
|
|
98
|
+
class_name = self.class.name.split('::').last
|
|
99
|
+
"<#{class_name} start_line_number: #{@start_line_number.inspect}, start_line_position:"\
|
|
100
|
+
" #{@start_line_position.inspect}, end_line_number: #{@end_line_number.inspect},"\
|
|
101
|
+
" end_line_position: #{@end_line_position.inspect}, additional_properties:"\
|
|
102
|
+
" #{@additional_properties}>"
|
|
103
|
+
end
|
|
104
|
+
end
|
|
105
|
+
end
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
# apimatic_api
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0 (
|
|
4
|
+
# https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module ApimaticApi
|
|
7
|
+
# Links Model.
|
|
8
|
+
class Links < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# TODO: Write general description for this method
|
|
13
|
+
# @return [String]
|
|
14
|
+
attr_accessor :status
|
|
15
|
+
|
|
16
|
+
# TODO: Write general description for this method
|
|
17
|
+
# @return [String]
|
|
18
|
+
attr_accessor :download
|
|
19
|
+
|
|
20
|
+
# A mapping from model property names to API property names.
|
|
21
|
+
def self.names
|
|
22
|
+
@_hash = {} if @_hash.nil?
|
|
23
|
+
@_hash['status'] = 'status'
|
|
24
|
+
@_hash['download'] = 'download'
|
|
25
|
+
@_hash
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
# An array for optional fields
|
|
29
|
+
def self.optionals
|
|
30
|
+
[]
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# An array for nullable fields
|
|
34
|
+
def self.nullables
|
|
35
|
+
[]
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
def initialize(status:, download:, additional_properties: nil)
|
|
39
|
+
# Add additional model properties to the instance
|
|
40
|
+
additional_properties = {} if additional_properties.nil?
|
|
41
|
+
|
|
42
|
+
@status = status
|
|
43
|
+
@download = download
|
|
44
|
+
@additional_properties = additional_properties
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
# Creates an instance of the object from a hash.
|
|
48
|
+
def self.from_hash(hash)
|
|
49
|
+
return nil unless hash
|
|
50
|
+
|
|
51
|
+
# Extract variables from the hash.
|
|
52
|
+
status = hash.key?('status') ? hash['status'] : nil
|
|
53
|
+
download = hash.key?('download') ? hash['download'] : nil
|
|
54
|
+
|
|
55
|
+
# Create a new hash for additional properties, removing known properties.
|
|
56
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
57
|
+
|
|
58
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
59
|
+
new_hash, proc { |value| value }
|
|
60
|
+
)
|
|
61
|
+
|
|
62
|
+
# Create object from extracted values.
|
|
63
|
+
Links.new(status: status,
|
|
64
|
+
download: download,
|
|
65
|
+
additional_properties: additional_properties)
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
# Provides a human-readable string representation of the object.
|
|
69
|
+
def to_s
|
|
70
|
+
class_name = self.class.name.split('::').last
|
|
71
|
+
"<#{class_name} status: #{@status}, download: #{@download}, additional_properties:"\
|
|
72
|
+
" #{@additional_properties}>"
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
76
|
+
def inspect
|
|
77
|
+
class_name = self.class.name.split('::').last
|
|
78
|
+
"<#{class_name} status: #{@status.inspect}, download: #{@download.inspect},"\
|
|
79
|
+
" additional_properties: #{@additional_properties}>"
|
|
80
|
+
end
|
|
81
|
+
end
|
|
82
|
+
end
|