middyjs / middy

🛵 The stylish Node.js middleware engine for AWS Lambda 🛵

Home Page:https://middy.js.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

http-response-serializer documentation incorrect

karmaniverous opened this issue · comments

Describe the bug

The http-response-serializer documentation page Content Type Negotiation section is incorrect.

Additional context

This section states:

The content type is determined in the following order:

  • context.requiredContentType -- allows the handler to override everything else
  • The Accept header via accept
  • context.preferredContentType -- allows the handler to override the default, but lets the request ask first
  • defaultContentType middleware configuration

If you look at the code, the context properties listed above are actually event properties.

Thanks for reporting! I see the issue. I should be able to put together an update before the end of the week.