-
Notifications
You must be signed in to change notification settings - Fork 271
BED-6664: Updated open api description to reflect fallback functionality in endpoints #2013
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
WalkthroughUpdates to the OpenAPI schema documentation add a new Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes
Possibly related PRs
Suggested labels
Suggested reviewers
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (2)
packages/go/openapi/doc/openapi.json (2)
3366-3370: Document allowed values for product_edition and add a brief description.Great addition. To make clients stricter and self-describing, suggest enumerating editions and adding a description (and optionally a minimal example):
"server_version": { - "type": "string" + "type": "string", + "description": "Semantic version of the running BloodHound server (e.g., 2.30.1)." }, "product_edition": { - "type": "string" + "type": "string", + "description": "Product edition of this instance.", + "enum": ["Community", "Enterprise"] }Optionally add a small 200-response example with both fields to help SDK generators.
Please confirm these enum values match what the server actually returns in both BHCE and BHE.
17398-17403: Clarify fallback semantics for asset_group_tag_id.The new text is helpful. To avoid ambiguity for clients, explicitly state whether omission selects the union of both zones or a precedence rule, and whether this fallback is environment-scoped.
Proposed tweak:
- "description": "The asset group tag id of the zone requested. If not supplied, the asset group tag id associated with 'Tier Zero' and 'Hygiene' is used.", + "description": "Zone tag to scope results. If omitted, results are evaluated against both the 'Tier Zero' and 'Hygiene' zones (union of both), within the current environment.",If precedence or filtering differs, spell it out here since this parameter is reused across endpoints.
Please confirm whether the fallback behavior is union-of-both, first-match, or implementation-defined, and update the description accordingly.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
packages/go/openapi/doc/openapi.json(2 hunks)packages/go/openapi/src/parameters/query.asset-group-tag-id.yaml(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (5)
- GitHub Check: Build BloodHound Container Image / Build and Package Container
- GitHub Check: run-tests
- GitHub Check: build-ui
- GitHub Check: run-tests
- GitHub Check: run-analysis
🔇 Additional comments (1)
packages/go/openapi/src/parameters/query.asset-group-tag-id.yaml (1)
17-17: Clear documentation of fallback behavior.The updated description effectively communicates the parameter's optional nature and its fallback behavior, now correctly specifying that both 'Tier Zero' and 'Hygiene' zones are included when the parameter is not supplied.
Description
Added new descriptiont text in yaml file for asset group tag id query param that is used in multiple endpoints. Also generated new open api doc file and included here with changes.
Note: It includes a change that I had added in a previous PR but forgot to generate the new file. Previous PR is and Ticket is BED-6548
Motivation and Context
Resolves: BED-6664
How Has This Been Tested?
Generating the new file and manually going to API explorer in BHE and BHCE to confirm new text is there.
Screenshots (optional):
Types of changes
Checklist:
Summary by CodeRabbit
New Features
product_editionfield to the API version response.Documentation