wesley-key-sdk 1.1.3 → 2.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 +110 -18
- data/bin/console +15 -0
- data/lib/{cypress_test_api → swagger_petstore}/api_helper.rb +2 -2
- data/lib/swagger_petstore/client.rb +95 -0
- data/lib/swagger_petstore/configuration.rb +197 -0
- data/lib/{cypress_test_api → swagger_petstore}/controllers/base_controller.rb +2 -2
- data/lib/swagger_petstore/controllers/pet_controller.rb +206 -0
- data/lib/swagger_petstore/controllers/store_controller.rb +94 -0
- data/lib/swagger_petstore/controllers/user_controller.rb +165 -0
- data/lib/{cypress_test_api → swagger_petstore}/exceptions/api_exception.rb +2 -2
- data/lib/swagger_petstore/exceptions/o_auth_provider_exception.rb +64 -0
- data/lib/swagger_petstore/http/auth/api_key.rb +52 -0
- data/lib/swagger_petstore/http/auth/http_basic.rb +62 -0
- data/lib/swagger_petstore/http/auth/petstore_auth.rb +113 -0
- data/lib/{cypress_test_api → swagger_petstore}/http/http_call_back.rb +2 -2
- data/lib/{cypress_test_api → swagger_petstore}/http/http_method_enum.rb +2 -2
- data/lib/{cypress_test_api → swagger_petstore}/http/http_request.rb +2 -2
- data/lib/{cypress_test_api → swagger_petstore}/http/http_response.rb +2 -2
- data/lib/swagger_petstore/http/proxy_settings.rb +22 -0
- data/lib/{cypress_test_api/models/message2.rb → swagger_petstore/models/api_response.rb} +24 -14
- data/lib/{cypress_test_api → swagger_petstore}/models/base_model.rb +2 -2
- data/lib/{cypress_test_api/models/item_response.rb → swagger_petstore/models/category.rb} +10 -19
- data/lib/{cypress_test_api/models/deer.rb → swagger_petstore/models/category2.rb} +21 -18
- data/lib/swagger_petstore/models/content_type_enum.rb +26 -0
- data/lib/swagger_petstore/models/o_auth_provider_error_enum.rb +62 -0
- data/lib/swagger_petstore/models/o_auth_scope_petstore_auth_enum.rb +36 -0
- data/lib/swagger_petstore/models/o_auth_token.rb +96 -0
- data/lib/swagger_petstore/models/order.rb +120 -0
- data/lib/swagger_petstore/models/pet.rb +117 -0
- data/lib/swagger_petstore/models/pet_request.rb +117 -0
- data/lib/swagger_petstore/models/status1_enum.rb +40 -0
- data/lib/swagger_petstore/models/status2_enum.rb +40 -0
- data/lib/swagger_petstore/models/status_enum.rb +40 -0
- data/lib/swagger_petstore/models/store_order_request.rb +120 -0
- data/lib/{cypress_test_api/models/response_http404.rb → swagger_petstore/models/tag.rb} +18 -9
- data/lib/swagger_petstore/models/user.rb +132 -0
- data/lib/swagger_petstore/models/user_request.rb +132 -0
- data/lib/{cypress_test_api → swagger_petstore}/utilities/date_time_helper.rb +2 -2
- data/lib/{cypress_test_api → swagger_petstore}/utilities/file_wrapper.rb +2 -2
- data/lib/swagger_petstore.rb +62 -0
- data/test/controllers/controller_test_base.rb +14 -11
- data/test/controllers/test_store_controller.rb +31 -0
- data/test/http_response_catcher.rb +2 -2
- metadata +46 -38
- data/lib/cypress_test_api/client.rb +0 -47
- data/lib/cypress_test_api/configuration.rb +0 -103
- data/lib/cypress_test_api/controllers/api_controller.rb +0 -102
- data/lib/cypress_test_api/http/proxy_settings.rb +0 -13
- data/lib/cypress_test_api/models/custom_enum.rb +0 -26
- data/lib/cypress_test_api/models/item.rb +0 -166
- data/lib/cypress_test_api/models/lion.rb +0 -68
- data/lib/cypress_test_api/models/message.rb +0 -68
- data/lib/cypress_test_api/models/multiple_arrays_request.rb +0 -70
- data/lib/cypress_test_api/models/nac_tag.rb +0 -265
- data/lib/cypress_test_api/models/o_auth_scope_o_auth_acg_enum.rb +0 -29
- data/lib/cypress_test_api/models/response_http400.rb +0 -62
- data/lib/cypress_test_api/models/status11_enum.rb +0 -26
- data/lib/cypress_test_api/models/status1_enum.rb +0 -26
- data/lib/cypress_test_api/models/status_enum.rb +0 -26
- data/lib/cypress_test_api/models/tokens_request.rb +0 -60
- data/lib/cypress_test_api.rb +0 -55
- data/test/controllers/test_api_controller.rb +0 -40
|
@@ -1,22 +1,27 @@
|
|
|
1
|
-
#
|
|
1
|
+
# swagger_petstore
|
|
2
2
|
#
|
|
3
3
|
# This file was automatically generated by APIMATIC v3.0
|
|
4
4
|
# ( https://www.apimatic.io ).
|
|
5
5
|
|
|
6
|
-
module
|
|
7
|
-
#
|
|
8
|
-
class
|
|
6
|
+
module SwaggerPetstore
|
|
7
|
+
# Tag Model.
|
|
8
|
+
class Tag < BaseModel
|
|
9
9
|
SKIP = Object.new
|
|
10
10
|
private_constant :SKIP
|
|
11
11
|
|
|
12
12
|
# TODO: Write general description for this method
|
|
13
|
-
# @return [
|
|
13
|
+
# @return [Integer]
|
|
14
14
|
attr_accessor :id
|
|
15
15
|
|
|
16
|
+
# TODO: Write general description for this method
|
|
17
|
+
# @return [String]
|
|
18
|
+
attr_accessor :name
|
|
19
|
+
|
|
16
20
|
# A mapping from model property names to API property names.
|
|
17
21
|
def self.names
|
|
18
22
|
@_hash = {} if @_hash.nil?
|
|
19
23
|
@_hash['id'] = 'id'
|
|
24
|
+
@_hash['name'] = 'name'
|
|
20
25
|
@_hash
|
|
21
26
|
end
|
|
22
27
|
|
|
@@ -24,6 +29,7 @@ module CypressTestApi
|
|
|
24
29
|
def self.optionals
|
|
25
30
|
%w[
|
|
26
31
|
id
|
|
32
|
+
name
|
|
27
33
|
]
|
|
28
34
|
end
|
|
29
35
|
|
|
@@ -32,8 +38,9 @@ module CypressTestApi
|
|
|
32
38
|
[]
|
|
33
39
|
end
|
|
34
40
|
|
|
35
|
-
def initialize(id = SKIP)
|
|
41
|
+
def initialize(id = SKIP, name = SKIP)
|
|
36
42
|
@id = id unless id == SKIP
|
|
43
|
+
@name = name unless name == SKIP
|
|
37
44
|
end
|
|
38
45
|
|
|
39
46
|
# Creates an instance of the object from a hash.
|
|
@@ -42,21 +49,23 @@ module CypressTestApi
|
|
|
42
49
|
|
|
43
50
|
# Extract variables from the hash.
|
|
44
51
|
id = hash.key?('id') ? hash['id'] : SKIP
|
|
52
|
+
name = hash.key?('name') ? hash['name'] : SKIP
|
|
45
53
|
|
|
46
54
|
# Create object from extracted values.
|
|
47
|
-
|
|
55
|
+
Tag.new(id,
|
|
56
|
+
name)
|
|
48
57
|
end
|
|
49
58
|
|
|
50
59
|
# Provides a human-readable string representation of the object.
|
|
51
60
|
def to_s
|
|
52
61
|
class_name = self.class.name.split('::').last
|
|
53
|
-
"<#{class_name} id: #{@id}>"
|
|
62
|
+
"<#{class_name} id: #{@id}, name: #{@name}>"
|
|
54
63
|
end
|
|
55
64
|
|
|
56
65
|
# Provides a debugging-friendly string with detailed object information.
|
|
57
66
|
def inspect
|
|
58
67
|
class_name = self.class.name.split('::').last
|
|
59
|
-
"<#{class_name} id: #{@id.inspect}>"
|
|
68
|
+
"<#{class_name} id: #{@id.inspect}, name: #{@name.inspect}>"
|
|
60
69
|
end
|
|
61
70
|
end
|
|
62
71
|
end
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
# swagger_petstore
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0
|
|
4
|
+
# ( https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module SwaggerPetstore
|
|
7
|
+
# User Model.
|
|
8
|
+
class User < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# TODO: Write general description for this method
|
|
13
|
+
# @return [Integer]
|
|
14
|
+
attr_accessor :id
|
|
15
|
+
|
|
16
|
+
# TODO: Write general description for this method
|
|
17
|
+
# @return [String]
|
|
18
|
+
attr_accessor :username
|
|
19
|
+
|
|
20
|
+
# TODO: Write general description for this method
|
|
21
|
+
# @return [String]
|
|
22
|
+
attr_accessor :first_name
|
|
23
|
+
|
|
24
|
+
# TODO: Write general description for this method
|
|
25
|
+
# @return [String]
|
|
26
|
+
attr_accessor :last_name
|
|
27
|
+
|
|
28
|
+
# TODO: Write general description for this method
|
|
29
|
+
# @return [String]
|
|
30
|
+
attr_accessor :email
|
|
31
|
+
|
|
32
|
+
# TODO: Write general description for this method
|
|
33
|
+
# @return [String]
|
|
34
|
+
attr_accessor :password
|
|
35
|
+
|
|
36
|
+
# TODO: Write general description for this method
|
|
37
|
+
# @return [String]
|
|
38
|
+
attr_accessor :phone
|
|
39
|
+
|
|
40
|
+
# User Status
|
|
41
|
+
# @return [Integer]
|
|
42
|
+
attr_accessor :user_status
|
|
43
|
+
|
|
44
|
+
# A mapping from model property names to API property names.
|
|
45
|
+
def self.names
|
|
46
|
+
@_hash = {} if @_hash.nil?
|
|
47
|
+
@_hash['id'] = 'id'
|
|
48
|
+
@_hash['username'] = 'username'
|
|
49
|
+
@_hash['first_name'] = 'firstName'
|
|
50
|
+
@_hash['last_name'] = 'lastName'
|
|
51
|
+
@_hash['email'] = 'email'
|
|
52
|
+
@_hash['password'] = 'password'
|
|
53
|
+
@_hash['phone'] = 'phone'
|
|
54
|
+
@_hash['user_status'] = 'userStatus'
|
|
55
|
+
@_hash
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
# An array for optional fields
|
|
59
|
+
def self.optionals
|
|
60
|
+
%w[
|
|
61
|
+
id
|
|
62
|
+
username
|
|
63
|
+
first_name
|
|
64
|
+
last_name
|
|
65
|
+
email
|
|
66
|
+
password
|
|
67
|
+
phone
|
|
68
|
+
user_status
|
|
69
|
+
]
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
# An array for nullable fields
|
|
73
|
+
def self.nullables
|
|
74
|
+
[]
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
def initialize(id = SKIP, username = SKIP, first_name = SKIP,
|
|
78
|
+
last_name = SKIP, email = SKIP, password = SKIP,
|
|
79
|
+
phone = SKIP, user_status = SKIP)
|
|
80
|
+
@id = id unless id == SKIP
|
|
81
|
+
@username = username unless username == SKIP
|
|
82
|
+
@first_name = first_name unless first_name == SKIP
|
|
83
|
+
@last_name = last_name unless last_name == SKIP
|
|
84
|
+
@email = email unless email == SKIP
|
|
85
|
+
@password = password unless password == SKIP
|
|
86
|
+
@phone = phone unless phone == SKIP
|
|
87
|
+
@user_status = user_status unless user_status == SKIP
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
# Creates an instance of the object from a hash.
|
|
91
|
+
def self.from_hash(hash)
|
|
92
|
+
return nil unless hash
|
|
93
|
+
|
|
94
|
+
# Extract variables from the hash.
|
|
95
|
+
id = hash.key?('id') ? hash['id'] : SKIP
|
|
96
|
+
username = hash.key?('username') ? hash['username'] : SKIP
|
|
97
|
+
first_name = hash.key?('firstName') ? hash['firstName'] : SKIP
|
|
98
|
+
last_name = hash.key?('lastName') ? hash['lastName'] : SKIP
|
|
99
|
+
email = hash.key?('email') ? hash['email'] : SKIP
|
|
100
|
+
password = hash.key?('password') ? hash['password'] : SKIP
|
|
101
|
+
phone = hash.key?('phone') ? hash['phone'] : SKIP
|
|
102
|
+
user_status = hash.key?('userStatus') ? hash['userStatus'] : SKIP
|
|
103
|
+
|
|
104
|
+
# Create object from extracted values.
|
|
105
|
+
User.new(id,
|
|
106
|
+
username,
|
|
107
|
+
first_name,
|
|
108
|
+
last_name,
|
|
109
|
+
email,
|
|
110
|
+
password,
|
|
111
|
+
phone,
|
|
112
|
+
user_status)
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
# Provides a human-readable string representation of the object.
|
|
116
|
+
def to_s
|
|
117
|
+
class_name = self.class.name.split('::').last
|
|
118
|
+
"<#{class_name} id: #{@id}, username: #{@username}, first_name: #{@first_name}, last_name:"\
|
|
119
|
+
" #{@last_name}, email: #{@email}, password: #{@password}, phone: #{@phone}, user_status:"\
|
|
120
|
+
" #{@user_status}>"
|
|
121
|
+
end
|
|
122
|
+
|
|
123
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
124
|
+
def inspect
|
|
125
|
+
class_name = self.class.name.split('::').last
|
|
126
|
+
"<#{class_name} id: #{@id.inspect}, username: #{@username.inspect}, first_name:"\
|
|
127
|
+
" #{@first_name.inspect}, last_name: #{@last_name.inspect}, email: #{@email.inspect},"\
|
|
128
|
+
" password: #{@password.inspect}, phone: #{@phone.inspect}, user_status:"\
|
|
129
|
+
" #{@user_status.inspect}>"
|
|
130
|
+
end
|
|
131
|
+
end
|
|
132
|
+
end
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
# swagger_petstore
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0
|
|
4
|
+
# ( https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module SwaggerPetstore
|
|
7
|
+
# UserRequest Model.
|
|
8
|
+
class UserRequest < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# TODO: Write general description for this method
|
|
13
|
+
# @return [Integer]
|
|
14
|
+
attr_accessor :id
|
|
15
|
+
|
|
16
|
+
# TODO: Write general description for this method
|
|
17
|
+
# @return [String]
|
|
18
|
+
attr_accessor :username
|
|
19
|
+
|
|
20
|
+
# TODO: Write general description for this method
|
|
21
|
+
# @return [String]
|
|
22
|
+
attr_accessor :first_name
|
|
23
|
+
|
|
24
|
+
# TODO: Write general description for this method
|
|
25
|
+
# @return [String]
|
|
26
|
+
attr_accessor :last_name
|
|
27
|
+
|
|
28
|
+
# TODO: Write general description for this method
|
|
29
|
+
# @return [String]
|
|
30
|
+
attr_accessor :email
|
|
31
|
+
|
|
32
|
+
# TODO: Write general description for this method
|
|
33
|
+
# @return [String]
|
|
34
|
+
attr_accessor :password
|
|
35
|
+
|
|
36
|
+
# TODO: Write general description for this method
|
|
37
|
+
# @return [String]
|
|
38
|
+
attr_accessor :phone
|
|
39
|
+
|
|
40
|
+
# User Status
|
|
41
|
+
# @return [Integer]
|
|
42
|
+
attr_accessor :user_status
|
|
43
|
+
|
|
44
|
+
# A mapping from model property names to API property names.
|
|
45
|
+
def self.names
|
|
46
|
+
@_hash = {} if @_hash.nil?
|
|
47
|
+
@_hash['id'] = 'id'
|
|
48
|
+
@_hash['username'] = 'username'
|
|
49
|
+
@_hash['first_name'] = 'firstName'
|
|
50
|
+
@_hash['last_name'] = 'lastName'
|
|
51
|
+
@_hash['email'] = 'email'
|
|
52
|
+
@_hash['password'] = 'password'
|
|
53
|
+
@_hash['phone'] = 'phone'
|
|
54
|
+
@_hash['user_status'] = 'userStatus'
|
|
55
|
+
@_hash
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
# An array for optional fields
|
|
59
|
+
def self.optionals
|
|
60
|
+
%w[
|
|
61
|
+
id
|
|
62
|
+
username
|
|
63
|
+
first_name
|
|
64
|
+
last_name
|
|
65
|
+
email
|
|
66
|
+
password
|
|
67
|
+
phone
|
|
68
|
+
user_status
|
|
69
|
+
]
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
# An array for nullable fields
|
|
73
|
+
def self.nullables
|
|
74
|
+
[]
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
def initialize(id = SKIP, username = SKIP, first_name = SKIP,
|
|
78
|
+
last_name = SKIP, email = SKIP, password = SKIP,
|
|
79
|
+
phone = SKIP, user_status = SKIP)
|
|
80
|
+
@id = id unless id == SKIP
|
|
81
|
+
@username = username unless username == SKIP
|
|
82
|
+
@first_name = first_name unless first_name == SKIP
|
|
83
|
+
@last_name = last_name unless last_name == SKIP
|
|
84
|
+
@email = email unless email == SKIP
|
|
85
|
+
@password = password unless password == SKIP
|
|
86
|
+
@phone = phone unless phone == SKIP
|
|
87
|
+
@user_status = user_status unless user_status == SKIP
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
# Creates an instance of the object from a hash.
|
|
91
|
+
def self.from_hash(hash)
|
|
92
|
+
return nil unless hash
|
|
93
|
+
|
|
94
|
+
# Extract variables from the hash.
|
|
95
|
+
id = hash.key?('id') ? hash['id'] : SKIP
|
|
96
|
+
username = hash.key?('username') ? hash['username'] : SKIP
|
|
97
|
+
first_name = hash.key?('firstName') ? hash['firstName'] : SKIP
|
|
98
|
+
last_name = hash.key?('lastName') ? hash['lastName'] : SKIP
|
|
99
|
+
email = hash.key?('email') ? hash['email'] : SKIP
|
|
100
|
+
password = hash.key?('password') ? hash['password'] : SKIP
|
|
101
|
+
phone = hash.key?('phone') ? hash['phone'] : SKIP
|
|
102
|
+
user_status = hash.key?('userStatus') ? hash['userStatus'] : SKIP
|
|
103
|
+
|
|
104
|
+
# Create object from extracted values.
|
|
105
|
+
UserRequest.new(id,
|
|
106
|
+
username,
|
|
107
|
+
first_name,
|
|
108
|
+
last_name,
|
|
109
|
+
email,
|
|
110
|
+
password,
|
|
111
|
+
phone,
|
|
112
|
+
user_status)
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
# Provides a human-readable string representation of the object.
|
|
116
|
+
def to_s
|
|
117
|
+
class_name = self.class.name.split('::').last
|
|
118
|
+
"<#{class_name} id: #{@id}, username: #{@username}, first_name: #{@first_name}, last_name:"\
|
|
119
|
+
" #{@last_name}, email: #{@email}, password: #{@password}, phone: #{@phone}, user_status:"\
|
|
120
|
+
" #{@user_status}>"
|
|
121
|
+
end
|
|
122
|
+
|
|
123
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
124
|
+
def inspect
|
|
125
|
+
class_name = self.class.name.split('::').last
|
|
126
|
+
"<#{class_name} id: #{@id.inspect}, username: #{@username.inspect}, first_name:"\
|
|
127
|
+
" #{@first_name.inspect}, last_name: #{@last_name.inspect}, email: #{@email.inspect},"\
|
|
128
|
+
" password: #{@password.inspect}, phone: #{@phone.inspect}, user_status:"\
|
|
129
|
+
" #{@user_status.inspect}>"
|
|
130
|
+
end
|
|
131
|
+
end
|
|
132
|
+
end
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
#
|
|
1
|
+
# swagger_petstore
|
|
2
2
|
#
|
|
3
3
|
# This file was automatically generated by APIMATIC v3.0
|
|
4
4
|
# ( https://www.apimatic.io ).
|
|
5
5
|
|
|
6
6
|
require 'date'
|
|
7
|
-
module
|
|
7
|
+
module SwaggerPetstore
|
|
8
8
|
# A utility that supports dateTime conversion to different formats
|
|
9
9
|
class DateTimeHelper < CoreLibrary::DateTimeHelper
|
|
10
10
|
end
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
#
|
|
1
|
+
# swagger_petstore
|
|
2
2
|
#
|
|
3
3
|
# This file was automatically generated by APIMATIC v3.0
|
|
4
4
|
# ( https://www.apimatic.io ).
|
|
5
5
|
|
|
6
|
-
module
|
|
6
|
+
module SwaggerPetstore
|
|
7
7
|
# A utility to allow users to set the content-type for files
|
|
8
8
|
class FileWrapper < CoreLibrary::FileWrapper
|
|
9
9
|
# The constructor.
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
# swagger_petstore
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0
|
|
4
|
+
# ( https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
require 'date'
|
|
7
|
+
require 'json'
|
|
8
|
+
|
|
9
|
+
require 'apimatic_core_interfaces'
|
|
10
|
+
require 'apimatic_core'
|
|
11
|
+
require 'apimatic_faraday_client_adapter'
|
|
12
|
+
|
|
13
|
+
require_relative 'swagger_petstore/api_helper'
|
|
14
|
+
require_relative 'swagger_petstore/client'
|
|
15
|
+
|
|
16
|
+
# Utilities
|
|
17
|
+
require_relative 'swagger_petstore/utilities/file_wrapper'
|
|
18
|
+
require_relative 'swagger_petstore/utilities/date_time_helper'
|
|
19
|
+
|
|
20
|
+
# Http
|
|
21
|
+
require_relative 'swagger_petstore/http/http_call_back'
|
|
22
|
+
require_relative 'swagger_petstore/http/http_method_enum'
|
|
23
|
+
require_relative 'swagger_petstore/http/http_request'
|
|
24
|
+
require_relative 'swagger_petstore/http/http_response'
|
|
25
|
+
require_relative 'swagger_petstore/http/proxy_settings'
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
require_relative 'swagger_petstore/http/auth/api_key'
|
|
29
|
+
require_relative 'swagger_petstore/http/auth/http_basic'
|
|
30
|
+
require_relative 'swagger_petstore/http/auth/petstore_auth'
|
|
31
|
+
|
|
32
|
+
# Models
|
|
33
|
+
require_relative 'swagger_petstore/models/base_model'
|
|
34
|
+
require_relative 'swagger_petstore/models/pet'
|
|
35
|
+
require_relative 'swagger_petstore/models/tag'
|
|
36
|
+
require_relative 'swagger_petstore/models/user'
|
|
37
|
+
require_relative 'swagger_petstore/models/api_response'
|
|
38
|
+
require_relative 'swagger_petstore/models/category'
|
|
39
|
+
require_relative 'swagger_petstore/models/order'
|
|
40
|
+
require_relative 'swagger_petstore/models/category2'
|
|
41
|
+
require_relative 'swagger_petstore/models/pet_request'
|
|
42
|
+
require_relative 'swagger_petstore/models/store_order_request'
|
|
43
|
+
require_relative 'swagger_petstore/models/user_request'
|
|
44
|
+
require_relative 'swagger_petstore/models/o_auth_token'
|
|
45
|
+
require_relative 'swagger_petstore/models/status1_enum'
|
|
46
|
+
require_relative 'swagger_petstore/models/status2_enum'
|
|
47
|
+
require_relative 'swagger_petstore/models/status_enum'
|
|
48
|
+
require_relative 'swagger_petstore/models/content_type_enum'
|
|
49
|
+
require_relative 'swagger_petstore/models/o_auth_provider_error_enum'
|
|
50
|
+
require_relative 'swagger_petstore/models/o_auth_scope_petstore_auth_enum'
|
|
51
|
+
|
|
52
|
+
# Exceptions
|
|
53
|
+
require_relative 'swagger_petstore/exceptions/api_exception'
|
|
54
|
+
require_relative 'swagger_petstore/exceptions/o_auth_provider_exception'
|
|
55
|
+
|
|
56
|
+
require_relative 'swagger_petstore/configuration'
|
|
57
|
+
|
|
58
|
+
# Controllers
|
|
59
|
+
require_relative 'swagger_petstore/controllers/base_controller'
|
|
60
|
+
require_relative 'swagger_petstore/controllers/pet_controller'
|
|
61
|
+
require_relative 'swagger_petstore/controllers/store_controller'
|
|
62
|
+
require_relative 'swagger_petstore/controllers/user_controller'
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
#
|
|
1
|
+
# swagger_petstore
|
|
2
2
|
#
|
|
3
3
|
# This file was automatically generated by APIMATIC v3.0
|
|
4
4
|
# ( https://www.apimatic.io ).
|
|
@@ -8,22 +8,25 @@ require 'minitest/autorun'
|
|
|
8
8
|
require 'minitest/hell'
|
|
9
9
|
require 'minitest/pride'
|
|
10
10
|
require 'minitest/proveit'
|
|
11
|
-
require '
|
|
11
|
+
require 'swagger_petstore'
|
|
12
12
|
require_relative '../http_response_catcher'
|
|
13
13
|
|
|
14
14
|
class ControllerTestBase < Minitest::Test
|
|
15
15
|
parallelize_me!
|
|
16
|
-
include
|
|
16
|
+
include SwaggerPetstore
|
|
17
17
|
include CoreLibrary
|
|
18
18
|
|
|
19
|
-
# Create configuration and set any test parameters
|
|
20
|
-
def create_configuration
|
|
21
|
-
Configuration.new(http_callback: HttpResponseCatcher.new)
|
|
22
|
-
end
|
|
23
|
-
|
|
24
19
|
# Initializes the base test controller
|
|
25
20
|
def setup_class
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
21
|
+
@client = Client.from_env(
|
|
22
|
+
http_basic_credentials: HttpBasicCredentials.new(username: 'test',
|
|
23
|
+
passwprd: 'testPassword'),
|
|
24
|
+
http_callback: HttpResponseCatcher.new
|
|
25
|
+
)
|
|
26
|
+
|
|
27
|
+
_config = @client.config
|
|
28
|
+
petstore_auth_token = @client.petstore_auth.fetch_token()
|
|
29
|
+
petstore_auth_credentials = _config.petstore_auth_credentials.clone_with(o_auth_token: petstore_auth_token)
|
|
30
|
+
_config = _config.clone_with(petstore_auth_credentials: petstore_auth_credentials)
|
|
31
|
+
@client = Client.new(config: _config)
|
|
29
32
|
end
|
|
30
33
|
end
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# swagger_petstore
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0
|
|
4
|
+
# ( https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
require_relative 'controller_test_base'
|
|
7
|
+
|
|
8
|
+
class StoreControllerTest < ControllerTestBase
|
|
9
|
+
# Called only once for the class before any test has executed
|
|
10
|
+
def setup
|
|
11
|
+
setup_class
|
|
12
|
+
@controller = @client.store
|
|
13
|
+
@response_catcher = @controller.http_call_back
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
# Returns a map of status codes to quantities
|
|
17
|
+
def test_get_inventory
|
|
18
|
+
|
|
19
|
+
# Perform the API call through the SDK function
|
|
20
|
+
result = @controller.get_inventory()
|
|
21
|
+
|
|
22
|
+
# Test response code
|
|
23
|
+
assert_equal(200, @response_catcher.response.status_code)
|
|
24
|
+
# Test headers
|
|
25
|
+
expected_headers = {}
|
|
26
|
+
expected_headers['content-type'] = 'application/json; charset=utf-8'
|
|
27
|
+
|
|
28
|
+
assert(ComparisonHelper.match_headers(expected_headers, @response_catcher.response.headers))
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
end
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
#
|
|
1
|
+
# swagger_petstore
|
|
2
2
|
#
|
|
3
3
|
# This file was automatically generated by APIMATIC v3.0
|
|
4
4
|
# ( https://www.apimatic.io ).
|
|
5
5
|
|
|
6
|
-
class HttpResponseCatcher <
|
|
6
|
+
class HttpResponseCatcher < SwaggerPetstore::HttpCallBack
|
|
7
7
|
attr_reader :response
|
|
8
8
|
|
|
9
9
|
def on_before_request(request)
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: wesley-key-sdk
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version:
|
|
4
|
+
version: 2.0.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Kenyon Jacobs
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2026-01-21 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: apimatic_core_interfaces
|
|
@@ -16,28 +16,28 @@ dependencies:
|
|
|
16
16
|
requirements:
|
|
17
17
|
- - "~>"
|
|
18
18
|
- !ruby/object:Gem::Version
|
|
19
|
-
version: 0.2.
|
|
19
|
+
version: 0.2.3
|
|
20
20
|
type: :runtime
|
|
21
21
|
prerelease: false
|
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
|
23
23
|
requirements:
|
|
24
24
|
- - "~>"
|
|
25
25
|
- !ruby/object:Gem::Version
|
|
26
|
-
version: 0.2.
|
|
26
|
+
version: 0.2.3
|
|
27
27
|
- !ruby/object:Gem::Dependency
|
|
28
28
|
name: apimatic_core
|
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
|
30
30
|
requirements:
|
|
31
31
|
- - "~>"
|
|
32
32
|
- !ruby/object:Gem::Version
|
|
33
|
-
version: 0.3.
|
|
33
|
+
version: 0.3.20
|
|
34
34
|
type: :runtime
|
|
35
35
|
prerelease: false
|
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
|
37
37
|
requirements:
|
|
38
38
|
- - "~>"
|
|
39
39
|
- !ruby/object:Gem::Version
|
|
40
|
-
version: 0.3.
|
|
40
|
+
version: 0.3.20
|
|
41
41
|
- !ruby/object:Gem::Dependency
|
|
42
42
|
name: apimatic_faraday_client_adapter
|
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -89,39 +89,47 @@ extra_rdoc_files: []
|
|
|
89
89
|
files:
|
|
90
90
|
- LICENSE
|
|
91
91
|
- README.md
|
|
92
|
-
-
|
|
93
|
-
- lib/
|
|
94
|
-
- lib/
|
|
95
|
-
- lib/
|
|
96
|
-
- lib/
|
|
97
|
-
- lib/
|
|
98
|
-
- lib/
|
|
99
|
-
- lib/
|
|
100
|
-
- lib/
|
|
101
|
-
- lib/
|
|
102
|
-
- lib/
|
|
103
|
-
- lib/
|
|
104
|
-
- lib/
|
|
105
|
-
- lib/
|
|
106
|
-
- lib/
|
|
107
|
-
- lib/
|
|
108
|
-
- lib/
|
|
109
|
-
- lib/
|
|
110
|
-
- lib/
|
|
111
|
-
- lib/
|
|
112
|
-
- lib/
|
|
113
|
-
- lib/
|
|
114
|
-
- lib/
|
|
115
|
-
- lib/
|
|
116
|
-
- lib/
|
|
117
|
-
- lib/
|
|
118
|
-
- lib/
|
|
119
|
-
- lib/
|
|
120
|
-
- lib/
|
|
121
|
-
- lib/
|
|
122
|
-
- lib/
|
|
92
|
+
- bin/console
|
|
93
|
+
- lib/swagger_petstore.rb
|
|
94
|
+
- lib/swagger_petstore/api_helper.rb
|
|
95
|
+
- lib/swagger_petstore/client.rb
|
|
96
|
+
- lib/swagger_petstore/configuration.rb
|
|
97
|
+
- lib/swagger_petstore/controllers/base_controller.rb
|
|
98
|
+
- lib/swagger_petstore/controllers/pet_controller.rb
|
|
99
|
+
- lib/swagger_petstore/controllers/store_controller.rb
|
|
100
|
+
- lib/swagger_petstore/controllers/user_controller.rb
|
|
101
|
+
- lib/swagger_petstore/exceptions/api_exception.rb
|
|
102
|
+
- lib/swagger_petstore/exceptions/o_auth_provider_exception.rb
|
|
103
|
+
- lib/swagger_petstore/http/auth/api_key.rb
|
|
104
|
+
- lib/swagger_petstore/http/auth/http_basic.rb
|
|
105
|
+
- lib/swagger_petstore/http/auth/petstore_auth.rb
|
|
106
|
+
- lib/swagger_petstore/http/http_call_back.rb
|
|
107
|
+
- lib/swagger_petstore/http/http_method_enum.rb
|
|
108
|
+
- lib/swagger_petstore/http/http_request.rb
|
|
109
|
+
- lib/swagger_petstore/http/http_response.rb
|
|
110
|
+
- lib/swagger_petstore/http/proxy_settings.rb
|
|
111
|
+
- lib/swagger_petstore/models/api_response.rb
|
|
112
|
+
- lib/swagger_petstore/models/base_model.rb
|
|
113
|
+
- lib/swagger_petstore/models/category.rb
|
|
114
|
+
- lib/swagger_petstore/models/category2.rb
|
|
115
|
+
- lib/swagger_petstore/models/content_type_enum.rb
|
|
116
|
+
- lib/swagger_petstore/models/o_auth_provider_error_enum.rb
|
|
117
|
+
- lib/swagger_petstore/models/o_auth_scope_petstore_auth_enum.rb
|
|
118
|
+
- lib/swagger_petstore/models/o_auth_token.rb
|
|
119
|
+
- lib/swagger_petstore/models/order.rb
|
|
120
|
+
- lib/swagger_petstore/models/pet.rb
|
|
121
|
+
- lib/swagger_petstore/models/pet_request.rb
|
|
122
|
+
- lib/swagger_petstore/models/status1_enum.rb
|
|
123
|
+
- lib/swagger_petstore/models/status2_enum.rb
|
|
124
|
+
- lib/swagger_petstore/models/status_enum.rb
|
|
125
|
+
- lib/swagger_petstore/models/store_order_request.rb
|
|
126
|
+
- lib/swagger_petstore/models/tag.rb
|
|
127
|
+
- lib/swagger_petstore/models/user.rb
|
|
128
|
+
- lib/swagger_petstore/models/user_request.rb
|
|
129
|
+
- lib/swagger_petstore/utilities/date_time_helper.rb
|
|
130
|
+
- lib/swagger_petstore/utilities/file_wrapper.rb
|
|
123
131
|
- test/controllers/controller_test_base.rb
|
|
124
|
-
- test/controllers/
|
|
132
|
+
- test/controllers/test_store_controller.rb
|
|
125
133
|
- test/http_response_catcher.rb
|
|
126
134
|
homepage: https://www.halefokodaqiby.com
|
|
127
135
|
licenses:
|