Skip to content

docs: document credential PATCH endpoint (BED-10419) - #3653

Draft
bfaulk96 wants to merge 17 commits into
mainfrom
BED-10419-update-credential-fields
Draft

bfaulk96 wants to merge 17 commits into
mainfrom
BED-10419-update-credential-fields

Conversation

@bfaulk96

@bfaulk96 bfaulk96 commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Description

Documents PATCH /api/v2/collie-job-secrets/:id in the OpenAPI source and generated specification.

packages/go/openapi/
  src/paths/collector-jobs.secrets.id.yaml  # PATCH contract
  doc/openapi.json                        # generated specification

Defines optional name, external_key_id, and write-only value fields, validation requirements, the metadata response, and error statuses.

Merge Danger

Door: Two-way. Documentation can be reverted.

Blast Radius: Documentation. The runtime endpoint is implemented in a separate BHE PR. The contract documents unchanged job snapshots and the possibility that a provider write succeeds before a database commit fails.

Motivation and Context

Resolves BED-10419

Keeps the API specification aligned with the credential update endpoint. Companion implementation: BHE #2398. Merge this PR first, then update the BHE submodule pointer to its merged revision.

How Has This Been Tested?

  • Before: The OpenAPI specification described GET and DELETE for an individual credential, but no PATCH operation.
    After: Both the YAML source and generated JSON describe PATCH. The generated JSON parses and includes the expected request fields and response statuses.
  • The BHE companion's credential unit, database integration, and routed API tests passed against the documented behavior, including successful partial updates and 400/401/403/404/409 responses.

Manual verification for reviewers: inspect UpdateCollectorJobSecret in the source YAML and generated JSON; confirm value is write-only, at least one update field is required, additional fields are rejected, and the 200 response contains credential metadata only.

No BHCE runtime code changed; the full BHCE test suite was not run.

Screenshots (optional):

Not applicable; OpenAPI documentation change.

Types of changes

  • Chore (a change that does not modify the application functionality)

Checklist:

  • I have met the contributing prerequisites
  • I have ensured that related documentation is up-to-date
    • Open API docs
    • Code comments (GoDocs / JSDocs)
  • I have followed proper test practices
    • Added/updated tests to cover my changes
    • All new and existing tests passed

slimi-so and others added 17 commits October 27, 2026 15:15
- Adds principalobjectid query param with description and schema documentation to "attack-paths.attack-paths-findings.yaml" file for "/attack-paths/findings" endpoint
- Resolves BED-9834
@bfaulk96 bfaulk96 added the api A pull request containing changes affecting the API code. label Nov 6, 2026
@bfaulk96 bfaulk96 self-assigned this Nov 6, 2026
@coderabbitai

coderabbitai Bot commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api A pull request containing changes affecting the API code.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants