Skip to content

feat(schema): add input can be optional on model configuration#1

Merged
mosoriob merged 7 commits intomainfrom
gsd/phase-12-is-optional
May 1, 2026
Merged

feat(schema): add input can be optional on model configuration#1
mosoriob merged 7 commits intomainfrom
gsd/phase-12-is-optional

Conversation

@mosoriob
Copy link
Copy Markdown
Contributor

No description provided.

…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.
@mosoriob mosoriob changed the title Gsd/phase 12 is optional feat(schema): add input can be optional on model configuration May 1, 2026
@mosoriob mosoriob merged commit 6f63ad0 into main May 1, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant