You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* handle multiple (per resp code) return types
Implements a way to handle per HTTP response code return types.
* also return http response from client api call
Copy file name to clipboardExpand all lines: README.md
+8-3Lines changed: 8 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -63,20 +63,25 @@ Validations are imposed in the constructor and `setproperty!` methods of models.
63
63
64
64
Each client API set is generated into a file named `api_<apiname>.jl`. It is represented as a `struct` and the APIs under it are generated as methods. An API set can be constructed by providing the OpenAPI client instance that it can use for communication.
65
65
66
-
The required API parameters are generated as regular function arguments. Optional parameters are generated as keyword arguments. Method documentation is generated with description, parameter information and return value. Two variants of the API are generated. The first variant is suitable for calling synchronously and returns a single instance of the result struct.
66
+
The required API parameters are generated as regular function arguments. Optional parameters are generated as keyword arguments. Method documentation is generated with description, parameter information and return value. Two variants of the API are generated. The first variant is suitable for calling synchronously. It returns a tuple of the result struct and the HTTP response.
67
67
68
68
```julia
69
69
# example synchronous API that returns an Order instance
The second variant is suitable for asynchronous calls to methods that return chunked transfer encoded responses, where in the API streams the response objects into an output channel.
74
74
75
75
```julia
76
76
# example asynchronous API that streams matching Pet instances into response_stream
@@ -29,7 +29,7 @@ Name | Type | Description | Notes
29
29
30
30
### Return type
31
31
32
-
nothing
32
+
Nothing
33
33
34
34
### Authorization
35
35
@@ -43,8 +43,8 @@ Name | Type | Description | Notes
43
43
[[Back to top]](#)[[Back to API list]](../README.md#documentation-for-api-endpoints)[[Back to Model list]](../README.md#documentation-for-models)[[Back to README]](../README.md)
@@ -63,7 +63,7 @@ Name | Type | Description | Notes
63
63
64
64
### Return type
65
65
66
-
nothing
66
+
Nothing
67
67
68
68
### Authorization
69
69
@@ -77,8 +77,8 @@ Name | Type | Description | Notes
77
77
[[Back to top]](#)[[Back to API list]](../README.md#documentation-for-api-endpoints)[[Back to Model list]](../README.md#documentation-for-models)[[Back to README]](../README.md)
@@ -107,8 +107,8 @@ Name | Type | Description | Notes
107
107
[[Back to top]](#)[[Back to API list]](../README.md#documentation-for-api-endpoints)[[Back to Model list]](../README.md#documentation-for-models)[[Back to README]](../README.md)
@@ -137,8 +137,8 @@ Name | Type | Description | Notes
137
137
[[Back to top]](#)[[Back to API list]](../README.md#documentation-for-api-endpoints)[[Back to Model list]](../README.md#documentation-for-models)[[Back to README]](../README.md)
138
138
139
139
# **get_pet_by_id**
140
-
> get_pet_by_id(_api::PetApi, pet_id::Int64; _mediaType=nothing) -> Pet <br/>
141
-
> get_pet_by_id(_api::PetApi, response_stream::Channel, pet_id::Int64; _mediaType=nothing) -> Pet
> get_pet_by_id(_api::PetApi, response_stream::Channel, pet_id::Int64; _mediaType=nothing) -> Channel{ Pet }, OpenAPI.Clients.ApiResponse
142
142
143
143
Find pet by ID
144
144
@@ -167,8 +167,8 @@ Name | Type | Description | Notes
167
167
[[Back to top]](#)[[Back to API list]](../README.md#documentation-for-api-endpoints)[[Back to Model list]](../README.md#documentation-for-models)[[Back to README]](../README.md)
@@ -181,7 +181,7 @@ Name | Type | Description | Notes
181
181
182
182
### Return type
183
183
184
-
nothing
184
+
Nothing
185
185
186
186
### Authorization
187
187
@@ -195,8 +195,8 @@ Name | Type | Description | Notes
195
195
[[Back to top]](#)[[Back to API list]](../README.md#documentation-for-api-endpoints)[[Back to Model list]](../README.md#documentation-for-models)[[Back to README]](../README.md)
@@ -216,7 +216,7 @@ Name | Type | Description | Notes
216
216
217
217
### Return type
218
218
219
-
nothing
219
+
Nothing
220
220
221
221
### Authorization
222
222
@@ -230,8 +230,8 @@ Name | Type | Description | Notes
230
230
[[Back to top]](#)[[Back to API list]](../README.md#documentation-for-api-endpoints)[[Back to Model list]](../README.md#documentation-for-models)[[Back to README]](../README.md)
@@ -27,7 +27,7 @@ Name | Type | Description | Notes
27
27
28
28
### Return type
29
29
30
-
nothing
30
+
Nothing
31
31
32
32
### Authorization
33
33
@@ -41,8 +41,8 @@ No authorization required
41
41
[[Back to top]](#)[[Back to API list]](../README.md#documentation-for-api-endpoints)[[Back to Model list]](../README.md#documentation-for-models)[[Back to README]](../README.md)
@@ -67,8 +67,8 @@ This endpoint does not need any parameter.
67
67
[[Back to top]](#)[[Back to API list]](../README.md#documentation-for-api-endpoints)[[Back to Model list]](../README.md#documentation-for-models)[[Back to README]](../README.md)
68
68
69
69
# **get_order_by_id**
70
-
> get_order_by_id(_api::StoreApi, order_id::Int64; _mediaType=nothing) -> Order <br/>
71
-
> get_order_by_id(_api::StoreApi, response_stream::Channel, order_id::Int64; _mediaType=nothing) -> Order
> get_order_by_id(_api::StoreApi, response_stream::Channel, order_id::Int64; _mediaType=nothing) -> Channel{ Order }, OpenAPI.Clients.ApiResponse
72
72
73
73
Find purchase order by ID
74
74
@@ -97,8 +97,8 @@ No authorization required
97
97
[[Back to top]](#)[[Back to API list]](../README.md#documentation-for-api-endpoints)[[Back to Model list]](../README.md#documentation-for-models)[[Back to README]](../README.md)
98
98
99
99
# **place_order**
100
-
> place_order(_api::StoreApi, body::Order; _mediaType=nothing) -> Order <br/>
101
-
> place_order(_api::StoreApi, response_stream::Channel, body::Order; _mediaType=nothing) -> Order
0 commit comments