Skip to content

Capitalized header shows up twice in generated docs #197

@JemarJones

Description

@JemarJones

Before you submit an issue we recommend you drop into the Gitter community or Fastify Help and ask any questions you have or mention any problems you've had getting started with Fastify.

Please read this entire template before posting any issue. If you ignore these instructions
and post an issue here that does not follow the instructions, your issue might be closed,
locked, and assigned the missing discussion label.

🐛 Bug Report

When specifying a capitalized header in the schema of a request, the key shows up twice in the generated docs. Once with the capitalization, and once lowercased.

To Reproduce

Steps to reproduce the behavior:

Paste your code here:

// JsonSchema for my post request
 {
  headers: {
    type: 'object',
    required: ['Authorization'],
    properties: {
      // Fastify lowercases all headers https://github.com/fastify/help/issues/71
      Authorization: { type: 'string' }
    }
  }
 // ...etc
}

image

Expected behavior

The header should only show up once. With the capitalization that is specified.

Paste the results here:

image

Your Environment

  • node version: v10.14.2
  • fastify version: >= 2.4.1
  • os: MacOS 10.14.6

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