Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Support string variable in the first argument of @Extension #1677

Merged
merged 20 commits into from
Sep 26, 2024

Conversation

chappelo
Copy link
Contributor

All Submissions:

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same update/change?
  • Have you written unit tests?
  • Have you written unit tests that cover the negative cases (i.e.: if bad data is submitted, does the library respond properly)?
  • This PR is associated with an existing issue?

Closing issues

closes #1520

Adds support of string identifiers to be passed into @Extension's attribute key.

This is accomplished by adding ts.isIdentifier checks into getExtensions. If it is an identifier -> getInitializerValue()

If this is a new feature submission:

  • Has the issue had a maintainer respond to the issue and clarify that the feature is something that aligns with the goals and philosophy of the project?

Potential Problems With The Approach

Test plan
I added test case to the existing extensions tests.

@chappelo chappelo marked this pull request as draft September 15, 2024 07:32
@chappelo
Copy link
Contributor Author

chappelo commented Sep 15, 2024

Hello, @WoH , if you have time can you take a look at this CI build error please?
https://github.com/lukeautry/tsoa/actions/runs/10871608128/job/30165646700?pr=1677

Looks like lru-cache had some updates last week which might be causing this? are some package updates appropriate?

isaacs/node-lru-cache@5ed947d

@WoH WoH mentioned this pull request Sep 15, 2024
4 tasks
@WoH
Copy link
Collaborator

WoH commented Sep 23, 2024

Should be fixed now, can you rebase?

@chappelo chappelo force-pushed the feat/string-variable-@Extension-support branch from ffc6c46 to a865a2c Compare September 23, 2024 11:27
@chappelo chappelo marked this pull request as ready for review September 23, 2024 11:54
@chappelo
Copy link
Contributor Author

Should be fixed now, can you rebase?

Cool, all works well now. Thanks.
Will mark as ready.

@WoH WoH merged commit 2c85ac9 into lukeautry:master Sep 26, 2024
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support string variable in the first argument of @Extension
2 participants