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: Correctly add the ApiRouter to the HTTP service's ApiRouter #273

Merged
merged 1 commit into from
Jul 7, 2024

Conversation

spencewenski
Copy link
Member

The HttpServiceBuilder#api_router method is incorrectly adding the provided ApiRouter to the normal axum Router. This means the routes defined in the provided ApiRouter will not show up in the generated OpenAPI schema.

Fix the method to correctly merge the provided ApiRouter with the HttpServiceBuilder's ApiRouter.

The `HttpServiceBuilder#api_router` method is incorrectly adding the
provided `ApiRouter` to the normal axum `Router`. This means the routes
defined in the provided `ApiRouter` will not show up in the generated
OpenAPI schema.

Fix the method to correctly merge the provided `ApiRouter` with the
`HttpServiceBuilder`'s `ApiRouter`.
Copy link

codecov bot commented Jul 7, 2024

Codecov Report

Attention: Patch coverage is 0% with 1 line in your changes missing coverage. Please review.

Project coverage is 43.98%. Comparing base (e3ce636) to head (31f662d).

Files Coverage Δ
src/service/http/builder.rs 25.45% <0.00%> (ø)

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e3ce636...31f662d. Read the comment docs.

@spencewenski spencewenski merged commit 0f22c35 into main Jul 7, 2024
14 of 15 checks passed
@spencewenski spencewenski deleted the fix-openapi-registration branch July 7, 2024 19:37
@github-actions github-actions bot mentioned this pull request Jul 7, 2024
spencewenski pushed a commit that referenced this pull request Jul 7, 2024
## 🤖 New release
* `roadster`: 0.5.3 -> 0.5.4

<details><summary><i><b>Changelog</b></i></summary><p>

<blockquote>

##
[0.5.4](roadster-v0.5.3...roadster-v0.5.4)
- 2024-07-07

### Added
- Add method to prepare the app separately from running it
([#270](#270))

### Fixed
- Correctly add the `ApiRouter` to the HTTP service's `ApiRouter`
([#273](#273))

### Other
- Fixes for default openapi docs
([#271](#271))
</blockquote>


</p></details>

---
This PR was generated with
[release-plz](https://github.com/MarcoIeni/release-plz/).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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.

1 participant