• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

RobinTail / express-zod-api / 33943958105
100%

Build:
DEFAULT BRANCH: master
Ran 05 Sep 2026 04:13AM UTC
Jobs 6
Files 52
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

05 Sep 2026 04:13AM UTC coverage: 100.0%. Remained the same
33943958105

push

github

web-flow
fix(documentation): `isCookie` option, checking `body` among `inputSources` (#3682)

Closes #3660.

## Summary

`makeParamLocator` in `express-zod-api/src/documentation-helpers.ts`
only assigned `in: cookie` to field names declared in a
`CookieSecurity`. Any other field actually read from
`request.cookies`/`request.signedCookies` (because
`"cookies"`/`"signedCookies"` is among the method's `inputSources`) fell
through to the `in: query` fallback — or to nothing when `"query"` was
not enabled — even though the cookie value wins at runtime.

This PR makes cookie sourcing explicit in the generated OpenAPI
document:

- **`makeParamLocator`** now computes `const isBodyEnabled =
inputSources.includes("body")` and returns it (alongside the existing
`isQueryEnabled`), providing a single source of truth.
- **Empty fallback gating**: both the `in: query` and `in: cookie`
fallbacks are now gated on `!isBodyEnabled` — when `"body"` is among the
sources, unmatched fields stay in the request-body depiction (body
remains the primary fallback, per the maintainer's design intent). This
also removes the `method !== "query"` special-case, which only held for
the default config.
- **Cookie fallback**: an unmatched field is depicted as `in: cookie`
when cookies are among the sources and neither `"body"` nor `"query"`
is. `in: query` keeps higher priority, and the explicit `CookieSecurity`
declaration keeps precedence.
- **`Documentation`** reuses the returned `isBodyEnabled` flag instead
of recomputing `inputSources.includes("body")`.

## Test coverage

- `documentation-helpers.spec.ts`: asserts the new `isBodyEnabled` flag,
the cookie fallback (cookies only, no body/query), the `in: query`
priority over cookies (incl. the `QUERY` method), and body-primary
variants.
- `documentation.spec.ts` snapshot: the CookieSecurity test's `page`
field stays `in: query` (the security-declared `session` field stays
`in: cookie`); the POST `id` field in the "Feature 1180: Headers opt-in... (continued)

1123 of 1171 branches covered (95.9%)

14 of 14 new or added lines in 3 files covered. (100.0%)

1615 of 1615 relevant lines covered (100.0%)

593.36 hits per line

Jobs
ID Job ID Ran Files Coverage
1 run-26.x - 33943958105.1 05 Sep 2026 04:13AM UTC 52
100.0
GitHub Action Run
2 run-24.11.0 - 33943958105.2 05 Sep 2026 04:13AM UTC 52
100.0
GitHub Action Run
3 run-24.x - 33943958105.3 05 Sep 2026 04:13AM UTC 52
100.0
GitHub Action Run
4 run-22.x - 33943958105.4 05 Sep 2026 04:13AM UTC 52
100.0
GitHub Action Run
5 run-26.0.0 - 33943958105.5 05 Sep 2026 04:13AM UTC 52
100.0
GitHub Action Run
6 run-22.19.0 - 33943958105.6 05 Sep 2026 04:14AM UTC 52
100.0
GitHub Action Run
Source Files on build 33943958105
  • Tree
  • List 52
  • Changed 2
  • Source Changed 2
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #33943958105
  • 8316d073 on github
  • Prev Build on master (#33797618434)
  • Next Build on master (#33944063308)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc