@@ -5,11 +5,12 @@ struct PetApi <: OpenAPI.APIClientImpl
5
5
client:: OpenAPI.Clients.Client
6
6
end
7
7
8
- function _oacinternal_add_pet (_api :: PetApi , body :: Pet ; _mediaType = nothing )
9
- return_types = Dict {Regex,Type} ()
10
- return_types[ Regex ( " ^ " * replace ( " 405 " , " x " => " . " ) * " \$ " )] = Nothing
8
+ const _returntypes_add_pet = Dict {Regex,Type} (
9
+ Regex ( " ^ " * replace ( " 405 " , " x " => " . " ) * " \$ " ) => Nothing,
10
+ )
11
11
12
- _ctx = OpenAPI. Clients. Ctx (_api. client, " POST" , return_types, " /pet" , [" petstore_auth" , ], body)
12
+ function _oacinternal_add_pet (_api:: PetApi , body:: Pet ; _mediaType= nothing )
13
+ _ctx = OpenAPI. Clients. Ctx (_api. client, " POST" , _returntypes_add_pet, " /pet" , [" petstore_auth" , ], body)
13
14
OpenAPI. Clients. set_header_accept (_ctx, [])
14
15
OpenAPI. Clients. set_header_content_type (_ctx, (_mediaType === nothing ) ? [" application/json" , " application/xml" , ] : [_mediaType])
15
16
return _ctx
@@ -32,12 +33,13 @@ function add_pet(_api::PetApi, response_stream::Channel, body::Pet; _mediaType=n
32
33
return OpenAPI. Clients. exec (_ctx, response_stream)
33
34
end
34
35
35
- function _oacinternal_delete_pet (_api :: PetApi , pet_id :: Int64 ; api_key = nothing , _mediaType = nothing )
36
- return_types = Dict {Regex,Type} ()
37
- return_types[ Regex (" ^" * replace (" 400 " , " x" => " ." ) * " \$ " )] = Nothing
38
- return_types[ Regex ( " ^ " * replace ( " 404 " , " x " => " . " ) * " \$ " )] = Nothing
36
+ const _returntypes_delete_pet = Dict {Regex,Type} (
37
+ Regex ( " ^ " * replace ( " 400 " , " x " => " . " ) * " \$ " ) => Nothing,
38
+ Regex (" ^" * replace (" 404 " , " x" => " ." ) * " \$ " ) => Nothing,
39
+ )
39
40
40
- _ctx = OpenAPI. Clients. Ctx (_api. client, " DELETE" , return_types, " /pet/{petId}" , [" petstore_auth" , ])
41
+ function _oacinternal_delete_pet (_api:: PetApi , pet_id:: Int64 ; api_key= nothing , _mediaType= nothing )
42
+ _ctx = OpenAPI. Clients. Ctx (_api. client, " DELETE" , _returntypes_delete_pet, " /pet/{petId}" , [" petstore_auth" , ])
41
43
OpenAPI. Clients. set_param (_ctx. path, " petId" , pet_id) # type Int64
42
44
OpenAPI. Clients. set_param (_ctx. header, " api_key" , api_key) # type String
43
45
OpenAPI. Clients. set_header_accept (_ctx, [])
@@ -63,12 +65,13 @@ function delete_pet(_api::PetApi, response_stream::Channel, pet_id::Int64; api_k
63
65
return OpenAPI. Clients. exec (_ctx, response_stream)
64
66
end
65
67
66
- function _oacinternal_find_pets_by_status (_api :: PetApi , status :: Vector{String} ; _mediaType = nothing )
67
- return_types = Dict {Regex,Type} ()
68
- return_types[ Regex (" ^" * replace (" 200 " , " x" => " ." ) * " \$ " )] = Vector{Pet}
69
- return_types[ Regex ( " ^ " * replace ( " 400 " , " x " => " . " ) * " \$ " )] = Nothing
68
+ const _returntypes_find_pets_by_status = Dict {Regex,Type} (
69
+ Regex ( " ^ " * replace ( " 200 " , " x " => " . " ) * " \$ " ) => Vector{Pet},
70
+ Regex (" ^" * replace (" 400 " , " x" => " ." ) * " \$ " ) => Nothing,
71
+ )
70
72
71
- _ctx = OpenAPI. Clients. Ctx (_api. client, " GET" , return_types, " /pet/findByStatus" , [" petstore_auth" , ])
73
+ function _oacinternal_find_pets_by_status (_api:: PetApi , status:: Vector{String} ; _mediaType= nothing )
74
+ _ctx = OpenAPI. Clients. Ctx (_api. client, " GET" , _returntypes_find_pets_by_status, " /pet/findByStatus" , [" petstore_auth" , ])
72
75
OpenAPI. Clients. set_param (_ctx. query, " status" , status) # type Vector{String}
73
76
OpenAPI. Clients. set_header_accept (_ctx, [" application/json" , " application/xml" , ])
74
77
OpenAPI. Clients. set_header_content_type (_ctx, (_mediaType === nothing ) ? [] : [_mediaType])
@@ -94,12 +97,13 @@ function find_pets_by_status(_api::PetApi, response_stream::Channel, status::Vec
94
97
return OpenAPI. Clients. exec (_ctx, response_stream)
95
98
end
96
99
97
- function _oacinternal_find_pets_by_tags (_api :: PetApi , tags :: Vector{String} ; _mediaType = nothing )
98
- return_types = Dict {Regex,Type} ()
99
- return_types[ Regex (" ^" * replace (" 200 " , " x" => " ." ) * " \$ " )] = Vector{Pet}
100
- return_types[ Regex ( " ^ " * replace ( " 400 " , " x " => " . " ) * " \$ " )] = Nothing
100
+ const _returntypes_find_pets_by_tags = Dict {Regex,Type} (
101
+ Regex ( " ^ " * replace ( " 200 " , " x " => " . " ) * " \$ " ) => Vector{Pet},
102
+ Regex (" ^" * replace (" 400 " , " x" => " ." ) * " \$ " ) => Nothing,
103
+ )
101
104
102
- _ctx = OpenAPI. Clients. Ctx (_api. client, " GET" , return_types, " /pet/findByTags" , [" petstore_auth" , ])
105
+ function _oacinternal_find_pets_by_tags (_api:: PetApi , tags:: Vector{String} ; _mediaType= nothing )
106
+ _ctx = OpenAPI. Clients. Ctx (_api. client, " GET" , _returntypes_find_pets_by_tags, " /pet/findByTags" , [" petstore_auth" , ])
103
107
OpenAPI. Clients. set_param (_ctx. query, " tags" , tags) # type Vector{String}
104
108
OpenAPI. Clients. set_header_accept (_ctx, [" application/json" , " application/xml" , ])
105
109
OpenAPI. Clients. set_header_content_type (_ctx, (_mediaType === nothing ) ? [] : [_mediaType])
@@ -125,13 +129,14 @@ function find_pets_by_tags(_api::PetApi, response_stream::Channel, tags::Vector{
125
129
return OpenAPI. Clients. exec (_ctx, response_stream)
126
130
end
127
131
128
- function _oacinternal_get_pet_by_id (_api :: PetApi , pet_id :: Int64 ; _mediaType = nothing )
129
- return_types = Dict {Regex,Type} ()
130
- return_types[ Regex (" ^" * replace (" 200 " , " x" => " ." ) * " \$ " )] = Pet
131
- return_types[ Regex (" ^" * replace (" 400 " , " x" => " ." ) * " \$ " )] = Nothing
132
- return_types[ Regex ( " ^ " * replace ( " 404 " , " x " => " . " ) * " \$ " )] = Nothing
132
+ const _returntypes_get_pet_by_id = Dict {Regex,Type} (
133
+ Regex ( " ^ " * replace ( " 200 " , " x " => " . " ) * " \$ " ) => Pet,
134
+ Regex (" ^" * replace (" 400 " , " x" => " ." ) * " \$ " ) => Nothing,
135
+ Regex (" ^" * replace (" 404 " , " x" => " ." ) * " \$ " ) => Nothing,
136
+ )
133
137
134
- _ctx = OpenAPI. Clients. Ctx (_api. client, " GET" , return_types, " /pet/{petId}" , [" api_key" , ])
138
+ function _oacinternal_get_pet_by_id (_api:: PetApi , pet_id:: Int64 ; _mediaType= nothing )
139
+ _ctx = OpenAPI. Clients. Ctx (_api. client, " GET" , _returntypes_get_pet_by_id, " /pet/{petId}" , [" api_key" , ])
135
140
OpenAPI. Clients. set_param (_ctx. path, " petId" , pet_id) # type Int64
136
141
OpenAPI. Clients. set_header_accept (_ctx, [" application/json" , " application/xml" , ])
137
142
OpenAPI. Clients. set_header_content_type (_ctx, (_mediaType === nothing ) ? [] : [_mediaType])
@@ -157,13 +162,14 @@ function get_pet_by_id(_api::PetApi, response_stream::Channel, pet_id::Int64; _m
157
162
return OpenAPI. Clients. exec (_ctx, response_stream)
158
163
end
159
164
160
- function _oacinternal_update_pet (_api :: PetApi , body :: Pet ; _mediaType = nothing )
161
- return_types = Dict {Regex,Type} ()
162
- return_types[ Regex (" ^" * replace (" 400 " , " x" => " ." ) * " \$ " )] = Nothing
163
- return_types[ Regex (" ^" * replace (" 404 " , " x" => " ." ) * " \$ " )] = Nothing
164
- return_types[ Regex ( " ^ " * replace ( " 405 " , " x " => " . " ) * " \$ " )] = Nothing
165
+ const _returntypes_update_pet = Dict {Regex,Type} (
166
+ Regex ( " ^ " * replace ( " 400 " , " x " => " . " ) * " \$ " ) => Nothing,
167
+ Regex (" ^" * replace (" 404 " , " x" => " ." ) * " \$ " ) => Nothing,
168
+ Regex (" ^" * replace (" 405 " , " x" => " ." ) * " \$ " ) => Nothing,
169
+ )
165
170
166
- _ctx = OpenAPI. Clients. Ctx (_api. client, " PUT" , return_types, " /pet" , [" petstore_auth" , ], body)
171
+ function _oacinternal_update_pet (_api:: PetApi , body:: Pet ; _mediaType= nothing )
172
+ _ctx = OpenAPI. Clients. Ctx (_api. client, " PUT" , _returntypes_update_pet, " /pet" , [" petstore_auth" , ], body)
167
173
OpenAPI. Clients. set_header_accept (_ctx, [])
168
174
OpenAPI. Clients. set_header_content_type (_ctx, (_mediaType === nothing ) ? [" application/json" , " application/xml" , ] : [_mediaType])
169
175
return _ctx
@@ -186,11 +192,12 @@ function update_pet(_api::PetApi, response_stream::Channel, body::Pet; _mediaTyp
186
192
return OpenAPI. Clients. exec (_ctx, response_stream)
187
193
end
188
194
189
- function _oacinternal_update_pet_with_form (_api :: PetApi , pet_id :: Int64 ; name = nothing , status = nothing , _mediaType = nothing )
190
- return_types = Dict {Regex,Type} ()
191
- return_types[ Regex ( " ^ " * replace ( " 405 " , " x " => " . " ) * " \$ " )] = Nothing
195
+ const _returntypes_update_pet_with_form = Dict {Regex,Type} (
196
+ Regex ( " ^ " * replace ( " 405 " , " x " => " . " ) * " \$ " ) => Nothing,
197
+ )
192
198
193
- _ctx = OpenAPI. Clients. Ctx (_api. client, " POST" , return_types, " /pet/{petId}" , [" petstore_auth" , ])
199
+ function _oacinternal_update_pet_with_form (_api:: PetApi , pet_id:: Int64 ; name= nothing , status= nothing , _mediaType= nothing )
200
+ _ctx = OpenAPI. Clients. Ctx (_api. client, " POST" , _returntypes_update_pet_with_form, " /pet/{petId}" , [" petstore_auth" , ])
194
201
OpenAPI. Clients. set_param (_ctx. path, " petId" , pet_id) # type Int64
195
202
OpenAPI. Clients. set_param (_ctx. form, " name" , name) # type String
196
203
OpenAPI. Clients. set_param (_ctx. form, " status" , status) # type String
@@ -218,11 +225,12 @@ function update_pet_with_form(_api::PetApi, response_stream::Channel, pet_id::In
218
225
return OpenAPI. Clients. exec (_ctx, response_stream)
219
226
end
220
227
221
- function _oacinternal_upload_file (_api :: PetApi , pet_id :: Int64 ; additional_metadata = nothing , file = nothing , _mediaType = nothing )
222
- return_types = Dict {Regex,Type} ()
223
- return_types[ Regex ( " ^ " * replace ( " 200 " , " x " => " . " ) * " \$ " )] = ApiResponse
228
+ const _returntypes_upload_file = Dict {Regex,Type} (
229
+ Regex ( " ^ " * replace ( " 200 " , " x " => " . " ) * " \$ " ) => ApiResponse,
230
+ )
224
231
225
- _ctx = OpenAPI. Clients. Ctx (_api. client, " POST" , return_types, " /pet/{petId}/uploadImage" , [" petstore_auth" , ])
232
+ function _oacinternal_upload_file (_api:: PetApi , pet_id:: Int64 ; additional_metadata= nothing , file= nothing , _mediaType= nothing )
233
+ _ctx = OpenAPI. Clients. Ctx (_api. client, " POST" , _returntypes_upload_file, " /pet/{petId}/uploadImage" , [" petstore_auth" , ])
226
234
OpenAPI. Clients. set_param (_ctx. path, " petId" , pet_id) # type Int64
227
235
OpenAPI. Clients. set_param (_ctx. form, " additionalMetadata" , additional_metadata) # type String
228
236
OpenAPI. Clients. set_param (_ctx. file, " file" , file) # type String
0 commit comments