Skip to content

[Core] Decide optional vs. nullable behavior for CustomField.value #1108

Open

Description

@SnowboardTechie

Summary

CustomField.value is required everywhere: the spec declares value: unknown in custom-field.tsp, both SDKs mirror it, and cg check errors when an implementation omits it. Because unknown emits an untyped property, "value": null already validates on the wire, but that's incidental rather than documented. We never made a deliberate call between "explicit null" and "key omitted" for a custom field with no value. Leftover from the v0.4.0 tech debt thread.

To discuss and decide as part of the next round of releases:

  • Should value be optional, explicitly nullable, or both? Do omitted vs null mean different things for any adopter?
  • If optional: loosening required to optional keeps existing payloads valid but changes what consumers can rely on. How do we classify and sequence that release?
  • What should cg check enforce after the decision?

Acceptance criteria

  • Answers to the questions above, and their rationale, are documented on this ticket after a verbal discussion with @widal001 and the other engineers.
  • The spec, both SDKs, and cg check are updated (or confirmed as-is) per the decision as part of the next round of releases.

Metadata

Metadata

Assignees

No one assigned

    Labels

    cliIssue or PR related to the @common-grants/cli librarycoreIssues related to @common-grants/core librarysdkIssue or PR related to our SDKs

    Type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions