Skip to content

Add JSON serialization support for cel.Env configuration - #1554

Open
TristonianJones wants to merge 3 commits into
cel-expr:masterfrom
TristonianJones:env-json
Open

TristonianJones wants to merge 3 commits into
cel-expr:masterfrom
TristonianJones:env-json

Conversation

@TristonianJones

Copy link
Copy Markdown
Collaborator

Ensure that configuration files support Json serialization and JsonSchema annotations to assist with MCP Tools.

Updates intended to replace the equivalent code in cel-expr/skills.

l46kok
l46kok previously approved these changes Oct 17, 2026
Comment thread common/env/env_test.go
Comment thread common/env/env.go

// Version may either be an unsigned long value or the string 'latest'. If empty, the value is treated as '0'.
Version string `yaml:"version,omitempty"`
Version string `yaml:"version,omitempty" json:"version,omitempty" jsonschema_description:"Extension version number or 'latest'"`

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There was some oddity regarding YAML environment version being deserializable as both a string and a number, (ex: version: 1, version: "1"). Not exactly certain if you want to retain the round-trippability between the two but if you do, maybe worth adding a test for this.

@TristonianJones TristonianJones Oct 17, 2026 •

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good call, though technically these should end up being the same based on the way the serializers work.

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.

2 participants