Skip to content

feat(docs): enable Swagger UI path filter + request-duration display#283

Merged
CryptoJones merged 1 commit into
masterfrom
feat/swagger-ui-add-filter-search
May 19, 2026
Merged

feat(docs): enable Swagger UI path filter + request-duration display#283
CryptoJones merged 1 commit into
masterfrom
feat/swagger-ui-add-filter-search

Conversation

@CryptoJones
Copy link
Copy Markdown
Owner

Summary

Two small swagger-ui-express options that pull their weight on a ~50-path, 16-entity spec.

  • filter: true — adds a free-text path filter at the top of the UI. Searching "invoice" / "bulk" / "company" jumps straight to the relevant block without scrolling. Real navigation aid for operators browsing the docs.
  • displayRequestDuration: true — shows the round-trip duration on every "Try it out" response. Cheap latency eyeball check during exploration; matches the data shape already exposed at /metrics.

Both are swagger-ui-side; no server change, no test impact. The existing persistAuthorization: true (keep authKey across reloads) stays.

Test plan

  • npm run lint && npm test — 760 passing.
  • The tests/api/openapi.test.js Swagger UI mount assertion (expect(res.text).toContain('Swagger')) still passes.

Proudly Made in Nebraska. Go Big Red! 🌽 https://xkcd.com/2347/

The /docs Swagger UI was mounted with just \`persistAuthorization\`.
Two small swagger-ui-express options that pull their weight on a
~50-path, 16-entity spec:

  - \`filter: true\` — adds a free-text path filter at the top of
    the UI. Searching "invoice" / "bulk" / "company" jumps straight
    to the relevant block without scrolling. Real navigation aid
    for operators browsing the docs.

  - \`displayRequestDuration: true\` — shows the round-trip
    duration on every "Try it out" response. Cheap latency
    eyeball check during exploration; matches the data shape
    already exposed at /metrics.

Both are swagger-ui-side; no server change, no test impact.
760 tests still pass.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@CryptoJones CryptoJones merged commit e296e68 into master May 19, 2026
3 checks passed
@CryptoJones CryptoJones deleted the feat/swagger-ui-add-filter-search branch May 19, 2026 15:34
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.

1 participant