Skip to content

Document the fov object in the GET /info/position response - #46

Open
pjeweb wants to merge 1 commit into
mainfrom
fix/info-position-schema
Open

pjeweb wants to merge 1 commit into
mainfrom
fix/info-position-schema

Conversation

@pjeweb

@pjeweb pjeweb commented Oct 15, 2026

Copy link
Copy Markdown
Member

GET /info/position returns the camera's position values plus the computed fov object (info.fov = getFOV(...) in get_info_handler.ts), but its OpenAPI response schema was PositionMapSchema (a map of numbers and strings only). Clients generated from the spec, such as the cams control SDK in alveusgg/alveusgg#2412, rejected every real response because fov is an object.

This documents the response as an object with a required fov (hFOV, vFOV, focalLength, x, y, multiplier), plus the position values as before (additionalProperties: number | string). Runtime behaviour is unchanged; only the spec is affected.

Testing

  • Built the image locally and ran it with the control-api mock from alveusgg/infrastructure (feat/local-mocks).
  • Checked every GET endpoint's real response against the spec: /info/position was the only one that didn't match, and it does now.
  • Ran the generated SDK through the cams manager Worker against the mock: position, move and zoom all work.

🤖 Generated with Claude Code

The handler returns the position values plus a computed `fov` object,
but the OpenAPI response schema was a map of numbers and strings only,
so generated clients rejected real responses.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@pjeweb
pjeweb requested a review from a team as a code owner October 15, 2026 23:16
@pjeweb
pjeweb requested a balanced review from Copilot October 15, 2026 23:29

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 Approval recommended

The focused schema correction matches the existing response structure and introduces no runtime changes or unresolved issues.

0 open findings

What changed in this PR

Corrects the OpenAPI response schema for GET /info/position to describe the existing response accurately.

Changes:

  • Documents the required fov object and its six numeric fields.
  • Preserves additional number-or-string position values without changing runtime behavior.
File Description
src/​modules/​info/​get_info_handler.ts Defines and uses the response schema containing fov.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

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.

2 participants