rcotter / dotnet-webapi-custom-mimetypes

A .Net WebAPI example using accepting and producting custom vnd mime types

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

dotnet-webapi-custom-mimetypes

A .Net WebAPI example that accepts and produces custom vendor mime types as a means of versioning or specializing views on a resource aka the Re (representation) in ReST. Swagger documentation is included.

Happily, JSON serialization is automatically detected for an Accept mime type like application/vnd.custom+json;version=1.

dynamic parameters may at times be required on POST/PUT/PATCH thus requiring manual deserialization. It is a bit more work but not too bad.

The examples Swaggers presents take an enormous amount of work. Also, examples and corresponding mime types are not tied meaning it is not clear that both must match when executing test calls.

image

...but it all works ok. There are likely refinements I'm not seeing.

About

A .Net WebAPI example using accepting and producting custom vnd mime types


Languages

Language:C# 100.0%