elements icon indicating copy to clipboard operation
elements copied to clipboard

Authorization panel not displayed in TryIt when usng an OpenApi 3.0 spec document.

Open NavidMitchell opened this issue 2 years ago • 2 comments

When using the Element UI web component. I do not get the authorization panel when using a OpenAPI version 3.0 document. My authorization is set to basic auth which looks like it supported by the code. However, it looks like the code is expecting the spec to be in a different format than what is available from the OpenAPI spec version 3.

Context

My users cannot use the try it feature since they cannot provide authentication information.

Expected Behavior

The Try It view should show the Authorization panel.

Steps to Reproduce

Using the attached OpenAPI spec configure the web component like so.

<elements-api
        id="elementsApi"
        apiDescriptionUrl="openapi.json"
        router="hash"
        tryItCredentialPolicy="include"
></elements-api>

File was renamed to .txt so it would be allowed by github. You will need to rename to .json. openapi.txt

NavidMitchell avatar Mar 25 '23 00:03 NavidMitchell

I have the same problem, have you found a workaround for this bug?

(my openapi.json is automatically generated and I have no choice but to use openapi 3.0.0.)

samihanine avatar Nov 28 '23 06:11 samihanine

I have the same problem, have you found a workaround for this bug?

(my openapi.json is automatically generated and I have no choice but to use openapi 3.0.0.)

I have not. I looked into fixing the code and submitting a patch. But I have not had time. At this point I have been thinking about switching to https://github.com/Redocly/redoc

NavidMitchell avatar Nov 28 '23 09:11 NavidMitchell