Skip to content

Conversation

@ericcrosson-bitgo
Copy link
Contributor

Add support for passing variables directly to apiSpec() without
requiring object literal syntax with spread operator.

Previously, this would fail:

export const MyApiSpec = apiSpec(myApiSpecProps);

And required this workaround:

export const MyApiSpec = apiSpec({
  ...myApiSpecProps
});

This change resolves identifiers when passed directly to apiSpec(),
handling both nested and imported identifiers.

Closes Ticket: DX-1604

@ericcrosson-bitgo ericcrosson-bitgo force-pushed the DX-1604-feat-openapi-generator-support-identifier-type-in-route-expressions branch from 1ea8bea to 61b5acf Compare July 26, 2025 18:57
@ericcrosson-bitgo ericcrosson-bitgo marked this pull request as ready for review July 26, 2025 18:57
@ericcrosson-bitgo ericcrosson-bitgo requested a review from a team as a code owner July 26, 2025 18:58
@ericcrosson-bitgo ericcrosson-bitgo force-pushed the DX-1604-feat-openapi-generator-support-identifier-type-in-route-expressions branch from 61b5acf to a252f30 Compare July 26, 2025 20:10
Add support for passing variables directly to apiSpec() without
requiring object literal syntax with spread operator.

Previously, this would fail:

```typescript
export const MyApiSpec = apiSpec(myApiSpecProps);
```

And required this workaround:

```typescript
export const MyApiSpec = apiSpec({
  ...myApiSpecProps
});
```

This change resolves identifiers when passed directly to apiSpec(),
handling both nested and imported identifiers.

Closes Ticket: DX-1604
@ericcrosson-bitgo ericcrosson-bitgo force-pushed the DX-1604-feat-openapi-generator-support-identifier-type-in-route-expressions branch from a252f30 to c6fdcbe Compare July 27, 2025 17:17
Copy link
Contributor

@shenbenson shenbenson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@ericcrosson-bitgo ericcrosson-bitgo merged commit 86c8d8d into BitGo:master Jul 28, 2025
6 checks passed
@github-actions
Copy link

🎉 This PR is included in version @api-ts/openapi-generator@5.9.0 🎉

The release is available on npm package (@latest dist-tag)

Your semantic-release bot 📦🚀

@github-actions
Copy link

github-actions bot commented Aug 1, 2025

🎉 This PR is included in version @api-ts/typed-express-router@2.0.0 🎉

The release is available on npm package (@latest dist-tag)

Your semantic-release bot 📦🚀

@github-actions
Copy link

github-actions bot commented Aug 1, 2025

🎉 This PR is included in version @api-ts/express-wrapper@2.0.0 🎉

The release is available on npm package (@latest dist-tag)

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants