Current Situation
The ModelDefinition.Registrant field in v1beta2/model references v1beta1/connection.Connection, which has snake_case JSON tags (created_at, user_id, deleted_at). This causes mesheryctl model generate output and server API responses to emit non-canonical wire format, violating the AGENTS.md contract:
"Wire is camelCase everywhere; DB is snake_case; the ORM layer is the sole translation boundary."
Similarly, ComponentDefinition.Model in both v1beta2 and v1beta3 component schemas references v1beta1/model.ModelDefinition (snake_case JSON tags: components_count, relationships_count). The ComponentSchemaVersion constant in v1beta3/const.go is also stale at "components.meshery.io/v1beta2" while both the YAML default and model init templates already emit v1beta3.
Proposed Change
v1beta2/model.ModelDefinition.Registrant → reference v1beta3/connection.Connection (camelCase JSON tags)
v1beta2/component.ComponentDefinition.Model → reference v1beta2/model.ModelDefinition
v1beta3/component.ComponentDefinition.Model → reference v1beta2/model.ModelDefinition
v1beta3/const.go#ComponentSchemaVersion → "components.meshery.io/v1beta3"
Acceptance Criteria
Related PRs
meshery/meshkit PR: Registry bridge adapters
meshery/meshery PR: Server handler + UI field name updates
Understanding Meshery Models
Contributing to Meshery Models
Current Situation
The
ModelDefinition.Registrantfield inv1beta2/modelreferencesv1beta1/connection.Connection, which has snake_case JSON tags (created_at,user_id,deleted_at). This causesmesheryctl model generateoutput and server API responses to emit non-canonical wire format, violating theAGENTS.mdcontract:Similarly,
ComponentDefinition.Modelin bothv1beta2andv1beta3component schemas referencesv1beta1/model.ModelDefinition(snake_case JSON tags:components_count,relationships_count). TheComponentSchemaVersionconstant inv1beta3/const.gois also stale at"components.meshery.io/v1beta2"while both the YAML default andmodel inittemplates already emitv1beta3.Proposed Change
v1beta2/model.ModelDefinition.Registrant→ referencev1beta3/connection.Connection(camelCase JSON tags)v1beta2/component.ComponentDefinition.Model→ referencev1beta2/model.ModelDefinitionv1beta3/component.ComponentDefinition.Model→ referencev1beta2/model.ModelDefinitionv1beta3/const.go#ComponentSchemaVersion→"components.meshery.io/v1beta3"Acceptance Criteria
mesheryctl model generateemitsregistrant.createdAt,registrant.userId(camelCase)mesheryctl model generateemits"schemaVersion": "components.meshery.io/v1beta3"in component filesgo build ./...passes acrossmeshery/schemas,meshery/meshkit, andmeshery/mesheryRelated PRs
meshery/meshkitPR: Registry bridge adaptersmeshery/mesheryPR: Server handler + UI field name updatesGeneral Contributor Guides and Handbook
Understanding Meshery Models
Contributing to Meshery Models