Skip to content

Conversation

tengfeisky
Copy link

Description

This PR fixes #1122

Summary

This PR adds support for configuring security schemes in the generated OpenAPI specification.

PR Checklist

Please ensure that:

  • The PR contains a descriptive title
  • The PR contains a descriptive summary of the changes
  • You build and test your changes before submitting a PR.
  • You have added relevant documentation
  • You have added relevant tests. We prefer integration tests wherever possible

Pre-Commit Instructions:

Copy link

vercel bot commented Jul 15, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
robyn ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 15, 2025 3:09pm

Copy link

recurseml bot commented Jul 15, 2025

✨ No issues found! Your code is sparkling clean! ✨

Need help? Join our Discord for support!
https://discord.gg/qEjHQk64Z9

Copy link

codspeed-hq bot commented Jul 16, 2025

CodSpeed Performance Report

Merging #1211 will not alter performance

Comparing tengfeisky:feat/add-security-scheme-config-to-openapi (39f330a) with main (d8339a7)

Summary

✅ 150 untouched benchmarks

"security": [],
}

def add_global_security_scheme(self, name: str, scheme: dict):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

where will this be called?

Comment on lines +269 to +272
if self.authentication_handler:
# self.authentication_handler.token_getter
self.openapi.add_global_security_scheme(name="bearerAuth", scheme={"type": "http", "scheme": "bearer"})

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and what would be the other kinds of auth here?

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

Successfully merging this pull request may close these issues.

Swagger UI doesn't have Autherize content

2 participants