docs(SOSO-440): write conversion policy concept#18
Merged
Conversation
Design concept for WriteConversionPolicyInterface (Strategy Pattern) that optionally converts field values to locale-specific formats before sending to AppSheet API. Key decisions: - Strategy Pattern analog to UnknownFieldPolicyInterface - Conversion AFTER validation (ensures only valid values are converted) - NoOp as default (no breaking change, explicit opt-in) - Phase 1: Date/DateTime/ChangeTimestamp - Phase 2: extensible for Percent/Price/Decimal (requires API research) Refs: #17
- Version corrected from v3.4.0 to v3.3.0 (ships with SOSO-439) - Added critical round-trip scenario documentation (find → update) - Added round-trip test cases ensuring locale-formatted dates pass through unchanged Refs: #17
… formatting Add WriteConversionPolicyInterface (Strategy Pattern) with two implementations: - NoOpWriteConversionPolicy (default, backward compatible) - LocaleWriteConversionPolicy (converts ISO dates to locale format on write) Conversion is applied AFTER validation, BEFORE sending to AppSheet API. Only add() and update() apply conversion; delete() does not. Includes 46 tests (31 unit + 15 integration), all 417 tests pass. Refs: SOSO-440, #17
Adds concept document for adding --locale support to inspect and add-table CLI commands, ensuring generated schemas include locale for locale-aware validation (SOSO-439) and write conversion (SOSO-440). Refs: #19
Replace manual --locale CLI flag with automatic locale detection from AppSheet API response data. The SchemaInspector analyzes date field values to determine separator and part order, then maps to a representative locale (de-DE, en-US, en-GB, ja-JP). Ambiguous cases (all date parts ≤ 12) default to en-US for '/' and de-DE for '.' separators. Refs: #19
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
WriteConversionPolicyInterface— optional locale-aware date formatting on write operationsUnknownFieldPolicyInterface)Key Design Decisions
getLocaleDateFormat()for conversion logicConcept Document
See
docs/SOSO-440/FEATURE_CONCEPT.mdfor full specification including:Refs: #17