Skip to content

Make it possible to return HTTP 406 when there's no match #133

@p-himik

Description

@p-himik

reitit.coercion.malli/create uses :content-types of a resource to determine which response content types are supported.

Muuntaja completely ignores that key and seemingly doesn't allow its users to configure a strict set of response content types.

E.g. I want for my API to only produce application/edn or application/transit+json. But even if I set :default-format in Muuntaja config to application/edn and restrict :formats to application/edn, a client will get EDN instead of HTTP 406 even when it specifies that it can't handle anything but e.g. application/json by using the Accept header.

An additional point worth considering is that different API endpoints might have different available content types.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions