Skip to content

Formatter doesn't retrieve value correctly if value name in schema has capital letters #849

Open
@bk201-

Description

In the schema, there is a header value with capital letters

"parameters": [
          {
            "name": "X-Customer-Code",
            "in": "header",
            "description": "Company Profile ID, it can be found on JetBrains Account portal near the company name",
            "schema": {
              "type": "string"
            }
          }
        ]

However, api/core transforms all headers to lowercase: https://github.com/readmeio/api/blob/cc5ee91b1d4d550c0c014875c74c5403762e42c8/packages/core/src/lib/prepareParams.ts#L367

Therefore formatted can't retrieve this field from data here:

if (typeof values[type][param.name] !== 'undefined') {

This issue also exist in [email protected] package

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggood first issueGood for newcomershelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions