Files
kubevela/pkg/definition/defkit/array_builder_test.go
Jerrin Francis c6ee19ee45 Fix: remove Mandatory() API and make non-optional the default field state in defkit (#7070)
Replace the three-state field marker system (Optional/Mandatory/Required)
  with a simpler two-state system where the default behavior produces
  `field: type` (no marker), `.Required()` produces `field!: type`, and
  `.Optional()` produces `field?: type`.

  - Remove Mandatory(), IsMandatory(), ForceOptional(), IsForceOptional()
    from all param types, StructField, Param interface, and CUE generator
  - Replace `mandatory` and `forceOptional` fields with `optional` field
    in baseParam and StructField
  - Simplify CUE marker resolution to: default=none, Required="!",
    Optional="?"
  - Remove BeMandatory() matcher and mandatoryParam interface
  - Migrate all test usages: .Mandatory() removed (now default behavior),
    .ForceOptional() replaced with .Optional()

Signed-off-by: Jerrin Francis <jerrinfrancis7@gmail.com>
2026-03-16 06:38:06 -07:00

23 KiB