Skip to content

feat(validation): implement framework-independent SDK response schema… - #483

Open
Code-Paragon wants to merge 2 commits into
Adamantine-guild:mainfrom
Code-Paragon:feat/451-response-schema-guards
Open

feat(validation): implement framework-independent SDK response schema…#483
Code-Paragon wants to merge 2 commits into
Adamantine-guild:mainfrom
Code-Paragon:feat/451-response-schema-guards

Conversation

@Code-Paragon

Copy link
Copy Markdown
Contributor

Description

Implements a lightweight, framework-independent SDK response schema guard system to verify unknown runtime API payloads before exposing them as typed public data.

  • Created composable schema builders (string, number, boolean, nullType, literal, optional, array, object, union).
  • Implemented strongly typed parsing returning discriminated ValidationResult<T> objects.
  • Added structured path tracking (e.g., data.members[2].id) for descriptive validation failures.
  • Enforced strict recursion depth bounding (max depth 20) to protect against pathological payloads and stack overflows.
  • Backed by 89 comprehensive unit tests covering primitives, nested objects, arrays, unions, and malformed responses.

Closes #451.

Type of Change

  • Bug fix (fix(scope): message)
  • New feature (feat(scope): message)
  • Documentation (docs(scope): message)
  • Refactoring (refactor(scope): message)
  • CI/CD (ci(scope): message)
  • Other

PR Title Format

This PR follows Conventional Commits:

Testing

  • Tests pass locally (pnpm test / pnpm typecheck / pnpm build)
  • New tests added (if applicable)

Checklist

  • PR title follows type(scope): message format
  • Code follows project style guidelines
  • Self-review completed

@Lakes41

Lakes41 commented Aug 30, 2026

Copy link
Copy Markdown
Contributor

This PR cannot be merged automatically because it has merge conflicts.

Please update the branch with the latest base branch and resolve the conflicts.

After the conflicts are resolved and checks pass, the automation can review it again.

@Lakes41

Lakes41 commented Aug 30, 2026

Copy link
Copy Markdown
Contributor

This PR cannot be merged automatically because one or more workflow checks failed.

Please review the failed checks, push a fix, and wait for the workflows to pass.

After the checks pass and there are no merge conflicts, the automation can review it again.

@Lakes41

Lakes41 commented Aug 30, 2026

Copy link
Copy Markdown
Contributor

This PR cannot be merged automatically because it has merge conflicts and one or more workflow checks failed.

Please update the branch with the latest base branch, resolve the conflicts, and fix the failing workflow checks.

After the conflicts are resolved and checks pass, the automation can review it again.

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.

Implement a framework-independent SDK response schema guard system

2 participants