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

Minimal utoipa example with file upload #85

Merged
merged 4 commits into from
Oct 13, 2024

Conversation

mattdavis90
Copy link
Contributor

As per #82 I've added a minimal example of using axum_typed_multipart with utoipa

The example is self-contained and I included a Cargo.toml because it requires additional dependencies. I haven't included a README as the code is hopefully reasonably easy to follow. On starting the web server a rapidoc user interface will describe the API endpoint and present a sample form that can be filled.

Thanks

Copy link

codecov bot commented Oct 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.49%. Comparing base (191e72e) to head (fbc9d43).
Report is 4 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #85   +/-   ##
=======================================
  Coverage   96.49%   96.49%           
=======================================
  Files          11       11           
  Lines         371      371           
=======================================
  Hits          358      358           
  Misses         13       13           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Owner

@murar8 murar8 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @mattdavis90, thanks for the contribution! Maybe we could briefly mention this example in src/lib.rs? So users know it exists.

@murar8
Copy link
Owner

murar8 commented Oct 13, 2024

I also see the CI lint failing so I would suggest you install the pre-commit hooks to make your life easier.
EDIT: Nevermind I think the action is broken, no worries will get it fixed.

@mattdavis90
Copy link
Contributor Author

I went back and fixed the git commit message to be semantic and I've run through pre-commit - I totally missed that in the repo.

I've added documentation - hopefully it reads ok and is somewhat in keeping with what you already had. Thanks

Copy link
Owner

@murar8 murar8 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, just left a small comment :)

src/lib.rs Outdated Show resolved Hide resolved
@mattdavis90
Copy link
Contributor Author

I've updated the docs to be a link and I think I fixed the issues with the conflicting versions of futures-core

@murar8
Copy link
Owner

murar8 commented Oct 13, 2024

I've updated the docs to be a link and I think I fixed the issues with the conflicting versions of futures-core

If you want you could also put whatever extra dep in dev-dependencies in the root Cargo.toml instead of using an extra manifest, maybe it will fix the issue?

@mattdavis90
Copy link
Contributor Author

I wasn't sure if it was reasonable to make devs install all dependencies for examples. Happy to go with your preference :)

@murar8
Copy link
Owner

murar8 commented Oct 13, 2024

Never mind @mattdavis90 the problem is independent of your PR, will get it fixed.

@murar8 murar8 merged commit aeec275 into murar8:main Oct 13, 2024
12 checks passed
@murar8 murar8 linked an issue Oct 13, 2024 that may be closed by this pull request
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.

Example: Usage with Utoipa
2 participants