0.16.0-rc7

(feat): The SDK generator now supports @param JSDoc comments for endpoint parameters. The generator now arranges JSDoc in a few separate groups, one for each of @param, @throws, and @examples like so:

1 /**
2 * This endpoint checks the health of a resource.
3 *
4 * @param {string} id - A unique identifier.
5 * @param {Service.RequestOptions} requestOptions - Request-specific configuration.
6 *
7 * @throws {@link Acme.UnauthorizedRequest}
8 * @throws {@link Acme.BadRequest}
9 *
10 * @example
11 * await testSdk.health.service.check("id-2sdx82h")
12 */
13 public async check(id: string, requestOptions?: Service.RequestOptions): Promise<void> {
14 ...
15 }

(feat): The generator will only include user-provided examples if they exist, and otherwise only include a single generated example, like so:

1 /**
2 * This endpoint checks the health of a resource.
3 *
4 * @example
5 * await testSdk.health.service.check("id-2sdx82h")
6 */
7 public async check(id: string, requestOptions?: Service.RequestOptions): Promise<void> {
8 ...
9 }

(fix): The SDK generator now escapes path parameters that would previously create invalid URLs (e.g. “\example”). Method implementations will now have references to encodeURIComponent like the following:

1const _response = await core.fetcher({
2 url: urlJoin(
3 (await core.Supplier.get(this._options.environment)) ?? environments.AcmeEnvironment.Prod,
4 `/users/${encodeURIComponent(userId)}`
5 ),
6 ...
7});

0.16.0-rc6

(fix): snippet templates now move file upload parameters to unnamed args

0.16.0-rc5

(fix): remove duplicate quotation marks in snippet templates