-
-
Notifications
You must be signed in to change notification settings - Fork 0
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
Download file endpoint #235
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 14 of 14 files at r1, all commit messages.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @johnml1135)
src/Serval.ApiServer/Startup.cs
line 119 at r1 (raw file):
foreach (Version version in versions) { services.AddSwaggerGen(o =>
I don't think this is necessary. I tried removing it and the generated client still looks correct.
src/Serval.DataFiles/Controllers/DataFilesController.cs
line 149 at r1 (raw file):
/// <response code="503">A necessary service is currently unavailable. Check `/health` for more details. </response> [Authorize(Scopes.ReadFiles)] [HttpPost("{id}/download")]
I would prefer the endpoint {id}/contents
. Nouns are preferred for hypertext resources.
Previously, ddaspit (Damien Daspit) wrote…
I removed swashbuckle too. I don't know why it is all working now... |
Previously, ddaspit (Damien Daspit) wrote…
Done. |
Previously, johnml1135 (John Lambert) wrote…
Correction - swashbuckle is needed but no other configuration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 11 of 14 files reviewed, 2 unresolved discussions (waiting on @johnml1135)
src/Serval.ApiServer/Startup.cs
line 119 at r1 (raw file):
Previously, johnml1135 (John Lambert) wrote…
Correction - swashbuckle is needed but no other configuration.
I removed Swashbuckle and it seems to work fine without it.
Previously, ddaspit (Damien Daspit) wrote…
Rebuild and run the integration E2E tests. |
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #235 +/- ##
==========================================
+ Coverage 62.39% 62.50% +0.11%
==========================================
Files 134 134
Lines 5826 5926 +100
Branches 912 936 +24
==========================================
+ Hits 3635 3704 +69
- Misses 1803 1824 +21
- Partials 388 398 +10 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 3 of 3 files at r2, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @johnml1135)
src/Serval.ApiServer/Startup.cs
line 119 at r1 (raw file):
Previously, johnml1135 (John Lambert) wrote…
Rebuild and run the integration E2E tests.
I rebuilt and ran the integration tests. They all passed. What is failing on your end?
Previously, ddaspit (Damien Daspit) wrote…
I checked again and now all the tests are passing without Swashbuckle. I removed it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 1 of 1 files at r3, all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @johnml1135)
* because of a wierd error, we needed to add swashbuckle to handle the auto-generated client working * https://www.codeproject.com/Articles/5163485/Fighting-File-Downloads-and-Dinosaurs-with-NSwag-v * https://stackoverflow.com/questions/43844261/what-is-the-correct-way-to-download-a-file-via-the-nswag-code-generator-angular
46f5cc6
to
aaf64a4
Compare
This resolves #232.
This change is