Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
bk201- opened this issue Mar 25, 2024 · 0 comments
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed

Comments

@bk201-
Copy link

bk201- commented Mar 25, 2024

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

@erunion erunion added bug Something isn't working help wanted Extra attention is needed good first issue Good for newcomers labels Mar 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants