Skip to content

feat(server): default validation to strict in serve() (currently None / off) #417

@bokelley

Description

@bokelley

Context

The pricing_options shape regression ({\"type\", \"rate\"} shipped instead of spec {\"pricing_model\", \"fixed_price\"}) made it through because Pydantic extra=\"allow\" swallowed it. Strict validation would have caught the bug at boot.

Default serve(validation=ValidationHookConfig(requests=\"strict\", responses=\"strict\")). Adopters who need looser behavior opt out with responses=\"warn\". The v3 ref seller already does this; promoting it to framework default catches the same class of bug across all adopters.

Acceptance Criteria

  • serve() default validation is ValidationHookConfig(requests=\"strict\", responses=\"strict\")
  • Adopter migration note in CHANGELOG
  • Opt-out (responses=\"warn\") documented
  • Existing examples / docs updated

Refs

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions