{{ message }}
Conversation
_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. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…itive _merge_examples de-duped with `ex not in merged`, i.e. Python `==`. That collapses semantically distinct JSON examples: True == 1, False == 0, 1 == 1.0 — so mixing such values silently dropped one. Switch to a canonical JSON key (json.dumps with sorted keys) for identity: order-insensitive for objects and type-aware for scalars. Aligns the de-dup behavior with the TypeScript implementation. Bumps utcp-http 1.1.10 -> 1.1.11. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…pi-example-dedup fix(openapi): type-aware, order-insensitive example de-duplication
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

_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
exampleson Schema objects (OAS 3.1/JSON Schema).Dependencies
utcp-httpfrom1.1.9to1.1.11.Written for commit 89a9832. Summary will update on new commits.