package scenario import "time" type Object struct { Params Params `yaml:"params" validate:"required"` Steps []Step `yaml:"steps" validate:"required,dive"` } type Params struct { Address string `yaml:"address" validate:"required"` Timeout time.Duration `yaml:"timeout" validate:"required"` } type Step struct { Name string `yaml:"name" validate:"required"` Query Query `yaml:"query" validate:"required"` Response Response `yaml:"response" validate:"required"` } type Query struct { Method string `yaml:"method" validate:"required"` URL string `yaml:"url" validate:"required"` Headers map[string]string `yaml:"headers"` Data string `yaml:"data"` } type Response struct { Code int `yaml:"code" validate:"required_without=Body"` Headers map[string]string `yaml:"headers"` Body []Sample `yaml:"body" validate:"required_without=Code"` } type Sample struct { Function string `yaml:"function"` Text string `yaml:"text"` }