-
Notifications
You must be signed in to change notification settings - Fork 129
Bumps OpenAPIKit to version 3.0.0-alpha.7 fixing an issue with trailing slashes. #69
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
Bumps OpenAPIKit to version 3.0.0-alpha.7 fixing an issue with trailing slashes. #69
Conversation
@miguel-arrf Thanks for driving this! 🙏
Is this something you intend to do in this PR? |
@swift-server-bot add to allowlist |
You could just change one of the paths in the integration test to end with a slash instead of adding another path+operation. But it'd be good for our tests to include this case. |
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 for the fix. Based on the discussion here and on the issue, I'll mark this as request changes, until we get the test changed.
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 @miguel-arrf for updating the tests, but I don't think we need a new operation for it, as those are pretty expensive to maintain (as you just saw when adding a new one), so we add new ones sparingly, only when we can't extend existing ones. An easier alternative is to modify the path of one of the existing operations, and update the corresponding test.
@czechboy0 Ah, I see! Thank you, I'll update it accordingly :)! |
d89e360
to
167b0b6
Compare
…ing with a slash are working properly.
(I still have some more tests to change, because of the Server!) |
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.
Looks great, thank you, @miguel-arrf! 🙏
@miguel-arrf Looks great! Would you like to update the PR description given you've gone to the effort of sorting the testing out?
EDIT: Actually, don't worry—I'll do it. Thanks for the contribution! |
Thanks @simonjbeaumont ! |
Motivation
As discussed in #51, there was an issue with paths containing trailing slashes. The problem was identified in the OpenAPIKit dependency. It was fixed in the PR mattpolzin/OpenAPIKit#274.
Modifications
This PR updates the OpenAPIKit dependency version from
3.0.0-alpha.6
to3.0.0-alpha.7
(available here), which includes the mentioned PR.Result
If a path ends with a trailing slash, such as
foo/bar/
, the generated functions will now correctly call the pathfoo/bar/
instead of (as previously)foo/bar
.Test Plan
Replaced an endpoint in the reference test to use a path with a trailing slash.
Resolves