File tree Expand file tree Collapse file tree
modules/openapi-generator/src/main/resources/php-nextgen
samples/client/others/typescript-fetch/infinite-recursion-issue/apis Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -497,7 +497,7 @@ class ObjectSerializer
497497 // If a discriminator is defined and points to a valid subclass, use it.
498498 $discriminator = $class::DISCRIMINATOR;
499499 if (!empty($discriminator) && isset($data->{ $discriminator } ) && is_string($data->{ $discriminator } )) {
500- $subclass = ' \{ {invokerPackage}} \M odel \\ ' . $data -> {$discriminator } ;
500+ $subclass = ' \{ {modelPackage}} \\ ' . $data -> {$discriminator } ;
501501 if (is_subclass_of($subclass, $class)) {
502502 $class = $subclass ;
503503 }
Original file line number Diff line number Diff line change @@ -28,21 +28,29 @@ import {
2828export class TestApi extends runtime . BaseAPI {
2929
3030 /**
31+ * Creates request options for test without sending the request
3132 */
32- async testRaw ( initOverrides ?: RequestInit | runtime . InitOverrideFunction ) : Promise < runtime . ApiResponse < Array < TestBaseDto > > > {
33+ async testRequestOpts ( initOverrides ?: RequestInit | runtime . InitOverrideFunction ) : Promise < runtime . RequestOpts > {
3334 const queryParameters : any = { } ;
3435
3536 const headerParameters : runtime . HTTPHeaders = { } ;
3637
3738
3839 let urlPath = `/api/v1/test` ;
3940
40- const response = await this . request ( {
41+ return {
4142 path : urlPath ,
4243 method : 'GET' ,
4344 headers : headerParameters ,
4445 query : queryParameters ,
45- } , initOverrides ) ;
46+ } ;
47+ }
48+
49+ /**
50+ */
51+ async testRaw ( initOverrides ?: RequestInit | runtime . InitOverrideFunction ) : Promise < runtime . ApiResponse < Array < TestBaseDto > > > {
52+ const requestConfig = await this . testRequestConfig ( initOverrides ) ;
53+ const response = await this . request ( requestConfig , initOverrides ) ;
4654
4755 return new runtime . JSONApiResponse ( response , ( jsonValue ) => jsonValue . map ( TestBaseDtoFromJSON ) ) ;
4856 }
You can’t perform that action at this time.
0 commit comments