Skip to content

CBG-4752: Bulk APIs for CV (read and write)#7714

Merged
bbrks merged 7 commits intomainfrom
CBG-4752
Aug 29, 2025
Merged

CBG-4752: Bulk APIs for CV (read and write)#7714
bbrks merged 7 commits intomainfrom
CBG-4752

Conversation

@bbrks
Copy link
Member

@bbrks bbrks commented Aug 28, 2025

CBG-4752

Read and write support for CVs in bulk APIs:

  • _all_docs
    • Removed show_cv option. Always return CV like we do for other APIs.
  • _bulk_get
    • Removed show_cv option.
    • Renamed/cleanup (make it obvious that RevTree IDs or CVs are accepted with new variable name revOrCV)
  • _bulk_docs
    • Renamed/cleanup
    • Use returned RevTree ID and CV for response
  • Test fixes
    • Mostly removing the full/hardcoded bulk API responses since CV is now present

Integration Tests

Copilot AI review requested due to automatic review settings August 28, 2025 14:02
@github-actions
Copy link

github-actions bot commented Aug 28, 2025

Redocly previews

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR implements comprehensive support for Current Versions (CVs) in bulk APIs by removing the show_cv parameter and always returning CV values, similar to other APIs. The changes enable bulk APIs to accept both RevTree IDs and CVs for document operations.

Key changes:

  • Removed show_cv query parameter from _all_docs and _bulk_get APIs - CVs are now always returned
  • Enhanced _bulk_get to accept either RevTree IDs or CVs in the rev field via renamed variable revOrCV
  • Updated _bulk_docs to return both RevTree ID and CV in responses for regular documents

Reviewed Changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
rest/bulk_api.go Core implementation removing show_cv parameters and adding CV support to bulk operations
rest/utilities_testing_resttester.go Updated GetDoc helper to handle documents without CV (like local docs)
rest/api_test.go Enhanced TestBulkDocs with comprehensive CV/RevTree ID testing and removed hardcoded responses
rest/doc_api_test.go Expanded TestBulkGetWithCV with additional test cases for CV/RevTree ID handling
rest/role_api_test.go Updated test assertions to handle dynamic CV values in responses
rest/access_test.go Modified test expectations to accommodate CV inclusion in responses
rest/adminapitest/admin_api_test.go Updated rev tree test to handle dynamic CV values
docs/api/ Removed show_cv parameter from OpenAPI specifications for affected endpoints

@bbrks bbrks self-assigned this Aug 28, 2025
@bbrks bbrks assigned torcolvin and unassigned bbrks Aug 28, 2025
@bbrks bbrks merged commit a99df74 into main Aug 29, 2025
45 checks passed
@bbrks bbrks deleted the CBG-4752 branch August 29, 2025 12:04
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.

3 participants