fix(openapi): Preserve example summaries in v3 OpenAPI importer #10805
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.
Description
Closes #9551
Fixes a bug where OpenAPI example summaries were being ignored in the v3 importer, causing example names to display as generic "Example 1", "Example 2", etc. instead of the user-provided summary names like "Partner token" and "User token".
Changes Made
AbstractMediaTypeObjectConverter.parseMediaTypeObject()to preserve the full OpenAPIExampleObjectstructure (includingsummaryanddescriptionfields) instead of extracting only thevaluefieldresolved.value.value ?? resolved.value→resolved.valueexample.value ?? example→exampleTesting
examples-endpoint-level-namedshould cover this scenario, but this should be verified.Review Checklist
Critical items to verify:
resolved.valueandexampleare of typeOpenAPIV3_1.ExampleObject(not just the raw value). The filter on line 93 expects this type, but worth double-checking the resolver methods.convertMediaTypeObjectExamples()at line 142) expect the fullExampleObjectstructure withsummaryanddescriptionfields, not just the raw value.examples-endpoint-level-named.jsonsnapshot) properly validate that example summaries are preserved through the entire pipeline.Session: https://app.devin.ai/sessions/107aa7cf711e4608937bfcad07d6c5b7
Requested by: @dannysheridan ([email protected])