redoc icon indicating copy to clipboard operation
redoc copied to clipboard

Redocly mangles some property names

Open DASPRiD opened this issue 1 year ago • 1 comments

Describe the bug In some cases it seems like Redocly mangles property names for no apparent reason. In the following OpenAPI spec, the property expiresIn gets displayed as expirese.

Expected behavior Redocly should not mangle property names.

Minimal reproducible OpenAPI snippet(if possible)

openapi: 3.1.0
info:
  title: Test API
  version: 1.0.0
paths:
  /test:
    get:
      responses:
        "200":
          content:
            application/json:
              schema:
                type: object
                properties:
                  expiresIn:
                    type: integer

Screenshots image

DASPRiD avatar May 16 '24 17:05 DASPRiD

I tracked this down a little bit further, and it seems like the correct name makes it all the way down to React in components/Fields/Field.tsx. So I assume this might be a React bug.

I see that Redocly is stuck on React 17.0.2. Since that is the latest release of that major version, and if this is actually not some configuration issue in Redocly's usage of React, the only way to fix this issue would be to upgrade the React dependency.

Just FYI, the name shows up correctly through the title attribute of the cell, but the name gets mangled as a text node of the span in React's createElement() somehow.

DASPRiD avatar May 17 '24 00:05 DASPRiD

Hi @DASPRiD, I tried to test it, and cannot reproduce it. I have correct field name expiresIn. Screenshot 2024-05-23 at 12 27 41

Please, provide additional information about reproducing it and we'll try to help you.

AlexVarchuk avatar May 23 '24 10:05 AlexVarchuk

Oh, I just figured out that one of my browser extensions was at fault, sorry for the noise, closing.

In case anyone else stumbles upon this, this is the extension in question: https://addons.mozilla.org/en-US/firefox/addon/binnen-i-be-gone/

DASPRiD avatar May 23 '24 10:05 DASPRiD