-
Notifications
You must be signed in to change notification settings - Fork 1
include all fields by default #82
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: fix_username/password_auth
Are you sure you want to change the base?
include all fields by default #82
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
@proofkit/better-auth
@proofkit/cli
create-proofkit
@proofkit/fmdapi
@proofkit/fmodata
@proofkit/typegen
@proofkit/webviewer
commit: |
6a2c2bf to
edecb0a
Compare
…lFieldsByDefault logic
| allTablesConfig, | ||
| setValue, | ||
| fieldsData, | ||
| topLevelIncludeAllFieldsByDefault, |
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.
excludeAllFields not updated for new include-by-default setting
The includeAllFields function was updated to conditionally handle the effectiveIncludeAllFieldsByDefault setting with two branches of logic (one for true, one for false), but the excludeAllFields function was not similarly updated. When includeAllFieldsByDefault is false, fields not in the config array are already excluded by default, so the correct "exclude all" behavior would be to clear the fields array. Instead, excludeAllFields always adds every field with exclude: true, creating redundant config entries. Additionally, the dependency array is missing topLevelIncludeAllFieldsByDefault.
| const fieldConfig = Array.isArray(fieldsConfig) | ||
| ? fieldsConfig.find((f) => f?.fieldName === fieldName) | ||
| : undefined; | ||
| const isExcluded = fieldConfig?.exclude === true; |
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.
setFieldTypeOverride doesn't preserve field when clearing override
The setFieldTypeOverride function wasn't updated to account for includeAllFieldsByDefault. When removing a typeOverride and only fieldName remains, the code removes the entire field entry (lines 466-496). However, when includeAllFieldsByDefault is false, removing the field entry causes the field to become excluded, since fields not in the config array are excluded by default. This means clearing a type override unintentionally excludes the field. The function needs to preserve the field entry when includeAllFieldsByDefault is false, and its dependency array is also missing topLevelIncludeAllFieldsByDefault.

Note
Introduce
includeAllFieldsByDefault(top-level and per-table) to control field inclusion for OData generation and expose it across the UI and generator.includeAllFieldsByDefaulttofmodatatop-level and per-table schemas inpackages/typegen/src/types.ts.generateODataTypesandgenerateTableOccurrencehonorincludeAllFieldsByDefault(table override > top-level; defaulttrue) to filter generated fields based on explicitfieldswhen false.App.tsxfor new OData configs.ConfigEditor, add switch for top-levelincludeAllFieldsByDefault.MetadataFieldsDialog:includeAllFieldsByDefaultfor per-field include/exclude logic, counts, and bulk actions; add per-table override select.fields/table entries safely.MetadataTablesEditor, compute included field counts based on effective setting and displayincluded/totalwhen applicable.Written by Cursor Bugbot for commit c8be2f8. This will update automatically on new commits. Configure here.