Add GET /organizations/:orgId/feature-flags support#391
Conversation
There was a problem hiding this comment.
Greptile Summary
This PR adds support for the GET /organizations/:orgId/feature-flags API endpoint to the WorkOS Ruby SDK. The implementation introduces a new FeatureFlag model class with standard attributes (id, name, slug, description, created_at, updated_at) and a list_organization_feature_flags method in the Organizations module. The changes follow established patterns in the codebase by creating a lightweight model wrapper that includes HashProvider for consistent JSON conversion, implementing the API method using the same request/response handling as other list operations like list_organization_roles, and returning a ListStruct for consistency with other list-based endpoints. The new functionality allows developers to programmatically retrieve feature flags configured for specific organizations through the WorkOS dashboard, extending the SDK's capabilities to include feature flag management alongside existing organization-scoped resources.
Confidence score: 3/5
- This PR has some implementation issues that should be addressed before merging, including test data mismatches and potential JSON parsing errors
- Score reflects concerns about hardcoded metadata values, test expectations not matching VCR data, and lack of input validation in the FeatureFlag class
- Pay close attention to
spec/lib/workos/organizations_spec.rbandlib/workos/feature_flag.rbfor the test data mismatch and JSON parsing robustness issues
5 files reviewed, no comments
89a15b6 to
3e44bf9
Compare
3e44bf9 to
f2d0851
Compare
Description
Add GET /organizations/:orgId/feature-flags support
Documentation
Does this require changes to the WorkOS Docs? E.g. the API Reference or code snippets need updates.
If yes, link a related docs PR and add a docs maintainer as a reviewer. Their approval is required.