-
Notifications
You must be signed in to change notification settings - Fork 125
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
Validate content type strings in validateDoc #471
Validate content type strings in validateDoc #471
Conversation
Thanks for your continued efforts @PARAIPAN9 ❤️. We'll take a look at this, but just to manage your expectations, we'll likely want to merge this after we ship 1.0.0 (hopefully on Wednesday). This could well be the first post-1.0 PR though :) |
@swift-server-bot test this please |
You're very welcome! Thank you for considering the changes, and I completely understand the priority of shipping 1.0.0 first. I'm thrilled to contribute, and eagerly looking forward to the exciting milestone of the first release. |
Hi @PARAIPAN9 - the issue might not have been super clear, but the issue was about doing the work of walking the OpenAPI document, and validating all the content type strings that exist there, in the That way, we'd catch invalid content types at the start, instead of doing so later when we're trying to generate code. The errors emitted today, when an invalid content type is encountered, are good enough, we just don't do the validation at the start, so it can lead to a more confusing debugging experience. Does that make sense? If that task is not something you want to pick up, no worries at all, just let me know and I'd unassign you. 🙂 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See comment above, the task is slightly different.
Ah, thank you for the clarification. It's ok, I'll continue working on it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks - just a few more comments about how we can validate all the content types and emit more information if an invalid content type is found.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great, we're basically there - just added a few more suggestions, but this is the right shape!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great, thank you! Let's just get the CI green and I'll merge it.
@swift-server-bot test this please |
Perfect, You’re welcome!! |
Motivation
Modifications
Result
Test Plan