Skip to content

docs: use-component-split-request-setting - #6609

Closed
Zaimwa9 wants to merge 2 commits into
mainfrom
docs/use-COMPONENT-SPLIT-REQUEST-setting
Closed

docs: use-component-split-request-setting#6609
Zaimwa9 wants to merge 2 commits into
mainfrom
docs/use-COMPONENT-SPLIT-REQUEST-setting

Conversation

@Zaimwa9

@Zaimwa9 Zaimwa9 commented Jan 28, 2026

Copy link
Copy Markdown
Contributor

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

Claude Analysis

Comparison Summary

  Full API Schema
  ┌─────────────────────────────────┬────────┬────────────────────────────┬──────────────────────┐
  │             Setting             │ Lines  │     Schema Definitions     │ Change from Original │
  ├─────────────────────────────────┼────────┼────────────────────────────┼──────────────────────┤
  │ Original (no setting)           │ 24,077 │ 351                        │ -                    │
  ├─────────────────────────────────┼────────┼────────────────────────────┼──────────────────────┤
  │ COMPONENT_NO_READ_ONLY_REQUIRED │ 23,599 │ 351                        │ -478 lines           │
  ├─────────────────────────────────┼────────┼────────────────────────────┼──────────────────────┤
  │ COMPONENT_SPLIT_REQUEST         │ 25,720 │ 462 (+111 Request schemas) │ +1,643 lines         │
  └─────────────────────────────────┴────────┴────────────────────────────┴──────────────────────┘
  MCP Schema
  ┌─────────────────────────────────┬────────┐
  │             Setting             │ Lines  │
  ├─────────────────────────────────┼────────┤
  │ COMPONENT_NO_READ_ONLY_REQUIRED │ 10,178 │
  ├─────────────────────────────────┼────────┤
  │ COMPONENT_SPLIT_REQUEST         │ 12,296 │
  └─────────────────────────────────┴────────┘
  Key Differences

  COMPONENT_NO_READ_ONLY_REQUIRED:
  - Removes readOnly fields from required arrays globally
  - Same schema used for request and response
  - Simpler, smaller schema
  - ReadOnly fields still present in schema, just not required

  COMPONENT_SPLIT_REQUEST:
  - Creates separate *Request schemas (196 new schemas)
  - Request schemas exclude readOnly fields entirely
  - Response schemas remain unchanged (still have readOnly in required)
  - Larger schema size
  - More explicit separation of request/response contracts

  Example: ListFeature

  With COMPONENT_SPLIT_REQUEST:
  ListFeature:           # Response - has readOnly fields in required
    required: [id, uuid, created_date, owners, project, ...]

  ListFeatureRequest:    # Request - only writable fields
    required: [name]

  With COMPONENT_NO_READ_ONLY_REQUIRED:
  ListFeature:           # Same schema for both
    required: [name]     # ReadOnly fields removed from required

How did you test this code?

Please describe.

@Zaimwa9
Zaimwa9 requested a review from a team as a code owner January 28, 2026 16:36
@Zaimwa9
Zaimwa9 requested review from khvn26 and removed request for a team January 28, 2026 16:36
@vercel

vercel Bot commented Jan 28, 2026

Copy link
Copy Markdown

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

3 Skipped Deployments
Project Deployment Review Updated (UTC)
docs Ignored Ignored Jan 28, 2026 4:36pm
flagsmith-frontend-preview Ignored Ignored Jan 28, 2026 4:36pm
flagsmith-frontend-staging Ignored Ignored Jan 28, 2026 4:36pm

Request Review

@github-actions github-actions Bot added the api Issue related to the REST API label Jan 28, 2026
@Zaimwa9 Zaimwa9 changed the title Docs/use component split request setting docs: use-component-split-request-setting Jan 28, 2026
@github-actions

github-actions Bot commented Jan 28, 2026

Copy link
Copy Markdown
Contributor

Docker builds report

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

@codecov

codecov Bot commented Jan 28, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.18%. Comparing base (3e6345b) to head (49e3b6c).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #6609   +/-   ##
=======================================
  Coverage   98.18%   98.18%           
=======================================
  Files        1295     1295           
  Lines       46920    46923    +3     
=======================================
+ Hits        46067    46070    +3     
  Misses        853      853           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Zaimwa9

Zaimwa9 commented Jan 28, 2026

Copy link
Copy Markdown
Contributor Author

Closing in favor of #6608

@Zaimwa9 Zaimwa9 closed this Jan 28, 2026
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.

1 participant