Skip to content
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

Fix media type handling of unions as payloads #584

Merged
merged 1 commit into from
Sep 29, 2020
Merged

Conversation

mtdowling
Copy link
Member

We had a case where if a union shape is marked with the httpPayload
trait, we wouldn't resolve a proper mediaType. This caused an NPE. The
code that determines the media type has been updated to treat unions
like structures, and a more helpful message was added in case a media
type can't be resolved at some point in the future.

Issue #, if available:

Description of changes:

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

We had a case where if a union shape is marked with the httpPayload
trait, we wouldn't resolve a proper mediaType. This caused an NPE. The
code that determines the media type has been updated to treat unions
like structures, and a more helpful message was added in case a media
type can't be resolved at some point in the future.
@mtdowling mtdowling merged commit 21f6c8a into master Sep 29, 2020
@mtdowling mtdowling deleted the fix-openapi-unions branch December 11, 2020 17:59
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.

2 participants