meshery/meshery

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

Open

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

在 GitHub 查看
 (1 评论) (0 反应) (1 负责人)HTML (10,013 star) (3,101 fork)batch import
help wanted

描述

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

贡献者指南

[mesheryctl] Populate generated model definitions with the requested model name · meshery/meshery#18982 | Good First Issue