RapiDoc icon indicating copy to clipboard operation
RapiDoc copied to clipboard

TypeError: Failed to execute 'append' on 'Headers': Invalid name

Open bjornharvold opened this issue 3 years ago β€’ 4 comments

Hi Team RapiDoc!

Thank you for an absolutely awesome Web Component that makes me look like a pro πŸ¦Έβ€β™‚οΈ

Having an issue with applying basic auth header. I looked at your test site with auth examples. Our config is identical IMHO.

I enter valid credentials that work fine when applied in Postman.

The error occurs when clicking the "Try" button.

Uncaught (in promise) TypeError: Failed to execute 'append' on 'Headers': Invalid name
    at api-request.js:1116:1
    at Array.forEach (<anonymous>)
    at ne.onTryClick (api-request.js:1116:1)
    at Z.handleEvent (rapidoc-min.js:2:14067)

Please let me know if this is an issue or if my config is incorrect. Guessing the latter πŸ™

openapi-spec.json.zip

bjornharvold avatar Oct 15 '22 11:10 bjornharvold

I have the same problem. Did you reach any conclusion maybe?

ramiel avatar Mar 04 '24 11:03 ramiel

Actually I did. It's important to not specify a name property in the security scheme

ramiel avatar Mar 04 '24 11:03 ramiel

Hi @ramiel

Good detective work πŸ¦Έβ€β™‚οΈ My spec is auto generated. Is not specifying a name working for you and what are the side-effects of not having a name there for other tools do you think?

🍺🍿

bjornharvold avatar Mar 05 '24 04:03 bjornharvold

No important side effect. The name was shown in the interface but also used for the header. To have a proper interface you can use the description field

ramiel avatar Mar 05 '24 09:03 ramiel