feat(schema): add input can be optional on model configuration#1
Merged
feat(schema): add input can be optional on model configuration#1
Conversation
…ntries
- Add junctionColumns optional field to RelationshipConfig interface
- Set junctionColumns: { is_optional: isOptional } on modelconfigurations.hasInput
- Set junctionColumns: { is_optional: isOptional } on modelconfigurationsetups.hasInput
- Set junctionColumns: { is_optional: isOptional } on configurationsetups.hasInput alias
…d request CREATE paths
- field-maps.ts: add is_optional at junction row level (sibling of input {})
- service.ts: spread junctionColumns onto junction rows in PUT delete-then-insert path
- request.ts: spread junctionColumns onto outer junction row in buildJunctionInserts CREATE path
…s_optional (D-21, D-22) - Test 10: isOptional=true flows to is_optional on outer junction row (D-21) - Test 11: absent isOptional produces no is_optional key on junction row (D-22) - Fix: exclude junctionColumns camelCase keys from nested entity data copy loop to prevent isOptional leaking into the nested dataset_specification insert
…ema in openapi.yaml - Declare isOptional as nullable boolean on DatasetSpecification - Field represents junction-row metadata surfaced on hasInput items
…es build CI was hardcoded to refs/heads/main, so branches like gsd/phase-12-is-optional never produced a docker image. Mirrors the ui repo fix (e0547dd): - branches: '**' so slashed feature branches trigger - build-and-push fires on any push event - SAFE_BRANCH replaces '/' with '-' (Docker tag spec forbids '/') - :latest gated to a separate post-build retag job that only fires on main
GET /modelconfigurations/{id} dropped is_optional from hasInput[] because
transformRow's junction traversal pivoted into the nested target entity
(DSpec) and discarded outer junction-row scalars. Hoist any column listed
in relConfig.junctionColumns onto the transformed entity (array-wrapped
per v1.8.0 contract) so writes round-trip through GET.
…mapper Junction column values like is_optional (bool) were wrapped in a single-element array, mirroring v1.8.0's array-wrapped object property convention. That convention is for relationship/object fields, not for plain junction scalars. The wrap broke the UI: !![false] is true (any array is truthy), so the isOptional checkbox flipped to checked on every refresh regardless of the DB value. Emit junction column hoist as scalar so the SDK FromJSONTyped patch copies it through to ds.isOptional verbatim and the UI sees the real boolean. Test: response.test.ts now asserts isOptional is scalar (not array) for both true and false junction column values, and omits the field when the column is null.
4 tasks
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.
No description provided.