Skip to content

allow media types to be registered with an application, rather than globally #1

@nicobrevin

Description

@nicobrevin

At the moment you can add new media types by registering them with Doze::MediaType.register, but it would be nice if you could override this set on a per doze application basis, i.e.

Doze::Application.new(resource_root, {
  :media_types => :defaults # takes all media types known to `Doze::MediaType`
})
# vs
Doze::Application.new(resource_root, {
  :media_types => ['application/json', 'application/xml'] # looks these up from Doze::MediaType
})
# vs
Doze::Application.new(resource_root, {
  :media_types => [Doze::MediaType::JSON, Doze::MediaType::HTML] # by class
})

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions