fix(openapi): preserve array-form (JSON Schema / OAS 3.1) examples

Merged
H3
4mo ago
+135-10

_extract_examples only handled 'examples' as an OpenAPI map of named Example Objects, while _schema_without_example_keys strips 'examples' from schemas before spreading. So a JSON Schema / OpenAPI 3.1 schema-level 'examples' list was extracted as nothing and then dropped - silent data loss.

Handle the list form too: list entries are literal example values; the map form keeps its Example Object 'value' handling. Adds a test covering array-form schema examples on both request body and response. Bumps utcp-http 1.1.9 -> 1.1.10.


Summary by cubic

Preserves JSON Schema/OpenAPI 3.1 array-form schema examples and makes example de-duplication type-aware and order-insensitive, so request and response examples carry through without losing distinct values.

  • Bug Fixes

    • Support array-form examples on Schema objects (OAS 3.1/JSON Schema).
    • De-duplicate examples via canonical JSON keys; keeps types distinct (e.g., True vs 1) and collapses reordered objects.
    • Tests for array-form examples and the new de-dup behavior on request body and response.
  • Dependencies

    • Bump utcp-http from 1.1.9 to 1.1.11.