Skip to content

Conversation

@JordonPhillips
Copy link
Contributor

@JordonPhillips JordonPhillips commented Jun 13, 2025

When converting to OpenAPI for the restJson1 protocol, we convert member names if they have the jsonName trait. However, we were not converting those member names in examples. This updates example conversion to respect member name, if present and enabled.

Fixes #2659


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

This updates AbstractRestProtocol's value transformer to take
the conversion context and the shape of the value it is transforming.
This updates the OpenAPI conversion to apply the jsonName trait
if said trait is enabled.
@JordonPhillips JordonPhillips requested a review from a team as a code owner June 13, 2025 14:43
@JordonPhillips JordonPhillips requested a review from joewyz June 13, 2025 14:43
@JordonPhillips JordonPhillips changed the title Openapi examples jsonname Fix jsonName conversion for OpenAPI examples Jun 13, 2025
Co-authored-by: Manuel Sugawara <[email protected]>
@JordonPhillips JordonPhillips requested a review from sugmanue June 20, 2025 08:01
@JordonPhillips JordonPhillips merged commit 0b6df7b into main Jun 27, 2025
9 checks passed
@JordonPhillips JordonPhillips deleted the openapi-examples-jsonname branch June 27, 2025 11:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

When generating openapi spec, examples trait does not respect jsonName trait

2 participants