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

Handle malformed content types #339

Merged
merged 4 commits into from Oct 24, 2023

Conversation

czechboy0
Copy link
Collaborator

Motivation

Before this PR, when a malformed content type (one that wasn't in the format foo/bar) was provided in the OpenAPI document, the generator would crash on a precondition failure, making it difficult to debug.

Modifications

Turn the precondition failure into a thrown error.

Result

Malformed content types now produce a thrown error instead of a crash.

Test Plan

All tests pass.

@czechboy0 czechboy0 merged commit f8f88d2 into apple:main Oct 24, 2023
8 checks passed
@czechboy0 czechboy0 deleted the hd-handle-malformed-content-types branch October 24, 2023 06:33
@czechboy0 czechboy0 added the semver/patch No public API change. label Oct 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver/patch No public API change.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants