Skip to content

Add /v1/decisions endpoint spec - #160

Open
roh26it wants to merge 1 commit into
masterfrom
docs/decisions-endpoint-spec
Open

roh26it wants to merge 1 commit into
masterfrom
docs/decisions-endpoint-spec

Conversation

@roh26it

@roh26it roh26it commented Sep 27, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Adds the /v1/decisions typed-judgment endpoint: path definition, CreateDecisionsRequest/CreateDecisionsResponse schemas, and the DecisionsQuestion/DecisionsAnswer (noul/choice/score discriminated union) component schemas.
  • Adds a Decisions tag and an x-code-samples.groups navigation entry, following the repo's documented convention for new endpoints.
  • Schemas are grounded in the gateway's actual types (src/types/decisionsRequestBody.ts in gateway-enterprise-node), not assumptions.
  • Wording avoids implying TypeSafe exclusivity — it's the first supported provider, with more planned — matching the parallel docs-core PR (Document TypeSafe provider and the Decisions endpoint docs-core#1097).

Test plan

  • python3 -c "import yaml; yaml.safe_load(open('openapi.yaml'))" parses cleanly
  • No duplicate schema/path/group keys introduced
  • Reviewer sanity-check against the live /v1/decisions route in gateway-enterprise-node

🤖 Generated with Claude Code

Documents the typed-judgment endpoint added to the gateway (TypeSafe's
Jev is the first supported provider, with more planned): path,
request/response schemas, tag, and code-samples navigation entry.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Copilot AI lite review requested due to automatic review settings September 27, 2026 06: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.

Copilot review overview

🟡 Changes recommended

Three moderate OpenAPI schema issues remain unresolved.

Review effort: Lite
Findings: 2 Medium severity

Open (2)
What changed in this PR

Adds the /v1/decisions typed-judgment OpenAPI endpoint and related schemas.

Changes:

  • Adds endpoint metadata, authentication, examples, and response schemas.
  • Adds typed question and answer schemas.
  • Adds the Decisions tag and documentation navigation.

Three moderate schema issues remain regarding required fields and discriminated unions.

File Description
openapi.yaml Defines the Decisions endpoint, schemas, examples, and documentation metadata.

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

Comment thread openapi.yaml
Comment on lines +26404 to +26411
type:
description: |
The kind of typed answer to return:
- `noul`: a single number.
- `choice`: one of the labels defined in `criteria`.
- `score`: a score between 0 and 1, optionally labeled by `criteria`.
type: string
enum: [noul, choice, score]
Comment thread openapi.yaml
Comment on lines +26475 to +26478
required:
- state
- model
- questions
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.

4 participants