-
Notifications
You must be signed in to change notification settings - Fork 467
[WIP - not draft] feat: synchronize-openapi-schema-with-gram #6499
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
base: main
Are you sure you want to change the base?
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. 3 Skipped Deployments
|
for more information, see https://pre-commit.ci
Docker builds report
|
…m:Flagsmith/flagsmith into feat/synchronize-openapi-schema-with-gram
|
Adding a push to gram CI step - testing it with |
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR is being reviewed by Cursor Bugbot
Details
Your team is on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle for each member of your team.
To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.
|
|
||
| # Then | ||
| assert "ApiKey" in updated["components"]["securitySchemes"] | ||
| assert updated["security"] == [{"ApiKey": []}] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Test assertions use wrong security scheme name
Medium Severity
The test assertions expect the security scheme to be named ApiKey, but the _update_security_for_mcp implementation in api/api/openapi.py uses TOKEN_AUTH as the security scheme name. This mismatch will cause test_mcp_update_security_for_mcp__sets_api_key_security_scheme and test_mcp_get_schema__filters_and_transforms to fail when run.
Additional Locations (1)
| generator_class = view.get_generator_class() | ||
|
|
||
| # Then | ||
| assert generator_class is MCPSchemaGenerator |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tests don't invoke the generator selection logic
Medium Severity
The tests call view.get_generator_class() expecting it to return different generators based on query_params, but the CustomSpectacularJSONAPIView and CustomSpectacularYAMLAPIView implementations set self.generator_class inside the get() method, not in a get_generator_class() method. Since the tests never call get(), the query parameter logic that selects the appropriate generator class is never executed. These tests will either fail with an AttributeError if the method doesn't exist, or return incorrect values because the selection logic was never triggered.
Additional Locations (1)
| list=extend_schema( | ||
| tags=["mcp"], | ||
| extensions={ | ||
| "x-mcp-name": "list_organization_groups", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Try with Gram own extension. Ask the guys
Thanks for submitting a PR! Please check the boxes below:
docs/if required so people know about the feature.Changes
Contributes to
Please describe.
How did you test this code?
Please describe.