@@ -5,11 +5,12 @@ struct PetApi <: OpenAPI.APIClientImpl
55 client:: OpenAPI.Clients.Client
66end
77
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+ )
1111
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)
1314 OpenAPI. Clients. set_header_accept (_ctx, [])
1415 OpenAPI. Clients. set_header_content_type (_ctx, (_mediaType === nothing ) ? [" application/json" , " application/xml" , ] : [_mediaType])
1516 return _ctx
@@ -32,12 +33,13 @@ function add_pet(_api::PetApi, response_stream::Channel, body::Pet; _mediaType=n
3233 return OpenAPI. Clients. exec (_ctx, response_stream)
3334end
3435
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+ )
3940
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" , ])
4143 OpenAPI. Clients. set_param (_ctx. path, " petId" , pet_id) # type Int64
4244 OpenAPI. Clients. set_param (_ctx. header, " api_key" , api_key) # type String
4345 OpenAPI. Clients. set_header_accept (_ctx, [])
@@ -63,12 +65,13 @@ function delete_pet(_api::PetApi, response_stream::Channel, pet_id::Int64; api_k
6365 return OpenAPI. Clients. exec (_ctx, response_stream)
6466end
6567
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+ )
7072
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" , ])
7275 OpenAPI. Clients. set_param (_ctx. query, " status" , status) # type Vector{String}
7376 OpenAPI. Clients. set_header_accept (_ctx, [" application/json" , " application/xml" , ])
7477 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
9497 return OpenAPI. Clients. exec (_ctx, response_stream)
9598end
9699
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+ )
101104
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" , ])
103107 OpenAPI. Clients. set_param (_ctx. query, " tags" , tags) # type Vector{String}
104108 OpenAPI. Clients. set_header_accept (_ctx, [" application/json" , " application/xml" , ])
105109 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{
125129 return OpenAPI. Clients. exec (_ctx, response_stream)
126130end
127131
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+ )
133137
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" , ])
135140 OpenAPI. Clients. set_param (_ctx. path, " petId" , pet_id) # type Int64
136141 OpenAPI. Clients. set_header_accept (_ctx, [" application/json" , " application/xml" , ])
137142 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
157162 return OpenAPI. Clients. exec (_ctx, response_stream)
158163end
159164
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+ )
165170
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)
167173 OpenAPI. Clients. set_header_accept (_ctx, [])
168174 OpenAPI. Clients. set_header_content_type (_ctx, (_mediaType === nothing ) ? [" application/json" , " application/xml" , ] : [_mediaType])
169175 return _ctx
@@ -186,11 +192,12 @@ function update_pet(_api::PetApi, response_stream::Channel, body::Pet; _mediaTyp
186192 return OpenAPI. Clients. exec (_ctx, response_stream)
187193end
188194
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+ )
192198
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" , ])
194201 OpenAPI. Clients. set_param (_ctx. path, " petId" , pet_id) # type Int64
195202 OpenAPI. Clients. set_param (_ctx. form, " name" , name) # type String
196203 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
218225 return OpenAPI. Clients. exec (_ctx, response_stream)
219226end
220227
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+ )
224231
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" , ])
226234 OpenAPI. Clients. set_param (_ctx. path, " petId" , pet_id) # type Int64
227235 OpenAPI. Clients. set_param (_ctx. form, " additionalMetadata" , additional_metadata) # type String
228236 OpenAPI. Clients. set_param (_ctx. file, " file" , file) # type String
0 commit comments