Skip to content

fix: Correctly add the ApiRouter to the HTTP service's ApiRouter#273

Merged
spencewenski merged 1 commit into
mainfrom
fix-openapi-registration
Jul 7, 2024
Merged

fix: Correctly add the ApiRouter to the HTTP service's ApiRouter#273
spencewenski merged 1 commit into
mainfrom
fix-openapi-registration

Conversation

@spencewenski

Copy link
Copy Markdown
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`.
@codecov

codecov Bot commented Jul 7, 2024

Copy link
Copy Markdown

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
@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