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

Upgrade dependencies, most important to utoipa 5, dropping a bunch of workarounds #947

Merged
merged 10 commits into from
Oct 31, 2024

Conversation

ctron
Copy link
Contributor

@ctron ctron commented Oct 30, 2024

This updates a few dependencies. Most notably to utoipa 5, which now supports nesting of specs, and generic type arguments. Allowing us to drop some workarounds we had in place. It also auto-collects schemas now.

@ctron
Copy link
Contributor Author

ctron commented Oct 30, 2024

@chirino @carlosthe19916 not sure this has an impact in the UI side of things.

@carlosthe19916
Copy link
Member

I can see the openapi.yaml will change a bit. I don't see too many changes though (it is something I can manage). I think it should not be a blocker for the UI. So those changes should be fine

common/auth/src/swagger_ui.rs Show resolved Hide resolved
modules/fundamental/src/advisory/endpoints/mod.rs Outdated Show resolved Hide resolved
modules/fundamental/src/sbom/endpoints/mod.rs Show resolved Hide resolved
modules/analysis/src/endpoints.rs Show resolved Hide resolved
modules/analysis/src/endpoints.rs Outdated Show resolved Hide resolved
By leveraging utoipa_actix_web, this change removes the hand-crafted
collection of openapi operations, and let utoipa collect this during
the creation of the actix web `App`. This results in the actual spec,
and removes the need to keep this aligned with the `openapi` functions
we had.

The downside is, that the `xtask` now needs to construct a full `App`
instance. Which isn't a big deal, but requires an embedded database
to the instantiated. However, we do this for running tests too.

This also already fixed an missing operation.
@ctron
Copy link
Contributor Author

ctron commented Oct 30, 2024

@jcrossley3 I'll work through the comments. In the meantime, I pushed some more changes. Which gets rid of the manually collected openapi spec altogether and uses the actually registered handlers to construct it.

@ctron ctron added this pull request to the merge queue Oct 31, 2024
Merged via the queue into trustification:main with commit ab103bd Oct 31, 2024
2 checks passed
@ctron ctron deleted the feature/update_deps_5 branch October 31, 2024 07:22
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.

3 participants