Skip to content

Fix jsonName conversion for OpenAPI examples #2666

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

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
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