meshery/meshery

[mesheryctl] Populate generated model definitions with the requested model name

开放

#18,982 创建于 2026年4月29日

 (1 条评论) (0 个反应) (1 位负责人)HTML (3,101 个派生)batch import
help wanted

仓库指标

星标
 (10,013 个星标)
PR 合并指标
 (PR 指标待抓取)

描述

See mesheryctl Command Tracker for current status of commands.

Current Behavior

mesheryctl model init scaffolds the directory structure, but it leaves a TODO in code for inserting the requested model name into the generated model definition.

As a result, users still have to perform an immediate manual edit in the primary generated file before the scaffold feels complete.

Desired Behavior

The generated model.json / model.yaml should already contain the requested model name so that the scaffold is closer to being ready-to-edit out of the box.

Implementation

Relevant code path:

  • mesheryctl/internal/cli/root/model/init.go
  • trailing TODO: put a model name into generated model file

Acceptance Tests

  • Running mesheryctl model init my-model should emit a generated model definition whose name field is already my-model.
  • Both JSON and YAML outputs should receive the requested name.
  • Existing scaffold generation tests should cover the populated name field.

Mockups

N/A


Contributor Resources

贡献者指南