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: list value for GET search params #136
Conversation
Codecov Report
📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more @@ Coverage Diff @@
## main #136 +/- ##
=======================================
Coverage 73.83% 73.83%
=======================================
Files 105 105
Lines 1120 1120
=======================================
Hits 827 827
Misses 293 293
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
Hi @Kraigo , thanks for your contribution! :) The implementation looks good, but there is one minor point that needs to be confirmed, please check :) |
Hey @myConsciousness |
bors merge |
138: docs: fixed for the pr (#136) r=myConsciousness a=myConsciousness # 1. Description <!-- Provide a description of what this PR is doing. If you're modifying existing behavior, describe the existing behavior, how this PR is changing it, and what motivated the change. If this is a breaking change, specify explicitly which APIs have been changed. --> ## 1.1. Checklist <!-- Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes (`[x]`). This will ensure a smooth and quick review process. --> - [x] The title of my PR starts with a [Conventional Commit] prefix (`fix:`, `feat:`, `docs:` etc). - [x] I have read the [Contributor Guide] and followed the process outlined for submitting PRs. - [x] I have updated/added tests for ALL new/updated/fixed functionality. - [x] I have updated/added relevant documentation in `docs` and added dartdoc comments with `///`. - [x] I have updated/added relevant examples in `examples`. ## 1.2. Breaking Change <!-- Does your PR require users to manually update their apps to accommodate your change? If the PR is a breaking change this should be indicated with suffix "!" (for example, `feat!:`, `fix!:`). See [Conventional Commit] for details. --> - [ ] Yes, this is a breaking change. - [x] No, this is _not_ a breaking change. ## 1.3. Related Issues <!-- Provide a list of issues related to this PR from the [issue database]. Indicate which of these issues are resolved or fixed by this PR, i.e. Fixes #xxxx* !--> <!-- Links --> [issue database]: https://github.com/mastodon-dart/mastodon-api/issues [contributor guide]: https://github.com/mastodon-dart/mastodon-api/blob/main/CONTRIBUTING.md [style guide]: https://github.com/mastodon-dart/mastodon-api/blob/main/STYLEGUIDE.md [conventional commit]: https://conventionalcommits.org Co-authored-by: myConsciousness <contact@shinyakato.dev>
@all-contributors please add @Kraigo for doc and bug |
I've put up a pull request to add @Kraigo! 🎉 |
138: docs: fixed for the pr (#136) r=myConsciousness a=myConsciousness # 1. Description <!-- Provide a description of what this PR is doing. If you're modifying existing behavior, describe the existing behavior, how this PR is changing it, and what motivated the change. If this is a breaking change, specify explicitly which APIs have been changed. --> ## 1.1. Checklist <!-- Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes (`[x]`). This will ensure a smooth and quick review process. --> - [x] The title of my PR starts with a [Conventional Commit] prefix (`fix:`, `feat:`, `docs:` etc). - [x] I have read the [Contributor Guide] and followed the process outlined for submitting PRs. - [x] I have updated/added tests for ALL new/updated/fixed functionality. - [x] I have updated/added relevant documentation in `docs` and added dartdoc comments with `///`. - [x] I have updated/added relevant examples in `examples`. ## 1.2. Breaking Change <!-- Does your PR require users to manually update their apps to accommodate your change? If the PR is a breaking change this should be indicated with suffix "!" (for example, `feat!:`, `fix!:`). See [Conventional Commit] for details. --> - [ ] Yes, this is a breaking change. - [x] No, this is _not_ a breaking change. ## 1.3. Related Issues <!-- Provide a list of issues related to this PR from the [issue database]. Indicate which of these issues are resolved or fixed by this PR, i.e. Fixes #xxxx* !--> <!-- Links --> [issue database]: https://github.com/mastodon-dart/mastodon-api/issues [contributor guide]: https://github.com/mastodon-dart/mastodon-api/blob/main/CONTRIBUTING.md [style guide]: https://github.com/mastodon-dart/mastodon-api/blob/main/STYLEGUIDE.md [conventional commit]: https://conventionalcommits.org Co-authored-by: myConsciousness <contact@shinyakato.dev> Co-authored-by: Shinya Kato / 加藤 真也 <kato.shinya.dev@gmail.com>
1. Description
SearchParams for GET request should support list values.
Expected:
/request?id[]=123&id[]=456
Current implementation use these params into uri string as text. But then dart
Uri.https()
will add extra "?"(querstion mark sign) at end. That URL breaks API and server respond with 404 error.Actual:
Added special parsing for list query params.
Changed types to support list params.
Added extra tests to check response URL.
Example:
https://stackoverflow.com/questions/69633989/dart-how-to-send-query-parameter-array-with-brackets
1.1. Checklist
fix:
,feat:
,docs:
etc).docs
and added dartdoc comments with///
.examples
.1.2. Breaking Change
1.3. Related Issues