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

security and securitySchemes do not recognize apiKey or httpApiKey types #914

Closed
nicolasmohamed opened this issue Jan 3, 2024 · 4 comments
Labels

Comments

@nicolasmohamed
Copy link

nicolasmohamed commented Jan 3, 2024

Describe the bug

If type field equals to apiKey, AsyncAPI Studio shows the following error:

"type" property must be equal to one of the allowed values: "userPassword", "X509", "http", "httpApiKey", "oauth2", "openIdConnect". Did you mean "httpApiKey"?

If type field equals to httpApiKey, AsyncAPI Studio shows the following error:

"type" property must be equal to one of the allowed values: "userPassword", "apiKey", "http", "oauth2", "openIdConnect". Did you mean "apiKey"?

How to Reproduce

securitySchemes:
    EventGridDomainKey:
      type: apiKey

securitySchemes:
    EventGridDomainKey:
      type: httpApiKey

same for:

security:
  - type: apiKey

Expected behavior

AsyncAPI Studio should render correctly as apiKey and httpApiKey are both valid types.

Thanks!!

@nicolasmohamed nicolasmohamed added the bug Something isn't working label Jan 3, 2024
Copy link

github-actions bot commented Jan 3, 2024

Welcome to AsyncAPI. Thanks a lot for reporting your first issue. Please check out our contributors guide and the instructions about a basic recommended setup useful for opening a pull request.
Keep in mind there are also other channels you can use to interact with AsyncAPI community. For more details check out this issue.

@Amzani
Copy link
Collaborator

Amzani commented Jan 10, 2024

@nicolasmohamed some properties are missing in your security definition:

For apikey for instance:

token:
      type: apiKey
      description: test
      in: user

You can check the doc

@Amzani Amzani closed this as completed Feb 16, 2024
@github-project-automation github-project-automation bot moved this from Backlog to Done in Studio - Kanban Feb 16, 2024
@Amzani Amzani reopened this Feb 16, 2024
@github-project-automation github-project-automation bot moved this from Done to Ready in Studio - Kanban Feb 16, 2024
@Amzani Amzani added area/dx and removed bug Something isn't working labels Feb 16, 2024
@helios2003
Copy link
Contributor

helios2003 commented Feb 28, 2024

Hi @Amzani , when I tried to reproduce the issue, the problem seems to be only in httpApiKey as apiKey as a value does not show any error. Has the issue been partially fixed or am I missing something?
image
image

@Amzani
Copy link
Collaborator

Amzani commented Feb 29, 2024

It's not a bug @helios2003
I commented here #914 (comment)

@Amzani Amzani closed this as completed Feb 29, 2024
@github-project-automation github-project-automation bot moved this from Ready to Done in Studio - Kanban Feb 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Archived in project
Development

No branches or pull requests

3 participants