Skip to content

Conversation

@Zaimwa9
Copy link
Contributor

@Zaimwa9 Zaimwa9 commented Jan 8, 2026

Thanks for submitting a PR! Please check the boxes below:

  • I have read the Contributing Guide.
  • I have added information to docs/ if required so people know about the feature.
  • I have filled in the "Changes" section below.
  • I have filled in the "How did you test this code" section below.

Changes

Contributes to

Please describe.

How did you test this code?

Please describe.

@Zaimwa9 Zaimwa9 requested review from a team as code owners January 8, 2026 16:54
@Zaimwa9 Zaimwa9 requested review from khvn26 and removed request for a team January 8, 2026 16:54
@vercel
Copy link

vercel bot commented Jan 8, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

3 Skipped Deployments
Project Deployment Review Updated (UTC)
docs Ignored Ignored Preview Jan 12, 2026 10:17am
flagsmith-frontend-preview Ignored Ignored Preview Jan 12, 2026 10:17am
flagsmith-frontend-staging Ignored Ignored Preview Jan 12, 2026 10:17am

@Zaimwa9 Zaimwa9 removed the request for review from khvn26 January 8, 2026 16:54
@github-actions github-actions bot added the api Issue related to the REST API label Jan 8, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Jan 8, 2026

Docker builds report

Image Build Status Security report
ghcr.io/flagsmith/flagsmith-e2e:pr-6499 Finished ✅ Skipped
ghcr.io/flagsmith/flagsmith-api-test:pr-6499 Finished ✅ Skipped
ghcr.io/flagsmith/flagsmith:pr-6499 Finished ✅ Results
ghcr.io/flagsmith/flagsmith-api:pr-6499 Finished ✅ Results
ghcr.io/flagsmith/flagsmith-private-cloud:pr-6499 Finished ✅ Results
ghcr.io/flagsmith/flagsmith-frontend:pr-6499 Finished ✅ Results

…m:Flagsmith/flagsmith into feat/synchronize-openapi-schema-with-gram
@Zaimwa9
Copy link
Contributor Author

Zaimwa9 commented Jan 9, 2026

Adding a push to gram CI step - testing it with platform-pull-request

Zaimwa9 and others added 3 commits January 9, 2026 10:59
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Copy link

@cursor cursor bot left a 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": []}]
Copy link

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)

Fix in Cursor Fix in Web

generator_class = view.get_generator_class()

# Then
assert generator_class is MCPSchemaGenerator
Copy link

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)

Fix in Cursor Fix in Web

list=extend_schema(
tags=["mcp"],
extensions={
"x-mcp-name": "list_organization_groups",
Copy link
Contributor Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api Issue related to the REST API

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants