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
Copy file name to clipboardExpand all lines: modules/openapi-generator/src/main/resources/php/api.mustache
+86-15Lines changed: 86 additions & 15 deletions
Original file line number
Diff line number
Diff line change
@@ -25,6 +25,7 @@ use GuzzleHttp\Psr7\MultipartStream;
25
25
use GuzzleHttp\Psr7\Request;
26
26
use GuzzleHttp\RequestOptions;
27
27
use {{invokerPackage}}\ApiException;
28
+
use {{invokerPackage}}\ApiResponse;
28
29
use {{invokerPackage}}\Configuration;
29
30
use {{invokerPackage}}\HeaderSelector;
30
31
use {{invokerPackage}}\ObjectSerializer;
@@ -99,12 +100,16 @@ use {{invokerPackage}}\ObjectSerializer;
99
100
*/
100
101
public function {{operationId}}({{#allParams}}${{paramName}}{{^required}} = {{#defaultValue}}{{{.}}}{{/defaultValue}}{{^defaultValue}}null{{/defaultValue}}{{/required}}{{#hasMore}}, {{/hasMore}}{{/allParams}})
* (method preserved to keep backward compatibility)
112
+
*
108
113
{{#summary}}
109
114
*
110
115
* {{{summary}}}
@@ -120,9 +125,41 @@ use {{invokerPackage}}\ObjectSerializer;
120
125
*
121
126
* @throws \{{invokerPackage}}\ApiException on non-2xx response
122
127
* @throws \InvalidArgumentException
123
-
* @return array of {{#returnType}}{{#responses}}{{#dataType}}{{^-first}}|{{/-first}}{{/dataType}}{{{dataType}}}{{/responses}}{{/returnType}}{{^returnType}}null{{/returnType}}, HTTP status code, HTTP response headers (array of strings)
128
+
* @return array of {{#returnType}}{{#responses}}{{#dataType}}{{^-first}}|{{/-first}}{{/dataType}}{{{dataType}}}{{/responses}}{{/returnType}}{{^returnType}}null{{/returnType}}, HTTP status code, HTTP response headers (strings[])
124
129
*/
125
130
public function {{operationId}}WithHttpInfo({{#allParams}}${{paramName}}{{^required}} = {{#defaultValue}}{{{.}}}{{/defaultValue}}{{^defaultValue}}null{{/defaultValue}}{{/required}}{{#hasMore}}, {{/hasMore}}{{/allParams}})
* @param {{dataType}} ${{paramName}}{{#description}} {{description}}{{/description}} {{#required}}(required){{/required}}{{^required}}(optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}}
156
+
{{/allParams}}
157
+
*
158
+
* @throws \{{invokerPackage}}\ApiException on non-2xx response
159
+
* @throws \InvalidArgumentException
160
+
* @return APIResponse with "message" property {{#returnType}}of type {{{returnType}}}{{/returnType}}{{^returnType}}equals to null{{/returnType}}
161
+
*/
162
+
public function {{operationId}}WithApiResponse({{#allParams}}${{paramName}}{{^required}} = {{#defaultValue}}{{{.}}}{{/defaultValue}}{{^defaultValue}}null{{/defaultValue}}{{/required}}{{#hasMore}}, {{/hasMore}}{{/allParams}})
return new ApiResponse(null, $statusCode, $response->getHeaders());
205
242
{{/returnType}}
206
243
207
244
} catch (ApiException $e) {
@@ -241,17 +278,19 @@ use {{invokerPackage}}\ObjectSerializer;
241
278
*/
242
279
public function {{operationId}}Async({{#allParams}}${{paramName}}{{^required}} = {{#defaultValue}}{{{.}}}{{/defaultValue}}{{^defaultValue}}null{{/defaultValue}}{{/required}}{{#hasMore}}, {{/hasMore}}{{/allParams}})
* (method preserved to keep backward compatibility)
293
+
*
255
294
* {{{summary}}}
256
295
*
257
296
{{#description}}
@@ -267,13 +306,45 @@ use {{invokerPackage}}\ObjectSerializer;
267
306
*/
268
307
public function {{operationId}}AsyncWithHttpInfo({{#allParams}}${{paramName}}{{^required}} = {{#defaultValue}}{{{.}}}{{/defaultValue}}{{^defaultValue}}null{{/defaultValue}}{{/required}}{{#hasMore}}, {{/hasMore}}{{/allParams}})
* @param {{dataType}} ${{paramName}}{{#description}} {{description}}{{/description}} {{#required}}(required){{/required}}{{^required}}(optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}}
332
+
{{/allParams}}
333
+
*
334
+
* @throws \InvalidArgumentException
335
+
* @return \GuzzleHttp\Promise\PromiseInterface
336
+
*/
337
+
public function {{operationId}}AsyncWithApiResponse({{#allParams}}${{paramName}}{{^required}} = {{#defaultValue}}{{{.}}}{{/defaultValue}}{{^defaultValue}}null{{/defaultValue}}{{/required}}{{#hasMore}}, {{/hasMore}}{{/allParams}})
0 commit comments