Skip to content

Add support for field defaults - #1630

Draft
Julian Gutierrez Oschmann (juli4n) wants to merge 1 commit into
agent-substrate:mainfrom
juli4n:defaulting
Draft

Add support for field defaults#1630
Julian Gutierrez Oschmann (juli4n) wants to merge 1 commit into
agent-substrate:mainfrom
juli4n:defaulting

Conversation

@juli4n

Copy link
Copy Markdown
Collaborator

Populate default fields during both Create and Update RPC calls so that resources are stored with defaults instead of zero values. This means that a) consumers don't need to be aware of the default value and b) default values can potentially change.

Only ActorTemplate had defaults, but added default functions for all resources so that all RPC handlers are wired up

Note that optional fields with defaults need to be tagged as +k8s:required. This is because they are required when they are stored in the DB. This is different than required from the client perspective.

Part of #1593

Populate default fields during both Create and Update RPC calls so
that resources are stored with defaults instead of zero values.

This is a much cleaner approach as it means that a) consumers don't need to
be aware of the default value and b) default values can potentially change.

Only ActorTemplate had defaults, but added default functions for all
resources so that all RPC handlers are wired up


Note that
@juli4n Julian Gutierrez Oschmann (juli4n) changed the title Add support for field defaults. Add support for field defaults Sep 12, 2026
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