feat(sdk): provide a way to request a custom URL and add apiName in request plugin context #7974
Annotations
6 errors and 1 warning
Test:
packages/@ama-sdk/create/src/index.it.spec.ts#L64
expect(received).not.toThrow()
Error name: "Error"
Error message: "Command failed: npm run build
STDERR:·
x Expected a semicolon
,-[src/api/pets/pets-api.ts:78:1]
78 | api: this
79 | };
80 |·
81 | const options = this.client.getRequestOptions : await this.client.getRequestOptions(requestOptions) ? await this.client.prepareOptions(basePath, 'POST', queryParams, headers, body || undefined, tokenizedOptions, metadata);
: ^
82 | const url = this.client.prepareUrl(options.basePath, options.queryParams);
83 |·
84 | const ret = this.client.processCall<void>(url, options, ApiTypes.DEFAULT, PetsApi.apiName, undefined, 'createPets');
`----·
x Expected a semicolon
,-[src/api/pets/pets-api.ts:114:1]
114 | api: this
115 | };
116 |·
117 | const options = this.client.getRequestOptions : await this.client.getRequestOptions(requestOptions) ? await this.client.prepareOptions(basePath, 'GET', queryParams, headers, body || undefined, tokenizedOptions, metadata);
: ^
118 | const url = this.client.prepareUrl(options.basePath, options.queryParams);
119 |·
120 | const ret = this.client.processCall<Pet[]>(url, options, ApiTypes.DEFAULT, PetsApi.apiName, undefined, 'listPets');
`----·
x Expected a semicolon
,-[src/api/pets/pets-api.ts:150:1]
150 | api: this
151 | };
152 |·
153 | const options = this.client.getRequestOptions : await this.client.getRequestOptions(requestOptions) ? await this.client.prepareOptions(basePath, 'GET', queryParams, headers, body || undefined, tokenizedOptions, metadata);
: ^
154 | const url = this.client.prepareUrl(options.basePath, options.queryParams);
155 |·
156 | const ret = this.client.processCall<Pet[]>(url, options, ApiTypes.DEFAULT, PetsApi.apiName, undefined, 'showPetById');
`----··
Caused by:
Syntax Error
Error: Failed to compile:
src/api/pets/pets-api.ts
at initialCompilation (D:\\a\\otter\\it-tests\\test-create-sdk\\my-test\\sdk\\node_modules\\@swc\\cli\\lib\\swc\\dir.js:163:19)
at async dir (D:\\a\\otter\\it-tests\\test-create-sdk\\my-test\\sdk\\node_modules\\@swc\\cli\\lib\\swc\\dir.js:228:5)·
OUTPUT:
,
> @my-test/[email protected] build
> npm run build:cjs && npm run build:esm2015 && npm run build:esm2020 && npm run files:pack··
> @my-test/[email protected] build:cjs
> swc src -d dist/cjs -C module.type=commonjs -q·
Failed to compile 1 file with swc.
,
x Expected a semicolon
,-[src/api/pets/pets-api.ts:78:1]
78 | api: this
79 | };
80 |·
81 | const options = this.client.getRequestOptions : await this.client.getRequestOptions(requestOptions) ? await this.client.prepareOptions(basePath, 'POST', queryParams, headers, body || undefined, tokenizedOptions, metadata);
: ^
82 | const url = this.client.prepareUrl(options.basePath, options.queryParams);
83 |·
84 | const ret = this.client.processCall<void>(url, options, ApiTypes.DEFAULT, PetsApi.apiName, undefined, 'createPets');
`----·
x Expected a semicolon
,-[src/api/pets/pets-api.ts:114:1]
114 | api: this
115 | };
116 |·
117 | const options = this.client.getRequestOptions : await this.client.getRequestOptions(requestOptions) ? await this.client.prepareOptions(basePath, 'GET', queryParams, headers, body || undefined, tokenizedOptions, metadata);
: ^
118 | const url = this.client.prepareUrl(options.basePath, options.queryParams);
119 |·
120 | const ret = this.client.processCall<Pet[]>(url, options, ApiTypes.DEFAULT, PetsApi.apiName, undefined, 'listPets');
`----·
x Expected a semicolon
,-[src/api/pets/pets-api.ts:150:1]
150 | api: this
151 | };
152 |·
153 | const options = this.client.getRequestOptions : await this.client.getRequestOptions(requestOption
|
Test:
packages/@ama-sdk/create/src/index.it.spec.ts#L75
expect(received).not.toThrow()
Error name: "Error"
Error message: "Command failed: npm run build
STDERR:·
x Expected a semicolon
,-[src/api/pets/pets-api.ts:79:1]
79 | api: this
80 | };
81 |·
82 | const options = this.client.getRequestOptions : await this.client.getRequestOptions(requestOptions) ? await this.client.prepareOptions(basePath, 'POST', queryParams, headers, body || undefined, tokenizedOptions, metadata);
: ^
83 | const url = this.client.prepareUrl(options.basePath, options.queryParams);
84 |·
85 | const ret = this.client.processCall<void>(url, options, ApiTypes.DEFAULT, PetsApi.apiName, { 201: undefined } , 'createPets');
`----·
x Expected a semicolon
,-[src/api/pets/pets-api.ts:115:1]
115 | api: this
116 | };
117 |·
118 | const options = this.client.getRequestOptions : await this.client.getRequestOptions(requestOptions) ? await this.client.prepareOptions(basePath, 'GET', queryParams, headers, body || undefined, tokenizedOptions, metadata);
: ^
119 | const url = this.client.prepareUrl(options.basePath, options.queryParams);
120 |·
121 | const ret = this.client.processCall<Pet[]>(url, options, ApiTypes.DEFAULT, PetsApi.apiName, { 200: revivePet } , 'listPets');
`----·
x Expected a semicolon
,-[src/api/pets/pets-api.ts:151:1]
151 | api: this
152 | };
153 |·
154 | const options = this.client.getRequestOptions : await this.client.getRequestOptions(requestOptions) ? await this.client.prepareOptions(basePath, 'GET', queryParams, headers, body || undefined, tokenizedOptions, metadata);
: ^
155 | const url = this.client.prepareUrl(options.basePath, options.queryParams);
156 |·
157 | const ret = this.client.processCall<Pet[]>(url, options, ApiTypes.DEFAULT, PetsApi.apiName, { 200: revivePet } , 'showPetById');
`----··
Caused by:
Syntax Error
Error: Failed to compile:
src/api/pets/pets-api.ts
at initialCompilation (D:\\a\\otter\\it-tests\\test-create-sdk1\\my-test\\sdk\\node_modules\\@swc\\cli\\lib\\swc\\dir.js:163:19)
at async dir (D:\\a\\otter\\it-tests\\test-create-sdk1\\my-test\\sdk\\node_modules\\@swc\\cli\\lib\\swc\\dir.js:228:5)·
OUTPUT:
,
> @my-test/[email protected] build
> npm run build:cjs && npm run build:esm2015 && npm run build:esm2020 && npm run files:pack··
> @my-test/[email protected] build:cjs
> swc src -d dist/cjs -C module.type=commonjs -q·
Failed to compile 1 file with swc.
,
x Expected a semicolon
,-[src/api/pets/pets-api.ts:79:1]
79 | api: this
80 | };
81 |·
82 | const options = this.client.getRequestOptions : await this.client.getRequestOptions(requestOptions) ? await this.client.prepareOptions(basePath, 'POST', queryParams, headers, body || undefined, tokenizedOptions, metadata);
: ^
83 | const url = this.client.prepareUrl(options.basePath, options.queryParams);
84 |·
85 | const ret = this.client.processCall<void>(url, options, ApiTypes.DEFAULT, PetsApi.apiName, { 201: undefined } , 'createPets');
`----·
x Expected a semicolon
,-[src/api/pets/pets-api.ts:115:1]
115 | api: this
116 | };
117 |·
118 | const options = this.client.getRequestOptions : await this.client.getRequestOptions(requestOptions) ? await this.client.prepareOptions(basePath, 'GET', queryParams, headers, body || undefined, tokenizedOptions, metadata);
: ^
119 | const url = this.client.prepareUrl(options.basePath, options.queryParams);
120 |·
121 | const ret = this.client.processCall<Pet[]>(url, options, ApiTypes.DEFAULT, PetsApi.apiName, { 200: revivePet } , 'listPets');
`----·
x Expected a semicolon
,-[src/api/pets/pets-api.ts:151:1]
151 | api: this
152 | };
153 |·
154 | const options = this.client.getRequestOptions
|
Test:
packages/@ama-sdk/create/src/index.it.spec.ts#L89
expect(received).not.toThrow()
Error name: "Error"
Error message: "Command failed: npm run build
STDERR:·
x Expected a semicolon
,-[src/api/pets/pets-api.ts:78:1]
78 | api: this
79 | };
80 |·
81 | const options = this.client.getRequestOptions : await this.client.getRequestOptions(requestOptions) ? await this.client.prepareOptions(basePath, 'POST', queryParams, headers, body || undefined, tokenizedOptions, metadata);
: ^
82 | const url = this.client.prepareUrl(options.basePath, options.queryParams);
83 |·
84 | const ret = this.client.processCall<void>(url, options, ApiTypes.DEFAULT, PetsApi.apiName, undefined, 'createPets');
`----·
x Expected a semicolon
,-[src/api/pets/pets-api.ts:114:1]
114 | api: this
115 | };
116 |·
117 | const options = this.client.getRequestOptions : await this.client.getRequestOptions(requestOptions) ? await this.client.prepareOptions(basePath, 'GET', queryParams, headers, body || undefined, tokenizedOptions, metadata);
: ^
118 | const url = this.client.prepareUrl(options.basePath, options.queryParams);
119 |·
120 | const ret = this.client.processCall<Pet[]>(url, options, ApiTypes.DEFAULT, PetsApi.apiName, undefined, 'listPets');
`----·
x Expected a semicolon
,-[src/api/pets/pets-api.ts:150:1]
150 | api: this
151 | };
152 |·
153 | const options = this.client.getRequestOptions : await this.client.getRequestOptions(requestOptions) ? await this.client.prepareOptions(basePath, 'GET', queryParams, headers, body || undefined, tokenizedOptions, metadata);
: ^
154 | const url = this.client.prepareUrl(options.basePath, options.queryParams);
155 |·
156 | const ret = this.client.processCall<Pet[]>(url, options, ApiTypes.DEFAULT, PetsApi.apiName, undefined, 'showPetById');
`----··
Caused by:
Syntax Error
Error: Failed to compile:
src/api/pets/pets-api.ts
at initialCompilation (D:\\a\\otter\\it-tests\\test-create-sdk2\\sdk\\node_modules\\@swc\\cli\\lib\\swc\\dir.js:163:19)
at async dir (D:\\a\\otter\\it-tests\\test-create-sdk2\\sdk\\node_modules\\@swc\\cli\\lib\\swc\\dir.js:228:5)·
OUTPUT:
,
> [email protected] build
> npm run build:cjs && npm run build:esm2015 && npm run build:esm2020 && npm run files:pack··
> [email protected] build:cjs
> swc src -d dist/cjs -C module.type=commonjs -q·
Failed to compile 1 file with swc.
,
x Expected a semicolon
,-[src/api/pets/pets-api.ts:78:1]
78 | api: this
79 | };
80 |·
81 | const options = this.client.getRequestOptions : await this.client.getRequestOptions(requestOptions) ? await this.client.prepareOptions(basePath, 'POST', queryParams, headers, body || undefined, tokenizedOptions, metadata);
: ^
82 | const url = this.client.prepareUrl(options.basePath, options.queryParams);
83 |·
84 | const ret = this.client.processCall<void>(url, options, ApiTypes.DEFAULT, PetsApi.apiName, undefined, 'createPets');
`----·
x Expected a semicolon
,-[src/api/pets/pets-api.ts:114:1]
114 | api: this
115 | };
116 |·
117 | const options = this.client.getRequestOptions : await this.client.getRequestOptions(requestOptions) ? await this.client.prepareOptions(basePath, 'GET', queryParams, headers, body || undefined, tokenizedOptions, metadata);
: ^
118 | const url = this.client.prepareUrl(options.basePath, options.queryParams);
119 |·
120 | const ret = this.client.processCall<Pet[]>(url, options, ApiTypes.DEFAULT, PetsApi.apiName, undefined, 'listPets');
`----·
x Expected a semicolon
,-[src/api/pets/pets-api.ts:150:1]
150 | api: this
151 | };
152 |·
153 | const options = this.client.getRequestOptions : await this.client.getRequestOptions(requestOptions) ? await this.client.prepareOpti
|
Test:
packages/@ama-sdk/create/src/index.it.spec.ts#L101
expect(received).not.toThrow()
Error name: "Error"
Error message: "Command failed: npm run build
STDERR:·
x Expected a semicolon
,-[src/api/pets/pets-api.ts:78:1]
78 | api: this
79 | };
80 |·
81 | const options = this.client.getRequestOptions : await this.client.getRequestOptions(requestOptions) ? await this.client.prepareOptions(basePath, 'POST', queryParams, headers, body || undefined, tokenizedOptions, metadata);
: ^
82 | const url = this.client.prepareUrl(options.basePath, options.queryParams);
83 |·
84 | const ret = this.client.processCall<void>(url, options, ApiTypes.DEFAULT, PetsApi.apiName, undefined, 'createPets');
`----·
x Expected a semicolon
,-[src/api/pets/pets-api.ts:114:1]
114 | api: this
115 | };
116 |·
117 | const options = this.client.getRequestOptions : await this.client.getRequestOptions(requestOptions) ? await this.client.prepareOptions(basePath, 'GET', queryParams, headers, body || undefined, tokenizedOptions, metadata);
: ^
118 | const url = this.client.prepareUrl(options.basePath, options.queryParams);
119 |·
120 | const ret = this.client.processCall<Pet[]>(url, options, ApiTypes.DEFAULT, PetsApi.apiName, undefined, 'listPets');
`----·
x Expected a semicolon
,-[src/api/pets/pets-api.ts:150:1]
150 | api: this
151 | };
152 |·
153 | const options = this.client.getRequestOptions : await this.client.getRequestOptions(requestOptions) ? await this.client.prepareOptions(basePath, 'GET', queryParams, headers, body || undefined, tokenizedOptions, metadata);
: ^
154 | const url = this.client.prepareUrl(options.basePath, options.queryParams);
155 |·
156 | const ret = this.client.processCall<Pet[]>(url, options, ApiTypes.DEFAULT, PetsApi.apiName, undefined, 'showPetById');
`----··
Caused by:
Syntax Error
Error: Failed to compile:
src/api/pets/pets-api.ts
at initialCompilation (D:\\a\\otter\\it-tests\\test-create-sdk3\\my-test\\sdk\\node_modules\\@swc\\cli\\lib\\swc\\dir.js:163:19)
at async dir (D:\\a\\otter\\it-tests\\test-create-sdk3\\my-test\\sdk\\node_modules\\@swc\\cli\\lib\\swc\\dir.js:228:5)·
OUTPUT:
,
> @my-test/[email protected] build
> npm run build:cjs && npm run build:esm2015 && npm run build:esm2020 && npm run files:pack··
> @my-test/[email protected] build:cjs
> swc src -d dist/cjs -C module.type=commonjs -q·
Failed to compile 1 file with swc.
,
x Expected a semicolon
,-[src/api/pets/pets-api.ts:78:1]
78 | api: this
79 | };
80 |·
81 | const options = this.client.getRequestOptions : await this.client.getRequestOptions(requestOptions) ? await this.client.prepareOptions(basePath, 'POST', queryParams, headers, body || undefined, tokenizedOptions, metadata);
: ^
82 | const url = this.client.prepareUrl(options.basePath, options.queryParams);
83 |·
84 | const ret = this.client.processCall<void>(url, options, ApiTypes.DEFAULT, PetsApi.apiName, undefined, 'createPets');
`----·
x Expected a semicolon
,-[src/api/pets/pets-api.ts:114:1]
114 | api: this
115 | };
116 |·
117 | const options = this.client.getRequestOptions : await this.client.getRequestOptions(requestOptions) ? await this.client.prepareOptions(basePath, 'GET', queryParams, headers, body || undefined, tokenizedOptions, metadata);
: ^
118 | const url = this.client.prepareUrl(options.basePath, options.queryParams);
119 |·
120 | const ret = this.client.processCall<Pet[]>(url, options, ApiTypes.DEFAULT, PetsApi.apiName, undefined, 'listPets');
`----·
x Expected a semicolon
,-[src/api/pets/pets-api.ts:150:1]
150 | api: this
151 | };
152 |·
153 | const options = this.client.getRequestOptions : await this.client.getRequestOptions(requestOpti
|
Test:
packages/@ama-sdk/create/src/index.it.spec.ts#L121
expect(received).not.toThrow()
Error name: "Error"
Error message: "Command failed: npm run build
STDERR:·
x Expected a semicolon
,-[src/api/pets/pets-api.ts:78:1]
78 | api: this
79 | };
80 |·
81 | const options = this.client.getRequestOptions : await this.client.getRequestOptions(requestOptions) ? await this.client.prepareOptions(basePath, 'POST', queryParams, headers, body || undefined, tokenizedOptions, metadata);
: ^
82 | const url = this.client.prepareUrl(options.basePath, options.queryParams);
83 |·
84 | const ret = this.client.processCall<void>(url, options, ApiTypes.DEFAULT, PetsApi.apiName, undefined, 'createPets');
`----·
x Expected a semicolon
,-[src/api/pets/pets-api.ts:114:1]
114 | api: this
115 | };
116 |·
117 | const options = this.client.getRequestOptions : await this.client.getRequestOptions(requestOptions) ? await this.client.prepareOptions(basePath, 'GET', queryParams, headers, body || undefined, tokenizedOptions, metadata);
: ^
118 | const url = this.client.prepareUrl(options.basePath, options.queryParams);
119 |·
120 | const ret = this.client.processCall<Pet[]>(url, options, ApiTypes.DEFAULT, PetsApi.apiName, undefined, 'listPets');
`----·
x Expected a semicolon
,-[src/api/pets/pets-api.ts:150:1]
150 | api: this
151 | };
152 |·
153 | const options = this.client.getRequestOptions : await this.client.getRequestOptions(requestOptions) ? await this.client.prepareOptions(basePath, 'GET', queryParams, headers, body || undefined, tokenizedOptions, metadata);
: ^
154 | const url = this.client.prepareUrl(options.basePath, options.queryParams);
155 |·
156 | const ret = this.client.processCall<Pet[]>(url, options, ApiTypes.DEFAULT, PetsApi.apiName, undefined, 'showPetById');
`----··
Caused by:
Syntax Error
Error: Failed to compile:
src/api/pets/pets-api.ts
at initialCompilation (D:\\a\\otter\\it-tests\\test-create-sdk5\\my-test\\sdk\\node_modules\\@swc\\cli\\lib\\swc\\dir.js:163:19)
at async dir (D:\\a\\otter\\it-tests\\test-create-sdk5\\my-test\\sdk\\node_modules\\@swc\\cli\\lib\\swc\\dir.js:228:5)·
OUTPUT:
,
> @my-test/[email protected] build
> npm run build:cjs && npm run build:esm2015 && npm run build:esm2020 && npm run files:pack··
> @my-test/[email protected] build:cjs
> swc src -d dist/cjs -C module.type=commonjs -q·
Failed to compile 1 file with swc.
,
x Expected a semicolon
,-[src/api/pets/pets-api.ts:78:1]
78 | api: this
79 | };
80 |·
81 | const options = this.client.getRequestOptions : await this.client.getRequestOptions(requestOptions) ? await this.client.prepareOptions(basePath, 'POST', queryParams, headers, body || undefined, tokenizedOptions, metadata);
: ^
82 | const url = this.client.prepareUrl(options.basePath, options.queryParams);
83 |·
84 | const ret = this.client.processCall<void>(url, options, ApiTypes.DEFAULT, PetsApi.apiName, undefined, 'createPets');
`----·
x Expected a semicolon
,-[src/api/pets/pets-api.ts:114:1]
114 | api: this
115 | };
116 |·
117 | const options = this.client.getRequestOptions : await this.client.getRequestOptions(requestOptions) ? await this.client.prepareOptions(basePath, 'GET', queryParams, headers, body || undefined, tokenizedOptions, metadata);
: ^
118 | const url = this.client.prepareUrl(options.basePath, options.queryParams);
119 |·
120 | const ret = this.client.processCall<Pet[]>(url, options, ApiTypes.DEFAULT, PetsApi.apiName, undefined, 'listPets');
`----·
x Expected a semicolon
,-[src/api/pets/pets-api.ts:150:1]
150 | api: this
151 | };
152 |·
153 | const options = this.client.getRequestOptions : await this.client.getRequestOptions(requestOpti
|
Test
Process completed with exit code 1.
|
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
|
Loading