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

Swagger Editor incorrectly makes auth schemes OR instead of AND #3414

Open
johnament opened this issue Aug 30, 2022 · 0 comments
Open

Swagger Editor incorrectly makes auth schemes OR instead of AND #3414

johnament opened this issue Aug 30, 2022 · 0 comments

Comments

@johnament
Copy link

Q&A (please complete the following information)

  • OS: macOS
  • Browser: chrome
  • Version: editor.swagger.io
  • Method of installation: browser
  • Swagger-Editor version: latest
  • Swagger/OpenAPI version: OpenAPI 3.0.1

Content & configuration

In our API, we require both an auth header and a custom header. As a result, I've made the following API spec which represents that part. However, when using the editor, I noticed that the prompts for authorization act like an either/or where the spec says it should be an AND: https://swagger.io/docs/specification/authentication/api-keys/

Example Swagger/OpenAPI definition:

components:
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: Api-Key
    authHeader:
      type: apiKey
      in: header
      name: Authorization

security:
  - apiKey: []
    authHeader: []

Describe the bug you're encountering

In our API, we require both an auth header and a custom header. As a result, I've made the following API spec which represents that part. However, when using the editor, I noticed that the prompts for authorization act like an either/or where the spec says it should be an AND: https://swagger.io/docs/specification/authentication/api-keys/

To reproduce...

Steps to reproduce the behavior:

  1. Go to editor, add this config in
  2. Click on 'Authorize'
  3. See that the two fields are displayed with buttons below each
  4. Expected: the two fields appear together and there is a single Authorize button.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant