Skip to content

Fix /search pagination response metadata - #138

Merged
afoote-mitre merged 1 commit into
devfrom
af/v1.0.0-prep
Aug 24, 2026
Merged

afoote-mitre merged 1 commit into
devfrom
af/v1.0.0-prep

Conversation

@afoote-mitre

@afoote-mitre afoote-mitre commented Aug 24, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • Preserve the requested resultsPerPage value in the pageSize response field.
  • Add resultsReturned to report the actual number of CVE records returned.
  • Update the OpenAPI schema, README, controller and route assertions, and generated Postman collection.

Why This Change Was Needed

The response previously set pageSize from the returned hit-array length. Partial, empty, and out-of-range pages therefore lost the page capacity requested by the caller. Separating requested page size from actual result count makes the pagination metadata unambiguous.

Primary Files

Change Files
Response metadata controllers/searchController.js
Controller and route coverage controllers/searchController.test.js, routes/search.integration.test.js
OpenAPI contract routes/swagger.js, api-docs/openapi.json, api-docs/openapi.test.js
Public documentation README.md
Manual Postman assertions test/postman/buildCollection.js, test/postman/CVE-Search-API.postman_collection.json

@afoote-mitre
afoote-mitre merged commit 151d9f8 into dev Aug 24, 2026
1 check 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.

1 participant