Skip to content

PLAT-1314/feat: validate JSON payloads before API requests - #13

Open
brtkwr wants to merge 7 commits into
mainfrom
bkunwar/plat-1314-payload-validation
Open

brtkwr wants to merge 7 commits into
mainfrom
bkunwar/plat-1314-payload-validation

Conversation

@brtkwr

@brtkwr brtkwr commented Oct 29, 2026 •

Copy link
Copy Markdown
Member

Changes

  • Validate JSON payloads against the embedded request schema before ordinary or paginated API requests, including dry runs.
  • Reject malformed JSON, empty required bodies, missing required fields, type and enum mismatches with usage exit code 2.
  • Warn on unknown structured properties without dropping them from the HTTP payload or blocking spec drift.
  • Validate a private payload projection against the original schema, preserving closed oneOf discrimination, composed array items, typed/open maps and shared schema contents.
  • Keep payload values out of validation diagnostics and warnings off stdout.
  • Add inline/file/stdin, nested schema, composition, immutability, dry-run and no-network regressions; document the behavior.

Validation

On head 2b7647cf5acea82380c7d0e7eeea7dfd7653c8ef, CI run 40864712290 passed both jobs:

  • build: go build ./..., embedded-spec drift check, all tests and coverage gate passed. Total coverage 81.5% (80% gate).
  • lint: formatting, vet, ineffassign, spelling, complexity and golint passed.
  • No tests run locally, as requested. All six changed files were re-read from the exact remote head.
  • Focused independent review found closed oneOf and composed-array warning edge cases; both now have regressions.

Scope

Refs PLAT-1314. Other checklist items and open PR scopes remain separate. Validation uses the existing kin-openapi OAS validator; this does not add a new JSON Schema engine or change embedded specs.

✨ via Codex session

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review 🔄 Running since 2026-10-29T11:21:12.142901Z 2b7647c New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

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.

1 participant