fix(cli): validate UModel YAML files - #94
Conversation
qiansheng91
left a comment
There was a problem hiding this comment.
Summary
Reviewed PR #94: fix(cli): validate UModel YAML files
The changes appear reasonable. No critical issues found in the diff.
Automated review by github-manager-bot
|
Issue Evaluation Category: Thank you for reporting this issue. The reported behavior is being reviewed against the current codebase. Next Steps:
Automated evaluation by github-manager-bot |
|
Issue Evaluation Category: Thank you for reporting this issue. It has been classified as a potential bug and is being reviewed against the current codebase. A deeper verification will be performed. If confirmed as a valid bug, an automated fix proposal may be generated. Automated evaluation by github-manager |
|
Issue Evaluation Category: Thank you for reporting this issue. To proceed with verification, please provide:
Automated evaluation by github-manager-bot |
|
Added the requested version, reproduction steps, expected vs. actual behavior, and verification evidence to the PR description. This is a non-crashing CLI input-handling gap on |
|
Issue Evaluation Category: Thank you @ for reporting this. This issue has been flagged as a potential bug. Next Steps:
Please ensure your report includes:
Automated evaluation by github-manager-bot |
|
Issue Evaluation Category: Thank you for reporting this issue. It has been classified as a potential bug and is being reviewed against the current codebase. If confirmed as a valid bug, an automated fix proposal may be generated. Community members can reply Automated evaluation by github-manager |
|
Issue Evaluation Category: Thank you for reporting this. The issue has been classified as a potential bug and is queued for code-level verification. Next steps:
Automated evaluation by github-manager-bot |
Summary
This closes a small gap in the local authoring loop: the CLI docs point
umctl umodel validateat a quickstart UModel YAML file, but the command only wrapped JSON before calling the validate API.Now
umctl umodel validatecan accept one schema-style UModel YAML file and send the sameelementspayload the API already expects.Scope
umodel putJSON-only.Verification details
main; no released tag was used for this reproduction.demo.go run ./cmd/umctl --addr http://localhost:8080 umodel validate demo examples/quickstart-multidomain/umodel/devops/entity_set/devops.service.yaml.kind,schema,metadata, andspecfields, and sends one element to/api/v1/umodel/demo/validate.elementspayload.TestUModelValidateAcceptsSchemaStyleYAMLFile, which fails without this change and verifies the normalized request payload with it.Tests
go test ./cmd/umctl/cmd -run 'TestUModelValidateAcceptsSchemaStyleYAMLFile|TestCLICommandsRouteToCorrectEndpoints' -count=1go test ./internal/umodel/payload -count=1go test ./internal/bootstrap ./internal/sampledata -run 'QuickStart|quickstart|Sample|Localization' -count=1git diff --check