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

Allow Security Field for Schema to be optional #6537

Merged
merged 8 commits into from
Jan 9, 2024
Merged

Conversation

jysheng123
Copy link
Contributor

@jysheng123 jysheng123 commented Jan 8, 2024

Which issue(s) does this change fix?

#6428

Why is this change necessary?

As per the open API document here https://swagger.io/specification/, users are allowed to specify if they want their endpoint to be security optional, this is done by passing security in the spec as security: [{}], however previously, this was treated as an error and raises an exception when it should be treated as no authorizer being passed in.

How does it address the issue?

Checks the edge case and does not raise error when it occurs.

What side effects does this change have?

Mandatory Checklist

PRs will only be reviewed after checklist is complete

  • Add input/output type hints to new functions/methods
  • Write design document if needed (Do I need to write a design document?)
  • Write/update unit tests
  • Write/update integration tests
  • Write/update functional tests if needed
  • make pr passes
  • make update-reproducible-reqs if dependencies were changed
  • Write documentation

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@jysheng123 jysheng123 requested a review from a team as a code owner January 8, 2024 18:22
@jysheng123 jysheng123 requested review from bentvelj and hnnasit January 8, 2024 18:22
@jysheng123 jysheng123 changed the title Openapi security Allow Security Field for open api schema to be optional Jan 8, 2024
@jysheng123 jysheng123 changed the title Allow Security Field for open api schema to be optional Allow Security Field for Schema to be optional Jan 8, 2024
@ramosbugs
Copy link
Contributor

thank you for fixing this!

@jysheng123 jysheng123 added this pull request to the merge queue Jan 9, 2024
Merged via the queue into develop with commit 5e44da8 Jan 9, 2024
55 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants