[HDR-6545] Document Issuer Hierarchy changes on Public API Team Members and Departments endpoints - #140
Open
shravi903 wants to merge 2 commits into
Conversation
Deploying accredible-api-documentation with
|
| Latest commit: |
8dec21e
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://ce3f8d01.accredible-api-documentation.pages.dev |
| Branch Preview URL: | https://feature-hdr-6545-update-api.accredible-api-documentation.pages.dev |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🎟 Ticket
HDR-6545 — documentation task covering two stories in the HDR-6012 epic:
⛔ Do not merge yet
This documents behaviour that has not shipped. All three backend PRs are still open:
There are also three places where these docs describe intended behaviour that the backend does not yet implement — see the table at the bottom. Each needs a backend change, or the published docs will be wrong.
📝 What does this PR do?
Documents the Issuer Hierarchy changes across the four Team Members operations and the five documented Departments operations. Follows the structure of #130 (the
pathwaysfield): additive schema properties, matching example bodies, updated cURL samples, plus prose for the authorization rules.Team Members —
POST /v1/team_members,GET/PUT/DELETE /v1/team_members/{id}groups:api,team,spotlight_directory,access_level,analytics_email,manage_dept_admins_and_devs.POST,PUT) gain the five accepted params:api,team,access_level,analytics_email,manage_dept_admins_and_devs.spotlight_directoryis response-only and is deliberately not in the request schema.access_levelis enumerated — request side to the three assignable values withdefault: "team_member", response side to all four wire values.access_level, and the permitted permission values per tier.Departments —
POST /v1/departments,GET/PUT/DELETE /v1/departments/{department_id},POST /v1/departments/searchNo schema changes — this story is authorization only, so it is prose in each operation's
description.GET,PUTandDELETEpreviously had no description at all.POST /v1/departments403 No Permission to manage Departments.GET /v1/departments/{id}404 No department foundPUT /v1/departments/{id}404 No department foundDELETE /v1/departments/{id}403 No Permission to manage Departments.POST /v1/departments/searchAlso included
department_id, butApi::V1::Public::TeamMemberSerializeremitsdepartment. Corrected in the schemas, therequiredarrays and the examples. Requests correctly keepdepartment_id. This bug predates this ticket.PUTclarifications: the payload replaces the member's entire permission set (a Department omitted from the array has its permission removed, which requires an account-wide key), andemailhas been dropped from the request schema since it is ignored.GET /v1/departments(index) is affected by HDR-6014 but has never been documented here. Left out — adding a new endpoint is separate work.docs/plans/. Happy to drop it from the branch if we'd rather not carry it in a public-facing repo.No error-response objects
The authorization rules are documented in prose only. This spec documents error responses almost nowhere today (a single
422onPOST /v2/credentials/bulk_create), so adding400/403/404objects to these operations only would be an inconsistent one-off. Happy to revisit if reviewers prefer otherwise.✅ How this was verified
openapi.jsonparses; the diff touches only the intended operations.permissionskeys matchTeamMemberSerializerexactly on all four responses andteam_member_paramsexactly on both requests; each example body matches its own schema's key set; the request examples obey the permitted-values table they document; each cURL body is byte-identical to its request example; nodepartment_idremains in any response.PermissionLocks#locks_forlayered on the public-API defaults and allowlist, then cross-checked againstpermission_locks_spec.rb— not written by hand.🪙 Type of change
✅ Checklist