Repository navigation
Dna docs improvements - #241
Merged
Merged
Conversation
Signed-off-by: Cameron Target <camerontarget@gmail.com>
Backend (spec is now self-documenting; /docs, /redoc and the site all
benefit):
- Add dna/openapi_schema.py: x-tagGroups ("Production Tracking" vs
"DNA"),
descriptions for every opaque-ID parameter, uniform 401 on
authenticated
routes, and error_responses() for per-route 4xx/5xx docs
- Add ErrorResponse model for the {"detail": ...} envelope
- Rewrite API description and tag descriptions to say what proxies the
tracking provider vs. what DNA stores; add Publishing and Project
Glossary
tags and retag the glossary/publish routes
- Document error statuses on every route that raises them; expand the
descriptions of publish-notes, draft PUT, find, generate-note,
run-qc-checks
- Add json_schema_extra examples to 48 schemas using one consistent
fictional
production
- Extend test_openapi_spec.py: tags grouped exactly once, 401 on secured
ops,
all params described, error bodies use ErrorResponse
- Regenerate docs/openapi.json
Docs site:
- Refresh the stale spec copy (was 2026-09-28: integer IDs, missing
endpoint)
and make build:full run fetch-openapi so it cannot drift again
- Group the reference sidebar by tag group
- Add hand-written Authentication, Concepts, Errors and Real-time pages
(incl. the /ws and extension-ingest WebSockets, which are not in
OpenAPI)
- Rewrite the landing page with a first-request walkthrough
- Trim API explorer code samples to cURL, Python, JavaScript, C, Rust,
Go;
load the bash Prism grammar so shell blocks highlight
- Update README and contributing guide to match the fetch script
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Signed-off-by: Cameron Target <camerontarget@gmail.com>
Signed-off-by: Cameron Target <camerontarget@gmail.com>
main landed #224 (Zoom bots) and #233 (notes link to their transcript) ahead of this branch, so after merging main: - DispatchBotRequest gets a second example showing a Zoom dispatch, and POST /transcription/bot says Zoom needs meeting_url with the passcode only honoured as the link's pwd - publish-notes description and the Concepts page now say the Note is linked to the version's newest transcript row (best effort), and the Concepts walkthrough publishes the transcript before the notes - Regenerate both openapi.json copies - Drop backend/docs/API_DOCS_MAINTENANCE.md; it was a merge-ordering guide for PRs that have now merged Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Signed-off-by: Cameron Target <camerontarget@gmail.com>
Signed-off-by: Cameron Target <camerontarget@gmail.com> # Conflicts: # dna-docs/README.md
- transcription_language in the user-settings request and response examples; User Settings tag description mentions it - DispatchBotRequest.language described as an ISO 639-1 code from GET /transcription/languages, with "en" in the Google Meet example - TranscriptionLanguagesResponse gets an example and the languages route documents its 400 - Concepts step 5 notes the web app fills language from the reviewer's settings, so other tools should pass it explicitly - Regenerate both openapi.json copies Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Signed-off-by: Cameron Target <camerontarget@gmail.com>
jspada200
approved these changes
Oct 22, 2026
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.
Summary
Makes the backend API usable by someone outside the project (e.g. a ShotGrid or AYON tooling developer) without reading the source. The OpenAPI document now documents itself, and the docs site gets hand-written guide pages around the generated reference.
Backend (spec is self-documenting;
/docs,/redocand the site all benefit)dna/openapi_schema.pylayers onto the generated spec:x-tagGroupssplitting endpoints into Production Tracking (proxy the provider; DNA stores nothing) and DNA (DNA's own storage).project_id,version_id,user_email, ...), injected centrally.error_responses()helper so routes declare the 4xx/5xx they raise. All error bodies reference a newErrorResponsemodel ({"detail": ...}).main.py: API description and every tag description rewritten to say what proxies the tracking provider vs. what DNA stores. New Publishing and Project Glossary tags; glossary/publish routes retagged. Longer descriptions onpublish-notes, draft PUT,find,generate-note,run-qc-checks.json_schema_extraexamples on ~50 schemas, all using one fictional production (project124, versionmk020_0010_comp_v003,sam.reviewer@studio.example) so examples agree across endpoints.test_openapi_spec.pynow asserts: every tag is in exactly one group, every secured op has a 401, every parameter is described, every documented error body isErrorResponse. These fail if a route is added without documenting it, which is the point.Docs site
npm run build:fullnow runsfetch-openapifirst so it cannot drift again./wsand extension-ingest WebSockets, which are not in OpenAPI). Landing page rewritten as a first-request walkthrough.Caught up with
main(merged in twice; one README conflict resolved in favour of thefetch-openapibuild step)DispatchBotRequestexample; bot route notes Zoom needsmeeting_urland the passcode only works as the link'spwd.publish-notesand the Concepts walkthrough say the Note is linked to the version's newest transcript row (best effort), and the walkthrough publishes the transcript before the notes.transcription_languagein the user-settings examples;DispatchBotRequest.languagedocumented as an ISO 639-1 code fromGET /transcription/languages; that route gets an example and its 400.build:full.Testing
How I Tested
cd backend && .venv/bin/python scripts/export_openapi.py— regenerateddocs/openapi.jsonfrom the merged code (41 paths, 58 schemas)..venv/bin/python -m pytest tests/test_openapi_spec.py tests/test_user_settings.py tests/test_transcription_languages_endpoint.py— 39 passed, including the new spec guards and the drift test.cd dna-docs && npm run build:full— fetch, regenerate and build succeed withonBrokenLinks: 'throw'.api:front matter of the generatedapi/reference/*.api.mdxforpublish-notes,transcription/bot,transcription/languagesand user-settings PUT, and confirmed the new descriptions, examples (language: "en",transcription_language: "en", Zoom second example) and error statuses are present.🤖 Generated with Claude Code