Nswag: AspNet core 2.2 sample multipart/formdata, application/www-form-url-encoded => 415 Unsupported Media Type

Created on 13 Dec 2018  路  4Comments  路  Source: RicoSuter/NSwag

When testing the asp net core 2.2 pet store example I noticed that the examples that consume multipart/formdata and application/www-form-url-encoded don't work. The server returns 415 Unsupported Media Type. This is for both documents (swagger and openapi).

The example does work in AspNet core 2.1

Is this still something that needs work? Or is the sample not updated?
Thanks

done enhancement

Most helpful comment

This is a known "bug" in .Net Core 2.2. It's been fixed in 3.0

.Net Core GitHub issue

All 4 comments

This is a known "bug" in .Net Core 2.2. It's been fixed in 3.0

.Net Core GitHub issue

So this is an ASP.NET Core issue and can be "fixed" with the proposed solution?

Yeah it鈥檚 a Asp.Net Core issue.
I think we need to wait and see what MS decides about fixing it in a 2.2.x service release.

Did anyone ever figure out the reason for this? Did any of you do your initial migration, and check your model types? When i've gotten that in the past it's been due to an incompatible data type with the version or some invalid media type, same for Laravel 5.7 with the whole json/text type migration.
I think i've got it patched.

Was this page helpful?
0 / 5 - 0 ratings