Skip to content

Commit a7550b3

Browse files
jmartin82claude
andauthored
Mock validation (#204)
* Implement mock definition validation and enhance error handling * Refactor mappingCreateHandler to validate mock definition directly * Add request path validation to Definition struct * Fix Validate method receiver type Change from pointer receiver to value receiver to fix compilation error in mapping.go where mock.Validate() is called on a value type. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent 9ab45e1 commit a7550b3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/mock/definition.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ type Definition struct {
9797
Control Control `json:"control"`
9898
}
9999

100-
func (d *Definition) Validate() error {
100+
func (d Definition) Validate() error {
101101
if d.URI == "" {
102102
return fmt.Errorf("URI is required")
103103
}

0 commit comments

Comments
 (0)