Skip to content

feat: add response-side validation utilities and structured Spring validation config#16

Merged
limehee merged 24 commits intomainfrom
feat/#15
Mar 3, 2026
Merged

feat: add response-side validation utilities and structured Spring validation config#16
limehee merged 24 commits intomainfrom
feat/#15

Conversation

@limehee
Copy link
Copy Markdown
Owner

@limehee limehee commented Mar 3, 2026

Summary

This PR adds RFC-oriented protocol utilities and expands Spring Boot configurability, tests, and documentation.

Key updates:

  • Added response-side protocol utilities in jsonrpc-core:
    • JsonRpcEnvelopeClassifier
    • JsonRpcResponseParser
    • JsonRpcResponseValidator
    • JsonRpcResponseValidationOptions
  • Added configurable request params type-violation policy in core:
    • JsonRpcParamsTypeViolationCodePolicy
    • policy-aware DefaultJsonRpcRequestValidator
  • Added structured Spring validation groups:
    • jsonrpc.validation.request.params-type-violation-code-policy
    • jsonrpc.validation.response.* (full response validation option surface)
  • Added Spring auto-configured beans:
    • JsonRpcResponseValidationOptions
    • JsonRpcResponseValidator
  • Added null-guard hardening in DefaultJsonRpcResponseValidator constructor.
  • Expanded sample scenarios and integration coverage (Pure Java + Spring Boot).
  • Updated README/docs/config metadata for implementation parity and IDE completion hints.

Related Issues

Change Type

  • Bug fix
  • Feature
  • Refactor
  • Documentation
  • Test
  • Build/CI

JSON-RPC Impact

Describe protocol-level impact, if any:

  • No protocol behavior change
  • Request validation behavior changed
  • Error mapping behavior changed
  • Method registration/dispatch behavior changed

Details:

  • Default runtime behavior remains RFC-aligned and backward-compatible unless new options are configured.
  • New opt-in configuration controls request params type-violation mapping and incoming response validation strictness.
  • Response-side utilities are additive and intended for client/bidirectional integration paths.

Validation

  • ./gradlew test
  • ./gradlew check
  • Added/updated tests for new behavior

Documentation

  • Updated README (if needed)
  • Added migration notes for breaking changes (if any)

limehee added 24 commits March 3, 2026 22:34
@limehee limehee linked an issue Mar 3, 2026 that may be closed by this pull request
@limehee limehee self-assigned this Mar 3, 2026
@limehee limehee added the type: feature New feature specification and implementation. label Mar 3, 2026
@limehee limehee merged commit d3e5c04 into main Mar 3, 2026
5 checks passed
@limehee limehee deleted the feat/#15 branch March 3, 2026 16:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: feature New feature specification and implementation.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add RFC-aligned response protocol utilities to jsonrpc-core

1 participant