You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 630757e
Browse filesBrowse the repository at this point in the historyBrowse files
fix(program-d): address cross-port review findings for VO-column PATCH
A high-effort cross-port review found latent divergences the corpus missed (it
only sent well-typed VO values on a value-object ref). Fixed + gated:
- C# generated POST/PATCH deserialized a VO jsonb column with no try/catch, so a
wrong-shaped body (array for a single VO, object for an array) threw
JsonException -> HTTP 500 where every other port (and C#'s own reference lane)
returns 400. Wrapped both deserializes -> 400.
- Kotlin controller had dropped the ObjectField guard ENTIRELY (not narrowed to
jsonb VOs), so a field.object @storage:flattened column emitted row[Table.<f>]
that flattened storage never creates -> the controller would not compile.
Narrowed read/create/patch inclusion to jsonb value-object columns via a new
isJsonbObjectColumn predicate (flattened stays skipped, as pre-Program-D).
- Java codegen-spring's new SpringValueObjectGenerator (the DTO/Patch bind target)
was unregistered — a real consumer running the standard generator set would get
a DTO referencing a Marker record with no Marker.java emitted. Registered it
("value-object", Java-only) + the cross-port registry manifest.
- Java api-docs JavaFieldShapes.dtoFields() iterated scalarFields, omitting the VO
components the DTO record now declares -> now uses dtoComponentFields.
- Java jsonb reference server PATCH omitted the present-null-on-required title
guard (title:null -> NOT NULL -> SQLException -> 500); added titlePresentValueValid.
- TS runtime resolveVoRef recursed into ANY @objectref; added the object.value
guard so a non-value ref validates identically (skipped) on every port.
New gate: jsonb-value-object-patch.yaml r21/r22 (wrong-shaped VO body -> 400) —
green on all five ports, both lanes.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NGQ7oSuNcjhsMHWwZzhBwr
Copy file name to clipboardExpand all lines: server/java/codegen-kotlin/src/main/kotlin/com/metaobjects/generator/kotlin/KotlinSpringControllerGenerator.kt
+29-4Lines changed: 29 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -161,7 +161,11 @@ open class KotlinSpringControllerGenerator : MultiFileDirectGeneratorBase<MetaOb
0 commit comments