Skip to content

JSON formatting for application/vnd.api+json does not work #382

@mtift

Description

@mtift

If I include the following in my .http file, I get formatted results:

GET https://jsonplaceholder.typicode.com/posts/3

This suggests to me that I have everything installed correctly, including jq for formatting. But if I include the following config (based on #143 (comment)):

      local ok, rest = pcall(require, "rest-nvim")
      if not ok then
        return
      end

      rest.setup {
        result = {
          behavior = {
            formatters = {
              json = "jq",
              vnd = "jq",
            },
          },
        },
      }

And query a JSON:API (from a Drupal site), then I get the following warning before the results come back unformatted:

[rest.nvim] INFO: Could not find a formatter for the body type vnd.api+json returned in the request, the results will not be formatted

Any idea what I'm doing wrong?

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