fix(mapper): support Fastify method arrays#78
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0722ba9d1a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| } else if (quote === "`" && char === "$" && source[index + 1] === "{") { | ||
| return null; |
There was a problem hiding this comment.
Preserve static methods when array includes template entry
In endOfArray, encountering ${...} inside any template literal immediately returns null, which makes readStringArrayLiteral reject the entire method array. For a valid Fastify route like method: ['GET', POST-${suffix}], this drops the static GET mapping instead of ignoring only the dynamic element, so route coverage is silently incomplete for mixed static/dynamic arrays.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in 01d27fd. The balanced scanner now carries template literals through route objects/arrays so static method entries are preserved, while dynamic template elements are still filtered at the string-literal reader. Added regression coverage for static entries before and after dynamic template elements.
There was a problem hiding this comment.
To use Codex here, create an environment for this repo.
Summary
Tests