github.com/emreu/go-swagger@v0.22.1/generator/moreschemavalidation_fixtures_test.go (about)

     1  // Copyright 2015 go-swagger maintainers
     2  //
     3  // Licensed under the Apache License, Version 2.0 (the "License");
     4  // you may not use this file except in compliance with the License.
     5  // You may obtain a copy of the License at
     6  //
     7  //    http://www.apache.org/licenses/LICENSE-2.0
     8  //
     9  // Unless required by applicable law or agreed to in writing, software
    10  // distributed under the License is distributed on an "AS IS" BASIS,
    11  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    12  // See the License for the specific language governing permissions and
    13  // limitations under the License.
    14  
    15  package generator
    16  
    17  func initFixture2071() {
    18  	f := newModelFixture("../fixtures/bugs/2071/fixture-2071.yaml", "check allOf serializer when x-go-name is present")
    19  	flattenRun := f.AddRun(false).WithMinimalFlatten(true)
    20  	flattenRun.AddExpectations("cat.go", []string{
    21  		"var dataAO1 struct {\n\t\tSomeAbility *string `json:\"ability,omitempty\"`",
    22  	},
    23  		// not expected
    24  		append(todo, "SomeAbility *string `json:\"SomeAbility,omitempty\"`"),
    25  		// output in log
    26  		noLines,
    27  		noLines)
    28  }
    29  
    30  func initFixture1479Part() {
    31  	// testing ../fixtures/bugs/1479/fixture-1479-part.yaml with flatten and expand (--skip-flatten)
    32  
    33  	/*
    34  		The breakage with allOf occurs when a schema with an allOf has itself a
    35  		property which is an allOf construct
    36  	*/
    37  
    38  	f := newModelFixture("../fixtures/bugs/1479/fixture-1479-part.yaml", "check nested AllOf validations (from Pouch Engine API)")
    39  	flattenRun := f.AddRun(false)
    40  	expandRun := f.AddRun(true)
    41  
    42  	// load expectations for model: container_create_config_all_of1.go
    43  	flattenRun.AddExpectations("container_create_config_all_of1.go", []string{
    44  		`type ContainerCreateConfigAllOf1 struct {`,
    45  		"	HostConfig *HostConfig `json:\"HostConfig,omitempty\"`",
    46  		"	NetworkingConfig *NetworkingConfig `json:\"NetworkingConfig,omitempty\"`",
    47  		`func (m *ContainerCreateConfigAllOf1) Validate(formats strfmt.Registry) error {`,
    48  		`	if err := m.validateHostConfig(formats); err != nil {`,
    49  		`	if err := m.validateNetworkingConfig(formats); err != nil {`,
    50  		`		return errors.CompositeValidationError(res...`,
    51  		`func (m *ContainerCreateConfigAllOf1) validateHostConfig(formats strfmt.Registry) error {`,
    52  		`	if swag.IsZero(m.HostConfig) {`,
    53  		`	if m.HostConfig != nil {`,
    54  		`		if err := m.HostConfig.Validate(formats); err != nil {`,
    55  		`			if ve, ok := err.(*errors.Validation); ok {`,
    56  		`				return ve.ValidateName("HostConfig"`,
    57  		`func (m *ContainerCreateConfigAllOf1) validateNetworkingConfig(formats strfmt.Registry) error {`,
    58  		`	if swag.IsZero(m.NetworkingConfig) {`,
    59  		`	if m.NetworkingConfig != nil {`,
    60  		`		if err := m.NetworkingConfig.Validate(formats); err != nil {`,
    61  		`			if ve, ok := err.(*errors.Validation); ok {`,
    62  		`				return ve.ValidateName("NetworkingConfig"`,
    63  	},
    64  		// not expected
    65  		todo,
    66  		// output in log
    67  		noLines,
    68  		noLines)
    69  
    70  	// load expectations for model: container_config.go
    71  	flattenRun.AddExpectations("container_config.go", []string{
    72  		`type ContainerConfig struct {`,
    73  		"	ArgsEscaped bool `json:\"ArgsEscaped,omitempty\"`",
    74  		"	AttachStderr bool `json:\"AttachStderr,omitempty\"`",
    75  		"	AttachStdin bool `json:\"AttachStdin,omitempty\"`",
    76  		"	AttachStdout bool `json:\"AttachStdout,omitempty\"`",
    77  		"	Cmd []string `json:\"Cmd\"`",
    78  		"	DiskQuota map[string]string `json:\"DiskQuota,omitempty\"`",
    79  		"	Domainname string `json:\"Domainname,omitempty\"`",
    80  		"	Entrypoint []string `json:\"Entrypoint\"`",
    81  		"	Env []string `json:\"Env\"`",
    82  		"	ExposedPorts map[string]interface{} `json:\"ExposedPorts,omitempty\"`",
    83  		"	Hostname strfmt.Hostname `json:\"Hostname,omitempty\"`",
    84  		"	Image string `json:\"Image\"`",
    85  		"	InitScript string `json:\"InitScript,omitempty\"`",
    86  		"	Labels map[string]string `json:\"Labels,omitempty\"`",
    87  		"	MacAddress string `json:\"MacAddress,omitempty\"`",
    88  		"	NetworkDisabled bool `json:\"NetworkDisabled,omitempty\"`",
    89  		"	OnBuild []string `json:\"OnBuild\"`",
    90  		"	OpenStdin bool `json:\"OpenStdin,omitempty\"`",
    91  		"	QuotaID string `json:\"QuotaID,omitempty\"`",
    92  		"	Rich bool `json:\"Rich,omitempty\"`",
    93  		"	RichMode string `json:\"RichMode,omitempty\"`",
    94  		"	Shell []string `json:\"Shell\"`",
    95  		"	SpecAnnotation map[string]string `json:\"SpecAnnotation,omitempty\"`",
    96  		"	StdinOnce bool `json:\"StdinOnce,omitempty\"`",
    97  		"	StopSignal string `json:\"StopSignal,omitempty\"`",
    98  		"	StopTimeout *int64 `json:\"StopTimeout,omitempty\"`",
    99  		"	Tty bool `json:\"Tty,omitempty\"`",
   100  		"	User string `json:\"User,omitempty\"`",
   101  		"	Volumes map[string]interface{} `json:\"Volumes,omitempty\"`",
   102  		"	WorkingDir string `json:\"WorkingDir,omitempty\"`",
   103  		`func (m *ContainerConfig) Validate(formats strfmt.Registry) error {`,
   104  		`	if err := m.validateExposedPorts(formats); err != nil {`,
   105  		`	if err := m.validateHostname(formats); err != nil {`,
   106  		`	if err := m.validateImage(formats); err != nil {`,
   107  		`	if err := m.validateRichMode(formats); err != nil {`,
   108  		`	if err := m.validateVolumes(formats); err != nil {`,
   109  		`		return errors.CompositeValidationError(res...`,
   110  		`var containerConfigExposedPortsValueEnum []interface{`,
   111  		`	var res []interface{`,
   112  		"	if err := json.Unmarshal([]byte(`[{}]`), &res); err != nil {",
   113  		`	for _, v := range res {`,
   114  		`		containerConfigExposedPortsValueEnum = append(containerConfigExposedPortsValueEnum, v`,
   115  		`func (m *ContainerConfig) validateExposedPortsValueEnum(path, location string, value interface{}) error {`,
   116  		`	if err := validate.Enum(path, location, value, containerConfigExposedPortsValueEnum); err != nil {`,
   117  		`func (m *ContainerConfig) validateExposedPorts(formats strfmt.Registry) error {`,
   118  		`	if swag.IsZero(m.ExposedPorts) {`,
   119  		`	for k := range m.ExposedPorts {`,
   120  		//`		if swag.IsZero(m.ExposedPorts[k]) {`,
   121  		`		if err := m.validateExposedPortsValueEnum("ExposedPorts"+"."+k, "body", m.ExposedPorts[k]); err != nil {`,
   122  		`func (m *ContainerConfig) validateHostname(formats strfmt.Registry) error {`,
   123  		`	if swag.IsZero(m.Hostname) {`,
   124  		`	if err := validate.MinLength("Hostname", "body", string(m.Hostname), 1); err != nil {`,
   125  		`	if err := validate.FormatOf("Hostname", "body", "hostname", m.Hostname.String(), formats); err != nil {`,
   126  		`func (m *ContainerConfig) validateImage(formats strfmt.Registry) error {`,
   127  		`	if err := validate.RequiredString("Image", "body", string(m.Image)); err != nil {`,
   128  		`var containerConfigTypeRichModePropEnum []interface{`,
   129  		`	var res []string`,
   130  		"	if err := json.Unmarshal([]byte(`[\"dumb-init\",\"sbin-init\",\"systemd\"]`), &res); err != nil {",
   131  		`	for _, v := range res {`,
   132  		`		containerConfigTypeRichModePropEnum = append(containerConfigTypeRichModePropEnum, v`,
   133  		`	ContainerConfigRichModeDumbInit string = "dumb-init"`,
   134  		`	ContainerConfigRichModeSbinInit string = "sbin-init"`,
   135  		`	ContainerConfigRichModeSystemd string = "systemd"`,
   136  		`func (m *ContainerConfig) validateRichModeEnum(path, location string, value string) error {`,
   137  		`	if err := validate.Enum(path, location, value, containerConfigTypeRichModePropEnum); err != nil {`,
   138  		`func (m *ContainerConfig) validateRichMode(formats strfmt.Registry) error {`,
   139  		`	if swag.IsZero(m.RichMode) {`,
   140  		`	if err := m.validateRichModeEnum("RichMode", "body", m.RichMode); err != nil {`,
   141  		`var containerConfigVolumesValueEnum []interface{`,
   142  		`	var res []interface{`,
   143  		"	if err := json.Unmarshal([]byte(`[{}]`), &res); err != nil {",
   144  		`	for _, v := range res {`,
   145  		`		containerConfigVolumesValueEnum = append(containerConfigVolumesValueEnum, v`,
   146  		`func (m *ContainerConfig) validateVolumesValueEnum(path, location string, value interface{}) error {`,
   147  		`	if err := validate.Enum(path, location, value, containerConfigVolumesValueEnum); err != nil {`,
   148  		`func (m *ContainerConfig) validateVolumes(formats strfmt.Registry) error {`,
   149  		`	if swag.IsZero(m.Volumes) {`,
   150  		`	for k := range m.Volumes {`,
   151  		//`		if swag.IsZero(m.Volumes[k]) {`,
   152  		`		if err := m.validateVolumesValueEnum("Volumes"+"."+k, "body", m.Volumes[k]); err != nil {`,
   153  	},
   154  		// not expected
   155  		todo,
   156  		// output in log
   157  		noLines,
   158  		noLines)
   159  
   160  	expandRun.AddExpectations("container_config.go", flattenRun.ExpectedFor("ContainerConfig").ExpectedLines, todo, noLines, noLines)
   161  
   162  	// load expectations for model: host_config_all_of0_log_config.go
   163  	flattenRun.AddExpectations("host_config_all_of0_log_config.go", []string{
   164  		`type HostConfigAllOf0LogConfig struct {`,
   165  		"	Config map[string]string `json:\"Config,omitempty\"`",
   166  		"	Type string `json:\"Type,omitempty\"`",
   167  		`func (m *HostConfigAllOf0LogConfig) Validate(formats strfmt.Registry) error {`,
   168  		`	if err := m.validateType(formats); err != nil {`,
   169  		`		return errors.CompositeValidationError(res...`,
   170  		`var hostConfigAllOf0LogConfigTypeTypePropEnum []interface{`,
   171  		`	var res []string`,
   172  		"	if err := json.Unmarshal([]byte(`[\"json-file\",\"syslog\",\"journald\",\"gelf\",\"fluentd\",\"awslogs\",\"splunk\",\"etwlogs\",\"none\"]`), &res); err != nil {",
   173  		`	for _, v := range res {`,
   174  		`		hostConfigAllOf0LogConfigTypeTypePropEnum = append(hostConfigAllOf0LogConfigTypeTypePropEnum, v`,
   175  		`	HostConfigAllOf0LogConfigTypeJSONFile string = "json-file"`,
   176  		`	HostConfigAllOf0LogConfigTypeSyslog string = "syslog"`,
   177  		`	HostConfigAllOf0LogConfigTypeJournald string = "journald"`,
   178  		`	HostConfigAllOf0LogConfigTypeGelf string = "gelf"`,
   179  		`	HostConfigAllOf0LogConfigTypeFluentd string = "fluentd"`,
   180  		`	HostConfigAllOf0LogConfigTypeAwslogs string = "awslogs"`,
   181  		`	HostConfigAllOf0LogConfigTypeSplunk string = "splunk"`,
   182  		`	HostConfigAllOf0LogConfigTypeEtwlogs string = "etwlogs"`,
   183  		`	HostConfigAllOf0LogConfigTypeNone string = "none"`,
   184  		`func (m *HostConfigAllOf0LogConfig) validateTypeEnum(path, location string, value string) error {`,
   185  		`	if err := validate.Enum(path, location, value, hostConfigAllOf0LogConfigTypeTypePropEnum); err != nil {`,
   186  		`func (m *HostConfigAllOf0LogConfig) validateType(formats strfmt.Registry) error {`,
   187  		`	if swag.IsZero(m.Type) {`,
   188  		`	if err := m.validateTypeEnum("Type", "body", m.Type); err != nil {`,
   189  	},
   190  		// not expected
   191  		todo,
   192  		// output in log
   193  		noLines,
   194  		noLines)
   195  
   196  	// load expectations for model: restart_policy.go
   197  	flattenRun.AddExpectations("restart_policy.go", []string{
   198  		`type RestartPolicy struct {`,
   199  		"	MaximumRetryCount int64 `json:\"MaximumRetryCount,omitempty\"`",
   200  		"	Name string `json:\"Name,omitempty\"`",
   201  		// empty validation
   202  		"func (m *RestartPolicy) Validate(formats strfmt.Registry) error {\n	return nil\n}",
   203  	},
   204  		// not expected
   205  		todo,
   206  		// output in log
   207  		noLines,
   208  		noLines)
   209  
   210  	expandRun.AddExpectations("restart_policy.go", flattenRun.ExpectedFor("RestartPolicy").ExpectedLines, todo, noLines, noLines)
   211  
   212  	// load expectations for model: endpoint_ip_a_m_config.go
   213  	flattenRun.AddExpectations("endpoint_ip_a_m_config.go", []string{
   214  		`type EndpointIPAMConfig struct {`,
   215  		"	IPV4Address string `json:\"IPv4Address,omitempty\"`",
   216  		"	IPV6Address string `json:\"IPv6Address,omitempty\"`",
   217  		"	LinkLocalIPs []string `json:\"LinkLocalIPs\"`",
   218  		// empty validation
   219  		"func (m *EndpointIPAMConfig) Validate(formats strfmt.Registry) error {\n	return nil\n}",
   220  	},
   221  		// not expected
   222  		todo,
   223  		// output in log
   224  		noLines,
   225  		noLines)
   226  
   227  	expandRun.AddExpectations("endpoint_ip_a_m_config.go", flattenRun.ExpectedFor("EndpointIPAMConfig").ExpectedLines, todo, noLines, noLines)
   228  
   229  	// load expectations for model: host_config_all_of0.go
   230  	flattenRun.AddExpectations("host_config_all_of0.go", []string{
   231  		`type HostConfigAllOf0 struct {`,
   232  		"	AutoRemove bool `json:\"AutoRemove,omitempty\"`",
   233  		"	Binds []string `json:\"Binds\"`",
   234  		"	CapAdd []string `json:\"CapAdd\"`",
   235  		"	CapDrop []string `json:\"CapDrop\"`",
   236  		"	Cgroup string `json:\"Cgroup,omitempty\"`",
   237  		"	ConsoleSize []*int64 `json:\"ConsoleSize\"`",
   238  		"	ContainerIDFile string `json:\"ContainerIDFile,omitempty\"`",
   239  		"	DNS []string `json:\"Dns\"`",
   240  		"	DNSOptions []string `json:\"DnsOptions\"`",
   241  		"	DNSSearch []string `json:\"DnsSearch\"`",
   242  		"	EnableLxcfs bool `json:\"EnableLxcfs,omitempty\"`",
   243  		"	ExtraHosts []string `json:\"ExtraHosts\"`",
   244  		"	GroupAdd []string `json:\"GroupAdd\"`",
   245  		"	InitScript string `json:\"InitScript,omitempty\"`",
   246  		"	IpcMode string `json:\"IpcMode,omitempty\"`",
   247  		"	Isolation string `json:\"Isolation,omitempty\"`",
   248  		"	Links []string `json:\"Links\"`",
   249  		"	LogConfig *HostConfigAllOf0LogConfig `json:\"LogConfig,omitempty\"`",
   250  		"	NetworkMode string `json:\"NetworkMode,omitempty\"`",
   251  		"	OomScoreAdj int64 `json:\"OomScoreAdj,omitempty\"`",
   252  		"	PidMode string `json:\"PidMode,omitempty\"`",
   253  		"	Privileged bool `json:\"Privileged,omitempty\"`",
   254  		"	PublishAllPorts bool `json:\"PublishAllPorts,omitempty\"`",
   255  		"	ReadonlyRootfs bool `json:\"ReadonlyRootfs,omitempty\"`",
   256  		"	RestartPolicy *RestartPolicy `json:\"RestartPolicy,omitempty\"`",
   257  		"	Rich bool `json:\"Rich,omitempty\"`",
   258  		"	RichMode string `json:\"RichMode,omitempty\"`",
   259  		"	Runtime string `json:\"Runtime,omitempty\"`",
   260  		"	SecurityOpt []string `json:\"SecurityOpt\"`",
   261  		"	ShmSize *int64 `json:\"ShmSize,omitempty\"`",
   262  		"	StorageOpt map[string]string `json:\"StorageOpt,omitempty\"`",
   263  		"	Sysctls map[string]string `json:\"Sysctls,omitempty\"`",
   264  		"	Tmpfs map[string]string `json:\"Tmpfs,omitempty\"`",
   265  		"	UTSMode string `json:\"UTSMode,omitempty\"`",
   266  		"	UsernsMode string `json:\"UsernsMode,omitempty\"`",
   267  		"	VolumeDriver string `json:\"VolumeDriver,omitempty\"`",
   268  		"	VolumesFrom []string `json:\"VolumesFrom\"`",
   269  		`func (m *HostConfigAllOf0) Validate(formats strfmt.Registry) error {`,
   270  		`	if err := m.validateConsoleSize(formats); err != nil {`,
   271  		`	if err := m.validateIsolation(formats); err != nil {`,
   272  		`	if err := m.validateLogConfig(formats); err != nil {`,
   273  		`	if err := m.validateOomScoreAdj(formats); err != nil {`,
   274  		`	if err := m.validateRestartPolicy(formats); err != nil {`,
   275  		`	if err := m.validateRichMode(formats); err != nil {`,
   276  		`	if err := m.validateShmSize(formats); err != nil {`,
   277  		`		return errors.CompositeValidationError(res...`,
   278  		`func (m *HostConfigAllOf0) validateConsoleSize(formats strfmt.Registry) error {`,
   279  		`	if swag.IsZero(m.ConsoleSize) {`,
   280  		`	iConsoleSizeSize := int64(len(m.ConsoleSize)`,
   281  		`	if err := validate.MinItems("ConsoleSize", "body", iConsoleSizeSize, 2); err != nil {`,
   282  		`	if err := validate.MaxItems("ConsoleSize", "body", iConsoleSizeSize, 2); err != nil {`,
   283  		`	for i := 0; i < len(m.ConsoleSize); i++ {`,
   284  		// do we need...?
   285  		`		if swag.IsZero(m.ConsoleSize[i]) {`,
   286  		//`		if err := validate.Required("ConsoleSize"+"."+strconv.Itoa(i), "body", m.ConsoleSize[i]); err != nil {`,
   287  		`		if err := validate.MinimumInt("ConsoleSize"+"."+strconv.Itoa(i), "body", int64(*m.ConsoleSize[i]), 0, false); err != nil {`,
   288  		`var hostConfigAllOf0TypeIsolationPropEnum []interface{`,
   289  		`	var res []string`,
   290  		"	if err := json.Unmarshal([]byte(`[\"default\",\"process\",\"hyperv\"]`), &res); err != nil {",
   291  		`	for _, v := range res {`,
   292  		`		hostConfigAllOf0TypeIsolationPropEnum = append(hostConfigAllOf0TypeIsolationPropEnum, v`,
   293  		`	HostConfigAllOf0IsolationDefault string = "default"`,
   294  		`	HostConfigAllOf0IsolationProcess string = "process"`,
   295  		`	HostConfigAllOf0IsolationHyperv string = "hyperv"`,
   296  		`func (m *HostConfigAllOf0) validateIsolationEnum(path, location string, value string) error {`,
   297  		`	if err := validate.Enum(path, location, value, hostConfigAllOf0TypeIsolationPropEnum); err != nil {`,
   298  		`func (m *HostConfigAllOf0) validateIsolation(formats strfmt.Registry) error {`,
   299  		`	if swag.IsZero(m.Isolation) {`,
   300  		`	if err := m.validateIsolationEnum("Isolation", "body", m.Isolation); err != nil {`,
   301  		`func (m *HostConfigAllOf0) validateLogConfig(formats strfmt.Registry) error {`,
   302  		`	if swag.IsZero(m.LogConfig) {`,
   303  		`	if m.LogConfig != nil {`,
   304  		`		if err := m.LogConfig.Validate(formats); err != nil {`,
   305  		`			if ve, ok := err.(*errors.Validation); ok {`,
   306  		`				return ve.ValidateName("LogConfig"`,
   307  		`func (m *HostConfigAllOf0) validateOomScoreAdj(formats strfmt.Registry) error {`,
   308  		`	if swag.IsZero(m.OomScoreAdj) {`,
   309  		`	if err := validate.MinimumInt("OomScoreAdj", "body", int64(m.OomScoreAdj), -1000, false); err != nil {`,
   310  		`	if err := validate.MaximumInt("OomScoreAdj", "body", int64(m.OomScoreAdj), 1000, false); err != nil {`,
   311  		`func (m *HostConfigAllOf0) validateRestartPolicy(formats strfmt.Registry) error {`,
   312  		`	if swag.IsZero(m.RestartPolicy) {`,
   313  		`	if m.RestartPolicy != nil {`,
   314  		`		if err := m.RestartPolicy.Validate(formats); err != nil {`,
   315  		`			if ve, ok := err.(*errors.Validation); ok {`,
   316  		`				return ve.ValidateName("RestartPolicy"`,
   317  		`var hostConfigAllOf0TypeRichModePropEnum []interface{`,
   318  		`	var res []string`,
   319  		"	if err := json.Unmarshal([]byte(`[\"dumb-init\",\"sbin-init\",\"systemd\"]`), &res); err != nil {",
   320  		`	for _, v := range res {`,
   321  		`		hostConfigAllOf0TypeRichModePropEnum = append(hostConfigAllOf0TypeRichModePropEnum, v`,
   322  		`	HostConfigAllOf0RichModeDumbInit string = "dumb-init"`,
   323  		`	HostConfigAllOf0RichModeSbinInit string = "sbin-init"`,
   324  		`	HostConfigAllOf0RichModeSystemd string = "systemd"`,
   325  		`func (m *HostConfigAllOf0) validateRichModeEnum(path, location string, value string) error {`,
   326  		`	if err := validate.Enum(path, location, value, hostConfigAllOf0TypeRichModePropEnum); err != nil {`,
   327  		`func (m *HostConfigAllOf0) validateRichMode(formats strfmt.Registry) error {`,
   328  		`	if swag.IsZero(m.RichMode) {`,
   329  		`	if err := m.validateRichModeEnum("RichMode", "body", m.RichMode); err != nil {`,
   330  		`func (m *HostConfigAllOf0) validateShmSize(formats strfmt.Registry) error {`,
   331  		`	if swag.IsZero(m.ShmSize) {`,
   332  		`	if err := validate.MinimumInt("ShmSize", "body", int64(*m.ShmSize), 0, false); err != nil {`,
   333  	},
   334  		// not expected
   335  		todo,
   336  		// output in log
   337  		noLines,
   338  		noLines)
   339  
   340  	// load expectations for model: host_config.go
   341  	flattenRun.AddExpectations("host_config.go", []string{
   342  		`type HostConfig struct {`,
   343  		`	HostConfigAllOf0`,
   344  		`	Resources`,
   345  		`func (m *HostConfig) Validate(formats strfmt.Registry) error {`,
   346  		`	if err := m.HostConfigAllOf0.Validate(formats); err != nil {`,
   347  		`	if err := m.Resources.Validate(formats); err != nil {`,
   348  		`		return errors.CompositeValidationError(res...`,
   349  	},
   350  		// not expected
   351  		todo,
   352  		// output in log
   353  		noLines,
   354  		noLines)
   355  
   356  	expandRun.AddExpectations("host_config.go", []string{
   357  		`type HostConfig struct {`,
   358  		"	AutoRemove bool `json:\"AutoRemove,omitempty\"`",
   359  		"	Binds []string `json:\"Binds\"`",
   360  		"	CapAdd []string `json:\"CapAdd\"`",
   361  		"	CapDrop []string `json:\"CapDrop\"`",
   362  		"	Cgroup string `json:\"Cgroup,omitempty\"`",
   363  		"	ConsoleSize []*int64 `json:\"ConsoleSize\"`",
   364  		"	ContainerIDFile string `json:\"ContainerIDFile,omitempty\"`",
   365  		"	DNS []string `json:\"Dns\"`",
   366  		"	DNSOptions []string `json:\"DnsOptions\"`",
   367  		"	DNSSearch []string `json:\"DnsSearch\"`",
   368  		"	EnableLxcfs bool `json:\"EnableLxcfs,omitempty\"`",
   369  		"	ExtraHosts []string `json:\"ExtraHosts\"`",
   370  		"	GroupAdd []string `json:\"GroupAdd\"`",
   371  		"	InitScript string `json:\"InitScript,omitempty\"`",
   372  		"	IpcMode string `json:\"IpcMode,omitempty\"`",
   373  		"	Isolation string `json:\"Isolation,omitempty\"`",
   374  		"	Links []string `json:\"Links\"`",
   375  		"	LogConfig *HostConfigAO0LogConfig `json:\"LogConfig,omitempty\"`",
   376  		"	NetworkMode string `json:\"NetworkMode,omitempty\"`",
   377  		"	OomScoreAdj int64 `json:\"OomScoreAdj,omitempty\"`",
   378  		"	PidMode string `json:\"PidMode,omitempty\"`",
   379  		"	Privileged bool `json:\"Privileged,omitempty\"`",
   380  		"	PublishAllPorts bool `json:\"PublishAllPorts,omitempty\"`",
   381  		"	ReadonlyRootfs bool `json:\"ReadonlyRootfs,omitempty\"`",
   382  		"	RestartPolicy *HostConfigAO0RestartPolicy `json:\"RestartPolicy,omitempty\"`",
   383  		"	Rich bool `json:\"Rich,omitempty\"`",
   384  		"	RichMode string `json:\"RichMode,omitempty\"`",
   385  		"	Runtime string `json:\"Runtime,omitempty\"`",
   386  		"	SecurityOpt []string `json:\"SecurityOpt\"`",
   387  		"	ShmSize *int64 `json:\"ShmSize,omitempty\"`",
   388  		"	StorageOpt map[string]string `json:\"StorageOpt,omitempty\"`",
   389  		"	Sysctls map[string]string `json:\"Sysctls,omitempty\"`",
   390  		"	Tmpfs map[string]string `json:\"Tmpfs,omitempty\"`",
   391  		"	UTSMode string `json:\"UTSMode,omitempty\"`",
   392  		"	UsernsMode string `json:\"UsernsMode,omitempty\"`",
   393  		"	VolumeDriver string `json:\"VolumeDriver,omitempty\"`",
   394  		"	VolumesFrom []string `json:\"VolumesFrom\"`",
   395  		"	BlkioWeight uint16 `json:\"BlkioWeight,omitempty\"`",
   396  		"	CgroupParent string `json:\"CgroupParent,omitempty\"`",
   397  		"	CPUShares int64 `json:\"CpuShares,omitempty\"`",
   398  		"	Memory int64 `json:\"Memory,omitempty\"`",
   399  		`func (m *HostConfig) Validate(formats strfmt.Registry) error {`,
   400  		`	if err := m.validateConsoleSize(formats); err != nil {`,
   401  		`	if err := m.validateIsolation(formats); err != nil {`,
   402  		`	if err := m.validateLogConfig(formats); err != nil {`,
   403  		`	if err := m.validateOomScoreAdj(formats); err != nil {`,
   404  		`	if err := m.validateRestartPolicy(formats); err != nil {`,
   405  		`	if err := m.validateRichMode(formats); err != nil {`,
   406  		`	if err := m.validateShmSize(formats); err != nil {`,
   407  		`	if err := m.validateBlkioWeight(formats); err != nil {`,
   408  		`		return errors.CompositeValidationError(res...`,
   409  		`func (m *HostConfig) validateConsoleSize(formats strfmt.Registry) error {`,
   410  		`	if swag.IsZero(m.ConsoleSize) {`,
   411  		`	iConsoleSizeSize := int64(len(m.ConsoleSize)`,
   412  		`	if err := validate.MinItems("ConsoleSize", "body", iConsoleSizeSize, 2); err != nil {`,
   413  		`	if err := validate.MaxItems("ConsoleSize", "body", iConsoleSizeSize, 2); err != nil {`,
   414  		`	for i := 0; i < len(m.ConsoleSize); i++ {`,
   415  		// do we need...
   416  		`		if swag.IsZero(m.ConsoleSize[i]) {`,
   417  		//`		if err := validate.Required("ConsoleSize"+"."+strconv.Itoa(i), "body", m.ConsoleSize[i]); err != nil {`,
   418  		`		if err := validate.MinimumInt("ConsoleSize"+"."+strconv.Itoa(i), "body", int64(*m.ConsoleSize[i]), 0, false); err != nil {`,
   419  		`var hostConfigTypeIsolationPropEnum []interface{`,
   420  		`	var res []string`,
   421  		"	if err := json.Unmarshal([]byte(`[\"default\",\"process\",\"hyperv\"]`), &res); err != nil {",
   422  		`	for _, v := range res {`,
   423  		`		hostConfigTypeIsolationPropEnum = append(hostConfigTypeIsolationPropEnum, v`,
   424  		`func (m *HostConfig) validateIsolationEnum(path, location string, value string) error {`,
   425  		`	if err := validate.Enum(path, location, value, hostConfigTypeIsolationPropEnum); err != nil {`,
   426  		`func (m *HostConfig) validateIsolation(formats strfmt.Registry) error {`,
   427  		`	if swag.IsZero(m.Isolation) {`,
   428  		`	if err := m.validateIsolationEnum("Isolation", "body", m.Isolation); err != nil {`,
   429  		`func (m *HostConfig) validateLogConfig(formats strfmt.Registry) error {`,
   430  		`	if swag.IsZero(m.LogConfig) {`,
   431  		`	if m.LogConfig != nil {`,
   432  		`		if err := m.LogConfig.Validate(formats); err != nil {`,
   433  		`			if ve, ok := err.(*errors.Validation); ok {`,
   434  		`				return ve.ValidateName("LogConfig"`,
   435  		`func (m *HostConfig) validateOomScoreAdj(formats strfmt.Registry) error {`,
   436  		`	if swag.IsZero(m.OomScoreAdj) {`,
   437  		`	if err := validate.MinimumInt("OomScoreAdj", "body", int64(m.OomScoreAdj), -1000, false); err != nil {`,
   438  		`	if err := validate.MaximumInt("OomScoreAdj", "body", int64(m.OomScoreAdj), 1000, false); err != nil {`,
   439  		`func (m *HostConfig) validateRestartPolicy(formats strfmt.Registry) error {`,
   440  		`	if swag.IsZero(m.RestartPolicy) {`,
   441  		`	if m.RestartPolicy != nil {`,
   442  		`		if err := m.RestartPolicy.Validate(formats); err != nil {`,
   443  		`			if ve, ok := err.(*errors.Validation); ok {`,
   444  		`				return ve.ValidateName("RestartPolicy"`,
   445  		`var hostConfigTypeRichModePropEnum []interface{`,
   446  		`	var res []string`,
   447  		"	if err := json.Unmarshal([]byte(`[\"dumb-init\",\"sbin-init\",\"systemd\"]`), &res); err != nil {",
   448  		`	for _, v := range res {`,
   449  		`		hostConfigTypeRichModePropEnum = append(hostConfigTypeRichModePropEnum, v`,
   450  		`func (m *HostConfig) validateRichModeEnum(path, location string, value string) error {`,
   451  		`	if err := validate.Enum(path, location, value, hostConfigTypeRichModePropEnum); err != nil {`,
   452  		`func (m *HostConfig) validateRichMode(formats strfmt.Registry) error {`,
   453  		`	if swag.IsZero(m.RichMode) {`,
   454  		`	if err := m.validateRichModeEnum("RichMode", "body", m.RichMode); err != nil {`,
   455  		`func (m *HostConfig) validateShmSize(formats strfmt.Registry) error {`,
   456  		`	if swag.IsZero(m.ShmSize) {`,
   457  		`	if err := validate.MinimumInt("ShmSize", "body", int64(*m.ShmSize), 0, false); err != nil {`,
   458  		`func (m *HostConfig) validateBlkioWeight(formats strfmt.Registry) error {`,
   459  		`	if swag.IsZero(m.BlkioWeight) {`,
   460  		`	if err := validate.MinimumInt("BlkioWeight", "body", int64(m.BlkioWeight), 0, false); err != nil {`,
   461  		`	if err := validate.MaximumInt("BlkioWeight", "body", int64(m.BlkioWeight), 1000, false); err != nil {`,
   462  		`type HostConfigAO0LogConfig struct {`,
   463  		"	Config map[string]string `json:\"Config,omitempty\"`",
   464  		"	Type string `json:\"Type,omitempty\"`",
   465  		`func (m *HostConfigAO0LogConfig) Validate(formats strfmt.Registry) error {`,
   466  		`	if err := m.validateType(formats); err != nil {`,
   467  		`		return errors.CompositeValidationError(res...`,
   468  		`var hostConfigAO0LogConfigTypeTypePropEnum []interface{`,
   469  		`	var res []string`,
   470  		"	if err := json.Unmarshal([]byte(`[\"json-file\",\"syslog\",\"journald\",\"gelf\",\"fluentd\",\"awslogs\",\"splunk\",\"etwlogs\",\"none\"]`), &res); err != nil {",
   471  		`	for _, v := range res {`,
   472  		`		hostConfigAO0LogConfigTypeTypePropEnum = append(hostConfigAO0LogConfigTypeTypePropEnum, v`,
   473  		`	HostConfigAO0LogConfigTypeJSONFile string = "json-file"`,
   474  		`	HostConfigAO0LogConfigTypeSyslog string = "syslog"`,
   475  		`	HostConfigAO0LogConfigTypeJournald string = "journald"`,
   476  		`	HostConfigAO0LogConfigTypeGelf string = "gelf"`,
   477  		`	HostConfigAO0LogConfigTypeFluentd string = "fluentd"`,
   478  		`	HostConfigAO0LogConfigTypeAwslogs string = "awslogs"`,
   479  		`	HostConfigAO0LogConfigTypeSplunk string = "splunk"`,
   480  		`	HostConfigAO0LogConfigTypeEtwlogs string = "etwlogs"`,
   481  		`	HostConfigAO0LogConfigTypeNone string = "none"`,
   482  		`func (m *HostConfigAO0LogConfig) validateTypeEnum(path, location string, value string) error {`,
   483  		`	if err := validate.Enum(path, location, value, hostConfigAO0LogConfigTypeTypePropEnum); err != nil {`,
   484  		`func (m *HostConfigAO0LogConfig) validateType(formats strfmt.Registry) error {`,
   485  		`	if swag.IsZero(m.Type) {`,
   486  		`	if err := m.validateTypeEnum("LogConfig"+"."+"Type", "body", m.Type); err != nil {`,
   487  		`type HostConfigAO0RestartPolicy struct {`,
   488  		"	MaximumRetryCount int64 `json:\"MaximumRetryCount,omitempty\"`",
   489  		"	Name string `json:\"Name,omitempty\"`",
   490  		`func (m *HostConfigAO0RestartPolicy) Validate(formats strfmt.Registry) error {`,
   491  		`		return errors.CompositeValidationError(res...`,
   492  	},
   493  		// not expected
   494  		todo,
   495  		// output in log
   496  		noLines,
   497  		noLines)
   498  
   499  	// load expectations for model: container_create_config.go
   500  	flattenRun.AddExpectations("container_create_config.go", []string{
   501  		`type ContainerCreateConfig struct {`,
   502  		`	ContainerConfig`,
   503  		`	ContainerCreateConfigAllOf1`,
   504  		`func (m *ContainerCreateConfig) Validate(formats strfmt.Registry) error {`,
   505  		`	if err := m.ContainerConfig.Validate(formats); err != nil {`,
   506  		`	if err := m.ContainerCreateConfigAllOf1.Validate(formats); err != nil {`,
   507  		`		return errors.CompositeValidationError(res...`,
   508  	},
   509  		// not expected
   510  		todo,
   511  		// output in log
   512  		noLines,
   513  		noLines)
   514  
   515  	expandRun.AddExpectations("container_create_config.go", []string{
   516  		`type ContainerCreateConfig struct {`,
   517  		"	ArgsEscaped bool `json:\"ArgsEscaped,omitempty\"`",
   518  		"	AttachStderr bool `json:\"AttachStderr,omitempty\"`",
   519  		"	AttachStdin bool `json:\"AttachStdin,omitempty\"`",
   520  		"	AttachStdout bool `json:\"AttachStdout,omitempty\"`",
   521  		"	Cmd []string `json:\"Cmd\"`",
   522  		"	DiskQuota map[string]string `json:\"DiskQuota,omitempty\"`",
   523  		"	Domainname string `json:\"Domainname,omitempty\"`",
   524  		"	Entrypoint []string `json:\"Entrypoint\"`",
   525  		"	Env []string `json:\"Env\"`",
   526  		"	ExposedPorts map[string]interface{} `json:\"ExposedPorts,omitempty\"`",
   527  		"	Hostname strfmt.Hostname `json:\"Hostname,omitempty\"`",
   528  		"	Image string `json:\"Image\"`",
   529  		"	InitScript string `json:\"InitScript,omitempty\"`",
   530  		"	Labels map[string]string `json:\"Labels,omitempty\"`",
   531  		"	MacAddress string `json:\"MacAddress,omitempty\"`",
   532  		"	NetworkDisabled bool `json:\"NetworkDisabled,omitempty\"`",
   533  		"	OnBuild []string `json:\"OnBuild\"`",
   534  		"	OpenStdin bool `json:\"OpenStdin,omitempty\"`",
   535  		"	QuotaID string `json:\"QuotaID,omitempty\"`",
   536  		"	Rich bool `json:\"Rich,omitempty\"`",
   537  		"	RichMode string `json:\"RichMode,omitempty\"`",
   538  		"	Shell []string `json:\"Shell\"`",
   539  		"	SpecAnnotation map[string]string `json:\"SpecAnnotation,omitempty\"`",
   540  		"	StdinOnce bool `json:\"StdinOnce,omitempty\"`",
   541  		"	StopSignal string `json:\"StopSignal,omitempty\"`",
   542  		"	StopTimeout *int64 `json:\"StopTimeout,omitempty\"`",
   543  		"	Tty bool `json:\"Tty,omitempty\"`",
   544  		"	User string `json:\"User,omitempty\"`",
   545  		"	Volumes map[string]interface{} `json:\"Volumes,omitempty\"`",
   546  		"	WorkingDir string `json:\"WorkingDir,omitempty\"`",
   547  		`	HostConfig struct {`,
   548  		"		AutoRemove bool `json:\"AutoRemove,omitempty\"`",
   549  		"		Binds []string `json:\"Binds\"`",
   550  		"		CapAdd []string `json:\"CapAdd\"`",
   551  		"		CapDrop []string `json:\"CapDrop\"`",
   552  		"		Cgroup string `json:\"Cgroup,omitempty\"`",
   553  		"		ConsoleSize []*int64 `json:\"ConsoleSize\"`",
   554  		"		ContainerIDFile string `json:\"ContainerIDFile,omitempty\"`",
   555  		"		DNS []string `json:\"Dns\"`",
   556  		"		DNSOptions []string `json:\"DnsOptions\"`",
   557  		"		DNSSearch []string `json:\"DnsSearch\"`",
   558  		"		EnableLxcfs bool `json:\"EnableLxcfs,omitempty\"`",
   559  		"		ExtraHosts []string `json:\"ExtraHosts\"`",
   560  		"		GroupAdd []string `json:\"GroupAdd\"`",
   561  		"		InitScript string `json:\"InitScript,omitempty\"`",
   562  		"		IpcMode string `json:\"IpcMode,omitempty\"`",
   563  		"		Isolation string `json:\"Isolation,omitempty\"`",
   564  		"		Links []string `json:\"Links\"`",
   565  		"		LogConfig *ContainerCreateConfigHostConfigAO0LogConfig `json:\"LogConfig,omitempty\"`",
   566  		"		NetworkMode string `json:\"NetworkMode,omitempty\"`",
   567  		"		OomScoreAdj int64 `json:\"OomScoreAdj,omitempty\"`",
   568  		"		PidMode string `json:\"PidMode,omitempty\"`",
   569  		"		Privileged bool `json:\"Privileged,omitempty\"`",
   570  		"		PublishAllPorts bool `json:\"PublishAllPorts,omitempty\"`",
   571  		"		ReadonlyRootfs bool `json:\"ReadonlyRootfs,omitempty\"`",
   572  		"		RestartPolicy *ContainerCreateConfigHostConfigAO0RestartPolicy `json:\"RestartPolicy,omitempty\"`",
   573  		"		Rich bool `json:\"Rich,omitempty\"`",
   574  		"		RichMode string `json:\"RichMode,omitempty\"`",
   575  		"		Runtime string `json:\"Runtime,omitempty\"`",
   576  		"		SecurityOpt []string `json:\"SecurityOpt\"`",
   577  		"		ShmSize *int64 `json:\"ShmSize,omitempty\"`",
   578  		"		StorageOpt map[string]string `json:\"StorageOpt,omitempty\"`",
   579  		"		Sysctls map[string]string `json:\"Sysctls,omitempty\"`",
   580  		"		Tmpfs map[string]string `json:\"Tmpfs,omitempty\"`",
   581  		"		UTSMode string `json:\"UTSMode,omitempty\"`",
   582  		"		UsernsMode string `json:\"UsernsMode,omitempty\"`",
   583  		"		VolumeDriver string `json:\"VolumeDriver,omitempty\"`",
   584  		"		VolumesFrom []string `json:\"VolumesFrom\"`",
   585  		"		BlkioWeight uint16 `json:\"BlkioWeight,omitempty\"`",
   586  		"		CgroupParent string `json:\"CgroupParent,omitempty\"`",
   587  		"		CPUShares int64 `json:\"CpuShares,omitempty\"`",
   588  		"		Memory int64 `json:\"Memory,omitempty\"`",
   589  		"	} `json:\"HostConfig,omitempty\"`",
   590  		"	NetworkingConfig *ContainerCreateConfigAO1NetworkingConfig `json:\"NetworkingConfig,omitempty\"`",
   591  		`func (m *ContainerCreateConfig) Validate(formats strfmt.Registry) error {`,
   592  		`	if err := m.validateExposedPorts(formats); err != nil {`,
   593  		`	if err := m.validateHostname(formats); err != nil {`,
   594  		`	if err := m.validateImage(formats); err != nil {`,
   595  		`	if err := m.validateRichMode(formats); err != nil {`,
   596  		`	if err := m.validateVolumes(formats); err != nil {`,
   597  		`	if err := m.validateHostConfig(formats); err != nil {`,
   598  		`	if err := m.validateNetworkingConfig(formats); err != nil {`,
   599  		`		return errors.CompositeValidationError(res...`,
   600  		`var containerCreateConfigExposedPortsValueEnum []interface{`,
   601  		`	var res []interface{`,
   602  		"	if err := json.Unmarshal([]byte(`[{}]`), &res); err != nil {",
   603  		`	for _, v := range res {`,
   604  		`		containerCreateConfigExposedPortsValueEnum = append(containerCreateConfigExposedPortsValueEnum, v`,
   605  		`func (m *ContainerCreateConfig) validateExposedPortsValueEnum(path, location string, value interface{}) error {`,
   606  		`	if err := validate.Enum(path, location, value, containerCreateConfigExposedPortsValueEnum); err != nil {`,
   607  		`func (m *ContainerCreateConfig) validateExposedPorts(formats strfmt.Registry) error {`,
   608  		`	if swag.IsZero(m.ExposedPorts) {`,
   609  		`	for k := range m.ExposedPorts {`,
   610  		//`		if swag.IsZero(m.ExposedPorts[k]) {`,
   611  		`		if err := m.validateExposedPortsValueEnum("ExposedPorts"+"."+k, "body", m.ExposedPorts[k]); err != nil {`,
   612  		`func (m *ContainerCreateConfig) validateHostname(formats strfmt.Registry) error {`,
   613  		`	if swag.IsZero(m.Hostname) {`,
   614  		`	if err := validate.MinLength("Hostname", "body", string(m.Hostname), 1); err != nil {`,
   615  		`	if err := validate.FormatOf("Hostname", "body", "hostname", m.Hostname.String(), formats); err != nil {`,
   616  		`func (m *ContainerCreateConfig) validateImage(formats strfmt.Registry) error {`,
   617  		`	if err := validate.RequiredString("Image", "body", string(m.Image)); err != nil {`,
   618  		`var containerCreateConfigTypeRichModePropEnum []interface{`,
   619  		`	var res []string`,
   620  		"	if err := json.Unmarshal([]byte(`[\"dumb-init\",\"sbin-init\",\"systemd\"]`), &res); err != nil {",
   621  		`	for _, v := range res {`,
   622  		`		containerCreateConfigTypeRichModePropEnum = append(containerCreateConfigTypeRichModePropEnum, v`,
   623  		`func (m *ContainerCreateConfig) validateRichModeEnum(path, location string, value string) error {`,
   624  		`	if err := validate.Enum(path, location, value, containerCreateConfigTypeRichModePropEnum); err != nil {`,
   625  		`func (m *ContainerCreateConfig) validateRichMode(formats strfmt.Registry) error {`,
   626  		`	if swag.IsZero(m.RichMode) {`,
   627  		`	if err := m.validateRichModeEnum("RichMode", "body", m.RichMode); err != nil {`,
   628  		`var containerCreateConfigVolumesValueEnum []interface{`,
   629  		`	var res []interface{`,
   630  		"	if err := json.Unmarshal([]byte(`[{}]`), &res); err != nil {",
   631  		`	for _, v := range res {`,
   632  		`		containerCreateConfigVolumesValueEnum = append(containerCreateConfigVolumesValueEnum, v`,
   633  		`func (m *ContainerCreateConfig) validateVolumesValueEnum(path, location string, value interface{}) error {`,
   634  		`	if err := validate.Enum(path, location, value, containerCreateConfigVolumesValueEnum); err != nil {`,
   635  		`func (m *ContainerCreateConfig) validateVolumes(formats strfmt.Registry) error {`,
   636  		`	if swag.IsZero(m.Volumes) {`,
   637  		`	for k := range m.Volumes {`,
   638  		//`		if swag.IsZero(m.Volumes[k]) {`,
   639  		`		if err := m.validateVolumesValueEnum("Volumes"+"."+k, "body", m.Volumes[k]); err != nil {`,
   640  		`func (m *ContainerCreateConfig) validateHostConfig(formats strfmt.Registry) error {`,
   641  		`	if swag.IsZero(m.HostConfig) {`,
   642  		`	iConsoleSizeSize := int64(len(m.HostConfig.ConsoleSize)`,
   643  		`	if err := validate.MinItems("HostConfig"+"."+"ConsoleSize", "body", iConsoleSizeSize, 2); err != nil {`,
   644  		`	if err := validate.MaxItems("HostConfig"+"."+"ConsoleSize", "body", iConsoleSizeSize, 2); err != nil {`,
   645  		`	for i := 0; i < len(m.HostConfig.ConsoleSize); i++ {`,
   646  		// do we need... ?
   647  		`		if swag.IsZero(m.HostConfig.ConsoleSize[i]) {`,
   648  		//`if err := validate.Required("HostConfig"+"."+"ConsoleSize"+"."+strconv.Itoa(i), "body", m.HostConfig.ConsoleSize[i]); err != nil {`,
   649  		`		if err := validate.MinimumInt("HostConfig"+"."+"ConsoleSize"+"."+strconv.Itoa(i), "body", int64(*m.HostConfig.ConsoleSize[i]), 0, false); err != nil {`,
   650  		// TODO: enum if anonymous allOf is not honored (missing func)
   651  		// => will do that with Enum refactoring
   652  		`	if err := m.validateIsolationEnum("HostConfig"+"."+"Isolation", "body", m.HostConfig.Isolation); err != nil {`,
   653  		`	if m.HostConfig.LogConfig != nil {`,
   654  		`		if err := m.HostConfig.LogConfig.Validate(formats); err != nil {`,
   655  		`			if ve, ok := err.(*errors.Validation); ok {`,
   656  		`				return ve.ValidateName("HostConfig" + "." + "LogConfig"`,
   657  		`	if err := validate.MinimumInt("HostConfig"+"."+"OomScoreAdj", "body", int64(m.HostConfig.OomScoreAdj), -1000, false); err != nil {`,
   658  		`	if err := validate.MaximumInt("HostConfig"+"."+"OomScoreAdj", "body", int64(m.HostConfig.OomScoreAdj), 1000, false); err != nil {`,
   659  		`	if m.HostConfig.RestartPolicy != nil {`,
   660  		`		if err := m.HostConfig.RestartPolicy.Validate(formats); err != nil {`,
   661  		`			if ve, ok := err.(*errors.Validation); ok {`,
   662  		`				return ve.ValidateName("HostConfig" + "." + "RestartPolicy"`,
   663  		`	if err := m.validateRichModeEnum("HostConfig"+"."+"RichMode", "body", m.HostConfig.RichMode); err != nil {`,
   664  		`	if err := validate.MinimumInt("HostConfig"+"."+"ShmSize", "body", int64(*m.HostConfig.ShmSize), 0, false); err != nil {`,
   665  		`	if err := validate.MinimumInt("HostConfig"+"."+"BlkioWeight", "body", int64(m.HostConfig.BlkioWeight), 0, false); err != nil {`,
   666  		`	if err := validate.MaximumInt("HostConfig"+"."+"BlkioWeight", "body", int64(m.HostConfig.BlkioWeight), 1000, false); err != nil {`,
   667  		`func (m *ContainerCreateConfig) validateNetworkingConfig(formats strfmt.Registry) error {`,
   668  		`	if swag.IsZero(m.NetworkingConfig) {`,
   669  		`	if m.NetworkingConfig != nil {`,
   670  		`		if err := m.NetworkingConfig.Validate(formats); err != nil {`,
   671  		`			if ve, ok := err.(*errors.Validation); ok {`,
   672  		`				return ve.ValidateName("NetworkingConfig"`,
   673  		`type ContainerCreateConfigAO1NetworkingConfig struct {`,
   674  		"	EndpointsConfig map[string]ContainerCreateConfigAO1NetworkingConfigEndpointsConfigAnon `json:\"EndpointsConfig,omitempty\"`",
   675  		`func (m *ContainerCreateConfigAO1NetworkingConfig) Validate(formats strfmt.Registry) error {`,
   676  		`	if err := m.validateEndpointsConfig(formats); err != nil {`,
   677  		`		return errors.CompositeValidationError(res...`,
   678  		`func (m *ContainerCreateConfigAO1NetworkingConfig) validateEndpointsConfig(formats strfmt.Registry) error {`,
   679  		`	if swag.IsZero(m.EndpointsConfig) {`,
   680  		`	for k := range m.EndpointsConfig {`,
   681  		`		if swag.IsZero(m.EndpointsConfig[k]) {`,
   682  		`		if val, ok := m.EndpointsConfig[k]; ok {`,
   683  		// NOTE: fixed incorrect IsNullable status in map element
   684  		//`			if val != nil {`,
   685  		`				if err := val.Validate(formats); err != nil {`,
   686  		`type ContainerCreateConfigAO1NetworkingConfigEndpointsConfigAnon struct {`,
   687  		"	Aliases []string `json:\"Aliases\"`",
   688  		"	DriverOpts map[string]string `json:\"DriverOpts,omitempty\"`",
   689  		"	EndpointID string `json:\"EndpointID,omitempty\"`",
   690  		"	Gateway string `json:\"Gateway,omitempty\"`",
   691  		"	GlobalIPV6Address string `json:\"GlobalIPv6Address,omitempty\"`",
   692  		"	GlobalIPV6PrefixLen int64 `json:\"GlobalIPv6PrefixLen,omitempty\"`",
   693  		"	IPAMConfig *ContainerCreateConfigAO1NetworkingConfigEndpointsConfigAnonIPAMConfig `json:\"IPAMConfig,omitempty\"`",
   694  		"	IPAddress string `json:\"IPAddress,omitempty\"`",
   695  		"	IPPrefixLen int64 `json:\"IPPrefixLen,omitempty\"`",
   696  		"	IPV6Gateway string `json:\"IPv6Gateway,omitempty\"`",
   697  		"	Links []string `json:\"Links\"`",
   698  		"	MacAddress string `json:\"MacAddress,omitempty\"`",
   699  		"	NetworkID string `json:\"NetworkID,omitempty\"`",
   700  		`func (m *ContainerCreateConfigAO1NetworkingConfigEndpointsConfigAnon) Validate(formats strfmt.Registry) error {`,
   701  		`	if err := m.validateIPAMConfig(formats); err != nil {`,
   702  		`		return errors.CompositeValidationError(res...`,
   703  		`func (m *ContainerCreateConfigAO1NetworkingConfigEndpointsConfigAnon) validateIPAMConfig(formats strfmt.Registry) error {`,
   704  		`	if swag.IsZero(m.IPAMConfig) {`,
   705  		`	if m.IPAMConfig != nil {`,
   706  		`		if err := m.IPAMConfig.Validate(formats); err != nil {`,
   707  		`			if ve, ok := err.(*errors.Validation); ok {`,
   708  		`				return ve.ValidateName("IPAMConfig"`,
   709  		`type ContainerCreateConfigAO1NetworkingConfigEndpointsConfigAnonIPAMConfig struct {`,
   710  		"	IPV4Address string `json:\"IPv4Address,omitempty\"`",
   711  		"	IPV6Address string `json:\"IPv6Address,omitempty\"`",
   712  		"	LinkLocalIPs []string `json:\"LinkLocalIPs\"`",
   713  		`func (m *ContainerCreateConfigAO1NetworkingConfigEndpointsConfigAnonIPAMConfig) Validate(formats strfmt.Registry) error {`,
   714  		`		return errors.CompositeValidationError(res...`,
   715  		`type ContainerCreateConfigHostConfigAO0LogConfig struct {`,
   716  		"	Config map[string]string `json:\"Config,omitempty\"`",
   717  		"	Type string `json:\"Type,omitempty\"`",
   718  		`func (m *ContainerCreateConfigHostConfigAO0LogConfig) Validate(formats strfmt.Registry) error {`,
   719  		`	if err := m.validateType(formats); err != nil {`,
   720  		`		return errors.CompositeValidationError(res...`,
   721  		`var containerCreateConfigHostConfigAO0LogConfigTypeTypePropEnum []interface{`,
   722  		`	var res []string`,
   723  		"	if err := json.Unmarshal([]byte(`[\"json-file\",\"syslog\",\"journald\",\"gelf\",\"fluentd\",\"awslogs\",\"splunk\",\"etwlogs\",\"none\"]`), &res); err != nil {",
   724  		`	for _, v := range res {`,
   725  		`		containerCreateConfigHostConfigAO0LogConfigTypeTypePropEnum = append(containerCreateConfigHostConfigAO0LogConfigTypeTypePropEnum, v`,
   726  		`	ContainerCreateConfigHostConfigAO0LogConfigTypeJSONFile string = "json-file"`,
   727  		`	ContainerCreateConfigHostConfigAO0LogConfigTypeSyslog string = "syslog"`,
   728  		`	ContainerCreateConfigHostConfigAO0LogConfigTypeJournald string = "journald"`,
   729  		`	ContainerCreateConfigHostConfigAO0LogConfigTypeGelf string = "gelf"`,
   730  		`	ContainerCreateConfigHostConfigAO0LogConfigTypeFluentd string = "fluentd"`,
   731  		`	ContainerCreateConfigHostConfigAO0LogConfigTypeAwslogs string = "awslogs"`,
   732  		`	ContainerCreateConfigHostConfigAO0LogConfigTypeSplunk string = "splunk"`,
   733  		`	ContainerCreateConfigHostConfigAO0LogConfigTypeEtwlogs string = "etwlogs"`,
   734  		`	ContainerCreateConfigHostConfigAO0LogConfigTypeNone string = "none"`,
   735  		`func (m *ContainerCreateConfigHostConfigAO0LogConfig) validateTypeEnum(path, location string, value string) error {`,
   736  		`	if err := validate.Enum(path, location, value, containerCreateConfigHostConfigAO0LogConfigTypeTypePropEnum); err != nil {`,
   737  		`func (m *ContainerCreateConfigHostConfigAO0LogConfig) validateType(formats strfmt.Registry) error {`,
   738  		`	if swag.IsZero(m.Type) {`,
   739  		`	if err := m.validateTypeEnum("HostConfig"+"."+"LogConfig"+"."+"Type", "body", m.Type); err != nil {`,
   740  		`type ContainerCreateConfigHostConfigAO0RestartPolicy struct {`,
   741  		"	MaximumRetryCount int64 `json:\"MaximumRetryCount,omitempty\"`",
   742  		"	Name string `json:\"Name,omitempty\"`",
   743  		`func (m *ContainerCreateConfigHostConfigAO0RestartPolicy) Validate(formats strfmt.Registry) error {`,
   744  		`		return errors.CompositeValidationError(res...`,
   745  	}, []string{
   746  		// not expected
   747  		`			if val != nil {`,
   748  	},
   749  		// output in log
   750  		noLines,
   751  		noLines)
   752  
   753  	// load expectations for model: resources.go
   754  	flattenRun.AddExpectations("resources.go", []string{
   755  		`type Resources struct {`,
   756  		"	BlkioWeight uint16 `json:\"BlkioWeight,omitempty\"`",
   757  		"	CgroupParent string `json:\"CgroupParent,omitempty\"`",
   758  		"	CPUShares int64 `json:\"CpuShares,omitempty\"`",
   759  		"	Memory int64 `json:\"Memory,omitempty\"`",
   760  		`func (m *Resources) Validate(formats strfmt.Registry) error {`,
   761  		`	if err := m.validateBlkioWeight(formats); err != nil {`,
   762  		`		return errors.CompositeValidationError(res...`,
   763  		`func (m *Resources) validateBlkioWeight(formats strfmt.Registry) error {`,
   764  		`	if swag.IsZero(m.BlkioWeight) {`,
   765  		`	if err := validate.MinimumInt("BlkioWeight", "body", int64(m.BlkioWeight), 0, false); err != nil {`,
   766  		`	if err := validate.MaximumInt("BlkioWeight", "body", int64(m.BlkioWeight), 1000, false); err != nil {`,
   767  	},
   768  		// not expected
   769  		todo,
   770  		// output in log
   771  		noLines,
   772  		noLines)
   773  
   774  	expandRun.AddExpectations("resources.go", flattenRun.ExpectedFor("Resources").ExpectedLines, todo, noLines, noLines)
   775  
   776  	// load expectations for model: networking_config.go
   777  	flattenRun.AddExpectations("networking_config.go", []string{
   778  		`type NetworkingConfig struct {`,
   779  		// maps are now simple types
   780  		//"	EndpointsConfig NetworkingConfigEndpointsConfig `json:\"EndpointsConfig,omitempty\"`",
   781  		"	EndpointsConfig map[string]*EndpointSettings `json:\"EndpointsConfig,omitempty\"`",
   782  		`func (m *NetworkingConfig) Validate(formats strfmt.Registry) error {`,
   783  		`	if err := m.validateEndpointsConfig(formats); err != nil {`,
   784  		`		return errors.CompositeValidationError(res...`,
   785  		`func (m *NetworkingConfig) validateEndpointsConfig(formats strfmt.Registry) error {`,
   786  		`	if swag.IsZero(m.EndpointsConfig) {`,
   787  		//`	if err := m.EndpointsConfig.Validate(formats); err != nil {`,
   788  		`       for k := range m.EndpointsConfig {`,
   789  		`	if err := validate.Required("EndpointsConfig"+"."+k, "body", m.EndpointsConfig[k]); err != nil {`,
   790  		`       	if val, ok := m.EndpointsConfig[k]; ok {`,
   791  		`          		if err := val.Validate(formats); err != nil {`,
   792  	},
   793  		// not expected
   794  		todo,
   795  		// output in log
   796  		noLines,
   797  		noLines)
   798  
   799  	// NOTE(fredbi): maps are now simple types: this definition disappears
   800  
   801  	// load expectations for model: endpoint_settings.go
   802  	flattenRun.AddExpectations("endpoint_settings.go", []string{
   803  		`type EndpointSettings struct {`,
   804  		"	Aliases []string `json:\"Aliases\"`",
   805  		"	DriverOpts map[string]string `json:\"DriverOpts,omitempty\"`",
   806  		"	EndpointID string `json:\"EndpointID,omitempty\"`",
   807  		"	Gateway string `json:\"Gateway,omitempty\"`",
   808  		"	GlobalIPV6Address string `json:\"GlobalIPv6Address,omitempty\"`",
   809  		"	GlobalIPV6PrefixLen int64 `json:\"GlobalIPv6PrefixLen,omitempty\"`",
   810  		"	IPAMConfig *EndpointIPAMConfig `json:\"IPAMConfig,omitempty\"`",
   811  		"	IPAddress string `json:\"IPAddress,omitempty\"`",
   812  		"	IPPrefixLen int64 `json:\"IPPrefixLen,omitempty\"`",
   813  		"	IPV6Gateway string `json:\"IPv6Gateway,omitempty\"`",
   814  		"	Links []string `json:\"Links\"`",
   815  		"	MacAddress string `json:\"MacAddress,omitempty\"`",
   816  		"	NetworkID string `json:\"NetworkID,omitempty\"`",
   817  		`func (m *EndpointSettings) Validate(formats strfmt.Registry) error {`,
   818  		`	if err := m.validateIPAMConfig(formats); err != nil {`,
   819  		`		return errors.CompositeValidationError(res...`,
   820  		`func (m *EndpointSettings) validateIPAMConfig(formats strfmt.Registry) error {`,
   821  		`	if swag.IsZero(m.IPAMConfig) {`,
   822  		`	if m.IPAMConfig != nil {`,
   823  		`		if err := m.IPAMConfig.Validate(formats); err != nil {`,
   824  		`			if ve, ok := err.(*errors.Validation); ok {`,
   825  		`				return ve.ValidateName("IPAMConfig"`,
   826  	},
   827  		// not expected
   828  		todo,
   829  		// output in log
   830  		noLines,
   831  		noLines)
   832  
   833  	expandRun.AddExpectations("endpoint_settings.go", []string{
   834  		`type EndpointSettings struct {`,
   835  		"	Aliases []string `json:\"Aliases\"`",
   836  		"	DriverOpts map[string]string `json:\"DriverOpts,omitempty\"`",
   837  		"	EndpointID string `json:\"EndpointID,omitempty\"`",
   838  		"	Gateway string `json:\"Gateway,omitempty\"`",
   839  		"	GlobalIPV6Address string `json:\"GlobalIPv6Address,omitempty\"`",
   840  		"	GlobalIPV6PrefixLen int64 `json:\"GlobalIPv6PrefixLen,omitempty\"`",
   841  		"	IPAMConfig *EndpointSettingsIPAMConfig `json:\"IPAMConfig,omitempty\"`",
   842  		"	IPAddress string `json:\"IPAddress,omitempty\"`",
   843  		"	IPPrefixLen int64 `json:\"IPPrefixLen,omitempty\"`",
   844  		"	IPV6Gateway string `json:\"IPv6Gateway,omitempty\"`",
   845  		"	Links []string `json:\"Links\"`",
   846  		"	MacAddress string `json:\"MacAddress,omitempty\"`",
   847  		"	NetworkID string `json:\"NetworkID,omitempty\"`",
   848  		`func (m *EndpointSettings) Validate(formats strfmt.Registry) error {`,
   849  		`	if err := m.validateIPAMConfig(formats); err != nil {`,
   850  		`		return errors.CompositeValidationError(res...`,
   851  		`func (m *EndpointSettings) validateIPAMConfig(formats strfmt.Registry) error {`,
   852  		`	if swag.IsZero(m.IPAMConfig) {`,
   853  		`	if m.IPAMConfig != nil {`,
   854  		`		if err := m.IPAMConfig.Validate(formats); err != nil {`,
   855  		`			if ve, ok := err.(*errors.Validation); ok {`,
   856  		`				return ve.ValidateName("IPAMConfig"`,
   857  		`type EndpointSettingsIPAMConfig struct {`,
   858  		"	IPV4Address string `json:\"IPv4Address,omitempty\"`",
   859  		"	IPV6Address string `json:\"IPv6Address,omitempty\"`",
   860  		"	LinkLocalIPs []string `json:\"LinkLocalIPs\"`",
   861  		`func (m *EndpointSettingsIPAMConfig) Validate(formats strfmt.Registry) error {`,
   862  		`		return errors.CompositeValidationError(res...`,
   863  	},
   864  		// not expected
   865  		noLines,
   866  		// output in log
   867  		noLines,
   868  		noLines)
   869  
   870  	// load expectations for model: networking_config_endpoints_config.go
   871  	// NOTE(fredbi): maps are now simple types - this definition disappears
   872  }
   873  func initFixtureSimpleAllOf() {
   874  	// testing ../fixtures/bugs/1487/fixture-simple-allOf.yaml with flatten and expand (--skip-flatten)
   875  
   876  	/* we test various composition combinations, including nested, and nested isolated with a properties (e.g. issue #1479) */
   877  
   878  	f := newModelFixture("../fixtures/bugs/1487/fixture-simple-allOf.yaml", "fixture for nested allOf with ref")
   879  	flattenRun := f.AddRun(false)
   880  	expandRun := f.AddRun(true)
   881  
   882  	// load expectations for model: not_really_composed_thing_all_of0.go
   883  	flattenRun.AddExpectations("not_really_composed_thing_all_of0.go", []string{
   884  		`type NotReallyComposedThingAllOf0 struct {`,
   885  		"	Prop0 strfmt.UUID `json:\"prop0,omitempty\"`",
   886  		`func (m *NotReallyComposedThingAllOf0) Validate(formats strfmt.Registry) error {`,
   887  		`	if err := m.validateProp0(formats); err != nil {`,
   888  		`		return errors.CompositeValidationError(res...`,
   889  		`func (m *NotReallyComposedThingAllOf0) validateProp0(formats strfmt.Registry) error {`,
   890  		`	if swag.IsZero(m.Prop0) {`,
   891  		`	if err := validate.FormatOf("prop0", "body", "uuid", m.Prop0.String(), formats); err != nil {`,
   892  	},
   893  		// not expected
   894  		todo,
   895  		// output in log
   896  		noLines,
   897  		noLines)
   898  
   899  	// load expectations for model: not_really_composed_thing.go
   900  	expandRun.AddExpectations("not_really_composed_thing.go", []string{
   901  		`type NotReallyComposedThing struct {`,
   902  		"	Prop0 strfmt.UUID `json:\"prop0,omitempty\"`",
   903  		`func (m *NotReallyComposedThing) UnmarshalJSON(raw []byte) error {`,
   904  		`	var dataAO0 struct {`,
   905  		"		Prop0 strfmt.UUID `json:\"prop0,omitempty\"`",
   906  		`	if err := swag.ReadJSON(raw, &dataAO0); err != nil {`,
   907  		`	m.Prop0 = dataAO0.Prop0`,
   908  		`func (m NotReallyComposedThing) MarshalJSON() ([]byte, error) {`,
   909  		`	_parts := make([][]byte, 0, 1`,
   910  		`	var dataAO0 struct {`,
   911  		"		Prop0 strfmt.UUID `json:\"prop0,omitempty\"`",
   912  		`	dataAO0.Prop0 = m.Prop0`,
   913  		`	jsonDataAO0, errAO0 := swag.WriteJSON(dataAO0`,
   914  		`	if errAO0 != nil {`,
   915  		`		return nil, errAO0`,
   916  		`	_parts = append(_parts, jsonDataAO0`,
   917  		`	return swag.ConcatJSON(_parts...), nil`,
   918  		`func (m *NotReallyComposedThing) Validate(formats strfmt.Registry) error {`,
   919  		`	if err := m.validateProp0(formats); err != nil {`,
   920  		`		return errors.CompositeValidationError(res...`,
   921  		`func (m *NotReallyComposedThing) validateProp0(formats strfmt.Registry) error {`,
   922  		`	if swag.IsZero(m.Prop0) {`,
   923  		`	if err := validate.FormatOf("prop0", "body", "uuid", m.Prop0.String(), formats); err != nil {`,
   924  		`func (m *NotReallyComposedThing) MarshalBinary() ([]byte, error) {`,
   925  		`	if m == nil {`,
   926  		`		return nil, nil`,
   927  		`	return swag.WriteJSON(m`,
   928  		`func (m *NotReallyComposedThing) UnmarshalBinary(b []byte) error {`,
   929  		`	var res NotReallyComposedThing`,
   930  		`	if err := swag.ReadJSON(b, &res); err != nil {`,
   931  		`	*m = res`,
   932  	},
   933  		// not expected
   934  		noLines,
   935  		// output in log
   936  		noLines,
   937  		noLines)
   938  
   939  	// load expectations for model: simple_nested_object_all_of1.go
   940  	flattenRun.AddExpectations("simple_nested_object_all_of1.go", []string{
   941  		`type SimpleNestedObjectAllOf1 struct {`,
   942  		"	Prop3 strfmt.UUID `json:\"prop3,omitempty\"`",
   943  		`func (m *SimpleNestedObjectAllOf1) Validate(formats strfmt.Registry) error {`,
   944  		`	if err := m.validateProp3(formats); err != nil {`,
   945  		`		return errors.CompositeValidationError(res...`,
   946  		`func (m *SimpleNestedObjectAllOf1) validateProp3(formats strfmt.Registry) error {`,
   947  		`	if swag.IsZero(m.Prop3) {`,
   948  		`	if err := validate.FormatOf("prop3", "body", "uuid", m.Prop3.String(), formats); err != nil {`,
   949  	},
   950  		// not expected
   951  		todo,
   952  		// output in log
   953  		noLines,
   954  		noLines)
   955  
   956  	// load expectations for model: break_nested_object_all_of1_prop7.go
   957  	flattenRun.AddExpectations("break_nested_object_all_of1_prop7.go", []string{
   958  		`type BreakNestedObjectAllOf1Prop7 struct {`,
   959  		`	BreakNestedObjectAllOf1Prop7AllOf0`,
   960  		`	BreakNestedObjectAllOf1Prop7AllOf1`,
   961  		`func (m *BreakNestedObjectAllOf1Prop7) Validate(formats strfmt.Registry) error {`,
   962  		`	if err := m.BreakNestedObjectAllOf1Prop7AllOf0.Validate(formats); err != nil {`,
   963  		`	if err := m.BreakNestedObjectAllOf1Prop7AllOf1.Validate(formats); err != nil {`,
   964  		`		return errors.CompositeValidationError(res...`,
   965  	},
   966  		// not expected
   967  		todo,
   968  		// output in log
   969  		noLines,
   970  		noLines)
   971  
   972  	// load expectations for model: composed_thing.go
   973  	flattenRun.AddExpectations("composed_thing.go", []string{
   974  		`type ComposedThing struct {`,
   975  		`	ComposedThingAllOf0`,
   976  		`	ComposedThingAllOf1`,
   977  		`func (m *ComposedThing) Validate(formats strfmt.Registry) error {`,
   978  		`	if err := m.ComposedThingAllOf0.Validate(formats); err != nil {`,
   979  		`	if err := m.ComposedThingAllOf1.Validate(formats); err != nil {`,
   980  		`		return errors.CompositeValidationError(res...`,
   981  	},
   982  		// not expected
   983  		todo,
   984  		// output in log
   985  		noLines,
   986  		noLines)
   987  
   988  	// load expectations for model: composed_thing.go
   989  	expandRun.AddExpectations("composed_thing.go", []string{
   990  		`type ComposedThing struct {`,
   991  		"	Prop1 strfmt.UUID `json:\"prop1,omitempty\"`",
   992  		"	Prop2 strfmt.UUID `json:\"prop2,omitempty\"`",
   993  		`func (m *ComposedThing) UnmarshalJSON(raw []byte) error {`,
   994  		`	var dataAO0 struct {`,
   995  		"		Prop1 strfmt.UUID `json:\"prop1,omitempty\"`",
   996  		`	if err := swag.ReadJSON(raw, &dataAO0); err != nil {`,
   997  		`	m.Prop1 = dataAO0.Prop1`,
   998  		`	var dataAO1 struct {`,
   999  		"		Prop2 strfmt.UUID `json:\"prop2,omitempty\"`",
  1000  		`	if err := swag.ReadJSON(raw, &dataAO1); err != nil {`,
  1001  		`	m.Prop2 = dataAO1.Prop2`,
  1002  		`func (m ComposedThing) MarshalJSON() ([]byte, error) {`,
  1003  		`	_parts := make([][]byte, 0, 2`,
  1004  		`	var dataAO0 struct {`,
  1005  		"		Prop1 strfmt.UUID `json:\"prop1,omitempty\"`",
  1006  		`	dataAO0.Prop1 = m.Prop1`,
  1007  		`	jsonDataAO0, errAO0 := swag.WriteJSON(dataAO0`,
  1008  		`	if errAO0 != nil {`,
  1009  		`		return nil, errAO0`,
  1010  		`	_parts = append(_parts, jsonDataAO0`,
  1011  		`	var dataAO1 struct {`,
  1012  		"		Prop2 strfmt.UUID `json:\"prop2,omitempty\"`",
  1013  		`	dataAO1.Prop2 = m.Prop2`,
  1014  		`	jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1`,
  1015  		`	if errAO1 != nil {`,
  1016  		`		return nil, errAO1`,
  1017  		`	_parts = append(_parts, jsonDataAO1`,
  1018  		`	return swag.ConcatJSON(_parts...), nil`,
  1019  		`func (m *ComposedThing) Validate(formats strfmt.Registry) error {`,
  1020  		`	if err := m.validateProp1(formats); err != nil {`,
  1021  		`	if err := m.validateProp2(formats); err != nil {`,
  1022  		`		return errors.CompositeValidationError(res...`,
  1023  		`func (m *ComposedThing) validateProp1(formats strfmt.Registry) error {`,
  1024  		`	if swag.IsZero(m.Prop1) {`,
  1025  		`	if err := validate.FormatOf("prop1", "body", "uuid", m.Prop1.String(), formats); err != nil {`,
  1026  		`func (m *ComposedThing) validateProp2(formats strfmt.Registry) error {`,
  1027  		`	if swag.IsZero(m.Prop2) {`,
  1028  		`	if err := validate.FormatOf("prop2", "body", "uuid", m.Prop2.String(), formats); err != nil {`,
  1029  		`func (m *ComposedThing) MarshalBinary() ([]byte, error) {`,
  1030  		`	if m == nil {`,
  1031  		`		return nil, nil`,
  1032  		`	return swag.WriteJSON(m`,
  1033  		`func (m *ComposedThing) UnmarshalBinary(b []byte) error {`,
  1034  		`	var res ComposedThing`,
  1035  		`	if err := swag.ReadJSON(b, &res); err != nil {`,
  1036  		`	*m = res`,
  1037  	},
  1038  		// not expected
  1039  		noLines,
  1040  		// output in log
  1041  		noLines,
  1042  		noLines)
  1043  
  1044  	// load expectations for model: break_nested_object.go
  1045  	flattenRun.AddExpectations("break_nested_object.go", []string{
  1046  		`type BreakNestedObject struct {`,
  1047  		`	SimpleNestedObject`,
  1048  		`	BreakNestedObjectAllOf1`,
  1049  		`func (m *BreakNestedObject) Validate(formats strfmt.Registry) error {`,
  1050  		`	if err := m.SimpleNestedObject.Validate(formats); err != nil {`,
  1051  		`	if err := m.BreakNestedObjectAllOf1.Validate(formats); err != nil {`,
  1052  		`		return errors.CompositeValidationError(res...`,
  1053  	},
  1054  		// not expected
  1055  		todo,
  1056  		// output in log
  1057  		noLines,
  1058  		noLines)
  1059  
  1060  	// load expectations for model: break_nested_object.go
  1061  	expandRun.AddExpectations("break_nested_object.go", []string{
  1062  		`type BreakNestedObject struct {`,
  1063  		`	BreakNestedObjectAllOf0`,
  1064  		"	Prop6 strfmt.UUID `json:\"prop6,omitempty\"`",
  1065  		`	Prop7 struct {`,
  1066  		"		Prop8 int64 `json:\"prop8,omitempty\"`",
  1067  		"		Prop9 int64 `json:\"prop9,omitempty\"`",
  1068  		"	} `json:\"prop7,omitempty\"`",
  1069  		`func (m *BreakNestedObject) UnmarshalJSON(raw []byte) error {`,
  1070  		`	var aO0 BreakNestedObjectAllOf0`,
  1071  		`	if err := swag.ReadJSON(raw, &aO0); err != nil {`,
  1072  		`	m.BreakNestedObjectAllOf0 = aO0`,
  1073  		`	var dataAO1 struct {`,
  1074  		"		Prop6 strfmt.UUID `json:\"prop6,omitempty\"`",
  1075  		`		Prop7 struct {`,
  1076  		"			Prop8 int64 `json:\"prop8,omitempty\"`",
  1077  		"			Prop9 int64 `json:\"prop9,omitempty\"`",
  1078  		"		} `json:\"prop7,omitempty\"`",
  1079  		`	if err := swag.ReadJSON(raw, &dataAO1); err != nil {`,
  1080  		`	m.Prop6 = dataAO1.Prop6`,
  1081  		`	m.Prop7 = dataAO1.Prop7`,
  1082  		`func (m BreakNestedObject) MarshalJSON() ([]byte, error) {`,
  1083  		`	_parts := make([][]byte, 0, 2`,
  1084  		`	aO0, err := swag.WriteJSON(m.BreakNestedObjectAllOf0`,
  1085  		`	if err != nil {`,
  1086  		`		return nil, err`,
  1087  		`	_parts = append(_parts, aO0`,
  1088  		`	var dataAO1 struct {`,
  1089  		"		Prop6 strfmt.UUID `json:\"prop6,omitempty\"`",
  1090  		`		Prop7 struct {`,
  1091  		"			Prop8 int64 `json:\"prop8,omitempty\"`",
  1092  		"			Prop9 int64 `json:\"prop9,omitempty\"`",
  1093  		"		} `json:\"prop7,omitempty\"`",
  1094  		`	dataAO1.Prop6 = m.Prop6`,
  1095  		`	dataAO1.Prop7 = m.Prop7`,
  1096  		`	jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1`,
  1097  		`	if errAO1 != nil {`,
  1098  		`		return nil, errAO1`,
  1099  		`	_parts = append(_parts, jsonDataAO1`,
  1100  		`	return swag.ConcatJSON(_parts...), nil`,
  1101  		`func (m *BreakNestedObject) Validate(formats strfmt.Registry) error {`,
  1102  		`	if err := m.BreakNestedObjectAllOf0.Validate(formats); err != nil {`,
  1103  		`	if err := m.validateProp6(formats); err != nil {`,
  1104  		`	if err := m.validateProp7(formats); err != nil {`,
  1105  		`		return errors.CompositeValidationError(res...`,
  1106  		`func (m *BreakNestedObject) validateProp6(formats strfmt.Registry) error {`,
  1107  		`	if swag.IsZero(m.Prop6) {`,
  1108  		`	if err := validate.FormatOf("prop6", "body", "uuid", m.Prop6.String(), formats); err != nil {`,
  1109  		`func (m *BreakNestedObject) validateProp7(formats strfmt.Registry) error {`,
  1110  		`	if swag.IsZero(m.Prop7) {`,
  1111  		`	if err := validate.MinimumInt("prop7"+"."+"prop8", "body", int64(m.Prop7.Prop8), 12, false); err != nil {`,
  1112  		`	if err := validate.MaximumInt("prop7"+"."+"prop9", "body", int64(m.Prop7.Prop9), 12, false); err != nil {`,
  1113  		`func (m *BreakNestedObject) MarshalBinary() ([]byte, error) {`,
  1114  		`	if m == nil {`,
  1115  		`		return nil, nil`,
  1116  		`	return swag.WriteJSON(m`,
  1117  		`func (m *BreakNestedObject) UnmarshalBinary(b []byte) error {`,
  1118  		`	var res BreakNestedObject`,
  1119  		`	if err := swag.ReadJSON(b, &res); err != nil {`,
  1120  		`	*m = res`,
  1121  		`type BreakNestedObjectAllOf0 struct {`,
  1122  		`	BreakNestedObjectAllOf0AllOf0`,
  1123  		"	Prop3 strfmt.UUID `json:\"prop3,omitempty\"`",
  1124  		`func (m *BreakNestedObjectAllOf0) UnmarshalJSON(raw []byte) error {`,
  1125  		`	var aO0 BreakNestedObjectAllOf0AllOf0`,
  1126  		`	if err := swag.ReadJSON(raw, &aO0); err != nil {`,
  1127  		`	m.BreakNestedObjectAllOf0AllOf0 = aO0`,
  1128  		`	var dataAO1 struct {`,
  1129  		"		Prop3 strfmt.UUID `json:\"prop3,omitempty\"`",
  1130  		`	if err := swag.ReadJSON(raw, &dataAO1); err != nil {`,
  1131  		`	m.Prop3 = dataAO1.Prop3`,
  1132  		`func (m BreakNestedObjectAllOf0) MarshalJSON() ([]byte, error) {`,
  1133  		`	_parts := make([][]byte, 0, 2`,
  1134  		`	aO0, err := swag.WriteJSON(m.BreakNestedObjectAllOf0AllOf0`,
  1135  		`	if err != nil {`,
  1136  		`		return nil, err`,
  1137  		`	_parts = append(_parts, aO0`,
  1138  		`	var dataAO1 struct {`,
  1139  		"		Prop3 strfmt.UUID `json:\"prop3,omitempty\"`",
  1140  		`	dataAO1.Prop3 = m.Prop3`,
  1141  		`	jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1`,
  1142  		`	if errAO1 != nil {`,
  1143  		`		return nil, errAO1`,
  1144  		`	_parts = append(_parts, jsonDataAO1`,
  1145  		`	return swag.ConcatJSON(_parts...), nil`,
  1146  		`func (m *BreakNestedObjectAllOf0) Validate(formats strfmt.Registry) error {`,
  1147  		`	if err := m.BreakNestedObjectAllOf0AllOf0.Validate(formats); err != nil {`,
  1148  		`	if err := m.validateProp3(formats); err != nil {`,
  1149  		`		return errors.CompositeValidationError(res...`,
  1150  		`func (m *BreakNestedObjectAllOf0) validateProp3(formats strfmt.Registry) error {`,
  1151  		`	if swag.IsZero(m.Prop3) {`,
  1152  		`	if err := validate.FormatOf("prop3", "body", "uuid", m.Prop3.String(), formats); err != nil {`,
  1153  		`func (m *BreakNestedObjectAllOf0) MarshalBinary() ([]byte, error) {`,
  1154  		`	if m == nil {`,
  1155  		`		return nil, nil`,
  1156  		`	return swag.WriteJSON(m`,
  1157  		`func (m *BreakNestedObjectAllOf0) UnmarshalBinary(b []byte) error {`,
  1158  		`	var res BreakNestedObjectAllOf0`,
  1159  		`	if err := swag.ReadJSON(b, &res); err != nil {`,
  1160  		`	*m = res`,
  1161  		`type BreakNestedObjectAllOf0AllOf0 struct {`,
  1162  		"	Prop1 strfmt.UUID `json:\"prop1,omitempty\"`",
  1163  		"	Prop2 strfmt.UUID `json:\"prop2,omitempty\"`",
  1164  		`func (m *BreakNestedObjectAllOf0AllOf0) UnmarshalJSON(raw []byte) error {`,
  1165  		`	var dataAO0 struct {`,
  1166  		"		Prop1 strfmt.UUID `json:\"prop1,omitempty\"`",
  1167  		`	if err := swag.ReadJSON(raw, &dataAO0); err != nil {`,
  1168  		`	m.Prop1 = dataAO0.Prop1`,
  1169  		`	var dataAO1 struct {`,
  1170  		"		Prop2 strfmt.UUID `json:\"prop2,omitempty\"`",
  1171  		`	if err := swag.ReadJSON(raw, &dataAO1); err != nil {`,
  1172  		`	m.Prop2 = dataAO1.Prop2`,
  1173  		`func (m BreakNestedObjectAllOf0AllOf0) MarshalJSON() ([]byte, error) {`,
  1174  		`	_parts := make([][]byte, 0, 2`,
  1175  		`	var dataAO0 struct {`,
  1176  		"		Prop1 strfmt.UUID `json:\"prop1,omitempty\"`",
  1177  		`	dataAO0.Prop1 = m.Prop1`,
  1178  		`	jsonDataAO0, errAO0 := swag.WriteJSON(dataAO0`,
  1179  		`	if errAO0 != nil {`,
  1180  		`		return nil, errAO0`,
  1181  		`	_parts = append(_parts, jsonDataAO0`,
  1182  		`	var dataAO1 struct {`,
  1183  		"		Prop2 strfmt.UUID `json:\"prop2,omitempty\"`",
  1184  		`	dataAO1.Prop2 = m.Prop2`,
  1185  		`	jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1`,
  1186  		`	if errAO1 != nil {`,
  1187  		`		return nil, errAO1`,
  1188  		`	_parts = append(_parts, jsonDataAO1`,
  1189  		`	return swag.ConcatJSON(_parts...), nil`,
  1190  		`func (m *BreakNestedObjectAllOf0AllOf0) Validate(formats strfmt.Registry) error {`,
  1191  		`	if err := m.validateProp1(formats); err != nil {`,
  1192  		`	if err := m.validateProp2(formats); err != nil {`,
  1193  		`		return errors.CompositeValidationError(res...`,
  1194  		`func (m *BreakNestedObjectAllOf0AllOf0) validateProp1(formats strfmt.Registry) error {`,
  1195  		`	if swag.IsZero(m.Prop1) {`,
  1196  		`	if err := validate.FormatOf("prop1", "body", "uuid", m.Prop1.String(), formats); err != nil {`,
  1197  		`func (m *BreakNestedObjectAllOf0AllOf0) validateProp2(formats strfmt.Registry) error {`,
  1198  		`	if swag.IsZero(m.Prop2) {`,
  1199  		`	if err := validate.FormatOf("prop2", "body", "uuid", m.Prop2.String(), formats); err != nil {`,
  1200  		`func (m *BreakNestedObjectAllOf0AllOf0) MarshalBinary() ([]byte, error) {`,
  1201  		`	if m == nil {`,
  1202  		`		return nil, nil`,
  1203  		`	return swag.WriteJSON(m`,
  1204  		`func (m *BreakNestedObjectAllOf0AllOf0) UnmarshalBinary(b []byte) error {`,
  1205  		`	var res BreakNestedObjectAllOf0AllOf0`,
  1206  		`	if err := swag.ReadJSON(b, &res); err != nil {`,
  1207  		`	*m = res`,
  1208  	},
  1209  		// not expected
  1210  		noLines,
  1211  		// output in log
  1212  		noLines,
  1213  		noLines)
  1214  
  1215  	// load expectations for model: deep_nested_object_all_of1_all_of1.go
  1216  	flattenRun.AddExpectations("deep_nested_object_all_of1_all_of1.go", []string{
  1217  		`type DeepNestedObjectAllOf1AllOf1 struct {`,
  1218  		"	Prop5 strfmt.Date `json:\"prop5,omitempty\"`",
  1219  		`func (m *DeepNestedObjectAllOf1AllOf1) Validate(formats strfmt.Registry) error {`,
  1220  		`	if err := m.validateProp5(formats); err != nil {`,
  1221  		`		return errors.CompositeValidationError(res...`,
  1222  		`func (m *DeepNestedObjectAllOf1AllOf1) validateProp5(formats strfmt.Registry) error {`,
  1223  		`	if swag.IsZero(m.Prop5) {`,
  1224  		`	if err := validate.FormatOf("prop5", "body", "date", m.Prop5.String(), formats); err != nil {`,
  1225  	},
  1226  		// not expected
  1227  		todo,
  1228  		// output in log
  1229  		noLines,
  1230  		noLines)
  1231  
  1232  	// load expectations for model: deep_nested_object.go
  1233  	flattenRun.AddExpectations("deep_nested_object.go", []string{
  1234  		`type DeepNestedObject struct {`,
  1235  		`	SimpleNestedObject`,
  1236  		`	DeepNestedObjectAllOf1`,
  1237  		`func (m *DeepNestedObject) Validate(formats strfmt.Registry) error {`,
  1238  		`	if err := m.SimpleNestedObject.Validate(formats); err != nil {`,
  1239  		`	if err := m.DeepNestedObjectAllOf1.Validate(formats); err != nil {`,
  1240  		`		return errors.CompositeValidationError(res...`,
  1241  	},
  1242  		// not expected
  1243  		todo,
  1244  		// output in log
  1245  		noLines,
  1246  		noLines)
  1247  
  1248  	// load expectations for model: deep_nested_object.go
  1249  	expandRun.AddExpectations("deep_nested_object.go", []string{
  1250  		`type DeepNestedObject struct {`,
  1251  		`	DeepNestedObjectAllOf0`,
  1252  		`	DeepNestedObjectAllOf1`,
  1253  		`func (m *DeepNestedObject) UnmarshalJSON(raw []byte) error {`,
  1254  		`	var aO0 DeepNestedObjectAllOf0`,
  1255  		`	if err := swag.ReadJSON(raw, &aO0); err != nil {`,
  1256  		`	m.DeepNestedObjectAllOf0 = aO0`,
  1257  		`	var aO1 DeepNestedObjectAllOf1`,
  1258  		`	if err := swag.ReadJSON(raw, &aO1); err != nil {`,
  1259  		`	m.DeepNestedObjectAllOf1 = aO1`,
  1260  		`func (m DeepNestedObject) MarshalJSON() ([]byte, error) {`,
  1261  		`	_parts := make([][]byte, 0, 2`,
  1262  		`	aO0, err := swag.WriteJSON(m.DeepNestedObjectAllOf0`,
  1263  		`	if err != nil {`,
  1264  		`		return nil, err`,
  1265  		`	_parts = append(_parts, aO0`,
  1266  		`	aO1, err := swag.WriteJSON(m.DeepNestedObjectAllOf1`,
  1267  		`	if err != nil {`,
  1268  		`		return nil, err`,
  1269  		`	_parts = append(_parts, aO1`,
  1270  		`	return swag.ConcatJSON(_parts...), nil`,
  1271  		`func (m *DeepNestedObject) Validate(formats strfmt.Registry) error {`,
  1272  		`	if err := m.DeepNestedObjectAllOf0.Validate(formats); err != nil {`,
  1273  		`	if err := m.DeepNestedObjectAllOf1.Validate(formats); err != nil {`,
  1274  		`		return errors.CompositeValidationError(res...`,
  1275  		`func (m *DeepNestedObject) MarshalBinary() ([]byte, error) {`,
  1276  		`	if m == nil {`,
  1277  		`		return nil, nil`,
  1278  		`	return swag.WriteJSON(m`,
  1279  		`func (m *DeepNestedObject) UnmarshalBinary(b []byte) error {`,
  1280  		`	var res DeepNestedObject`,
  1281  		`	if err := swag.ReadJSON(b, &res); err != nil {`,
  1282  		`	*m = res`,
  1283  		`type DeepNestedObjectAllOf0 struct {`,
  1284  		`	DeepNestedObjectAllOf0AllOf0`,
  1285  		"	Prop3 strfmt.UUID `json:\"prop3,omitempty\"`",
  1286  		`func (m *DeepNestedObjectAllOf0) UnmarshalJSON(raw []byte) error {`,
  1287  		`	var aO0 DeepNestedObjectAllOf0AllOf0`,
  1288  		`	if err := swag.ReadJSON(raw, &aO0); err != nil {`,
  1289  		`	m.DeepNestedObjectAllOf0AllOf0 = aO0`,
  1290  		`	var dataAO1 struct {`,
  1291  		"		Prop3 strfmt.UUID `json:\"prop3,omitempty\"`",
  1292  		`	if err := swag.ReadJSON(raw, &dataAO1); err != nil {`,
  1293  		`	m.Prop3 = dataAO1.Prop3`,
  1294  		`func (m DeepNestedObjectAllOf0) MarshalJSON() ([]byte, error) {`,
  1295  		`	_parts := make([][]byte, 0, 2`,
  1296  		`	aO0, err := swag.WriteJSON(m.DeepNestedObjectAllOf0AllOf0`,
  1297  		`	if err != nil {`,
  1298  		`		return nil, err`,
  1299  		`	_parts = append(_parts, aO0`,
  1300  		`	var dataAO1 struct {`,
  1301  		"		Prop3 strfmt.UUID `json:\"prop3,omitempty\"`",
  1302  		`	dataAO1.Prop3 = m.Prop3`,
  1303  		`	jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1`,
  1304  		`	if errAO1 != nil {`,
  1305  		`		return nil, errAO1`,
  1306  		`	_parts = append(_parts, jsonDataAO1`,
  1307  		`	return swag.ConcatJSON(_parts...), nil`,
  1308  		`func (m *DeepNestedObjectAllOf0) Validate(formats strfmt.Registry) error {`,
  1309  		`	if err := m.DeepNestedObjectAllOf0AllOf0.Validate(formats); err != nil {`,
  1310  		`	if err := m.validateProp3(formats); err != nil {`,
  1311  		`		return errors.CompositeValidationError(res...`,
  1312  		`func (m *DeepNestedObjectAllOf0) validateProp3(formats strfmt.Registry) error {`,
  1313  		`	if swag.IsZero(m.Prop3) {`,
  1314  		`	if err := validate.FormatOf("prop3", "body", "uuid", m.Prop3.String(), formats); err != nil {`,
  1315  		`func (m *DeepNestedObjectAllOf0) MarshalBinary() ([]byte, error) {`,
  1316  		`	if m == nil {`,
  1317  		`		return nil, nil`,
  1318  		`	return swag.WriteJSON(m`,
  1319  		`func (m *DeepNestedObjectAllOf0) UnmarshalBinary(b []byte) error {`,
  1320  		`	var res DeepNestedObjectAllOf0`,
  1321  		`	if err := swag.ReadJSON(b, &res); err != nil {`,
  1322  		`	*m = res`,
  1323  		`type DeepNestedObjectAllOf0AllOf0 struct {`,
  1324  		"	Prop1 strfmt.UUID `json:\"prop1,omitempty\"`",
  1325  		"	Prop2 strfmt.UUID `json:\"prop2,omitempty\"`",
  1326  		`func (m *DeepNestedObjectAllOf0AllOf0) UnmarshalJSON(raw []byte) error {`,
  1327  		`	var dataAO0 struct {`,
  1328  		"		Prop1 strfmt.UUID `json:\"prop1,omitempty\"`",
  1329  		`	if err := swag.ReadJSON(raw, &dataAO0); err != nil {`,
  1330  		`	m.Prop1 = dataAO0.Prop1`,
  1331  		`	var dataAO1 struct {`,
  1332  		"		Prop2 strfmt.UUID `json:\"prop2,omitempty\"`",
  1333  		`	if err := swag.ReadJSON(raw, &dataAO1); err != nil {`,
  1334  		`	m.Prop2 = dataAO1.Prop2`,
  1335  		`func (m DeepNestedObjectAllOf0AllOf0) MarshalJSON() ([]byte, error) {`,
  1336  		`	_parts := make([][]byte, 0, 2`,
  1337  		`	var dataAO0 struct {`,
  1338  		"		Prop1 strfmt.UUID `json:\"prop1,omitempty\"`",
  1339  		`	dataAO0.Prop1 = m.Prop1`,
  1340  		`	jsonDataAO0, errAO0 := swag.WriteJSON(dataAO0`,
  1341  		`	if errAO0 != nil {`,
  1342  		`		return nil, errAO0`,
  1343  		`	_parts = append(_parts, jsonDataAO0`,
  1344  		`	var dataAO1 struct {`,
  1345  		"		Prop2 strfmt.UUID `json:\"prop2,omitempty\"`",
  1346  		`	dataAO1.Prop2 = m.Prop2`,
  1347  		`	jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1`,
  1348  		`	if errAO1 != nil {`,
  1349  		`		return nil, errAO1`,
  1350  		`	_parts = append(_parts, jsonDataAO1`,
  1351  		`	return swag.ConcatJSON(_parts...), nil`,
  1352  		`func (m *DeepNestedObjectAllOf0AllOf0) Validate(formats strfmt.Registry) error {`,
  1353  		`	if err := m.validateProp1(formats); err != nil {`,
  1354  		`	if err := m.validateProp2(formats); err != nil {`,
  1355  		`		return errors.CompositeValidationError(res...`,
  1356  		`func (m *DeepNestedObjectAllOf0AllOf0) validateProp1(formats strfmt.Registry) error {`,
  1357  		`	if swag.IsZero(m.Prop1) {`,
  1358  		`	if err := validate.FormatOf("prop1", "body", "uuid", m.Prop1.String(), formats); err != nil {`,
  1359  		`func (m *DeepNestedObjectAllOf0AllOf0) validateProp2(formats strfmt.Registry) error {`,
  1360  		`	if swag.IsZero(m.Prop2) {`,
  1361  		`	if err := validate.FormatOf("prop2", "body", "uuid", m.Prop2.String(), formats); err != nil {`,
  1362  		`func (m *DeepNestedObjectAllOf0AllOf0) MarshalBinary() ([]byte, error) {`,
  1363  		`	if m == nil {`,
  1364  		`		return nil, nil`,
  1365  		`	return swag.WriteJSON(m`,
  1366  		`func (m *DeepNestedObjectAllOf0AllOf0) UnmarshalBinary(b []byte) error {`,
  1367  		`	var res DeepNestedObjectAllOf0AllOf0`,
  1368  		`	if err := swag.ReadJSON(b, &res); err != nil {`,
  1369  		`	*m = res`,
  1370  		`type DeepNestedObjectAllOf1 struct {`,
  1371  		"	Prop4 strfmt.UUID `json:\"prop4,omitempty\"`",
  1372  		"	Prop5 strfmt.Date `json:\"prop5,omitempty\"`",
  1373  		`func (m *DeepNestedObjectAllOf1) UnmarshalJSON(raw []byte) error {`,
  1374  		`	var dataAO0 struct {`,
  1375  		"		Prop4 strfmt.UUID `json:\"prop4,omitempty\"`",
  1376  		`	if err := swag.ReadJSON(raw, &dataAO0); err != nil {`,
  1377  		`	m.Prop4 = dataAO0.Prop4`,
  1378  		`	var dataAO1 struct {`,
  1379  		"		Prop5 strfmt.Date `json:\"prop5,omitempty\"`",
  1380  		`	if err := swag.ReadJSON(raw, &dataAO1); err != nil {`,
  1381  		`	m.Prop5 = dataAO1.Prop5`,
  1382  		`func (m DeepNestedObjectAllOf1) MarshalJSON() ([]byte, error) {`,
  1383  		`	_parts := make([][]byte, 0, 2`,
  1384  		`	var dataAO0 struct {`,
  1385  		"		Prop4 strfmt.UUID `json:\"prop4,omitempty\"`",
  1386  		`	dataAO0.Prop4 = m.Prop4`,
  1387  		`	jsonDataAO0, errAO0 := swag.WriteJSON(dataAO0`,
  1388  		`	if errAO0 != nil {`,
  1389  		`		return nil, errAO0`,
  1390  		`	_parts = append(_parts, jsonDataAO0`,
  1391  		`	var dataAO1 struct {`,
  1392  		"		Prop5 strfmt.Date `json:\"prop5,omitempty\"`",
  1393  		`	dataAO1.Prop5 = m.Prop5`,
  1394  		`	jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1`,
  1395  		`	if errAO1 != nil {`,
  1396  		`		return nil, errAO1`,
  1397  		`	_parts = append(_parts, jsonDataAO1`,
  1398  		`	return swag.ConcatJSON(_parts...), nil`,
  1399  		`func (m *DeepNestedObjectAllOf1) Validate(formats strfmt.Registry) error {`,
  1400  		`	if err := m.validateProp4(formats); err != nil {`,
  1401  		`	if err := m.validateProp5(formats); err != nil {`,
  1402  		`		return errors.CompositeValidationError(res...`,
  1403  		`func (m *DeepNestedObjectAllOf1) validateProp4(formats strfmt.Registry) error {`,
  1404  		`	if swag.IsZero(m.Prop4) {`,
  1405  		`	if err := validate.FormatOf("prop4", "body", "uuid", m.Prop4.String(), formats); err != nil {`,
  1406  		`func (m *DeepNestedObjectAllOf1) validateProp5(formats strfmt.Registry) error {`,
  1407  		`	if swag.IsZero(m.Prop5) {`,
  1408  		`	if err := validate.FormatOf("prop5", "body", "date", m.Prop5.String(), formats); err != nil {`,
  1409  		`func (m *DeepNestedObjectAllOf1) MarshalBinary() ([]byte, error) {`,
  1410  		`	if m == nil {`,
  1411  		`		return nil, nil`,
  1412  		`	return swag.WriteJSON(m`,
  1413  		`func (m *DeepNestedObjectAllOf1) UnmarshalBinary(b []byte) error {`,
  1414  		`	var res DeepNestedObjectAllOf1`,
  1415  		`	if err := swag.ReadJSON(b, &res); err != nil {`,
  1416  		`	*m = res`,
  1417  	},
  1418  		// not expected
  1419  		noLines,
  1420  		// output in log
  1421  		noLines,
  1422  		noLines)
  1423  
  1424  	// load expectations for model: break_nested_object_all_of1.go
  1425  	flattenRun.AddExpectations("break_nested_object_all_of1.go", []string{
  1426  		`type BreakNestedObjectAllOf1 struct {`,
  1427  		"	Prop6 strfmt.UUID `json:\"prop6,omitempty\"`",
  1428  		"	Prop7 *BreakNestedObjectAllOf1Prop7 `json:\"prop7,omitempty\"`",
  1429  		`func (m *BreakNestedObjectAllOf1) Validate(formats strfmt.Registry) error {`,
  1430  		`	if err := m.validateProp6(formats); err != nil {`,
  1431  		`	if err := m.validateProp7(formats); err != nil {`,
  1432  		`		return errors.CompositeValidationError(res...`,
  1433  		`func (m *BreakNestedObjectAllOf1) validateProp6(formats strfmt.Registry) error {`,
  1434  		`	if swag.IsZero(m.Prop6) {`,
  1435  		`	if err := validate.FormatOf("prop6", "body", "uuid", m.Prop6.String(), formats); err != nil {`,
  1436  		`func (m *BreakNestedObjectAllOf1) validateProp7(formats strfmt.Registry) error {`,
  1437  		`	if swag.IsZero(m.Prop7) {`,
  1438  		`	if m.Prop7 != nil {`,
  1439  		`		if err := m.Prop7.Validate(formats); err != nil {`,
  1440  		`			if ve, ok := err.(*errors.Validation); ok {`,
  1441  		`				return ve.ValidateName("prop7"`,
  1442  	},
  1443  		// not expected
  1444  		todo,
  1445  		// output in log
  1446  		noLines,
  1447  		noLines)
  1448  
  1449  	// load expectations for model: not_really_composed_thing.go
  1450  	flattenRun.AddExpectations("not_really_composed_thing.go", []string{
  1451  		`type NotReallyComposedThing struct {`,
  1452  		`	NotReallyComposedThingAllOf0`,
  1453  		`func (m *NotReallyComposedThing) Validate(formats strfmt.Registry) error {`,
  1454  		`	if err := m.NotReallyComposedThingAllOf0.Validate(formats); err != nil {`,
  1455  		`		return errors.CompositeValidationError(res...`,
  1456  	},
  1457  		// not expected
  1458  		todo,
  1459  		// output in log
  1460  		noLines,
  1461  		noLines)
  1462  
  1463  	expandRun.AddExpectations("not_really_composed_thing.go", []string{
  1464  		`type NotReallyComposedThing struct {`,
  1465  		"	Prop0 strfmt.UUID `json:\"prop0,omitempty\"`",
  1466  		`func (m *NotReallyComposedThing) Validate(formats strfmt.Registry) error {`,
  1467  		`	if err := m.validateProp0(formats); err != nil {`,
  1468  		`		return errors.CompositeValidationError(res...`,
  1469  		`func (m *NotReallyComposedThing) validateProp0(formats strfmt.Registry) error {`,
  1470  		`	if swag.IsZero(m.Prop0) {`,
  1471  		`	if err := validate.FormatOf("prop0", "body", "uuid", m.Prop0.String(), formats); err != nil {`,
  1472  	},
  1473  		// not expected
  1474  		noLines,
  1475  		// output in log
  1476  		noLines,
  1477  		noLines)
  1478  
  1479  	// load expectations for model: simple_nested_object.go
  1480  	flattenRun.AddExpectations("simple_nested_object.go", []string{
  1481  		`type SimpleNestedObject struct {`,
  1482  		`	ComposedThing`,
  1483  		`	SimpleNestedObjectAllOf1`,
  1484  		`func (m *SimpleNestedObject) Validate(formats strfmt.Registry) error {`,
  1485  		`	if err := m.ComposedThing.Validate(formats); err != nil {`,
  1486  		`	if err := m.SimpleNestedObjectAllOf1.Validate(formats); err != nil {`,
  1487  		`		return errors.CompositeValidationError(res...`,
  1488  	},
  1489  		// not expected
  1490  		todo,
  1491  		// output in log
  1492  		noLines,
  1493  		noLines)
  1494  
  1495  	// load expectations for model: simple_nested_object.go
  1496  	expandRun.AddExpectations("simple_nested_object.go", []string{
  1497  		`type SimpleNestedObject struct {`,
  1498  		`	SimpleNestedObjectAllOf0`,
  1499  		"	Prop3 strfmt.UUID `json:\"prop3,omitempty\"`",
  1500  		`func (m *SimpleNestedObject) UnmarshalJSON(raw []byte) error {`,
  1501  		`	var aO0 SimpleNestedObjectAllOf0`,
  1502  		`	if err := swag.ReadJSON(raw, &aO0); err != nil {`,
  1503  		`	m.SimpleNestedObjectAllOf0 = aO0`,
  1504  		`	var dataAO1 struct {`,
  1505  		"		Prop3 strfmt.UUID `json:\"prop3,omitempty\"`",
  1506  		`	if err := swag.ReadJSON(raw, &dataAO1); err != nil {`,
  1507  		`	m.Prop3 = dataAO1.Prop3`,
  1508  		`func (m SimpleNestedObject) MarshalJSON() ([]byte, error) {`,
  1509  		`	_parts := make([][]byte, 0, 2`,
  1510  		`	aO0, err := swag.WriteJSON(m.SimpleNestedObjectAllOf0`,
  1511  		`	if err != nil {`,
  1512  		`		return nil, err`,
  1513  		`	_parts = append(_parts, aO0`,
  1514  		`	var dataAO1 struct {`,
  1515  		"		Prop3 strfmt.UUID `json:\"prop3,omitempty\"`",
  1516  		`	dataAO1.Prop3 = m.Prop3`,
  1517  		`	jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1`,
  1518  		`	if errAO1 != nil {`,
  1519  		`		return nil, errAO1`,
  1520  		`	_parts = append(_parts, jsonDataAO1`,
  1521  		`	return swag.ConcatJSON(_parts...), nil`,
  1522  		`func (m *SimpleNestedObject) Validate(formats strfmt.Registry) error {`,
  1523  		`	if err := m.SimpleNestedObjectAllOf0.Validate(formats); err != nil {`,
  1524  		`	if err := m.validateProp3(formats); err != nil {`,
  1525  		`		return errors.CompositeValidationError(res...`,
  1526  		`func (m *SimpleNestedObject) validateProp3(formats strfmt.Registry) error {`,
  1527  		`	if swag.IsZero(m.Prop3) {`,
  1528  		`	if err := validate.FormatOf("prop3", "body", "uuid", m.Prop3.String(), formats); err != nil {`,
  1529  		`func (m *SimpleNestedObject) MarshalBinary() ([]byte, error) {`,
  1530  		`	if m == nil {`,
  1531  		`		return nil, nil`,
  1532  		`	return swag.WriteJSON(m`,
  1533  		`func (m *SimpleNestedObject) UnmarshalBinary(b []byte) error {`,
  1534  		`	var res SimpleNestedObject`,
  1535  		`	if err := swag.ReadJSON(b, &res); err != nil {`,
  1536  		`	*m = res`,
  1537  		`type SimpleNestedObjectAllOf0 struct {`,
  1538  		"	Prop1 strfmt.UUID `json:\"prop1,omitempty\"`",
  1539  		"	Prop2 strfmt.UUID `json:\"prop2,omitempty\"`",
  1540  		`func (m *SimpleNestedObjectAllOf0) UnmarshalJSON(raw []byte) error {`,
  1541  		`	var dataAO0 struct {`,
  1542  		"		Prop1 strfmt.UUID `json:\"prop1,omitempty\"`",
  1543  		`	if err := swag.ReadJSON(raw, &dataAO0); err != nil {`,
  1544  		`	m.Prop1 = dataAO0.Prop1`,
  1545  		`	var dataAO1 struct {`,
  1546  		"		Prop2 strfmt.UUID `json:\"prop2,omitempty\"`",
  1547  		`	if err := swag.ReadJSON(raw, &dataAO1); err != nil {`,
  1548  		`	m.Prop2 = dataAO1.Prop2`,
  1549  		`func (m SimpleNestedObjectAllOf0) MarshalJSON() ([]byte, error) {`,
  1550  		`	_parts := make([][]byte, 0, 2`,
  1551  		`	var dataAO0 struct {`,
  1552  		"		Prop1 strfmt.UUID `json:\"prop1,omitempty\"`",
  1553  		`	dataAO0.Prop1 = m.Prop1`,
  1554  		`	jsonDataAO0, errAO0 := swag.WriteJSON(dataAO0`,
  1555  		`	if errAO0 != nil {`,
  1556  		`		return nil, errAO0`,
  1557  		`	_parts = append(_parts, jsonDataAO0`,
  1558  		`	var dataAO1 struct {`,
  1559  		"		Prop2 strfmt.UUID `json:\"prop2,omitempty\"`",
  1560  		`	dataAO1.Prop2 = m.Prop2`,
  1561  		`	jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1`,
  1562  		`	if errAO1 != nil {`,
  1563  		`		return nil, errAO1`,
  1564  		`	_parts = append(_parts, jsonDataAO1`,
  1565  		`	return swag.ConcatJSON(_parts...), nil`,
  1566  		`func (m *SimpleNestedObjectAllOf0) Validate(formats strfmt.Registry) error {`,
  1567  		`	if err := m.validateProp1(formats); err != nil {`,
  1568  		`	if err := m.validateProp2(formats); err != nil {`,
  1569  		`		return errors.CompositeValidationError(res...`,
  1570  		`func (m *SimpleNestedObjectAllOf0) validateProp1(formats strfmt.Registry) error {`,
  1571  		`	if swag.IsZero(m.Prop1) {`,
  1572  		`	if err := validate.FormatOf("prop1", "body", "uuid", m.Prop1.String(), formats); err != nil {`,
  1573  		`func (m *SimpleNestedObjectAllOf0) validateProp2(formats strfmt.Registry) error {`,
  1574  		`	if swag.IsZero(m.Prop2) {`,
  1575  		`	if err := validate.FormatOf("prop2", "body", "uuid", m.Prop2.String(), formats); err != nil {`,
  1576  		`func (m *SimpleNestedObjectAllOf0) MarshalBinary() ([]byte, error) {`,
  1577  		`	if m == nil {`,
  1578  		`		return nil, nil`,
  1579  		`	return swag.WriteJSON(m`,
  1580  		`func (m *SimpleNestedObjectAllOf0) UnmarshalBinary(b []byte) error {`,
  1581  		`	var res SimpleNestedObjectAllOf0`,
  1582  		`	if err := swag.ReadJSON(b, &res); err != nil {`,
  1583  		`	*m = res`,
  1584  	},
  1585  		// not expected
  1586  		noLines,
  1587  		// output in log
  1588  		noLines,
  1589  		noLines)
  1590  
  1591  	// load expectations for model: break_nested_object_all_of1_prop7_all_of0.go
  1592  	flattenRun.AddExpectations("break_nested_object_all_of1_prop7_all_of0.go", []string{
  1593  		`type BreakNestedObjectAllOf1Prop7AllOf0 struct {`,
  1594  		"	Prop8 int64 `json:\"prop8,omitempty\"`",
  1595  		`func (m *BreakNestedObjectAllOf1Prop7AllOf0) Validate(formats strfmt.Registry) error {`,
  1596  		`	if err := m.validateProp8(formats); err != nil {`,
  1597  		`		return errors.CompositeValidationError(res...`,
  1598  		`func (m *BreakNestedObjectAllOf1Prop7AllOf0) validateProp8(formats strfmt.Registry) error {`,
  1599  		`	if swag.IsZero(m.Prop8) {`,
  1600  		`	if err := validate.MinimumInt("prop8", "body", int64(m.Prop8), 12, false); err != nil {`,
  1601  	},
  1602  		// not expected
  1603  		todo,
  1604  		// output in log
  1605  		noLines,
  1606  		noLines)
  1607  
  1608  	// load expectations for model: deep_nested_object_all_of1_all_of0.go
  1609  	flattenRun.AddExpectations("deep_nested_object_all_of1_all_of0.go", []string{
  1610  		`type DeepNestedObjectAllOf1AllOf0 struct {`,
  1611  		"	Prop4 strfmt.UUID `json:\"prop4,omitempty\"`",
  1612  		`func (m *DeepNestedObjectAllOf1AllOf0) Validate(formats strfmt.Registry) error {`,
  1613  		`	if err := m.validateProp4(formats); err != nil {`,
  1614  		`		return errors.CompositeValidationError(res...`,
  1615  		`func (m *DeepNestedObjectAllOf1AllOf0) validateProp4(formats strfmt.Registry) error {`,
  1616  		`	if swag.IsZero(m.Prop4) {`,
  1617  		`	if err := validate.FormatOf("prop4", "body", "uuid", m.Prop4.String(), formats); err != nil {`,
  1618  	},
  1619  		// not expected
  1620  		todo,
  1621  		// output in log
  1622  		noLines,
  1623  		noLines)
  1624  
  1625  	// load expectations for model: break_nested_object_all_of1_prop7_all_of1.go
  1626  	flattenRun.AddExpectations("break_nested_object_all_of1_prop7_all_of1.go", []string{
  1627  		`type BreakNestedObjectAllOf1Prop7AllOf1 struct {`,
  1628  		"	Prop9 int64 `json:\"prop9,omitempty\"`",
  1629  		`func (m *BreakNestedObjectAllOf1Prop7AllOf1) Validate(formats strfmt.Registry) error {`,
  1630  		`	if err := m.validateProp9(formats); err != nil {`,
  1631  		`		return errors.CompositeValidationError(res...`,
  1632  		`func (m *BreakNestedObjectAllOf1Prop7AllOf1) validateProp9(formats strfmt.Registry) error {`,
  1633  		`	if swag.IsZero(m.Prop9) {`,
  1634  		`	if err := validate.MaximumInt("prop9", "body", int64(m.Prop9), 12, false); err != nil {`,
  1635  	},
  1636  		// not expected
  1637  		todo,
  1638  		// output in log
  1639  		noLines,
  1640  		noLines)
  1641  
  1642  	// load expectations for model: composed_thing_all_of0.go
  1643  	flattenRun.AddExpectations("composed_thing_all_of0.go", []string{
  1644  		`type ComposedThingAllOf0 struct {`,
  1645  		"	Prop1 strfmt.UUID `json:\"prop1,omitempty\"`",
  1646  		`func (m *ComposedThingAllOf0) Validate(formats strfmt.Registry) error {`,
  1647  		`	if err := m.validateProp1(formats); err != nil {`,
  1648  		`		return errors.CompositeValidationError(res...`,
  1649  		`func (m *ComposedThingAllOf0) validateProp1(formats strfmt.Registry) error {`,
  1650  		`	if swag.IsZero(m.Prop1) {`,
  1651  		`	if err := validate.FormatOf("prop1", "body", "uuid", m.Prop1.String(), formats); err != nil {`,
  1652  	},
  1653  		// not expected
  1654  		todo,
  1655  		// output in log
  1656  		noLines,
  1657  		noLines)
  1658  
  1659  	// load expectations for model: composed_thing_all_of1.go
  1660  	flattenRun.AddExpectations("composed_thing_all_of1.go", []string{
  1661  		`type ComposedThingAllOf1 struct {`,
  1662  		"	Prop2 strfmt.UUID `json:\"prop2,omitempty\"`",
  1663  		`func (m *ComposedThingAllOf1) Validate(formats strfmt.Registry) error {`,
  1664  		`	if err := m.validateProp2(formats); err != nil {`,
  1665  		`		return errors.CompositeValidationError(res...`,
  1666  		`func (m *ComposedThingAllOf1) validateProp2(formats strfmt.Registry) error {`,
  1667  		`	if swag.IsZero(m.Prop2) {`,
  1668  		`	if err := validate.FormatOf("prop2", "body", "uuid", m.Prop2.String(), formats); err != nil {`,
  1669  	},
  1670  		// not expected
  1671  		todo,
  1672  		// output in log
  1673  		noLines,
  1674  		noLines)
  1675  
  1676  	// load expectations for model: deep_nested_object_all_of1.go
  1677  	flattenRun.AddExpectations("deep_nested_object_all_of1.go", []string{
  1678  		`type DeepNestedObjectAllOf1 struct {`,
  1679  		`	DeepNestedObjectAllOf1AllOf0`,
  1680  		`	DeepNestedObjectAllOf1AllOf1`,
  1681  		`func (m *DeepNestedObjectAllOf1) Validate(formats strfmt.Registry) error {`,
  1682  		`	if err := m.DeepNestedObjectAllOf1AllOf0.Validate(formats); err != nil {`,
  1683  		`	if err := m.DeepNestedObjectAllOf1AllOf1.Validate(formats); err != nil {`,
  1684  		`		return errors.CompositeValidationError(res...`,
  1685  	},
  1686  		// not expected
  1687  		todo,
  1688  		// output in log
  1689  		noLines,
  1690  		noLines)
  1691  
  1692  }
  1693  
  1694  func initFixtureComplexAllOf() {
  1695  	// testing ../fixtures/bugs/1487/fixture-complex-allOf.yaml with flatten and expand (--skip-flatten)
  1696  
  1697  	/*
  1698  	 */
  1699  	f := newModelFixture("../fixtures/bugs/1487/fixture-complex-allOf.yaml", "fixture for nested allOf with ref")
  1700  	flattenRun := f.AddRun(false)
  1701  	expandRun := f.AddRun(true)
  1702  
  1703  	// load expectations for model: aliased_date.go
  1704  	flattenRun.AddExpectations("aliased_date.go", []string{
  1705  		`type AliasedDate strfmt.Date`,
  1706  		`func (m AliasedDate) Validate(formats strfmt.Registry) error {`,
  1707  		`	if err := validate.FormatOf("", "body", "date", strfmt.Date(m).String(), formats); err != nil {`,
  1708  		`		return errors.CompositeValidationError(res...`,
  1709  	},
  1710  		// not expected
  1711  		todo,
  1712  		// output in log
  1713  		noLines,
  1714  		noLines)
  1715  
  1716  	expandRun.AddExpectations("aliased_date.go", flattenRun.ExpectedFor("AliasedDate").ExpectedLines, todo, noLines, noLines)
  1717  
  1718  	// load expectations for model: object_mix_all_of2.go
  1719  	flattenRun.AddExpectations("object_mix_all_of2.go", []string{
  1720  		`type ObjectMixAllOf2 struct {`,
  1721  		"	Prop2 *ObjectMixAllOf2Prop2 `json:\"prop2,omitempty\"`",
  1722  		`func (m *ObjectMixAllOf2) Validate(formats strfmt.Registry) error {`,
  1723  		`	if err := m.validateProp2(formats); err != nil {`,
  1724  		`		return errors.CompositeValidationError(res...`,
  1725  		`func (m *ObjectMixAllOf2) validateProp2(formats strfmt.Registry) error {`,
  1726  		`	if swag.IsZero(m.Prop2) {`,
  1727  		`	if m.Prop2 != nil {`,
  1728  		`		if err := m.Prop2.Validate(formats); err != nil {`,
  1729  		`			if ve, ok := err.(*errors.Validation); ok {`,
  1730  		`				return ve.ValidateName("prop2"`,
  1731  	},
  1732  		// not expected
  1733  		todo,
  1734  		// output in log
  1735  		noLines,
  1736  		noLines)
  1737  
  1738  	// load expectations for model: object_mix.go
  1739  	flattenRun.AddExpectations("object_mix.go", []string{
  1740  		`type ObjectMix struct {`,
  1741  		`	ObjectMixAllOf1`,
  1742  		`	ObjectMixAllOf2`,
  1743  		`func (m *ObjectMix) Validate(formats strfmt.Registry) error {`,
  1744  		`	if err := m.ObjectMixAllOf1.Validate(formats); err != nil {`,
  1745  		`	if err := m.ObjectMixAllOf2.Validate(formats); err != nil {`,
  1746  		`		return errors.CompositeValidationError(res...`,
  1747  	},
  1748  		// not expected
  1749  		todo,
  1750  		// output in log
  1751  		noLines,
  1752  		noLines)
  1753  
  1754  	expandRun.AddExpectations("object_mix.go", []string{
  1755  		`type ObjectMix struct {`,
  1756  		`	Prop1 struct {`,
  1757  		`		ObjectMixProp1AllOf0`,
  1758  		`		ObjectMixProp1AllOf1`,
  1759  		"	} `json:\"prop1,omitempty\"`",
  1760  		`	Prop2 struct {`,
  1761  		`		ObjectMixProp2AllOf0`,
  1762  		`		ObjectMixProp2AllOf1`,
  1763  		"	} `json:\"prop2,omitempty\"`",
  1764  		`func (m *ObjectMix) Validate(formats strfmt.Registry) error {`,
  1765  		`	if err := m.validateProp1(formats); err != nil {`,
  1766  		`	if err := m.validateProp2(formats); err != nil {`,
  1767  		`		return errors.CompositeValidationError(res...`,
  1768  		`func (m *ObjectMix) validateProp1(formats strfmt.Registry) error {`,
  1769  		`	if swag.IsZero(m.Prop1) {`,
  1770  		`func (m *ObjectMix) validateProp2(formats strfmt.Registry) error {`,
  1771  		`	if swag.IsZero(m.Prop2) {`,
  1772  		`type ObjectMixProp1AllOf0 strfmt.Date`,
  1773  		`func (m ObjectMixProp1AllOf0) Validate(formats strfmt.Registry) error {`,
  1774  		`	if err := validate.FormatOf("", "body", "date", strfmt.Date(m).String(), formats); err != nil {`,
  1775  		`		return errors.CompositeValidationError(res...`,
  1776  		`type ObjectMixProp1AllOf1 strfmt.Date`,
  1777  		`func (m ObjectMixProp1AllOf1) Validate(formats strfmt.Registry) error {`,
  1778  		`	if err := validate.FormatOf("", "body", "date", strfmt.Date(m).String(), formats); err != nil {`,
  1779  		`		return errors.CompositeValidationError(res...`,
  1780  		`type ObjectMixProp2AllOf0 strfmt.Date`,
  1781  		`func (m ObjectMixProp2AllOf0) Validate(formats strfmt.Registry) error {`,
  1782  		`	if err := validate.FormatOf("", "body", "date", strfmt.Date(m).String(), formats); err != nil {`,
  1783  		`		return errors.CompositeValidationError(res...`,
  1784  		`type ObjectMixProp2AllOf1 strfmt.Date`,
  1785  		`func (m ObjectMixProp2AllOf1) Validate(formats strfmt.Registry) error {`,
  1786  		`	if err := validate.FormatOf("", "body", "date", strfmt.Date(m).String(), formats); err != nil {`,
  1787  		`		return errors.CompositeValidationError(res...`,
  1788  	},
  1789  		// not expected
  1790  		noLines,
  1791  		// output in log
  1792  		noLines,
  1793  		noLines)
  1794  
  1795  	// load expectations for model: all_of_slices_of_aliases.go
  1796  	flattenRun.AddExpectations("all_of_slices_of_aliases.go", []string{
  1797  		`type AllOfSlicesOfAliases struct {`,
  1798  		`	AllOfSlicesOfAliasesAllOf0`,
  1799  		`	AllOfSlicesOfAliasesAllOf1`,
  1800  		`func (m *AllOfSlicesOfAliases) Validate(formats strfmt.Registry) error {`,
  1801  		`	if err := m.AllOfSlicesOfAliasesAllOf0.Validate(formats); err != nil {`,
  1802  		`	if err := m.AllOfSlicesOfAliasesAllOf1.Validate(formats); err != nil {`,
  1803  		`		return errors.CompositeValidationError(res...`,
  1804  	},
  1805  		// not expected
  1806  		todo,
  1807  		// output in log
  1808  		noLines,
  1809  		noLines)
  1810  
  1811  	expandRun.AddExpectations("all_of_slices_of_aliases.go", []string{
  1812  		`type AllOfSlicesOfAliases struct {`,
  1813  		"	Prop1 []strfmt.Date `json:\"prop1\"`",
  1814  		"	Prop2 []*strfmt.Date `json:\"prop2\"`",
  1815  		`func (m *AllOfSlicesOfAliases) Validate(formats strfmt.Registry) error {`,
  1816  		`	if err := m.validateProp1(formats); err != nil {`,
  1817  		`	if err := m.validateProp2(formats); err != nil {`,
  1818  		`		return errors.CompositeValidationError(res...`,
  1819  		`func (m *AllOfSlicesOfAliases) validateProp1(formats strfmt.Registry) error {`,
  1820  		`	if swag.IsZero(m.Prop1) {`,
  1821  		`	iProp1Size := int64(len(m.Prop1)`,
  1822  		`	if err := validate.MaxItems("prop1", "body", iProp1Size, 10); err != nil {`,
  1823  		`	for i := 0; i < len(m.Prop1); i++ {`,
  1824  		`		if err := validate.FormatOf("prop1"+"."+strconv.Itoa(i), "body", "date", m.Prop1[i].String(), formats); err != nil {`,
  1825  		`func (m *AllOfSlicesOfAliases) validateProp2(formats strfmt.Registry) error {`,
  1826  		`	if swag.IsZero(m.Prop2) {`,
  1827  		`	iProp2Size := int64(len(m.Prop2)`,
  1828  		`	if err := validate.MaxItems("prop2", "body", iProp2Size, 20); err != nil {`,
  1829  		`	for i := 0; i < len(m.Prop2); i++ {`,
  1830  		// do we need Required when item is nullable?
  1831  		// nullable not required:
  1832  		`		if swag.IsZero(m.Prop2[i]) {`,
  1833  		// nullable required:
  1834  		//`	if err := validate.Required("prop2"+"."+strconv.Itoa(i), "body", m.Prop2[i]); err != nil`,
  1835  		`		if err := validate.FormatOf("prop2"+"."+strconv.Itoa(i), "body", "date", m.Prop2[i].String(), formats); err != nil {`,
  1836  	},
  1837  		// not expected
  1838  		noLines,
  1839  		// output in log
  1840  		noLines,
  1841  		noLines)
  1842  
  1843  	// load expectations for model: all_of_aliases.go
  1844  	flattenRun.AddExpectations("all_of_aliases.go", []string{
  1845  		`type AllOfAliases struct {`,
  1846  		`	AliasedDate`,
  1847  		`	AliasedNullableDate`,
  1848  		`func (m *AllOfAliases) Validate(formats strfmt.Registry) error {`,
  1849  		`	if err := m.AliasedDate.Validate(formats); err != nil {`,
  1850  		`	if err := m.AliasedNullableDate.Validate(formats); err != nil {`,
  1851  		`		return errors.CompositeValidationError(res...`,
  1852  	},
  1853  		// not expected
  1854  		todo,
  1855  		// output in log
  1856  		noLines,
  1857  		noLines)
  1858  
  1859  	expandRun.AddExpectations("all_of_aliases.go", []string{
  1860  		`type AllOfAliases struct {`,
  1861  		`	AllOfAliasesAllOf0`,
  1862  		`	AllOfAliasesAllOf1`,
  1863  		`func (m *AllOfAliases) Validate(formats strfmt.Registry) error {`,
  1864  		`	if err := m.AllOfAliasesAllOf0.Validate(formats); err != nil {`,
  1865  		`	if err := m.AllOfAliasesAllOf1.Validate(formats); err != nil {`,
  1866  		`		return errors.CompositeValidationError(res...`,
  1867  		`type AllOfAliasesAllOf0 strfmt.Date`,
  1868  		`func (m AllOfAliasesAllOf0) Validate(formats strfmt.Registry) error {`,
  1869  		`	if err := validate.FormatOf("", "body", "date", strfmt.Date(m).String(), formats); err != nil {`,
  1870  		`		return errors.CompositeValidationError(res...`,
  1871  		// NOTE: the x-nullable has not been honored here
  1872  		// so we don't have: `type AllOfAliasesAllOf1 *strfmt.Date`,
  1873  		// this is by design, since nullability is honored by the container of the alias, not the
  1874  		// alias itself. An allOf branch container is composing types, not pointers.
  1875  		`type AllOfAliasesAllOf1 strfmt.Date`,
  1876  		`func (m AllOfAliasesAllOf1) Validate(formats strfmt.Registry) error {`,
  1877  		`	if err := validate.FormatOf("", "body", "date", strfmt.Date(m).String(), formats); err != nil {`,
  1878  		`		return errors.CompositeValidationError(res...`,
  1879  	},
  1880  		// not expected
  1881  		noLines,
  1882  		// output in log
  1883  		noLines,
  1884  		noLines)
  1885  
  1886  	// load expectations for model: object_mix_all_of1.go
  1887  	flattenRun.AddExpectations("object_mix_all_of1.go", []string{
  1888  		`type ObjectMixAllOf1 struct {`,
  1889  		"	Prop1 *ObjectMixAllOf1Prop1 `json:\"prop1,omitempty\"`",
  1890  		`func (m *ObjectMixAllOf1) Validate(formats strfmt.Registry) error {`,
  1891  		`	if err := m.validateProp1(formats); err != nil {`,
  1892  		`		return errors.CompositeValidationError(res...`,
  1893  		`func (m *ObjectMixAllOf1) validateProp1(formats strfmt.Registry) error {`,
  1894  		`	if swag.IsZero(m.Prop1) {`,
  1895  		`	if m.Prop1 != nil {`,
  1896  		`		if err := m.Prop1.Validate(formats); err != nil {`,
  1897  		`			if ve, ok := err.(*errors.Validation); ok {`,
  1898  		`				return ve.ValidateName("prop1"`,
  1899  	},
  1900  		// not expected
  1901  		todo,
  1902  		// output in log
  1903  		noLines,
  1904  		noLines)
  1905  
  1906  	// load expectations for model: all_of_slices_of_aliases_all_of0.go
  1907  	flattenRun.AddExpectations("all_of_slices_of_aliases_all_of0.go", []string{
  1908  		`type AllOfSlicesOfAliasesAllOf0 struct {`,
  1909  		"	Prop1 []AliasedDate `json:\"prop1\"`",
  1910  		`func (m *AllOfSlicesOfAliasesAllOf0) Validate(formats strfmt.Registry) error {`,
  1911  		`	if err := m.validateProp1(formats); err != nil {`,
  1912  		`		return errors.CompositeValidationError(res...`,
  1913  		`func (m *AllOfSlicesOfAliasesAllOf0) validateProp1(formats strfmt.Registry) error {`,
  1914  		`	if swag.IsZero(m.Prop1) {`,
  1915  		`	iProp1Size := int64(len(m.Prop1)`,
  1916  		`	if err := validate.MaxItems("prop1", "body", iProp1Size, 10); err != nil {`,
  1917  		`	for i := 0; i < len(m.Prop1); i++ {`,
  1918  		`		if err := m.Prop1[i].Validate(formats); err != nil {`,
  1919  		`			if ve, ok := err.(*errors.Validation); ok {`,
  1920  		`				return ve.ValidateName("prop1" + "." + strconv.Itoa(i)`,
  1921  	},
  1922  		// not expected
  1923  		todo,
  1924  		// output in log
  1925  		noLines,
  1926  		noLines)
  1927  
  1928  	// load expectations for model: slice_of_all_of.go
  1929  	flattenRun.AddExpectations("slice_of_all_of.go", []string{
  1930  		`type SliceOfAllOf []*SliceOfAllOfItems`,
  1931  		`func (m SliceOfAllOf) Validate(formats strfmt.Registry) error {`,
  1932  		`	if err := validate.UniqueItems("", "body", m); err != nil {`,
  1933  		`	for i := 0; i < len(m); i++ {`,
  1934  		// do we need Required when item is nullable?
  1935  		// nullable not required:
  1936  		`		if swag.IsZero(m[i]) {`,
  1937  		// nullable required:
  1938  		//`if err := validate.Required(strconv.Itoa(i), "body", m[i]); err != nil {`,
  1939  		`		if m[i] != nil {`,
  1940  		`			if err := m[i].Validate(formats); err != nil {`,
  1941  		`				if ve, ok := err.(*errors.Validation); ok {`,
  1942  		`					return ve.ValidateName(strconv.Itoa(i)`,
  1943  		`		return errors.CompositeValidationError(res...`,
  1944  	},
  1945  		// not expected
  1946  		todo,
  1947  		// output in log
  1948  		noLines,
  1949  		noLines)
  1950  
  1951  	expandRun.AddExpectations("slice_of_all_of.go", []string{
  1952  		`type SliceOfAllOf []*SliceOfAllOfItems0`,
  1953  		`func (m SliceOfAllOf) Validate(formats strfmt.Registry) error {`,
  1954  		`	if err := validate.UniqueItems("", "body", m); err != nil {`,
  1955  		`	for i := 0; i < len(m); i++ {`,
  1956  		// do we need Required when item is nullable?
  1957  		// nullable not required:
  1958  		`		if swag.IsZero(m[i]) {`,
  1959  		// nullable required:
  1960  		//`if err := validate.Required(strconv.Itoa(i), "body", m[i]); err != nil {`,
  1961  		`		if m[i] != nil {`,
  1962  		`			if err := m[i].Validate(formats); err != nil {`,
  1963  		`				if ve, ok := err.(*errors.Validation); ok {`,
  1964  		`					return ve.ValidateName(strconv.Itoa(i)`,
  1965  		`		return errors.CompositeValidationError(res...`,
  1966  		`type SliceOfAllOfItems0 struct {`,
  1967  		"	Prop0 strfmt.UUID `json:\"prop0,omitempty\"`",
  1968  		`	SliceOfAllOfItems0AllOf1`,
  1969  		`func (m *SliceOfAllOfItems0) Validate(formats strfmt.Registry) error {`,
  1970  		`	if err := m.validateProp0(formats); err != nil {`,
  1971  		`		return errors.CompositeValidationError(res...`,
  1972  		`func (m *SliceOfAllOfItems0) validateProp0(formats strfmt.Registry) error {`,
  1973  		`	if swag.IsZero(m.Prop0) {`,
  1974  		`	if err := validate.FormatOf("prop0", "body", "uuid", m.Prop0.String(), formats); err != nil {`,
  1975  		`type SliceOfAllOfItems0AllOf1 []interface{`,
  1976  		// empty validation
  1977  		"func (m SliceOfAllOfItems0AllOf1) Validate(formats strfmt.Registry) error {\n	return nil\n}",
  1978  	},
  1979  		// not expected
  1980  		noLines,
  1981  		// output in log
  1982  		noLines,
  1983  		noLines)
  1984  
  1985  	// load expectations for model: object_mix_all_of2_prop2.go
  1986  	flattenRun.AddExpectations("object_mix_all_of2_prop2.go", []string{
  1987  		`type ObjectMixAllOf2Prop2 struct {`,
  1988  		`	AliasedDate`,
  1989  		`	AliasedNullableDate`,
  1990  		`func (m *ObjectMixAllOf2Prop2) Validate(formats strfmt.Registry) error {`,
  1991  		`	if err := m.AliasedDate.Validate(formats); err != nil {`,
  1992  		`	if err := m.AliasedNullableDate.Validate(formats); err != nil {`,
  1993  		`		return errors.CompositeValidationError(res...`,
  1994  	},
  1995  		// not expected
  1996  		todo,
  1997  		// output in log
  1998  		noLines,
  1999  		noLines)
  2000  
  2001  	// load expectations for model: slice_of_all_of_items_all_of0.go
  2002  	flattenRun.AddExpectations("slice_of_all_of_items_all_of0.go", []string{
  2003  		`type SliceOfAllOfItemsAllOf0 struct {`,
  2004  		"	Prop0 strfmt.UUID `json:\"prop0,omitempty\"`",
  2005  		`func (m *SliceOfAllOfItemsAllOf0) Validate(formats strfmt.Registry) error {`,
  2006  		`	if err := m.validateProp0(formats); err != nil {`,
  2007  		`		return errors.CompositeValidationError(res...`,
  2008  		`func (m *SliceOfAllOfItemsAllOf0) validateProp0(formats strfmt.Registry) error {`,
  2009  		`	if swag.IsZero(m.Prop0) {`,
  2010  		`	if err := validate.FormatOf("prop0", "body", "uuid", m.Prop0.String(), formats); err != nil {`,
  2011  	},
  2012  		// not expected
  2013  		todo,
  2014  		// output in log
  2015  		noLines,
  2016  		noLines)
  2017  
  2018  	// load expectations for model: slice_of_interfaces.go
  2019  	flattenRun.AddExpectations("slice_of_interfaces.go", []string{
  2020  		`type SliceOfInterfaces []interface{`,
  2021  		// empty validation
  2022  		"func (m SliceOfInterfaces) Validate(formats strfmt.Registry) error {\n	return nil\n}",
  2023  	},
  2024  		// not expected
  2025  		todo,
  2026  		// output in log
  2027  		noLines,
  2028  		noLines)
  2029  
  2030  	expandRun.AddExpectations("slice_of_interfaces.go", flattenRun.ExpectedFor("SliceOfInterfaces").ExpectedLines, todo, noLines, noLines)
  2031  
  2032  	// load expectations for model: slice_of_interfaces_with_validation.go
  2033  	flattenRun.AddExpectations("slice_of_interfaces_with_validation.go", []string{
  2034  		`type SliceOfInterfacesWithValidation []interface{`,
  2035  		`func (m SliceOfInterfacesWithValidation) Validate(formats strfmt.Registry) error {`,
  2036  		`	iSliceOfInterfacesWithValidationSize := int64(len(m)`,
  2037  		`	if err := validate.MaxItems("", "body", iSliceOfInterfacesWithValidationSize, 10); err != nil {`,
  2038  		`		return errors.CompositeValidationError(res...`,
  2039  	},
  2040  		// not expected
  2041  		todo,
  2042  		// output in log
  2043  		noLines,
  2044  		noLines)
  2045  
  2046  	expandRun.AddExpectations("slice_of_interfaces_with_validation.go", flattenRun.ExpectedFor("SliceOfInterfacesWithValidation").ExpectedLines, todo, noLines, noLines)
  2047  
  2048  	// load expectations for model: aliased_nullable_date.go
  2049  	flattenRun.AddExpectations("aliased_nullable_date.go", []string{
  2050  		`type AliasedNullableDate strfmt.Date`,
  2051  		`func (m AliasedNullableDate) Validate(formats strfmt.Registry) error {`,
  2052  		`	if err := validate.FormatOf("", "body", "date", strfmt.Date(m).String(), formats); err != nil {`,
  2053  		`		return errors.CompositeValidationError(res...`,
  2054  	},
  2055  		// not expected
  2056  		todo,
  2057  		// output in log
  2058  		noLines,
  2059  		noLines)
  2060  
  2061  	expandRun.AddExpectations("aliased_nullable_date.go", flattenRun.ExpectedFor("AliasedNullableDate").ExpectedLines, todo, noLines, noLines)
  2062  
  2063  	// load expectations for model: slice_mix.go
  2064  	flattenRun.AddExpectations("slice_mix.go", []string{
  2065  		`type SliceMix struct {`,
  2066  		`	SliceOfAllOf`,
  2067  		`	SliceOfInterfaces`,
  2068  		`func (m *SliceMix) Validate(formats strfmt.Registry) error {`,
  2069  		`	if err := m.SliceOfAllOf.Validate(formats); err != nil {`,
  2070  		`	if err := m.SliceOfInterfaces.Validate(formats); err != nil {`,
  2071  		`		return errors.CompositeValidationError(res...`,
  2072  	},
  2073  		// not expected
  2074  		todo,
  2075  		// output in log
  2076  		warning,
  2077  		noLines)
  2078  
  2079  	expandRun.AddExpectations("slice_mix.go", []string{
  2080  		`type SliceMix struct {`,
  2081  		`	SliceMixAllOf0`,
  2082  		`	SliceMixAllOf1`,
  2083  		`func (m *SliceMix) Validate(formats strfmt.Registry) error {`,
  2084  		`	if err := m.SliceMixAllOf0.Validate(formats); err != nil {`,
  2085  		`		return errors.CompositeValidationError(res...`,
  2086  		`type SliceMixAllOf0 []*SliceMixAllOf0Items0`,
  2087  		`func (m SliceMixAllOf0) Validate(formats strfmt.Registry) error {`,
  2088  		`	if err := validate.UniqueItems("", "body", m); err != nil {`,
  2089  		`	for i := 0; i < len(m); i++ {`,
  2090  		// do we need Required when item is nullable?
  2091  		// nullable not required:
  2092  		`		if swag.IsZero(m[i]) {`,
  2093  		// nullable required:
  2094  		//`if err := validate.Required(strconv.Itoa(i), "body", m[i]); err != nil {`,
  2095  		`		if m[i] != nil {`,
  2096  		`			if err := m[i].Validate(formats); err != nil {`,
  2097  		`				if ve, ok := err.(*errors.Validation); ok {`,
  2098  		`					return ve.ValidateName(strconv.Itoa(i)`,
  2099  		`		return errors.CompositeValidationError(res...`,
  2100  		`type SliceMixAllOf0Items0 struct {`,
  2101  		"	Prop0 strfmt.UUID `json:\"prop0,omitempty\"`",
  2102  		`	SliceMixAllOf0Items0AllOf1`,
  2103  		`func (m *SliceMixAllOf0Items0) Validate(formats strfmt.Registry) error {`,
  2104  		`	if err := m.validateProp0(formats); err != nil {`,
  2105  		`		return errors.CompositeValidationError(res...`,
  2106  		`func (m *SliceMixAllOf0Items0) validateProp0(formats strfmt.Registry) error {`,
  2107  		`	if swag.IsZero(m.Prop0) {`,
  2108  		`	if err := validate.FormatOf("prop0", "body", "uuid", m.Prop0.String(), formats); err != nil {`,
  2109  		`type SliceMixAllOf0Items0AllOf1 []interface{`,
  2110  		`type SliceMixAllOf1 []interface{`,
  2111  		// empty validation
  2112  		"func (m SliceMixAllOf0Items0AllOf1) Validate(formats strfmt.Registry) error {\n	return nil\n}",
  2113  	},
  2114  		// not expected
  2115  		noLines,
  2116  		// output in log
  2117  		noLines,
  2118  		noLines)
  2119  
  2120  	// load expectations for model: object_mix_all_of1_prop1.go
  2121  	flattenRun.AddExpectations("object_mix_all_of1_prop1.go", []string{
  2122  		`type ObjectMixAllOf1Prop1 struct {`,
  2123  		`	AliasedDate`,
  2124  		`	AliasedNullableDate`,
  2125  		`func (m *ObjectMixAllOf1Prop1) Validate(formats strfmt.Registry) error {`,
  2126  		`	if err := m.AliasedDate.Validate(formats); err != nil {`,
  2127  		`	if err := m.AliasedNullableDate.Validate(formats); err != nil {`,
  2128  		`		return errors.CompositeValidationError(res...`,
  2129  	},
  2130  		// not expected
  2131  		todo,
  2132  		// output in log
  2133  		noLines,
  2134  		noLines)
  2135  
  2136  	// load expectations for model: slice_of_all_of_items.go
  2137  	flattenRun.AddExpectations("slice_of_all_of_items.go", []string{
  2138  		`type SliceOfAllOfItems struct {`,
  2139  		`	SliceOfAllOfItemsAllOf0`,
  2140  		`	SliceOfInterfaces`,
  2141  		`func (m *SliceOfAllOfItems) Validate(formats strfmt.Registry) error {`,
  2142  		`	if err := m.SliceOfAllOfItemsAllOf0.Validate(formats); err != nil {`,
  2143  		`	if err := m.SliceOfInterfaces.Validate(formats); err != nil {`,
  2144  		`		return errors.CompositeValidationError(res...`,
  2145  	},
  2146  		// not expected
  2147  		todo,
  2148  		// output in log
  2149  		noLines,
  2150  		noLines)
  2151  
  2152  	// load expectations for model: all_of_slices_of_aliases_all_of1.go
  2153  	flattenRun.AddExpectations("all_of_slices_of_aliases_all_of1.go", []string{
  2154  		`type AllOfSlicesOfAliasesAllOf1 struct {`,
  2155  		"	Prop2 []*AliasedNullableDate `json:\"prop2\"`",
  2156  		`func (m *AllOfSlicesOfAliasesAllOf1) Validate(formats strfmt.Registry) error {`,
  2157  		`	if err := m.validateProp2(formats); err != nil {`,
  2158  		`		return errors.CompositeValidationError(res...`,
  2159  		`func (m *AllOfSlicesOfAliasesAllOf1) validateProp2(formats strfmt.Registry) error {`,
  2160  		`	if swag.IsZero(m.Prop2) {`,
  2161  		`	iProp2Size := int64(len(m.Prop2)`,
  2162  		`	if err := validate.MaxItems("prop2", "body", iProp2Size, 20); err != nil {`,
  2163  		`	for i := 0; i < len(m.Prop2); i++ {`,
  2164  		// do we need Required when item is nullable?
  2165  		// nullable not required:
  2166  		`		if swag.IsZero(m.Prop2[i]) {`,
  2167  		// nullable required:
  2168  		//`if err := validate.Required("prop2"+"."+strconv.Itoa(i), "body", m.Prop2[i]); err != nil {`,
  2169  		`		if m.Prop2[i] != nil {`,
  2170  		`			if err := m.Prop2[i].Validate(formats); err != nil {`,
  2171  		`				if ve, ok := err.(*errors.Validation); ok {`,
  2172  		`					return ve.ValidateName("prop2" + "." + strconv.Itoa(i)`,
  2173  	},
  2174  		// not expected
  2175  		todo,
  2176  		// output in log
  2177  		noLines,
  2178  		noLines)
  2179  
  2180  }
  2181  
  2182  func initFixtureIsNullable() {
  2183  	// testing ../fixtures/bugs/1487/fixture-is-nullable.yaml with flatten and expand (--skip-flatten)
  2184  
  2185  	/* just an elementary check with the x-nullable tag
  2186  	 */
  2187  	f := newModelFixture("../fixtures/bugs/1487/fixture-is-nullable.yaml", "fixture for x-nullable flag")
  2188  	flattenRun := f.AddRun(false)
  2189  	expandRun := f.AddRun(true)
  2190  
  2191  	// load expectations for model: thing_with_nullable_dates.go
  2192  	flattenRun.AddExpectations("thing_with_nullable_dates.go", []string{
  2193  		`type ThingWithNullableDates struct {`,
  2194  		"	Prop1 strfmt.Date `json:\"prop1,omitempty\"`",
  2195  		"	Prop2 *strfmt.Date `json:\"prop2,omitempty\"`",
  2196  		`func (m *ThingWithNullableDates) Validate(formats strfmt.Registry) error {`,
  2197  		`	if err := m.validateProp1(formats); err != nil {`,
  2198  		`	if err := m.validateProp2(formats); err != nil {`,
  2199  		`		return errors.CompositeValidationError(res...`,
  2200  		`func (m *ThingWithNullableDates) validateProp1(formats strfmt.Registry) error {`,
  2201  		`	if swag.IsZero(m.Prop1) {`,
  2202  		`	if err := validate.FormatOf("prop1", "body", "date", m.Prop1.String(), formats); err != nil {`,
  2203  		`func (m *ThingWithNullableDates) validateProp2(formats strfmt.Registry) error {`,
  2204  		`	if swag.IsZero(m.Prop2) {`,
  2205  		`	if err := validate.FormatOf("prop2", "body", "date", m.Prop2.String(), formats); err != nil {`,
  2206  	},
  2207  		// not expected
  2208  		todo,
  2209  		// output in log
  2210  		noLines,
  2211  		noLines)
  2212  
  2213  	expandRun.AddExpectations("thing_with_nullable_dates.go", flattenRun.ExpectedFor("ThingWithNullableDates").ExpectedLines, todo, noLines, noLines)
  2214  
  2215  }
  2216  
  2217  func initFixtureItching() {
  2218  	// testing ../fixtures/bugs/1487/fixture-itching.yaml with flatten and expand (--skip-flatten)
  2219  
  2220  	/*
  2221  		This one regroups a number of itching cases, essentially around additionalProperties.
  2222  		In particular, we test some things with empty objects (no properties) which have additionalProperties of diverse sorts.
  2223  		We also added here some funny models using the special types Files, string format: binary and interface{}
  2224  		These special cases do not correspond to actual API specs: we use them to verify the internal behavior of the general.
  2225  	*/
  2226  	f := newModelFixture("../fixtures/bugs/1487/fixture-itching.yaml", "fixture for additionalProperties")
  2227  	flattenRun := f.AddRun(false)
  2228  	expandRun := f.AddRun(true)
  2229  
  2230  	// load expectations for model: top_level_format_issue_my_alternate_file.go
  2231  	flattenRun.AddExpectations("top_level_format_issue_my_alternate_file.go", []string{
  2232  		`import "io"`,
  2233  		`type TopLevelFormatIssueMyAlternateFile io.ReadCloser`,
  2234  	},
  2235  		// not expected
  2236  		todo,
  2237  		// output in log
  2238  		noLines,
  2239  		noLines)
  2240  
  2241  	// load expectations for model: not_validated_additional_props.go
  2242  	flattenRun.AddExpectations("not_validated_additional_props.go", []string{
  2243  		`type NotValidatedAdditionalProps struct {`,
  2244  		"	Prop2 strfmt.UUID `json:\"prop2,omitempty\"`",
  2245  		"	NotValidatedAdditionalProps map[string]map[string]map[string]string `json:\"-\"`",
  2246  		`func (m *NotValidatedAdditionalProps) Validate(formats strfmt.Registry) error {`,
  2247  		`	if err := m.validateProp2(formats); err != nil {`,
  2248  		`		return errors.CompositeValidationError(res...`,
  2249  		`func (m *NotValidatedAdditionalProps) validateProp2(formats strfmt.Registry) error {`,
  2250  		`	if swag.IsZero(m.Prop2) {`,
  2251  		`	if err := validate.FormatOf("prop2", "body", "uuid", m.Prop2.String(), formats); err != nil {`,
  2252  	},
  2253  		// not expected
  2254  		todo,
  2255  		// output in log
  2256  		noLines,
  2257  		noLines)
  2258  
  2259  	expandRun.AddExpectations("not_validated_additional_props.go", flattenRun.ExpectedFor("NotValidatedAdditionalProps").ExpectedLines, todo, noLines, noLines)
  2260  
  2261  	// load expectations for model: aliased_nullable_file.go
  2262  	flattenRun.AddExpectations("aliased_nullable_file.go", []string{
  2263  		`import "io"`,
  2264  		`type AliasedNullableFile io.ReadCloser`,
  2265  	},
  2266  		// not expected
  2267  		todo,
  2268  		// output in log
  2269  		noLines,
  2270  		noLines)
  2271  
  2272  	expandRun.AddExpectations("aliased_nullable_file.go", flattenRun.ExpectedFor("AliasedNullableFile").ExpectedLines, todo, noLines, noLines)
  2273  
  2274  	// load expectations for model: empty_object_with_additional_nullable_primitive.go
  2275  	flattenRun.AddExpectations("empty_object_with_additional_nullable_primitive.go", []string{
  2276  		`type EmptyObjectWithAdditionalNullablePrimitive map[string]*strfmt.Date`,
  2277  		`func (m EmptyObjectWithAdditionalNullablePrimitive) Validate(formats strfmt.Registry) error {`,
  2278  		`	for k := range m {`,
  2279  		`		if swag.IsZero(m[k]) {`,
  2280  		`		if err := validate.FormatOf(k, "body", "date", m[k].String(), formats); err != nil {`,
  2281  		`		return errors.CompositeValidationError(res...`,
  2282  	},
  2283  		// not expected
  2284  		todo,
  2285  		// output in log
  2286  		noLines,
  2287  		noLines)
  2288  
  2289  	expandRun.AddExpectations("empty_object_with_additional_nullable_primitive.go", flattenRun.ExpectedFor("EmptyObjectWithAdditionalNullablePrimitive").ExpectedLines, todo, noLines, noLines)
  2290  
  2291  	// load expectations for model: empty_object_with_additional_alias.go
  2292  	flattenRun.AddExpectations("empty_object_with_additional_alias.go", []string{
  2293  		`type EmptyObjectWithAdditionalAlias map[string]AliasedThing`,
  2294  		`func (m EmptyObjectWithAdditionalAlias) Validate(formats strfmt.Registry) error {`,
  2295  		`	for k := range m {`,
  2296  		`		if err := validate.Required(k, "body", m[k]); err != nil {`,
  2297  		`		if val, ok := m[k]; ok {`,
  2298  		`			if err := val.Validate(formats); err != nil {`,
  2299  		`		return errors.CompositeValidationError(res...`,
  2300  	},
  2301  		// not expected
  2302  		todo,
  2303  		// output in log
  2304  		noLines,
  2305  		noLines)
  2306  
  2307  	expandRun.AddExpectations("empty_object_with_additional_alias.go", []string{
  2308  		`type EmptyObjectWithAdditionalAlias map[string]EmptyObjectWithAdditionalAliasAnon`,
  2309  		`func (m EmptyObjectWithAdditionalAlias) Validate(formats strfmt.Registry) error {`,
  2310  		`	for k := range m {`,
  2311  		`		if swag.IsZero(m[k]) {`,
  2312  		`		if val, ok := m[k]; ok {`,
  2313  		`			if err := val.Validate(formats); err != nil {`,
  2314  		`		return errors.CompositeValidationError(res...`,
  2315  		`type EmptyObjectWithAdditionalAliasAnon struct {`,
  2316  		"	Prop1 strfmt.Date `json:\"prop1,omitempty\"`",
  2317  		`func (m *EmptyObjectWithAdditionalAliasAnon) Validate(formats strfmt.Registry) error {`,
  2318  		`	if err := m.validateProp1(formats); err != nil {`,
  2319  		`		return errors.CompositeValidationError(res...`,
  2320  		`func (m *EmptyObjectWithAdditionalAliasAnon) validateProp1(formats strfmt.Registry) error {`,
  2321  		`	if swag.IsZero(m.Prop1) {`,
  2322  		`	if err := validate.FormatOf("prop1", "body", "date", m.Prop1.String(), formats); err != nil {`,
  2323  	},
  2324  		// not expected
  2325  		noLines,
  2326  		// output in log
  2327  		noLines,
  2328  		noLines)
  2329  
  2330  	// load expectations for model: nullable_thing.go
  2331  	flattenRun.AddExpectations("nullable_thing.go", []string{
  2332  		`type NullableThing strfmt.Date`,
  2333  		`func (m NullableThing) Validate(formats strfmt.Registry) error {`,
  2334  		`	if err := validate.FormatOf("", "body", "date", strfmt.Date(m).String(), formats); err != nil {`,
  2335  		`		return errors.CompositeValidationError(res...`,
  2336  	},
  2337  		// not expected
  2338  		todo,
  2339  		// output in log
  2340  		noLines,
  2341  		noLines)
  2342  
  2343  	expandRun.AddExpectations("nullable_thing.go", flattenRun.ExpectedFor("NullableThing").ExpectedLines, todo, noLines, noLines)
  2344  
  2345  	// load expectations for model: slice_of_aliased_files.go
  2346  	flattenRun.AddExpectations("slice_of_aliased_files.go", []string{
  2347  		`type SliceOfAliasedFiles []AliasedFile`,
  2348  		`func (m SliceOfAliasedFiles) Validate(formats strfmt.Registry) error {`,
  2349  		`	iSliceOfAliasedFilesSize := int64(len(m)`,
  2350  		`	if err := validate.MinItems("", "body", iSliceOfAliasedFilesSize, 4); err != nil {`,
  2351  		`		return errors.CompositeValidationError(res...`,
  2352  	},
  2353  		// not expected
  2354  		todo,
  2355  		// output in log
  2356  		noLines,
  2357  		noLines)
  2358  
  2359  	expandRun.AddExpectations("slice_of_aliased_files.go", []string{
  2360  		`type SliceOfAliasedFiles []io.ReadCloser`,
  2361  		`func (m SliceOfAliasedFiles) Validate(formats strfmt.Registry) error {`,
  2362  		`	iSliceOfAliasedFilesSize := int64(len(m)`,
  2363  		`	if err := validate.MinItems("", "body", iSliceOfAliasedFilesSize, 4); err != nil {`,
  2364  		`		return errors.CompositeValidationError(res...`,
  2365  	},
  2366  		// not expected
  2367  		noLines,
  2368  		// output in log
  2369  		noLines,
  2370  		noLines)
  2371  
  2372  	// load expectations for model: empty_object_with_additional_non_nullable_primitive.go
  2373  	flattenRun.AddExpectations("empty_object_with_additional_non_nullable_primitive.go", []string{
  2374  		`type EmptyObjectWithAdditionalNonNullablePrimitive map[string]strfmt.Date`,
  2375  		`func (m EmptyObjectWithAdditionalNonNullablePrimitive) Validate(formats strfmt.Registry) error {`,
  2376  		`	for k := range m {`,
  2377  		// fix undue IsZero call
  2378  		//`		if swag.IsZero(m[k]) {`,
  2379  		`		if err := validate.FormatOf(k, "body", "date", m[k].String(), formats); err != nil {`,
  2380  		`		return errors.CompositeValidationError(res...`,
  2381  	},
  2382  		// not expected
  2383  		todo,
  2384  		// output in log
  2385  		noLines,
  2386  		noLines)
  2387  
  2388  	expandRun.AddExpectations("empty_object_with_additional_non_nullable_primitive.go", flattenRun.ExpectedFor("EmptyObjectWithAdditionalNonNullablePrimitive").ExpectedLines, todo, noLines, noLines)
  2389  
  2390  	// load expectations for model: good_old_format_issue.go
  2391  	flattenRun.AddExpectations("good_old_format_issue.go", []string{
  2392  		`type GoodOldFormatIssue struct {`,
  2393  		"	AlternateFile GoodOldFormatIssueAlternateFile `json:\"alternateFile,omitempty\"`",
  2394  		"	AnotherFile io.ReadCloser `json:\"anotherFile,omitempty\"`",
  2395  		"	MyBytes strfmt.Base64 `json:\"myBytes,omitempty\"`",
  2396  		"	MyFile io.ReadCloser `json:\"myFile\"`",
  2397  		"	ThisAliasedFile AliasedFile `json:\"thisAliasedFile,omitempty\"`",
  2398  		"	ThisAlternateAliasedFile AliasedTypeFile `json:\"thisAlternateAliasedFile,omitempty\"`",
  2399  		"	ThisNullableAliasedFile *AliasedNullableFile `json:\"thisNullableAliasedFile,omitempty\"`",
  2400  		"	ThisNullableAlternateAliasedFile *AliasedTypeNullableFile `json:\"thisNullableAlternateAliasedFile,omitempty\"`",
  2401  		`func (m *GoodOldFormatIssue) Validate(formats strfmt.Registry) error {`,
  2402  		`	if err := m.validateMyBytes(formats); err != nil {`,
  2403  		`	if err := m.validateMyFile(formats); err != nil {`,
  2404  		`		return errors.CompositeValidationError(res...`,
  2405  		`func (m *GoodOldFormatIssue) validateMyBytes(formats strfmt.Registry) error {`,
  2406  		`	if swag.IsZero(m.MyBytes) {`,
  2407  		// Fixed this: we don't want to call validate.FormatOf() for base64
  2408  		//`	if err := validate.FormatOf("myBytes", "body", "byte", m.MyBytes.String(), formats); err != nil {`,
  2409  		`func (m *GoodOldFormatIssue) validateMyFile(formats strfmt.Registry) error {`,
  2410  		`	if err := validate.Required("myFile", "body", io.ReadCloser(m.MyFile)); err != nil {`,
  2411  	},
  2412  		// not expected
  2413  		todo,
  2414  		// output in log
  2415  		noLines,
  2416  		noLines)
  2417  
  2418  	expandRun.AddExpectations("good_old_format_issue.go", []string{
  2419  		`type GoodOldFormatIssue struct {`,
  2420  		"	AlternateFile io.ReadCloser `json:\"alternateFile,omitempty\"`",
  2421  		"	AnotherFile io.ReadCloser `json:\"anotherFile,omitempty\"`",
  2422  		"	MyBytes strfmt.Base64 `json:\"myBytes,omitempty\"`",
  2423  		"	MyFile io.ReadCloser `json:\"myFile\"`",
  2424  		"	ThisAliasedFile io.ReadCloser `json:\"thisAliasedFile,omitempty\"`",
  2425  		"	ThisAlternateAliasedFile io.ReadCloser `json:\"thisAlternateAliasedFile,omitempty\"`",
  2426  		"	ThisNullableAliasedFile io.ReadCloser `json:\"thisNullableAliasedFile,omitempty\"`",
  2427  		"	ThisNullableAlternateAliasedFile io.ReadCloser `json:\"thisNullableAlternateAliasedFile,omitempty\"`",
  2428  		`func (m *GoodOldFormatIssue) Validate(formats strfmt.Registry) error {`,
  2429  		`	if err := m.validateMyBytes(formats); err != nil {`,
  2430  		`	if err := m.validateMyFile(formats); err != nil {`,
  2431  		`		return errors.CompositeValidationError(res...`,
  2432  		`func (m *GoodOldFormatIssue) validateMyBytes(formats strfmt.Registry) error {`,
  2433  		`	if swag.IsZero(m.MyBytes) {`,
  2434  		// Fixed this: we don't want to call validate.FormatOf() for base64
  2435  		//`	if err := validate.FormatOf("myBytes", "body", "byte", m.MyBytes.String(), formats); err != nil {`,
  2436  		`func (m *GoodOldFormatIssue) validateMyFile(formats strfmt.Registry) error {`,
  2437  		`	if err := validate.Required("myFile", "body", io.ReadCloser(m.MyFile)); err != nil {`,
  2438  	},
  2439  		// not expected
  2440  		noLines,
  2441  		// output in log
  2442  		noLines,
  2443  		noLines)
  2444  
  2445  	// load expectations for model: empty_object_with_additional_slice_additional_properties_items.go
  2446  	flattenRun.AddExpectations("empty_object_with_additional_slice_additional_properties_items.go", []string{
  2447  		`type EmptyObjectWithAdditionalSliceAdditionalPropertiesItems struct {`,
  2448  		"	DummyProp1 strfmt.Date `json:\"dummyProp1,omitempty\"`",
  2449  		`func (m *EmptyObjectWithAdditionalSliceAdditionalPropertiesItems) Validate(formats strfmt.Registry) error {`,
  2450  		`	if err := m.validateDummyProp1(formats); err != nil {`,
  2451  		`		return errors.CompositeValidationError(res...`,
  2452  		`func (m *EmptyObjectWithAdditionalSliceAdditionalPropertiesItems) validateDummyProp1(formats strfmt.Registry) error {`,
  2453  		`	if swag.IsZero(m.DummyProp1) {`,
  2454  		`	if err := validate.FormatOf("dummyProp1", "body", "date", m.DummyProp1.String(), formats); err != nil {`,
  2455  	},
  2456  		// not expected
  2457  		todo,
  2458  		// output in log
  2459  		noLines,
  2460  		noLines)
  2461  
  2462  	// load expectations for model: not_validated_additional_props_slice.go
  2463  	flattenRun.AddExpectations("not_validated_additional_props_slice.go", []string{
  2464  		`type NotValidatedAdditionalPropsSlice struct {`,
  2465  		"	Prop2 strfmt.UUID `json:\"prop2,omitempty\"`",
  2466  		"	NotValidatedAdditionalPropsSlice map[string][]map[string]map[string]string `json:\"-\"`",
  2467  		`func (m *NotValidatedAdditionalPropsSlice) Validate(formats strfmt.Registry) error {`,
  2468  		`	if err := m.validateProp2(formats); err != nil {`,
  2469  		`		return errors.CompositeValidationError(res...`,
  2470  		`func (m *NotValidatedAdditionalPropsSlice) validateProp2(formats strfmt.Registry) error {`,
  2471  		`	if swag.IsZero(m.Prop2) {`,
  2472  		`	if err := validate.FormatOf("prop2", "body", "uuid", m.Prop2.String(), formats); err != nil {`,
  2473  	},
  2474  		// not expected
  2475  		todo,
  2476  		// output in log
  2477  		noLines,
  2478  		noLines)
  2479  
  2480  	// load expectations for model: aliased_type_file.go
  2481  	flattenRun.AddExpectations("aliased_type_file.go", []string{
  2482  		`import "io"`,
  2483  		`type AliasedTypeFile io.ReadCloser`,
  2484  	},
  2485  		// not expected
  2486  		todo,
  2487  		// output in log
  2488  		noLines,
  2489  		noLines)
  2490  
  2491  	expandRun.AddExpectations("aliased_type_file.go", flattenRun.ExpectedFor("AliasedTypeFile").ExpectedLines, todo, noLines, noLines)
  2492  
  2493  	// load expectations for model: object_with_empty_object.go
  2494  	flattenRun.AddExpectations("object_with_empty_object.go", []string{
  2495  		`type ObjectWithEmptyObject struct {`,
  2496  		"	EmptyObj EmptyObjectWithAdditionalAlias `json:\"emptyObj,omitempty\"`",
  2497  		"	NonEmptyObj *NullableThing `json:\"nonEmptyObj,omitempty\"`",
  2498  		`func (m *ObjectWithEmptyObject) Validate(formats strfmt.Registry) error {`,
  2499  		`	if err := m.validateEmptyObj(formats); err != nil {`,
  2500  		`	if err := m.validateNonEmptyObj(formats); err != nil {`,
  2501  		`		return errors.CompositeValidationError(res...`,
  2502  		`func (m *ObjectWithEmptyObject) validateEmptyObj(formats strfmt.Registry) error {`,
  2503  		`	if swag.IsZero(m.EmptyObj) {`,
  2504  		`	if err := m.EmptyObj.Validate(formats); err != nil {`,
  2505  		`		if ve, ok := err.(*errors.Validation); ok {`,
  2506  		`			return ve.ValidateName("emptyObj"`,
  2507  		`func (m *ObjectWithEmptyObject) validateNonEmptyObj(formats strfmt.Registry) error {`,
  2508  		`	if swag.IsZero(m.NonEmptyObj) {`,
  2509  		`	if m.NonEmptyObj != nil {`,
  2510  		`		if err := m.NonEmptyObj.Validate(formats); err != nil {`,
  2511  		`			if ve, ok := err.(*errors.Validation); ok {`,
  2512  		`				return ve.ValidateName("nonEmptyObj"`,
  2513  	},
  2514  		// not expected
  2515  		todo,
  2516  		// output in log
  2517  		noLines,
  2518  		noLines)
  2519  
  2520  	expandRun.AddExpectations("object_with_empty_object.go", []string{
  2521  		`type ObjectWithEmptyObject struct {`,
  2522  		"	EmptyObj map[string]ObjectWithEmptyObjectEmptyObjAnon `json:\"emptyObj,omitempty\"`",
  2523  		"	NonEmptyObj *strfmt.Date `json:\"nonEmptyObj,omitempty\"`",
  2524  		`func (m *ObjectWithEmptyObject) Validate(formats strfmt.Registry) error {`,
  2525  		`	if err := m.validateEmptyObj(formats); err != nil {`,
  2526  		`	if err := m.validateNonEmptyObj(formats); err != nil {`,
  2527  		`		return errors.CompositeValidationError(res...`,
  2528  		`func (m *ObjectWithEmptyObject) validateEmptyObj(formats strfmt.Registry) error {`,
  2529  		`	if swag.IsZero(m.EmptyObj) {`,
  2530  		`	for k := range m.EmptyObj {`,
  2531  		`		if swag.IsZero(m.EmptyObj[k]) {`,
  2532  		`		if val, ok := m.EmptyObj[k]; ok {`,
  2533  		`			if err := val.Validate(formats); err != nil {`,
  2534  		`func (m *ObjectWithEmptyObject) validateNonEmptyObj(formats strfmt.Registry) error {`,
  2535  		`	if swag.IsZero(m.NonEmptyObj) {`,
  2536  		`	if err := validate.FormatOf("nonEmptyObj", "body", "date", m.NonEmptyObj.String(), formats); err != nil {`,
  2537  		`type ObjectWithEmptyObjectEmptyObjAnon struct {`,
  2538  		"	Prop1 strfmt.Date `json:\"prop1,omitempty\"`",
  2539  		`func (m *ObjectWithEmptyObjectEmptyObjAnon) Validate(formats strfmt.Registry) error {`,
  2540  		`	if err := m.validateProp1(formats); err != nil {`,
  2541  		`		return errors.CompositeValidationError(res...`,
  2542  		`func (m *ObjectWithEmptyObjectEmptyObjAnon) validateProp1(formats strfmt.Registry) error {`,
  2543  		`	if swag.IsZero(m.Prop1) {`,
  2544  		`	if err := validate.FormatOf("prop1", "body", "date", m.Prop1.String(), formats); err != nil {`,
  2545  	},
  2546  		// not expected
  2547  		noLines,
  2548  		// output in log
  2549  		noLines,
  2550  		noLines)
  2551  
  2552  	// load expectations for model: aliased_file.go
  2553  	flattenRun.AddExpectations("aliased_file.go", []string{
  2554  		`import "io"`,
  2555  		`type AliasedFile io.ReadCloser`,
  2556  	},
  2557  		// not expected
  2558  		todo,
  2559  		// output in log
  2560  		noLines,
  2561  		noLines)
  2562  
  2563  	expandRun.AddExpectations("aliased_file.go", flattenRun.ExpectedFor("AliasedFile").ExpectedLines, todo, noLines, noLines)
  2564  
  2565  	// load expectations for model: empty_object_with_additional_slice.go
  2566  	flattenRun.AddExpectations("empty_object_with_additional_slice.go", []string{
  2567  		`type EmptyObjectWithAdditionalSlice map[string][]EmptyObjectWithAdditionalSliceAdditionalPropertiesItems`,
  2568  		`func (m EmptyObjectWithAdditionalSlice) Validate(formats strfmt.Registry) error {`,
  2569  		// fixed undue Required on this aliased type
  2570  		//`	if err := validate.Required("", "body", EmptyObjectWithAdditionalSlice(m)); err != nil {`,
  2571  		`	for k := range m {`,
  2572  		`		if err := validate.Required(k, "body", m[k]); err != nil {`,
  2573  		`		for i := 0; i < len(m[k]); i++ {`,
  2574  		`			if err := m[k][i].Validate(formats); err != nil {`,
  2575  		`				if ve, ok := err.(*errors.Validation); ok {`,
  2576  		`					return ve.ValidateName(k + "." + strconv.Itoa(i)`,
  2577  		`		return errors.CompositeValidationError(res...`,
  2578  	},
  2579  		// not expected
  2580  		todo,
  2581  		// output in log
  2582  		noLines,
  2583  		noLines)
  2584  
  2585  	expandRun.AddExpectations("empty_object_with_additional_slice.go", []string{
  2586  		`type EmptyObjectWithAdditionalSlice map[string][]EmptyObjectWithAdditionalSliceItems0`,
  2587  		`func (m EmptyObjectWithAdditionalSlice) Validate(formats strfmt.Registry) error {`,
  2588  		// fixed undue Required on this aliased type
  2589  		//`	if err := validate.Required("", "body", EmptyObjectWithAdditionalSlice(m)); err != nil {`,
  2590  		`	for k := range m {`,
  2591  		`		if err := validate.Required(k, "body", m[k]); err != nil {`,
  2592  		`		for i := 0; i < len(m[k]); i++ {`,
  2593  		`			if err := m[k][i].Validate(formats); err != nil {`,
  2594  		`				if ve, ok := err.(*errors.Validation); ok {`,
  2595  		`					return ve.ValidateName(k + "." + strconv.Itoa(i)`,
  2596  		`		return errors.CompositeValidationError(res...`,
  2597  		`type EmptyObjectWithAdditionalSliceItems0 struct {`,
  2598  		"	DummyProp1 strfmt.Date `json:\"dummyProp1,omitempty\"`",
  2599  		`func (m *EmptyObjectWithAdditionalSliceItems0) Validate(formats strfmt.Registry) error {`,
  2600  		`	if err := m.validateDummyProp1(formats); err != nil {`,
  2601  		`		return errors.CompositeValidationError(res...`,
  2602  		`func (m *EmptyObjectWithAdditionalSliceItems0) validateDummyProp1(formats strfmt.Registry) error {`,
  2603  		`	if swag.IsZero(m.DummyProp1) {`,
  2604  		`	if err := validate.FormatOf("dummyProp1", "body", "date", m.DummyProp1.String(), formats); err != nil {`,
  2605  	},
  2606  		// not expected
  2607  		noLines,
  2608  		// output in log
  2609  		noLines,
  2610  		noLines)
  2611  
  2612  	// load expectations for model: additional_aliased_file.go
  2613  	flattenRun.AddExpectations("additional_aliased_file.go", []string{
  2614  		`type AdditionalAliasedFile interface{`,
  2615  	},
  2616  		// not expected
  2617  		todo,
  2618  		// output in log
  2619  		noLines,
  2620  		noLines)
  2621  
  2622  	expandRun.AddExpectations("additional_aliased_file.go", flattenRun.ExpectedFor("AdditionalAliasedFile").ExpectedLines, todo, noLines, noLines)
  2623  
  2624  	// load expectations for model: good_old_format_issue_alternate_file.go
  2625  	flattenRun.AddExpectations("good_old_format_issue_alternate_file.go", []string{
  2626  		`import "io"`,
  2627  		`type GoodOldFormatIssueAlternateFile io.ReadCloser`,
  2628  	},
  2629  		// not expected
  2630  		todo,
  2631  		// output in log
  2632  		noLines,
  2633  		noLines)
  2634  
  2635  	// load expectations for model: empty_object_with_additional_nested_slice_additional_properties_items_items_items.go
  2636  	flattenRun.AddExpectations("empty_object_with_additional_nested_slice_additional_properties_items_items_items.go", []string{
  2637  		`type EmptyObjectWithAdditionalNestedSliceAdditionalPropertiesItemsItemsItems struct {`,
  2638  		"	DummyProp1 strfmt.Date `json:\"dummyProp1,omitempty\"`",
  2639  		`func (m *EmptyObjectWithAdditionalNestedSliceAdditionalPropertiesItemsItemsItems) Validate(formats strfmt.Registry) error {`,
  2640  		`	if err := m.validateDummyProp1(formats); err != nil {`,
  2641  		`		return errors.CompositeValidationError(res...`,
  2642  		`func (m *EmptyObjectWithAdditionalNestedSliceAdditionalPropertiesItemsItemsItems) validateDummyProp1(formats strfmt.Registry) error {`,
  2643  		`	if swag.IsZero(m.DummyProp1) {`,
  2644  		`	if err := validate.FormatOf("dummyProp1", "body", "date", m.DummyProp1.String(), formats); err != nil {`,
  2645  	},
  2646  		// not expected
  2647  		todo,
  2648  		// output in log
  2649  		noLines,
  2650  		noLines)
  2651  
  2652  	// load expectations for model: aliased_thing.go
  2653  	flattenRun.AddExpectations("aliased_thing.go", []string{
  2654  		`type AliasedThing struct {`,
  2655  		"	Prop1 strfmt.Date `json:\"prop1,omitempty\"`",
  2656  		`func (m *AliasedThing) Validate(formats strfmt.Registry) error {`,
  2657  		`	if err := m.validateProp1(formats); err != nil {`,
  2658  		`		return errors.CompositeValidationError(res...`,
  2659  		`func (m *AliasedThing) validateProp1(formats strfmt.Registry) error {`,
  2660  		`	if swag.IsZero(m.Prop1) {`,
  2661  		`	if err := validate.FormatOf("prop1", "body", "date", m.Prop1.String(), formats); err != nil {`,
  2662  	},
  2663  		// not expected
  2664  		todo,
  2665  		// output in log
  2666  		noLines,
  2667  		noLines)
  2668  
  2669  	expandRun.AddExpectations("aliased_thing.go", flattenRun.ExpectedFor("AliasedThing").ExpectedLines, todo, noLines, noLines)
  2670  
  2671  	// load expectations for model: additional_file.go
  2672  	flattenRun.AddExpectations("additional_file.go", []string{
  2673  		`type AdditionalFile struct {`,
  2674  		"	DirName string `json:\"dirName,omitempty\"`",
  2675  		"	AdditionalFile map[string]io.ReadCloser `json:\"-\"`",
  2676  		// empty validation
  2677  		"func (m *AdditionalFile) Validate(formats strfmt.Registry) error {\n	return nil\n}",
  2678  	},
  2679  		// not expected
  2680  		todo,
  2681  		// output in log
  2682  		noLines,
  2683  		noLines)
  2684  
  2685  	expandRun.AddExpectations("additional_file.go", flattenRun.ExpectedFor("AdditionalFile").ExpectedLines, todo, noLines, noLines)
  2686  
  2687  	// load expectations for model: aliased_type_nullable_file.go
  2688  	flattenRun.AddExpectations("aliased_type_nullable_file.go", []string{
  2689  		`import "io"`,
  2690  		`type AliasedTypeNullableFile io.ReadCloser`,
  2691  	},
  2692  		// not expected
  2693  		validatable,
  2694  		// output in log
  2695  		noLines,
  2696  		noLines)
  2697  
  2698  	expandRun.AddExpectations("aliased_type_nullable_file.go", flattenRun.ExpectedFor("AliasedTypeNullableFile").ExpectedLines, validatable, noLines, noLines)
  2699  
  2700  	// load expectations for model: top_level_format_issue.go
  2701  	flattenRun.AddExpectations("top_level_format_issue.go", []string{
  2702  		`type TopLevelFormatIssue struct {`,
  2703  		"	MyAlternateFile TopLevelFormatIssueMyAlternateFile `json:\"myAlternateFile,omitempty\"`",
  2704  		"	MyFile io.ReadCloser `json:\"myFile,omitempty\"`",
  2705  		// empty validation
  2706  		"func (m *TopLevelFormatIssue) Validate(formats strfmt.Registry) error {\n	return nil\n}",
  2707  	},
  2708  		// not expected
  2709  		todo,
  2710  		// output in log
  2711  		noLines,
  2712  		noLines)
  2713  
  2714  	expandRun.AddExpectations("top_level_format_issue.go", []string{
  2715  		`type TopLevelFormatIssue struct {`,
  2716  		"	MyAlternateFile io.ReadCloser `json:\"myAlternateFile,omitempty\"`",
  2717  		"	MyFile io.ReadCloser `json:\"myFile,omitempty\"`",
  2718  		// empty validation
  2719  		"func (m *TopLevelFormatIssue) Validate(formats strfmt.Registry) error {\n	return nil\n}",
  2720  	},
  2721  		// not expected
  2722  		noLines,
  2723  		// output in log
  2724  		noLines,
  2725  		noLines)
  2726  
  2727  	// load expectations for model: enums_with_additional_props.go
  2728  	flattenRun.AddExpectations("enums_with_additional_props.go", []string{
  2729  		`type EnumsWithAdditionalProps map[string]interface{`,
  2730  		`var enumsWithAdditionalPropsEnum []interface{`,
  2731  		`	var res []EnumsWithAdditionalProps`,
  2732  		"	if err := json.Unmarshal([]byte(`[\"{ \\\"a\\\": 1, \\\"b\\\": 2 }\",\"{ \\\"a\\\": 3, \\\"b\\\": 4 }\"]`), &res); err != nil {",
  2733  		`	for _, v := range res {`,
  2734  		`		enumsWithAdditionalPropsEnum = append(enumsWithAdditionalPropsEnum, v`,
  2735  		`func (m *EnumsWithAdditionalProps) validateEnumsWithAdditionalPropsEnum(path, location string, value EnumsWithAdditionalProps) error {`,
  2736  		`	if err := validate.Enum(path, location, value, enumsWithAdditionalPropsEnum); err != nil {`,
  2737  		`var enumsWithAdditionalPropsValueEnum []interface{`,
  2738  		`	var res []interface{`,
  2739  		"	if err := json.Unmarshal([]byte(`[\"{ \\\"b\\\": 2 }\",\"{ \\\"b\\\": 4 }\"]`), &res); err != nil {",
  2740  		`	for _, v := range res {`,
  2741  		`		enumsWithAdditionalPropsValueEnum = append(enumsWithAdditionalPropsValueEnum, v`,
  2742  		`func (m *EnumsWithAdditionalProps) validateEnumsWithAdditionalPropsValueEnum(path, location string, value interface{}) error {`,
  2743  		`	if err := validate.Enum(path, location, value, enumsWithAdditionalPropsValueEnum); err != nil {`,
  2744  		`func (m EnumsWithAdditionalProps) Validate(formats strfmt.Registry) error {`,
  2745  		`	for k := range m {`,
  2746  		`		if err := m.validateEnumsWithAdditionalPropsValueEnum(k, "body", m[k]); err != nil {`,
  2747  		`	if err := m.validateEnumsWithAdditionalPropsEnum("", "body", m); err != nil {`,
  2748  		`		return errors.CompositeValidationError(res...`,
  2749  	},
  2750  		// not expected
  2751  		todo,
  2752  		// output in log
  2753  		noLines,
  2754  		noLines)
  2755  
  2756  	expandRun.AddExpectations("enums_with_additional_props.go", flattenRun.ExpectedFor("EnumsWithAdditionalProps").ExpectedLines, todo, noLines, noLines)
  2757  
  2758  	// load expectations for model: empty_object_with_additional_nested_slice.go
  2759  	flattenRun.AddExpectations("empty_object_with_additional_nested_slice.go", []string{
  2760  		`type EmptyObjectWithAdditionalNestedSlice map[string][][][]EmptyObjectWithAdditionalNestedSliceAdditionalPropertiesItemsItemsItems`,
  2761  		`func (m EmptyObjectWithAdditionalNestedSlice) Validate(formats strfmt.Registry) error {`,
  2762  		`	for k := range m {`,
  2763  		`		if err := validate.Required(k, "body", m[k]); err != nil {`,
  2764  		`		for i := 0; i < len(m[k]); i++ {`,
  2765  		`			for ii := 0; ii < len(m[k][i]); ii++ {`,
  2766  		`				for iii := 0; iii < len(m[k][i][ii]); iii++ {`,
  2767  		`					if err := m[k][i][ii][iii].Validate(formats); err != nil {`,
  2768  		`						if ve, ok := err.(*errors.Validation); ok {`,
  2769  		`							return ve.ValidateName(k + "." + strconv.Itoa(i) + "." + strconv.Itoa(ii) + "." + strconv.Itoa(iii)`,
  2770  		`		return errors.CompositeValidationError(res...`,
  2771  	},
  2772  		// not expected
  2773  		todo,
  2774  		// output in log
  2775  		noLines,
  2776  		noLines)
  2777  
  2778  	expandRun.AddExpectations("empty_object_with_additional_nested_slice.go", []string{
  2779  		`type EmptyObjectWithAdditionalNestedSlice map[string][][][]EmptyObjectWithAdditionalNestedSliceItems0`,
  2780  		`func (m EmptyObjectWithAdditionalNestedSlice) Validate(formats strfmt.Registry) error {`,
  2781  		`	for k := range m {`,
  2782  		`		if err := validate.Required(k, "body", m[k]); err != nil {`,
  2783  		`		for i := 0; i < len(m[k]); i++ {`,
  2784  		`			for ii := 0; ii < len(m[k][i]); ii++ {`,
  2785  		`				for iii := 0; iii < len(m[k][i][ii]); iii++ {`,
  2786  		`					if err := m[k][i][ii][iii].Validate(formats); err != nil {`,
  2787  		`						if ve, ok := err.(*errors.Validation); ok {`,
  2788  		`							return ve.ValidateName(k + "." + strconv.Itoa(i) + "." + strconv.Itoa(ii) + "." + strconv.Itoa(iii)`,
  2789  		`		return errors.CompositeValidationError(res...`,
  2790  		`type EmptyObjectWithAdditionalNestedSliceItems0 struct {`,
  2791  		"	DummyProp1 strfmt.Date `json:\"dummyProp1,omitempty\"`",
  2792  		`func (m *EmptyObjectWithAdditionalNestedSliceItems0) Validate(formats strfmt.Registry) error {`,
  2793  		`	if err := m.validateDummyProp1(formats); err != nil {`,
  2794  		`		return errors.CompositeValidationError(res...`,
  2795  		`func (m *EmptyObjectWithAdditionalNestedSliceItems0) validateDummyProp1(formats strfmt.Registry) error {`,
  2796  		`	if swag.IsZero(m.DummyProp1) {`,
  2797  		`	if err := validate.FormatOf("dummyProp1", "body", "date", m.DummyProp1.String(), formats); err != nil {`,
  2798  	},
  2799  		// not expected
  2800  		noLines,
  2801  		// output in log
  2802  		noLines,
  2803  		noLines)
  2804  
  2805  	// load expectations for model: empty_object_with_additional_nullable.go
  2806  	// fixed nullability of aliased type
  2807  	flattenRun.AddExpectations("empty_object_with_additional_nullable.go", []string{
  2808  		`type EmptyObjectWithAdditionalNullable map[string]*NullableThing`,
  2809  		`func (m EmptyObjectWithAdditionalNullable) Validate(formats strfmt.Registry) error {`,
  2810  		`	for k := range m {`,
  2811  		`		if swag.IsZero(m[k]) {`,
  2812  		`		if val, ok := m[k]; ok {`,
  2813  		`			if err := val.Validate(formats); err != nil {`,
  2814  		`		return errors.CompositeValidationError(res...`,
  2815  	},
  2816  		// not expected
  2817  		todo,
  2818  		// output in log
  2819  		noLines,
  2820  		noLines)
  2821  
  2822  	expandRun.AddExpectations("empty_object_with_additional_nullable.go", []string{
  2823  		`type EmptyObjectWithAdditionalNullable map[string]*strfmt.Date`,
  2824  		`func (m EmptyObjectWithAdditionalNullable) Validate(formats strfmt.Registry) error {`,
  2825  		`	for k := range m {`,
  2826  		`		if swag.IsZero(m[k]) {`,
  2827  		`		if err := validate.FormatOf(k, "body", "date", m[k].String(), formats); err != nil {`,
  2828  		`		return errors.CompositeValidationError(res...`,
  2829  	},
  2830  		// not expected
  2831  		noLines,
  2832  		// output in log
  2833  		noLines,
  2834  		noLines)
  2835  
  2836  	// load expectations for model: not_validated_at_all.go
  2837  	flattenRun.AddExpectations("not_validated_at_all.go", []string{
  2838  		`type NotValidatedAtAll struct {`,
  2839  		"	Prop2 string `json:\"prop2,omitempty\"`",
  2840  		"	NotValidatedAtAll map[string][]map[string]map[string]string `json:\"-\"`",
  2841  		// empty validation
  2842  		"func (m *NotValidatedAtAll) Validate(formats strfmt.Registry) error {\n	return nil\n}",
  2843  	},
  2844  		// not expected
  2845  		todo,
  2846  		// output in log
  2847  		noLines,
  2848  		noLines)
  2849  
  2850  	expandRun.AddExpectations("not_validated_at_all.go", flattenRun.ExpectedFor("NotValidatedAtAll").ExpectedLines, todo, noLines, noLines)
  2851  }
  2852  
  2853  func initFixtureAdditionalProps() {
  2854  	// testing ../fixtures/bugs/1487/fixture-additionalProps.yaml with flatten and expand (--skip-flatten)
  2855  
  2856  	/*
  2857  		various patterns of additionalProperties
  2858  	*/
  2859  	f := newModelFixture("../fixtures/bugs/1487/fixture-additionalProps.yaml", "fixture for additionalProperties")
  2860  	flattenRun := f.AddRun(false)
  2861  	expandRun := f.AddRun(true)
  2862  
  2863  	// load expectations for model: additional_object_with_formated_thing.go
  2864  	flattenRun.AddExpectations("additional_object_with_formated_thing.go", []string{
  2865  		`type AdditionalObjectWithFormatedThing struct {`,
  2866  		"	Blob *int64 `json:\"blob\"`",
  2867  		"	AdditionalObjectWithFormatedThing map[string]strfmt.Date `json:\"-\"`",
  2868  		`func (m *AdditionalObjectWithFormatedThing) Validate(formats strfmt.Registry) error {`,
  2869  		`	if err := m.validateBlob(formats); err != nil {`,
  2870  		`	for k := range m.AdditionalObjectWithFormatedThing {`,
  2871  		// removed undue IZero call
  2872  		//`		if swag.IsZero(m.AdditionalObjectWithFormatedThing[k]) {`,
  2873  		`		if err := validate.FormatOf(k, "body", "date", m.AdditionalObjectWithFormatedThing[k].String(), formats); err != nil {`,
  2874  		`		return errors.CompositeValidationError(res...`,
  2875  		`func (m *AdditionalObjectWithFormatedThing) validateBlob(formats strfmt.Registry) error {`,
  2876  		`	if err := validate.Required("blob", "body", m.Blob); err != nil {`,
  2877  		`	if err := validate.MinimumInt("blob", "body", int64(*m.Blob), 1, false); err != nil {`,
  2878  	},
  2879  		// not expected
  2880  		todo,
  2881  		// output in log
  2882  		noLines,
  2883  		noLines)
  2884  
  2885  	expandRun.AddExpectations("additional_object_with_formated_thing.go", flattenRun.ExpectedFor("AdditionalObjectWithFormatedThing").ExpectedLines, todo, noLines, noLines)
  2886  
  2887  	// load expectations for model: aliased_date.go
  2888  	flattenRun.AddExpectations("aliased_date.go", []string{
  2889  		`type AliasedDate strfmt.Date`,
  2890  		`func (m AliasedDate) Validate(formats strfmt.Registry) error {`,
  2891  		`	if err := validate.FormatOf("", "body", "date", strfmt.Date(m).String(), formats); err != nil {`,
  2892  		`		return errors.CompositeValidationError(res...`,
  2893  	},
  2894  		// not expected
  2895  		todo,
  2896  		// output in log
  2897  		noLines,
  2898  		noLines)
  2899  
  2900  	expandRun.AddExpectations("aliased_date.go", flattenRun.ExpectedFor("AliasedDate").ExpectedLines, todo, noLines, noLines)
  2901  
  2902  	// load expectations for model: additional_array_of_refed_thing.go
  2903  	flattenRun.AddExpectations("additional_array_of_refed_thing.go", []string{
  2904  		`type AdditionalArrayOfRefedThing struct {`,
  2905  		"	ThisOneNotRequired int64 `json:\"thisOneNotRequired,omitempty\"`",
  2906  		"	AdditionalArrayOfRefedThing map[string][]AliasedDate `json:\"-\"`",
  2907  		`func (m *AdditionalArrayOfRefedThing) Validate(formats strfmt.Registry) error {`,
  2908  		`	if err := m.validateThisOneNotRequired(formats); err != nil {`,
  2909  		`	for k := range m.AdditionalArrayOfRefedThing {`,
  2910  		// removed undue IsZero call
  2911  		//`		if swag.IsZero(m.AdditionalArrayOfRefedThing[k]) {`,
  2912  		`		if err := validate.UniqueItems(k, "body", m.AdditionalArrayOfRefedThing[k]); err != nil {`,
  2913  		`		for i := 0; i < len(m.AdditionalArrayOfRefedThing[k]); i++ {`,
  2914  		`			if err := m.AdditionalArrayOfRefedThing[k][i].Validate(formats); err != nil {`,
  2915  		`				if ve, ok := err.(*errors.Validation); ok {`,
  2916  		`					return ve.ValidateName(k + "." + strconv.Itoa(i)`,
  2917  		`		return errors.CompositeValidationError(res...`,
  2918  		`func (m *AdditionalArrayOfRefedThing) validateThisOneNotRequired(formats strfmt.Registry) error {`,
  2919  		`	if swag.IsZero(m.ThisOneNotRequired) {`,
  2920  		`	if err := validate.MaximumInt("thisOneNotRequired", "body", int64(m.ThisOneNotRequired), 10, false); err != nil {`,
  2921  	},
  2922  		// not expected
  2923  		todo,
  2924  		// output in log
  2925  		noLines,
  2926  		noLines)
  2927  
  2928  	expandRun.AddExpectations("additional_array_of_refed_thing.go", []string{
  2929  		`type AdditionalArrayOfRefedThing struct {`,
  2930  		"	ThisOneNotRequired int64 `json:\"thisOneNotRequired,omitempty\"`",
  2931  		"	AdditionalArrayOfRefedThing map[string][]strfmt.Date `json:\"-\"`",
  2932  		`func (m *AdditionalArrayOfRefedThing) Validate(formats strfmt.Registry) error {`,
  2933  		`	if err := m.validateThisOneNotRequired(formats); err != nil {`,
  2934  		`	for k := range m.AdditionalArrayOfRefedThing {`,
  2935  		// removed undue IsZero() call
  2936  		//`		if swag.IsZero(m.AdditionalArrayOfRefedThing[k]) {`,
  2937  		`		if err := validate.UniqueItems(k, "body", m.AdditionalArrayOfRefedThing[k]); err != nil {`,
  2938  		`		for i := 0; i < len(m.AdditionalArrayOfRefedThing[k]); i++ {`,
  2939  		`			if err := validate.FormatOf(k+"."+strconv.Itoa(i), "body", "date", m.AdditionalArrayOfRefedThing[k][i].String(), formats); err != nil {`,
  2940  		`		return errors.CompositeValidationError(res...`,
  2941  		`func (m *AdditionalArrayOfRefedThing) validateThisOneNotRequired(formats strfmt.Registry) error {`,
  2942  		`	if swag.IsZero(m.ThisOneNotRequired) {`,
  2943  		`	if err := validate.MaximumInt("thisOneNotRequired", "body", int64(m.ThisOneNotRequired), 10, false); err != nil {`,
  2944  	},
  2945  		// not expected
  2946  		todo,
  2947  		// output in log
  2948  		noLines,
  2949  		noLines)
  2950  
  2951  	// load expectations for model: additional_object_with_nullable_thing.go
  2952  	flattenRun.AddExpectations("additional_object_with_nullable_thing.go", []string{
  2953  		`type AdditionalObjectWithNullableThing struct {`,
  2954  		"	Blob int64 `json:\"blob,omitempty\"`",
  2955  		"	AdditionalObjectWithNullableThing map[string]*AliasedNullableDate `json:\"-\"`",
  2956  		`func (m *AdditionalObjectWithNullableThing) Validate(formats strfmt.Registry) error {`,
  2957  		`	if err := m.validateBlob(formats); err != nil {`,
  2958  		`	for k := range m.AdditionalObjectWithNullableThing {`,
  2959  		`		if swag.IsZero(m.AdditionalObjectWithNullableThing[k]) {`,
  2960  		`		if val, ok := m.AdditionalObjectWithNullableThing[k]; ok {`,
  2961  		`			if val != nil {`,
  2962  		`				if err := val.Validate(formats); err != nil {`,
  2963  		`		return errors.CompositeValidationError(res...`,
  2964  		`func (m *AdditionalObjectWithNullableThing) validateBlob(formats strfmt.Registry) error {`,
  2965  		`	if swag.IsZero(m.Blob) {`,
  2966  		`	if err := validate.MinimumInt("blob", "body", int64(m.Blob), 1, false); err != nil {`,
  2967  	},
  2968  		// not expected
  2969  		todo,
  2970  		// output in log
  2971  		noLines,
  2972  		noLines)
  2973  
  2974  	expandRun.AddExpectations("additional_object_with_nullable_thing.go", []string{
  2975  		`type AdditionalObjectWithNullableThing struct {`,
  2976  		"	Blob int64 `json:\"blob,omitempty\"`",
  2977  		"	AdditionalObjectWithNullableThing map[string]*strfmt.Date `json:\"-\"`",
  2978  		`func (m *AdditionalObjectWithNullableThing) Validate(formats strfmt.Registry) error {`,
  2979  		`	if err := m.validateBlob(formats); err != nil {`,
  2980  		`	for k := range m.AdditionalObjectWithNullableThing {`,
  2981  		`		if swag.IsZero(m.AdditionalObjectWithNullableThing[k]) {`,
  2982  		`		if err := validate.FormatOf(k, "body", "date", m.AdditionalObjectWithNullableThing[k].String(), formats); err != nil {`,
  2983  		`		return errors.CompositeValidationError(res...`,
  2984  		`func (m *AdditionalObjectWithNullableThing) validateBlob(formats strfmt.Registry) error {`,
  2985  		`	if swag.IsZero(m.Blob) {`,
  2986  		`	if err := validate.MinimumInt("blob", "body", int64(m.Blob), 1, false); err != nil {`,
  2987  	},
  2988  		// not expected
  2989  		todo,
  2990  		// output in log
  2991  		noLines,
  2992  		noLines)
  2993  
  2994  	// load expectations for model: additional_things.go
  2995  	flattenRun.AddExpectations("additional_things.go", []string{
  2996  		`type AdditionalThings struct {`,
  2997  		"	Origin *string `json:\"origin\"`",
  2998  		"	Status string `json:\"status,omitempty\"`",
  2999  		"	AdditionalThings map[string]string `json:\"-\"`",
  3000  		`var additionalThingsValueEnum []interface{`,
  3001  		`	var res []string`,
  3002  		"	if err := json.Unmarshal([]byte(`[\"bookshop\",\"amazon\",\"library\"]`), &res); err != nil {",
  3003  		`	for _, v := range res {`,
  3004  		`		additionalThingsValueEnum = append(additionalThingsValueEnum, v`,
  3005  		`func (m *AdditionalThings) validateAdditionalThingsValueEnum(path, location string, value string) error {`,
  3006  		`	if err := validate.Enum(path, location, value, additionalThingsValueEnum); err != nil {`,
  3007  		`func (m *AdditionalThings) Validate(formats strfmt.Registry) error {`,
  3008  		`	if err := m.validateOrigin(formats); err != nil {`,
  3009  		`	if err := m.validateStatus(formats); err != nil {`,
  3010  		`	for k := range m.AdditionalThings {`,
  3011  		// removed undue IsZero call
  3012  		//`		if swag.IsZero(m.AdditionalThings[k]) {`,
  3013  		`		if err := m.validateAdditionalThingsValueEnum(k, "body", m.AdditionalThings[k]); err != nil {`,
  3014  		`		return errors.CompositeValidationError(res...`,
  3015  		`var additionalThingsTypeOriginPropEnum []interface{`,
  3016  		`	var res []string`,
  3017  		"	if err := json.Unmarshal([]byte(`[\"print\",\"e-book\",\"collection\",\"museum\"]`), &res); err != nil {",
  3018  		`	for _, v := range res {`,
  3019  		`		additionalThingsTypeOriginPropEnum = append(additionalThingsTypeOriginPropEnum, v`,
  3020  		`	AdditionalThingsOriginPrint string = "print"`,
  3021  		`	AdditionalThingsOriginEBook string = "e-book"`,
  3022  		`	AdditionalThingsOriginCollection string = "collection"`,
  3023  		`	AdditionalThingsOriginMuseum string = "museum"`,
  3024  		`func (m *AdditionalThings) validateOriginEnum(path, location string, value string) error {`,
  3025  		`	if err := validate.Enum(path, location, value, additionalThingsTypeOriginPropEnum); err != nil {`,
  3026  		`func (m *AdditionalThings) validateOrigin(formats strfmt.Registry) error {`,
  3027  		`	if err := validate.Required("origin", "body", m.Origin); err != nil {`,
  3028  		`	if err := m.validateOriginEnum("origin", "body", *m.Origin); err != nil {`,
  3029  		`var additionalThingsTypeStatusPropEnum []interface{`,
  3030  		`	var res []string`,
  3031  		"	if err := json.Unmarshal([]byte(`[\"OK\",\"KO\"]`), &res); err != nil {",
  3032  		`	for _, v := range res {`,
  3033  		`		additionalThingsTypeStatusPropEnum = append(additionalThingsTypeStatusPropEnum, v`,
  3034  		`	AdditionalThingsStatusOK string = "OK"`,
  3035  		`	AdditionalThingsStatusKO string = "KO"`,
  3036  		`func (m *AdditionalThings) validateStatusEnum(path, location string, value string) error {`,
  3037  		`	if err := validate.Enum(path, location, value, additionalThingsTypeStatusPropEnum); err != nil {`,
  3038  		`func (m *AdditionalThings) validateStatus(formats strfmt.Registry) error {`,
  3039  		`	if swag.IsZero(m.Status) {`,
  3040  		`	if err := m.validateStatusEnum("status", "body", m.Status); err != nil {`,
  3041  	},
  3042  		// not expected
  3043  		todo,
  3044  		// output in log
  3045  		noLines,
  3046  		noLines)
  3047  
  3048  	expandRun.AddExpectations("additional_things.go", flattenRun.ExpectedFor("AdditionalThings").ExpectedLines, todo, noLines, noLines)
  3049  
  3050  	// load expectations for model: transitive_refed_thing_additional_properties.go
  3051  	flattenRun.AddExpectations("transitive_refed_thing_additional_properties.go", []string{
  3052  		`type TransitiveRefedThingAdditionalProperties struct {`,
  3053  		"	A1 strfmt.DateTime `json:\"a1,omitempty\"`",
  3054  		"	TransitiveRefedThingAdditionalProperties map[string]*NoValidationThing `json:\"-\"`",
  3055  		`func (m *TransitiveRefedThingAdditionalProperties) Validate(formats strfmt.Registry) error {`,
  3056  		`	if err := m.validateA1(formats); err != nil {`,
  3057  		`	for k := range m.TransitiveRefedThingAdditionalProperties {`,
  3058  		`		if val, ok := m.TransitiveRefedThingAdditionalProperties[k]; ok {`,
  3059  		`			if val != nil {`,
  3060  		`				if err := val.Validate(formats); err != nil {`,
  3061  		`		return errors.CompositeValidationError(res...`,
  3062  		`func (m *TransitiveRefedThingAdditionalProperties) validateA1(formats strfmt.Registry) error {`,
  3063  		`	if swag.IsZero(m.A1) {`,
  3064  		`	if err := validate.FormatOf("a1", "body", "date-time", m.A1.String(), formats); err != nil {`,
  3065  	},
  3066  		// not expected
  3067  		todo,
  3068  		// output in log
  3069  		noLines,
  3070  		noLines)
  3071  
  3072  	// load expectations for model: additional_object.go
  3073  	flattenRun.AddExpectations("additional_object.go", []string{
  3074  		`type AdditionalObject struct {`,
  3075  		"	MockID float64 `json:\"mockId,omitempty\"`",
  3076  		"	AdditionalObject map[string]*AdditionalObjectAdditionalProperties `json:\"-\"`",
  3077  		`func (m *AdditionalObject) Validate(formats strfmt.Registry) error {`,
  3078  		`	for k := range m.AdditionalObject {`,
  3079  		`		if val, ok := m.AdditionalObject[k]; ok {`,
  3080  		`			if val != nil {`,
  3081  		`				if err := val.Validate(formats); err != nil {`,
  3082  		`		return errors.CompositeValidationError(res...`,
  3083  	},
  3084  		// not expected
  3085  		todo,
  3086  		// output in log
  3087  		noLines,
  3088  		noLines)
  3089  
  3090  	expandRun.AddExpectations("additional_object.go", []string{
  3091  		`type AdditionalObject struct {`,
  3092  		"	MockID float64 `json:\"mockId,omitempty\"`",
  3093  		"	AdditionalObject map[string]*AdditionalObjectAnon `json:\"-\"`",
  3094  		`func (m *AdditionalObject) Validate(formats strfmt.Registry) error {`,
  3095  		`	for k := range m.AdditionalObject {`,
  3096  		`		if val, ok := m.AdditionalObject[k]; ok {`,
  3097  		`			if val != nil {`,
  3098  		`				if err := val.Validate(formats); err != nil {`,
  3099  		`		return errors.CompositeValidationError(res...`,
  3100  		`type AdditionalObjectAnon struct {`,
  3101  		"	MockA string `json:\"mockA,omitempty\"`",
  3102  		"	MockB *string `json:\"mockB\"`",
  3103  		"	MockC float64 `json:\"mockC,omitempty\"`",
  3104  		`func (m *AdditionalObjectAnon) Validate(formats strfmt.Registry) error {`,
  3105  		`	if err := m.validateMockA(formats); err != nil {`,
  3106  		`	if err := m.validateMockB(formats); err != nil {`,
  3107  		`		return errors.CompositeValidationError(res...`,
  3108  		`func (m *AdditionalObjectAnon) validateMockA(formats strfmt.Registry) error {`,
  3109  		`	if swag.IsZero(m.MockA) {`,
  3110  		"	if err := validate.Pattern(\"mockA\", \"body\", string(m.MockA), `^[A-Z]$`); err != nil {",
  3111  		`func (m *AdditionalObjectAnon) validateMockB(formats strfmt.Registry) error {`,
  3112  		`	if err := validate.Required("mockB", "body", m.MockB); err != nil {`,
  3113  		`	if err := validate.MinLength("mockB", "body", string(*m.MockB), 1); err != nil {`,
  3114  	},
  3115  		// not expected
  3116  		todo,
  3117  		// output in log
  3118  		noLines,
  3119  		noLines)
  3120  
  3121  	// load expectations for model: additional_slice_of_objects_additional_properties_items.go
  3122  	flattenRun.AddExpectations("additional_slice_of_objects_additional_properties_items.go", []string{
  3123  		`type AdditionalSliceOfObjectsAdditionalPropertiesItems struct {`,
  3124  		"	Prop2 int64 `json:\"prop2,omitempty\"`",
  3125  		// empty validation
  3126  		"func (m *AdditionalSliceOfObjectsAdditionalPropertiesItems) Validate(formats strfmt.Registry) error {\n	return nil\n}",
  3127  	},
  3128  		// not expected
  3129  		todo,
  3130  		// output in log
  3131  		noLines,
  3132  		noLines)
  3133  
  3134  	// load expectations for model: additional_slice_of_aliased_nullable_primitives.go
  3135  	flattenRun.AddExpectations("additional_slice_of_aliased_nullable_primitives.go", []string{
  3136  		`type AdditionalSliceOfAliasedNullablePrimitives struct {`,
  3137  		"	Prop3 strfmt.UUID `json:\"prop3,omitempty\"`",
  3138  		"	AdditionalSliceOfAliasedNullablePrimitives map[string][]*AliasedNullableDate `json:\"-\"`",
  3139  		`func (m *AdditionalSliceOfAliasedNullablePrimitives) Validate(formats strfmt.Registry) error {`,
  3140  		`	if err := m.validateProp3(formats); err != nil {`,
  3141  		`	for k := range m.AdditionalSliceOfAliasedNullablePrimitives {`,
  3142  		// removed undue IsSzero call
  3143  		//`		if swag.IsZero(m.AdditionalSliceOfAliasedNullablePrimitives[k]) {`,
  3144  		`		iAdditionalSliceOfAliasedNullablePrimitivesSize := int64(len(m.AdditionalSliceOfAliasedNullablePrimitives[k])`,
  3145  		`		if err := validate.MinItems(k, "body", iAdditionalSliceOfAliasedNullablePrimitivesSize, 10); err != nil {`,
  3146  		`		for i := 0; i < len(m.AdditionalSliceOfAliasedNullablePrimitives[k]); i++ {`,
  3147  		// do we need Required when item is nullable?
  3148  		// nullable not required:
  3149  		`			if swag.IsZero(m.AdditionalSliceOfAliasedNullablePrimitives[k][i]) {`,
  3150  		// nullable required:
  3151  		//`			if err := validate.Required(k+"."+strconv.Itoa(i), "body", m.AdditionalSliceOfAliasedNullablePrimitives[k][i]); err != nil {`,
  3152  		`			if m.AdditionalSliceOfAliasedNullablePrimitives[k][i] != nil {`,
  3153  		`				if err := m.AdditionalSliceOfAliasedNullablePrimitives[k][i].Validate(formats); err != nil {`,
  3154  		`					if ve, ok := err.(*errors.Validation); ok {`,
  3155  		`						return ve.ValidateName(k + "." + strconv.Itoa(i)`,
  3156  		`		return errors.CompositeValidationError(res...`,
  3157  		`func (m *AdditionalSliceOfAliasedNullablePrimitives) validateProp3(formats strfmt.Registry) error {`,
  3158  		`	if swag.IsZero(m.Prop3) {`,
  3159  		`	if err := validate.FormatOf("prop3", "body", "uuid", m.Prop3.String(), formats); err != nil {`,
  3160  	},
  3161  		// not expected
  3162  		todo,
  3163  		// output in log
  3164  		noLines,
  3165  		noLines)
  3166  
  3167  	expandRun.AddExpectations("additional_slice_of_aliased_nullable_primitives.go", []string{
  3168  		`type AdditionalSliceOfAliasedNullablePrimitives struct {`,
  3169  		"	Prop3 strfmt.UUID `json:\"prop3,omitempty\"`",
  3170  		"	AdditionalSliceOfAliasedNullablePrimitives map[string][]*strfmt.Date `json:\"-\"`",
  3171  		`func (m *AdditionalSliceOfAliasedNullablePrimitives) Validate(formats strfmt.Registry) error {`,
  3172  		`	if err := m.validateProp3(formats); err != nil {`,
  3173  		`	for k := range m.AdditionalSliceOfAliasedNullablePrimitives {`,
  3174  		//`		if swag.IsZero(m.AdditionalSliceOfAliasedNullablePrimitives[k]) {`,
  3175  		`		iAdditionalSliceOfAliasedNullablePrimitivesSize := int64(len(m.AdditionalSliceOfAliasedNullablePrimitives[k])`,
  3176  		`		if err := validate.MinItems(k, "body", iAdditionalSliceOfAliasedNullablePrimitivesSize, 10); err != nil {`,
  3177  		`		for i := 0; i < len(m.AdditionalSliceOfAliasedNullablePrimitives[k]); i++ {`,
  3178  		// do we need Required when item is nullable?
  3179  		// nullable not required:
  3180  		`			if swag.IsZero(m.AdditionalSliceOfAliasedNullablePrimitives[k][i]) {`,
  3181  		// nullable required:
  3182  		//`			if err := validate.Required(k+"."+strconv.Itoa(i), "body", m.AdditionalSliceOfAliasedNullablePrimitives[k][i]); err != nil {`,
  3183  		`			if err := validate.FormatOf(k+"."+strconv.Itoa(i), "body", "date", m.AdditionalSliceOfAliasedNullablePrimitives[k][i].String(), formats); err != nil {`,
  3184  		`		return errors.CompositeValidationError(res...`,
  3185  		`func (m *AdditionalSliceOfAliasedNullablePrimitives) validateProp3(formats strfmt.Registry) error {`,
  3186  		`	if swag.IsZero(m.Prop3) {`,
  3187  		`	if err := validate.FormatOf("prop3", "body", "uuid", m.Prop3.String(), formats); err != nil {`,
  3188  	},
  3189  		// not expected
  3190  		todo,
  3191  		// output in log
  3192  		noLines,
  3193  		noLines)
  3194  
  3195  	// load expectations for model: additional_slice_of_slice.go
  3196  	flattenRun.AddExpectations("additional_slice_of_slice.go", []string{
  3197  		`type AdditionalSliceOfSlice struct {`,
  3198  		"	Prop4 strfmt.UUID `json:\"prop4,omitempty\"`",
  3199  		"	AdditionalSliceOfSlice map[string][][]*AdditionalSliceOfSliceAdditionalPropertiesItemsItems `json:\"-\"`",
  3200  		`func (m *AdditionalSliceOfSlice) Validate(formats strfmt.Registry) error {`,
  3201  		`	if err := m.validateProp4(formats); err != nil {`,
  3202  		`	for k := range m.AdditionalSliceOfSlice {`,
  3203  		`		if err := validate.Required(k, "body", m.AdditionalSliceOfSlice[k]); err != nil {`,
  3204  		`		for i := 0; i < len(m.AdditionalSliceOfSlice[k]); i++ {`,
  3205  		`			iiAdditionalSliceOfSliceSize := int64(len(m.AdditionalSliceOfSlice[k][i])`,
  3206  		`			if err := validate.MaxItems(k+"."+strconv.Itoa(i), "body", iiAdditionalSliceOfSliceSize, 10); err != nil {`,
  3207  		`			for ii := 0; ii < len(m.AdditionalSliceOfSlice[k][i]); ii++ {`,
  3208  		// do we need Required when item is nullable?
  3209  		// nullable not required:
  3210  		`				if swag.IsZero(m.AdditionalSliceOfSlice[k][i][ii]) {`,
  3211  		// nullable not required:
  3212  		//`				if err := validate.Required(k+"."+strconv.Itoa(i)+"."+strconv.Itoa(ii), "body", m.AdditionalSliceOfSlice[k][i][ii]); err != nil {`,
  3213  		`				if m.AdditionalSliceOfSlice[k][i][ii] != nil {`,
  3214  		`					if err := m.AdditionalSliceOfSlice[k][i][ii].Validate(formats); err != nil {`,
  3215  		`						if ve, ok := err.(*errors.Validation); ok {`,
  3216  		`							return ve.ValidateName(k + "." + strconv.Itoa(i) + "." + strconv.Itoa(ii)`,
  3217  		`		return errors.CompositeValidationError(res...`,
  3218  		`func (m *AdditionalSliceOfSlice) validateProp4(formats strfmt.Registry) error {`,
  3219  		`	if swag.IsZero(m.Prop4) {`,
  3220  		`	if err := validate.FormatOf("prop4", "body", "uuid", m.Prop4.String(), formats); err != nil {`,
  3221  	},
  3222  		// not expected
  3223  		todo,
  3224  		// output in log
  3225  		noLines,
  3226  		noLines)
  3227  
  3228  	expandRun.AddExpectations("additional_slice_of_slice.go", []string{
  3229  		`type AdditionalSliceOfSlice struct {`,
  3230  		"	Prop4 strfmt.UUID `json:\"prop4,omitempty\"`",
  3231  		"	AdditionalSliceOfSlice map[string][][]*AdditionalSliceOfSliceItems0 `json:\"-\"`",
  3232  		`func (m *AdditionalSliceOfSlice) Validate(formats strfmt.Registry) error {`,
  3233  		`	if err := m.validateProp4(formats); err != nil {`,
  3234  		`	for k := range m.AdditionalSliceOfSlice {`,
  3235  		`		if err := validate.Required(k, "body", m.AdditionalSliceOfSlice[k]); err != nil {`,
  3236  		`		for i := 0; i < len(m.AdditionalSliceOfSlice[k]); i++ {`,
  3237  		`			iiAdditionalSliceOfSliceSize := int64(len(m.AdditionalSliceOfSlice[k][i])`,
  3238  		`			if err := validate.MaxItems(k+"."+strconv.Itoa(i), "body", iiAdditionalSliceOfSliceSize, 10); err != nil {`,
  3239  		`			for ii := 0; ii < len(m.AdditionalSliceOfSlice[k][i]); ii++ {`,
  3240  		// do we need Required when item is nullable?
  3241  		// nullable not required:
  3242  		`				if swag.IsZero(m.AdditionalSliceOfSlice[k][i][ii]) {`,
  3243  		// nullable required:
  3244  		//`				if err := validate.Required(k+"."+strconv.Itoa(i)+"."+strconv.Itoa(ii), "body", m.AdditionalSliceOfSlice[k][i][ii]); err != nil {`,
  3245  		`				if m.AdditionalSliceOfSlice[k][i][ii] != nil {`,
  3246  		`					if err := m.AdditionalSliceOfSlice[k][i][ii].Validate(formats); err != nil {`,
  3247  		`						if ve, ok := err.(*errors.Validation); ok {`,
  3248  		`							return ve.ValidateName(k + "." + strconv.Itoa(i) + "." + strconv.Itoa(ii)`,
  3249  		`		return errors.CompositeValidationError(res...`,
  3250  		`func (m *AdditionalSliceOfSlice) validateProp4(formats strfmt.Registry) error {`,
  3251  		`	if swag.IsZero(m.Prop4) {`,
  3252  		`	if err := validate.FormatOf("prop4", "body", "uuid", m.Prop4.String(), formats); err != nil {`,
  3253  		`type AdditionalSliceOfSliceItems0 struct {`,
  3254  		"	Prop5 int64 `json:\"prop5,omitempty\"`",
  3255  		`func (m *AdditionalSliceOfSliceItems0) Validate(formats strfmt.Registry) error {`,
  3256  		`	if err := m.validateProp5(formats); err != nil {`,
  3257  		`		return errors.CompositeValidationError(res...`,
  3258  		`func (m *AdditionalSliceOfSliceItems0) validateProp5(formats strfmt.Registry) error {`,
  3259  		`	if swag.IsZero(m.Prop5) {`,
  3260  		`	if err := validate.MaximumInt("prop5", "body", int64(m.Prop5), 10, false); err != nil {`,
  3261  	},
  3262  		// not expected
  3263  		todo,
  3264  		// output in log
  3265  		noLines,
  3266  		noLines)
  3267  
  3268  	// load expectations for model: additional_object_with_aliased_thing.go
  3269  	flattenRun.AddExpectations("additional_object_with_aliased_thing.go", []string{
  3270  		`type AdditionalObjectWithAliasedThing struct {`,
  3271  		"	Blob int64 `json:\"blob,omitempty\"`",
  3272  		"	AdditionalObjectWithAliasedThing map[string]AliasedDate `json:\"-\"`",
  3273  		`func (m *AdditionalObjectWithAliasedThing) Validate(formats strfmt.Registry) error {`,
  3274  		`	if err := m.validateBlob(formats); err != nil {`,
  3275  		`	for k := range m.AdditionalObjectWithAliasedThing {`,
  3276  		// removed undue IsZero call
  3277  		//`		if swag.IsZero(m.AdditionalObjectWithAliasedThing[k]) {`,
  3278  		`		if val, ok := m.AdditionalObjectWithAliasedThing[k]; ok {`,
  3279  		`			if err := val.Validate(formats); err != nil {`,
  3280  		`		return errors.CompositeValidationError(res...`,
  3281  		`func (m *AdditionalObjectWithAliasedThing) validateBlob(formats strfmt.Registry) error {`,
  3282  		`	if swag.IsZero(m.Blob) {`,
  3283  		`	if err := validate.MinimumInt("blob", "body", int64(m.Blob), 1, false); err != nil {`,
  3284  	},
  3285  		// not expected
  3286  		todo,
  3287  		// output in log
  3288  		noLines,
  3289  		noLines)
  3290  
  3291  	expandRun.AddExpectations("additional_object_with_aliased_thing.go", []string{
  3292  		`type AdditionalObjectWithAliasedThing struct {`,
  3293  		"	Blob int64 `json:\"blob,omitempty\"`",
  3294  		"	AdditionalObjectWithAliasedThing map[string]strfmt.Date `json:\"-\"`",
  3295  		`func (m *AdditionalObjectWithAliasedThing) Validate(formats strfmt.Registry) error {`,
  3296  		`	if err := m.validateBlob(formats); err != nil {`,
  3297  		`	for k := range m.AdditionalObjectWithAliasedThing {`,
  3298  		//`		if swag.IsZero(m.AdditionalObjectWithAliasedThing[k]) {`,
  3299  		`		if err := validate.FormatOf(k, "body", "date", m.AdditionalObjectWithAliasedThing[k].String(), formats); err != nil {`,
  3300  		`		return errors.CompositeValidationError(res...`,
  3301  		`func (m *AdditionalObjectWithAliasedThing) validateBlob(formats strfmt.Registry) error {`,
  3302  		`	if swag.IsZero(m.Blob) {`,
  3303  		`	if err := validate.MinimumInt("blob", "body", int64(m.Blob), 1, false); err != nil {`,
  3304  	},
  3305  		// not expected
  3306  		todo,
  3307  		// output in log
  3308  		noLines,
  3309  		noLines)
  3310  
  3311  	// load expectations for model: additional_things_nested_additional_properties.go
  3312  	flattenRun.AddExpectations("additional_things_nested_additional_properties.go", []string{
  3313  		`type AdditionalThingsNestedAdditionalProperties struct {`,
  3314  		"	PrinterAddress string `json:\"printerAddress,omitempty\"`",
  3315  		"	PrinterCountry string `json:\"printerCountry,omitempty\"`",
  3316  		"	PrinterDate strfmt.Date `json:\"printerDate,omitempty\"`",
  3317  		"	AdditionalThingsNestedAdditionalProperties map[string]*AdditionalThingsNestedAdditionalPropertiesAdditionalProperties `json:\"-\"`",
  3318  		`func (m *AdditionalThingsNestedAdditionalProperties) Validate(formats strfmt.Registry) error {`,
  3319  		`	if err := m.validatePrinterCountry(formats); err != nil {`,
  3320  		`	if err := m.validatePrinterDate(formats); err != nil {`,
  3321  		`	for k := range m.AdditionalThingsNestedAdditionalProperties {`,
  3322  		`		if val, ok := m.AdditionalThingsNestedAdditionalProperties[k]; ok {`,
  3323  		`			if val != nil {`,
  3324  		`				if err := val.Validate(formats); err != nil {`,
  3325  		`		return errors.CompositeValidationError(res...`,
  3326  		`var additionalThingsNestedAdditionalPropertiesTypePrinterCountryPropEnum []interface{`,
  3327  		`	var res []string`,
  3328  		"	if err := json.Unmarshal([]byte(`[\"US\",\"FR\",\"UK\",\"BE\",\"CA\",\"DE\"]`), &res); err != nil {",
  3329  		`	for _, v := range res {`,
  3330  		`		additionalThingsNestedAdditionalPropertiesTypePrinterCountryPropEnum = append(additionalThingsNestedAdditionalPropertiesTypePrinterCountryPropEnum, v`,
  3331  		`	AdditionalThingsNestedAdditionalPropertiesPrinterCountryUS string = "US"`,
  3332  		`	AdditionalThingsNestedAdditionalPropertiesPrinterCountryFR string = "FR"`,
  3333  		`	AdditionalThingsNestedAdditionalPropertiesPrinterCountryUK string = "UK"`,
  3334  		`	AdditionalThingsNestedAdditionalPropertiesPrinterCountryBE string = "BE"`,
  3335  		`	AdditionalThingsNestedAdditionalPropertiesPrinterCountryCA string = "CA"`,
  3336  		`	AdditionalThingsNestedAdditionalPropertiesPrinterCountryDE string = "DE"`,
  3337  		`func (m *AdditionalThingsNestedAdditionalProperties) validatePrinterCountryEnum(path, location string, value string) error {`,
  3338  		`	if err := validate.Enum(path, location, value, additionalThingsNestedAdditionalPropertiesTypePrinterCountryPropEnum); err != nil {`,
  3339  		`func (m *AdditionalThingsNestedAdditionalProperties) validatePrinterCountry(formats strfmt.Registry) error {`,
  3340  		`	if swag.IsZero(m.PrinterCountry) {`,
  3341  		`	if err := m.validatePrinterCountryEnum("printerCountry", "body", m.PrinterCountry); err != nil {`,
  3342  		`func (m *AdditionalThingsNestedAdditionalProperties) validatePrinterDate(formats strfmt.Registry) error {`,
  3343  		`	if swag.IsZero(m.PrinterDate) {`,
  3344  		`	if err := validate.FormatOf("printerDate", "body", "date", m.PrinterDate.String(), formats); err != nil {`,
  3345  	},
  3346  		// not expected
  3347  		todo,
  3348  		// output in log
  3349  		noLines,
  3350  		noLines)
  3351  
  3352  	// load expectations for model: empty_object_with_additional_slice_additional_properties_items.go
  3353  	flattenRun.AddExpectations("empty_object_with_additional_slice_additional_properties_items.go", []string{
  3354  		`type EmptyObjectWithAdditionalSliceAdditionalPropertiesItems struct {`,
  3355  		"	DummyProp1 strfmt.Date `json:\"dummyProp1,omitempty\"`",
  3356  		`func (m *EmptyObjectWithAdditionalSliceAdditionalPropertiesItems) Validate(formats strfmt.Registry) error {`,
  3357  		`	if err := m.validateDummyProp1(formats); err != nil {`,
  3358  		`		return errors.CompositeValidationError(res...`,
  3359  		`func (m *EmptyObjectWithAdditionalSliceAdditionalPropertiesItems) validateDummyProp1(formats strfmt.Registry) error {`,
  3360  		`	if swag.IsZero(m.DummyProp1) {`,
  3361  		`	if err := validate.FormatOf("dummyProp1", "body", "date", m.DummyProp1.String(), formats); err != nil {`,
  3362  	},
  3363  		// not expected
  3364  		todo,
  3365  		// output in log
  3366  		noLines,
  3367  		noLines)
  3368  
  3369  	// load expectations for model: additional_things_nested_additional_properties_additional_properties.go
  3370  	flattenRun.AddExpectations("additional_things_nested_additional_properties_additional_properties.go", []string{
  3371  		`type AdditionalThingsNestedAdditionalPropertiesAdditionalProperties struct {`,
  3372  		"	AverageDelay strfmt.Duration `json:\"averageDelay,omitempty\"`",
  3373  		`func (m *AdditionalThingsNestedAdditionalPropertiesAdditionalProperties) Validate(formats strfmt.Registry) error {`,
  3374  		`	if err := m.validateAverageDelay(formats); err != nil {`,
  3375  		`		return errors.CompositeValidationError(res...`,
  3376  		`func (m *AdditionalThingsNestedAdditionalPropertiesAdditionalProperties) validateAverageDelay(formats strfmt.Registry) error {`,
  3377  		`	if swag.IsZero(m.AverageDelay) {`,
  3378  		`	if err := validate.FormatOf("averageDelay", "body", "duration", m.AverageDelay.String(), formats); err != nil {`,
  3379  	},
  3380  		// not expected
  3381  		todo,
  3382  		// output in log
  3383  		noLines,
  3384  		noLines)
  3385  
  3386  	// load expectations for model: additional_slice_of_slice_additional_properties_items_items.go
  3387  	flattenRun.AddExpectations("additional_slice_of_slice_additional_properties_items_items.go", []string{
  3388  		`type AdditionalSliceOfSliceAdditionalPropertiesItemsItems struct {`,
  3389  		"	Prop5 int64 `json:\"prop5,omitempty\"`",
  3390  		`func (m *AdditionalSliceOfSliceAdditionalPropertiesItemsItems) Validate(formats strfmt.Registry) error {`,
  3391  		`	if err := m.validateProp5(formats); err != nil {`,
  3392  		`		return errors.CompositeValidationError(res...`,
  3393  		`func (m *AdditionalSliceOfSliceAdditionalPropertiesItemsItems) validateProp5(formats strfmt.Registry) error {`,
  3394  		`	if swag.IsZero(m.Prop5) {`,
  3395  		`	if err := validate.MaximumInt("prop5", "body", int64(m.Prop5), 10, false); err != nil {`,
  3396  	},
  3397  		// not expected
  3398  		todo,
  3399  		// output in log
  3400  		noLines,
  3401  		noLines)
  3402  
  3403  	// load expectations for model: additional_object_additional_properties.go
  3404  	flattenRun.AddExpectations("additional_object_additional_properties.go", []string{
  3405  		`type AdditionalObjectAdditionalProperties struct {`,
  3406  		"	MockA string `json:\"mockA,omitempty\"`",
  3407  		"	MockB *string `json:\"mockB\"`",
  3408  		"	MockC float64 `json:\"mockC,omitempty\"`",
  3409  		`func (m *AdditionalObjectAdditionalProperties) Validate(formats strfmt.Registry) error {`,
  3410  		`	if err := m.validateMockA(formats); err != nil {`,
  3411  		`	if err := m.validateMockB(formats); err != nil {`,
  3412  		`		return errors.CompositeValidationError(res...`,
  3413  		`func (m *AdditionalObjectAdditionalProperties) validateMockA(formats strfmt.Registry) error {`,
  3414  		`	if swag.IsZero(m.MockA) {`,
  3415  		"	if err := validate.Pattern(\"mockA\", \"body\", string(m.MockA), `^[A-Z]$`); err != nil {",
  3416  		`func (m *AdditionalObjectAdditionalProperties) validateMockB(formats strfmt.Registry) error {`,
  3417  		`	if err := validate.Required("mockB", "body", m.MockB); err != nil {`,
  3418  		`	if err := validate.MinLength("mockB", "body", string(*m.MockB), 1); err != nil {`,
  3419  	},
  3420  		// not expected
  3421  		todo,
  3422  		// output in log
  3423  		noLines,
  3424  		noLines)
  3425  
  3426  	// load expectations for model: additional_transitive_refed_thing.go
  3427  	flattenRun.AddExpectations("additional_transitive_refed_thing.go", []string{
  3428  		`type AdditionalTransitiveRefedThing struct {`,
  3429  		"	ThisOneNotRequired int64 `json:\"thisOneNotRequired,omitempty\"`",
  3430  		"	AdditionalTransitiveRefedThing map[string][]*TransitiveRefedThing `json:\"-\"`",
  3431  		`func (m *AdditionalTransitiveRefedThing) Validate(formats strfmt.Registry) error {`,
  3432  		`	if err := m.validateThisOneNotRequired(formats); err != nil {`,
  3433  		`	for k := range m.AdditionalTransitiveRefedThing {`,
  3434  		`		if err := validate.Required(k, "body", m.AdditionalTransitiveRefedThing[k]); err != nil {`,
  3435  		`		if err := validate.UniqueItems(k, "body", m.AdditionalTransitiveRefedThing[k]); err != nil {`,
  3436  		`		for i := 0; i < len(m.AdditionalTransitiveRefedThing[k]); i++ {`,
  3437  		// do we need Required when item is nullable?
  3438  		// nullable not required:
  3439  		`			if swag.IsZero(m.AdditionalTransitiveRefedThing[k][i]) {`,
  3440  		// nullable required:
  3441  		//`			if err := validate.Required(k+"."+strconv.Itoa(i), "body", m.AdditionalTransitiveRefedThing[k][i]); err != nil {`,
  3442  		`			if m.AdditionalTransitiveRefedThing[k][i] != nil {`,
  3443  		`				if err := m.AdditionalTransitiveRefedThing[k][i].Validate(formats); err != nil {`,
  3444  		`					if ve, ok := err.(*errors.Validation); ok {`,
  3445  		`						return ve.ValidateName(k + "." + strconv.Itoa(i)`,
  3446  		`		return errors.CompositeValidationError(res...`,
  3447  		`func (m *AdditionalTransitiveRefedThing) validateThisOneNotRequired(formats strfmt.Registry) error {`,
  3448  		`	if swag.IsZero(m.ThisOneNotRequired) {`,
  3449  		`	if err := validate.MaximumInt("thisOneNotRequired", "body", int64(m.ThisOneNotRequired), 10, false); err != nil {`,
  3450  	},
  3451  		// not expected
  3452  		todo,
  3453  		// output in log
  3454  		noLines,
  3455  		noLines)
  3456  
  3457  	expandRun.AddExpectations("additional_transitive_refed_thing.go", []string{
  3458  		`type AdditionalTransitiveRefedThing struct {`,
  3459  		"	ThisOneNotRequired int64 `json:\"thisOneNotRequired,omitempty\"`",
  3460  		"	AdditionalTransitiveRefedThing map[string][]*AdditionalTransitiveRefedThingItems0 `json:\"-\"`",
  3461  		`func (m *AdditionalTransitiveRefedThing) Validate(formats strfmt.Registry) error {`,
  3462  		`	if err := m.validateThisOneNotRequired(formats); err != nil {`,
  3463  		`	for k := range m.AdditionalTransitiveRefedThing {`,
  3464  		`		if err := validate.Required(k, "body", m.AdditionalTransitiveRefedThing[k]); err != nil {`,
  3465  		`		if err := validate.UniqueItems(k, "body", m.AdditionalTransitiveRefedThing[k]); err != nil {`,
  3466  		`		for i := 0; i < len(m.AdditionalTransitiveRefedThing[k]); i++ {`,
  3467  		// do we need Required when item is nullable?
  3468  		// nullable not required:
  3469  		`			if swag.IsZero(m.AdditionalTransitiveRefedThing[k][i]) {`,
  3470  		// nullable required:
  3471  		//`			if err := validate.Required(k+"."+strconv.Itoa(i), "body", m.AdditionalTransitiveRefedThing[k][i]); err != nil {`,
  3472  		`			if m.AdditionalTransitiveRefedThing[k][i] != nil {`,
  3473  		`				if err := m.AdditionalTransitiveRefedThing[k][i].Validate(formats); err != nil {`,
  3474  		`					if ve, ok := err.(*errors.Validation); ok {`,
  3475  		`						return ve.ValidateName(k + "." + strconv.Itoa(i)`,
  3476  		`		return errors.CompositeValidationError(res...`,
  3477  		`func (m *AdditionalTransitiveRefedThing) validateThisOneNotRequired(formats strfmt.Registry) error {`,
  3478  		`	if swag.IsZero(m.ThisOneNotRequired) {`,
  3479  		`	if err := validate.MaximumInt("thisOneNotRequired", "body", int64(m.ThisOneNotRequired), 10, false); err != nil {`,
  3480  		`type AdditionalTransitiveRefedThingItems0 struct {`,
  3481  		"	ThisOneNotRequiredEither int64 `json:\"thisOneNotRequiredEither,omitempty\"`",
  3482  		"	AdditionalTransitiveRefedThingItems0 map[string]*AdditionalTransitiveRefedThingItems0Anon `json:\"-\"`",
  3483  		`func (m *AdditionalTransitiveRefedThingItems0) Validate(formats strfmt.Registry) error {`,
  3484  		`	if err := m.validateThisOneNotRequiredEither(formats); err != nil {`,
  3485  		`	for k := range m.AdditionalTransitiveRefedThingItems0 {`,
  3486  		`		if val, ok := m.AdditionalTransitiveRefedThingItems0[k]; ok {`,
  3487  		`			if val != nil {`,
  3488  		`				if err := val.Validate(formats); err != nil {`,
  3489  		`		return errors.CompositeValidationError(res...`,
  3490  		`func (m *AdditionalTransitiveRefedThingItems0) validateThisOneNotRequiredEither(formats strfmt.Registry) error {`,
  3491  		`	if swag.IsZero(m.ThisOneNotRequiredEither) {`,
  3492  		`	if err := validate.MaximumInt("thisOneNotRequiredEither", "body", int64(m.ThisOneNotRequiredEither), 20, false); err != nil {`,
  3493  		`type AdditionalTransitiveRefedThingItems0Anon struct {`,
  3494  		"	A1 strfmt.DateTime `json:\"a1,omitempty\"`",
  3495  		"	AdditionalTransitiveRefedThingItems0Anon map[string]*AdditionalTransitiveRefedThingItems0AnonAnon `json:\"-\"`",
  3496  		`func (m *AdditionalTransitiveRefedThingItems0Anon) Validate(formats strfmt.Registry) error {`,
  3497  		`	if err := m.validateA1(formats); err != nil {`,
  3498  		`	for k := range m.AdditionalTransitiveRefedThingItems0Anon {`,
  3499  		`		if val, ok := m.AdditionalTransitiveRefedThingItems0Anon[k]; ok {`,
  3500  		`			if val != nil {`,
  3501  		`				if err := val.Validate(formats); err != nil {`,
  3502  		`		return errors.CompositeValidationError(res...`,
  3503  		`func (m *AdditionalTransitiveRefedThingItems0Anon) validateA1(formats strfmt.Registry) error {`,
  3504  		`	if swag.IsZero(m.A1) {`,
  3505  		`	if err := validate.FormatOf("a1", "body", "date-time", m.A1.String(), formats); err != nil {`,
  3506  		`type AdditionalTransitiveRefedThingItems0AnonAnon struct {`,
  3507  		"	Discourse string `json:\"discourse,omitempty\"`",
  3508  		"	HoursSpent float64 `json:\"hoursSpent,omitempty\"`",
  3509  		"	AdditionalTransitiveRefedThingItems0AnonAnonAdditionalProperties map[string]interface{} `json:\"-\"`",
  3510  		// empty validation
  3511  		"func (m *AdditionalTransitiveRefedThingItems0AnonAnon) Validate(formats strfmt.Registry) error {\n	return nil\n}",
  3512  	},
  3513  		// not expected
  3514  		todo,
  3515  		// output in log
  3516  		noLines,
  3517  		noLines)
  3518  
  3519  	// load expectations for model: additional_nullable_array_thing.go
  3520  	flattenRun.AddExpectations("additional_nullable_array_thing.go", []string{
  3521  		`type AdditionalNullableArrayThing struct {`,
  3522  		"	ThisOneNotRequired int64 `json:\"thisOneNotRequired,omitempty\"`",
  3523  		"	AdditionalNullableArrayThing map[string][]strfmt.ISBN `json:\"-\"`",
  3524  		`func (m *AdditionalNullableArrayThing) Validate(formats strfmt.Registry) error {`,
  3525  		`	if err := m.validateThisOneNotRequired(formats); err != nil {`,
  3526  		`	for k := range m.AdditionalNullableArrayThing {`,
  3527  		//`		if swag.IsZero(m.AdditionalNullableArrayThing[k]) {`,
  3528  		`		if err := validate.UniqueItems(k, "body", m.AdditionalNullableArrayThing[k]); err != nil {`,
  3529  		`		for i := 0; i < len(m.AdditionalNullableArrayThing[k]); i++ {`,
  3530  		`			if err := validate.FormatOf(k+"."+strconv.Itoa(i), "body", "isbn", m.AdditionalNullableArrayThing[k][i].String(), formats); err != nil {`,
  3531  		`		return errors.CompositeValidationError(res...`,
  3532  		`func (m *AdditionalNullableArrayThing) validateThisOneNotRequired(formats strfmt.Registry) error {`,
  3533  		`	if swag.IsZero(m.ThisOneNotRequired) {`,
  3534  		`	if err := validate.MaximumInt("thisOneNotRequired", "body", int64(m.ThisOneNotRequired), 10, false); err != nil {`,
  3535  	},
  3536  		// not expected
  3537  		todo,
  3538  		// output in log
  3539  		noLines,
  3540  		noLines)
  3541  
  3542  	expandRun.AddExpectations("additional_nullable_array_thing.go", flattenRun.ExpectedFor("AdditionalNullableArrayThing").ExpectedLines, todo, noLines, noLines)
  3543  
  3544  	// load expectations for model: additional_slice_of_primitives.go
  3545  	flattenRun.AddExpectations("additional_slice_of_primitives.go", []string{
  3546  		`type AdditionalSliceOfPrimitives struct {`,
  3547  		"	Prop1 string `json:\"prop1,omitempty\"`",
  3548  		"	AdditionalSliceOfPrimitives map[string][]strfmt.Date `json:\"-\"`",
  3549  		`func (m *AdditionalSliceOfPrimitives) Validate(formats strfmt.Registry) error {`,
  3550  		`	for k := range m.AdditionalSliceOfPrimitives {`,
  3551  		//`		if swag.IsZero(m.AdditionalSliceOfPrimitives[k]) {`,
  3552  		`		if err := validate.UniqueItems(k, "body", m.AdditionalSliceOfPrimitives[k]); err != nil {`,
  3553  		`		for i := 0; i < len(m.AdditionalSliceOfPrimitives[k]); i++ {`,
  3554  		`			if err := validate.FormatOf(k+"."+strconv.Itoa(i), "body", "date", m.AdditionalSliceOfPrimitives[k][i].String(), formats); err != nil {`,
  3555  		`		return errors.CompositeValidationError(res...`,
  3556  	},
  3557  		// not expected
  3558  		todo,
  3559  		// output in log
  3560  		noLines,
  3561  		noLines)
  3562  
  3563  	expandRun.AddExpectations("additional_slice_of_primitives.go", flattenRun.ExpectedFor("AdditionalSliceOfPrimitives").ExpectedLines, todo, noLines, noLines)
  3564  
  3565  	// load expectations for model: additional_array_thing.go
  3566  	flattenRun.AddExpectations("additional_array_thing.go", []string{
  3567  		`type AdditionalArrayThing struct {`,
  3568  		"	ThisOneNotRequired int64 `json:\"thisOneNotRequired,omitempty\"`",
  3569  		"	AdditionalArrayThing map[string][]strfmt.UUID `json:\"-\"`",
  3570  		`func (m *AdditionalArrayThing) Validate(formats strfmt.Registry) error {`,
  3571  		`	if err := m.validateThisOneNotRequired(formats); err != nil {`,
  3572  		`	for k := range m.AdditionalArrayThing {`,
  3573  		//`		if swag.IsZero(m.AdditionalArrayThing[k]) {`,
  3574  		`		if err := validate.UniqueItems(k, "body", m.AdditionalArrayThing[k]); err != nil {`,
  3575  		`		for i := 0; i < len(m.AdditionalArrayThing[k]); i++ {`,
  3576  		`			if err := validate.FormatOf(k+"."+strconv.Itoa(i), "body", "uuid", m.AdditionalArrayThing[k][i].String(), formats); err != nil {`,
  3577  		`		return errors.CompositeValidationError(res...`,
  3578  		`func (m *AdditionalArrayThing) validateThisOneNotRequired(formats strfmt.Registry) error {`,
  3579  		`	if swag.IsZero(m.ThisOneNotRequired) {`,
  3580  		`	if err := validate.MaximumInt("thisOneNotRequired", "body", int64(m.ThisOneNotRequired), 10, false); err != nil {`,
  3581  	},
  3582  		// not expected
  3583  		todo,
  3584  		// output in log
  3585  		noLines,
  3586  		noLines)
  3587  
  3588  	expandRun.AddExpectations("additional_array_thing.go", flattenRun.ExpectedFor("AdditionalArrayThing").ExpectedLines, todo, noLines, noLines)
  3589  
  3590  	// load expectations for model: interface_thing.go
  3591  	flattenRun.AddExpectations("interface_thing.go", []string{
  3592  		`type InterfaceThing interface{}`,
  3593  	},
  3594  		// not expected
  3595  		todo,
  3596  		// output in log
  3597  		noLines,
  3598  		noLines)
  3599  
  3600  	expandRun.AddExpectations("interface_thing.go", flattenRun.ExpectedFor("InterfaceThing").ExpectedLines, todo, noLines, noLines)
  3601  
  3602  	// load expectations for model: empty_object_with_additional_slice.go
  3603  	flattenRun.AddExpectations("empty_object_with_additional_slice.go", []string{
  3604  		`type EmptyObjectWithAdditionalSlice map[string][]EmptyObjectWithAdditionalSliceAdditionalPropertiesItems`,
  3605  		`func (m EmptyObjectWithAdditionalSlice) Validate(formats strfmt.Registry) error {`,
  3606  		//`	if err := validate.Required("", "body", EmptyObjectWithAdditionalSlice(m)); err != nil {`,
  3607  		`	for k := range m {`,
  3608  		`		if err := validate.Required(k, "body", m[k]); err != nil {`,
  3609  		`		for i := 0; i < len(m[k]); i++ {`,
  3610  		`			if err := m[k][i].Validate(formats); err != nil {`,
  3611  		`				if ve, ok := err.(*errors.Validation); ok {`,
  3612  		`					return ve.ValidateName(k + "." + strconv.Itoa(i)`,
  3613  		`		return errors.CompositeValidationError(res...`,
  3614  	},
  3615  		// not expected
  3616  		todo,
  3617  		// output in log
  3618  		noLines,
  3619  		noLines)
  3620  
  3621  	expandRun.AddExpectations("empty_object_with_additional_slice.go", []string{
  3622  		`type EmptyObjectWithAdditionalSlice map[string][]EmptyObjectWithAdditionalSliceItems0`,
  3623  		`func (m EmptyObjectWithAdditionalSlice) Validate(formats strfmt.Registry) error {`,
  3624  		//`	if err := validate.Required("", "body", EmptyObjectWithAdditionalSlice(m)); err != nil {`,
  3625  		`	for k := range m {`,
  3626  		`		if err := validate.Required(k, "body", m[k]); err != nil {`,
  3627  		`		for i := 0; i < len(m[k]); i++ {`,
  3628  		`			if err := m[k][i].Validate(formats); err != nil {`,
  3629  		`				if ve, ok := err.(*errors.Validation); ok {`,
  3630  		`					return ve.ValidateName(k + "." + strconv.Itoa(i)`,
  3631  		`		return errors.CompositeValidationError(res...`,
  3632  		`type EmptyObjectWithAdditionalSliceItems0 struct {`,
  3633  		"	DummyProp1 strfmt.Date `json:\"dummyProp1,omitempty\"`",
  3634  		`func (m *EmptyObjectWithAdditionalSliceItems0) Validate(formats strfmt.Registry) error {`,
  3635  		`	if err := m.validateDummyProp1(formats); err != nil {`,
  3636  		`		return errors.CompositeValidationError(res...`,
  3637  		`func (m *EmptyObjectWithAdditionalSliceItems0) validateDummyProp1(formats strfmt.Registry) error {`,
  3638  		`	if swag.IsZero(m.DummyProp1) {`,
  3639  		`	if err := validate.FormatOf("dummyProp1", "body", "date", m.DummyProp1.String(), formats); err != nil {`,
  3640  	},
  3641  		// not expected
  3642  		todo,
  3643  		// output in log
  3644  		noLines,
  3645  		noLines)
  3646  
  3647  	// load expectations for model: additional_slice_of_objects.go
  3648  	flattenRun.AddExpectations("additional_slice_of_objects.go", []string{
  3649  		`type AdditionalSliceOfObjects struct {`,
  3650  		"	Prop1 string `json:\"prop1,omitempty\"`",
  3651  		"	AdditionalSliceOfObjects map[string][]*AdditionalSliceOfObjectsAdditionalPropertiesItems `json:\"-\"`",
  3652  		`func (m *AdditionalSliceOfObjects) Validate(formats strfmt.Registry) error {`,
  3653  		`	for k := range m.AdditionalSliceOfObjects {`,
  3654  		`		if err := validate.Required(k, "body", m.AdditionalSliceOfObjects[k]); err != nil {`,
  3655  		`		if err := validate.UniqueItems(k, "body", m.AdditionalSliceOfObjects[k]); err != nil {`,
  3656  		`		for i := 0; i < len(m.AdditionalSliceOfObjects[k]); i++ {`,
  3657  		// do we need Required when item is nullable?
  3658  		// nullable not required:
  3659  		`			if swag.IsZero(m.AdditionalSliceOfObjects[k][i]) {`,
  3660  		// nullable required:
  3661  		//`if err := validate.Required(k, "body", m.AdditionalSliceOfObjects[k]); err != nil {`,
  3662  		`			if m.AdditionalSliceOfObjects[k][i] != nil {`,
  3663  		`				if err := m.AdditionalSliceOfObjects[k][i].Validate(formats); err != nil {`,
  3664  		`					if ve, ok := err.(*errors.Validation); ok {`,
  3665  		`						return ve.ValidateName(k + "." + strconv.Itoa(i)`,
  3666  		`		return errors.CompositeValidationError(res...`,
  3667  	},
  3668  		// not expected
  3669  		todo,
  3670  		// output in log
  3671  		noLines,
  3672  		noLines)
  3673  
  3674  	expandRun.AddExpectations("additional_slice_of_objects.go", []string{
  3675  		`type AdditionalSliceOfObjects struct {`,
  3676  		"	Prop1 string `json:\"prop1,omitempty\"`",
  3677  		"	AdditionalSliceOfObjects map[string][]*AdditionalSliceOfObjectsItems0 `json:\"-\"`",
  3678  		`func (m *AdditionalSliceOfObjects) Validate(formats strfmt.Registry) error {`,
  3679  		`	for k := range m.AdditionalSliceOfObjects {`,
  3680  		`		if err := validate.Required(k, "body", m.AdditionalSliceOfObjects[k]); err != nil {`,
  3681  		`		if err := validate.UniqueItems(k, "body", m.AdditionalSliceOfObjects[k]); err != nil {`,
  3682  		`		for i := 0; i < len(m.AdditionalSliceOfObjects[k]); i++ {`,
  3683  		// do we need Required when item is nullable?
  3684  		// nullable not required:
  3685  		`			if swag.IsZero(m.AdditionalSliceOfObjects[k][i]) {`,
  3686  		// nullable required:
  3687  		//`if err := validate.Required(k, "body", m.AdditionalSliceOfObjects[k]); err != nil {`,
  3688  		`			if m.AdditionalSliceOfObjects[k][i] != nil {`,
  3689  		`				if err := m.AdditionalSliceOfObjects[k][i].Validate(formats); err != nil {`,
  3690  		`					if ve, ok := err.(*errors.Validation); ok {`,
  3691  		`						return ve.ValidateName(k + "." + strconv.Itoa(i)`,
  3692  		`		return errors.CompositeValidationError(res...`,
  3693  		`type AdditionalSliceOfObjectsItems0 struct {`,
  3694  		"	Prop2 int64 `json:\"prop2,omitempty\"`",
  3695  		// empty validation
  3696  		"func (m *AdditionalSliceOfObjectsItems0) Validate(formats strfmt.Registry) error {\n	return nil\n}",
  3697  	},
  3698  		// not expected
  3699  		todo,
  3700  		// output in log
  3701  		noLines,
  3702  		noLines)
  3703  
  3704  	// load expectations for model: additional_things_nested.go
  3705  	flattenRun.AddExpectations("additional_things_nested.go", []string{
  3706  		`type AdditionalThingsNested struct {`,
  3707  		"	Origin string `json:\"origin,omitempty\"`",
  3708  		"	AdditionalThingsNested map[string]*AdditionalThingsNestedAdditionalProperties `json:\"-\"`",
  3709  		`func (m *AdditionalThingsNested) Validate(formats strfmt.Registry) error {`,
  3710  		`	if err := m.validateOrigin(formats); err != nil {`,
  3711  		`	for k := range m.AdditionalThingsNested {`,
  3712  		`		if val, ok := m.AdditionalThingsNested[k]; ok {`,
  3713  		`			if val != nil {`,
  3714  		`				if err := val.Validate(formats); err != nil {`,
  3715  		`		return errors.CompositeValidationError(res...`,
  3716  		`var additionalThingsNestedTypeOriginPropEnum []interface{`,
  3717  		`	var res []string`,
  3718  		"	if err := json.Unmarshal([]byte(`[\"goPrint\",\"goE-book\",\"goCollection\",\"goMuseum\"]`), &res); err != nil {",
  3719  		`	for _, v := range res {`,
  3720  		`		additionalThingsNestedTypeOriginPropEnum = append(additionalThingsNestedTypeOriginPropEnum, v`,
  3721  		`	AdditionalThingsNestedOriginGoPrint string = "goPrint"`,
  3722  		`	AdditionalThingsNestedOriginGoEBook string = "goE-book"`,
  3723  		`	AdditionalThingsNestedOriginGoCollection string = "goCollection"`,
  3724  		`	AdditionalThingsNestedOriginGoMuseum string = "goMuseum"`,
  3725  		`func (m *AdditionalThingsNested) validateOriginEnum(path, location string, value string) error {`,
  3726  		`	if err := validate.Enum(path, location, value, additionalThingsNestedTypeOriginPropEnum); err != nil {`,
  3727  		`func (m *AdditionalThingsNested) validateOrigin(formats strfmt.Registry) error {`,
  3728  		`	if swag.IsZero(m.Origin) {`,
  3729  		`	if err := m.validateOriginEnum("origin", "body", m.Origin); err != nil {`,
  3730  	},
  3731  		// not expected
  3732  		todo,
  3733  		// output in log
  3734  		noLines,
  3735  		noLines)
  3736  
  3737  	expandRun.AddExpectations("additional_things_nested.go", []string{
  3738  		`type AdditionalThingsNested struct {`,
  3739  		"	Origin string `json:\"origin,omitempty\"`",
  3740  		"	AdditionalThingsNested map[string]*AdditionalThingsNestedAnon `json:\"-\"`",
  3741  		`func (m *AdditionalThingsNested) Validate(formats strfmt.Registry) error {`,
  3742  		`	if err := m.validateOrigin(formats); err != nil {`,
  3743  		`	for k := range m.AdditionalThingsNested {`,
  3744  		`		if val, ok := m.AdditionalThingsNested[k]; ok {`,
  3745  		`			if val != nil {`,
  3746  		`				if err := val.Validate(formats); err != nil {`,
  3747  		`		return errors.CompositeValidationError(res...`,
  3748  		`var additionalThingsNestedTypeOriginPropEnum []interface{`,
  3749  		`	var res []string`,
  3750  		"	if err := json.Unmarshal([]byte(`[\"goPrint\",\"goE-book\",\"goCollection\",\"goMuseum\"]`), &res); err != nil {",
  3751  		`	for _, v := range res {`,
  3752  		`		additionalThingsNestedTypeOriginPropEnum = append(additionalThingsNestedTypeOriginPropEnum, v`,
  3753  		`	AdditionalThingsNestedOriginGoPrint string = "goPrint"`,
  3754  		`	AdditionalThingsNestedOriginGoEBook string = "goE-book"`,
  3755  		`	AdditionalThingsNestedOriginGoCollection string = "goCollection"`,
  3756  		`	AdditionalThingsNestedOriginGoMuseum string = "goMuseum"`,
  3757  		`func (m *AdditionalThingsNested) validateOriginEnum(path, location string, value string) error {`,
  3758  		`	if err := validate.Enum(path, location, value, additionalThingsNestedTypeOriginPropEnum); err != nil {`,
  3759  		`func (m *AdditionalThingsNested) validateOrigin(formats strfmt.Registry) error {`,
  3760  		`	if swag.IsZero(m.Origin) {`,
  3761  		`	if err := m.validateOriginEnum("origin", "body", m.Origin); err != nil {`,
  3762  		`type AdditionalThingsNestedAnon struct {`,
  3763  		"	PrinterAddress string `json:\"printerAddress,omitempty\"`",
  3764  		"	PrinterCountry string `json:\"printerCountry,omitempty\"`",
  3765  		"	PrinterDate strfmt.Date `json:\"printerDate,omitempty\"`",
  3766  		"	AdditionalThingsNestedAnon map[string]*AdditionalThingsNestedAnonAnon `json:\"-\"`",
  3767  		`func (m *AdditionalThingsNestedAnon) Validate(formats strfmt.Registry) error {`,
  3768  		`	if err := m.validatePrinterCountry(formats); err != nil {`,
  3769  		`	if err := m.validatePrinterDate(formats); err != nil {`,
  3770  		`	for k := range m.AdditionalThingsNestedAnon {`,
  3771  		`		if val, ok := m.AdditionalThingsNestedAnon[k]; ok {`,
  3772  		`			if val != nil {`,
  3773  		`				if err := val.Validate(formats); err != nil {`,
  3774  		`		return errors.CompositeValidationError(res...`,
  3775  		`var additionalThingsNestedAnonTypePrinterCountryPropEnum []interface{`,
  3776  		`	var res []string`,
  3777  		"	if err := json.Unmarshal([]byte(`[\"US\",\"FR\",\"UK\",\"BE\",\"CA\",\"DE\"]`), &res); err != nil {",
  3778  		`	for _, v := range res {`,
  3779  		`		additionalThingsNestedAnonTypePrinterCountryPropEnum = append(additionalThingsNestedAnonTypePrinterCountryPropEnum, v`,
  3780  		`	AdditionalThingsNestedAnonPrinterCountryUS string = "US"`,
  3781  		`	AdditionalThingsNestedAnonPrinterCountryFR string = "FR"`,
  3782  		`	AdditionalThingsNestedAnonPrinterCountryUK string = "UK"`,
  3783  		`	AdditionalThingsNestedAnonPrinterCountryBE string = "BE"`,
  3784  		`	AdditionalThingsNestedAnonPrinterCountryCA string = "CA"`,
  3785  		`	AdditionalThingsNestedAnonPrinterCountryDE string = "DE"`,
  3786  		`func (m *AdditionalThingsNestedAnon) validatePrinterCountryEnum(path, location string, value string) error {`,
  3787  		`	if err := validate.Enum(path, location, value, additionalThingsNestedAnonTypePrinterCountryPropEnum); err != nil {`,
  3788  		`func (m *AdditionalThingsNestedAnon) validatePrinterCountry(formats strfmt.Registry) error {`,
  3789  		`	if swag.IsZero(m.PrinterCountry) {`,
  3790  		`	if err := m.validatePrinterCountryEnum("printerCountry", "body", m.PrinterCountry); err != nil {`,
  3791  		`func (m *AdditionalThingsNestedAnon) validatePrinterDate(formats strfmt.Registry) error {`,
  3792  		`	if swag.IsZero(m.PrinterDate) {`,
  3793  		`	if err := validate.FormatOf("printerDate", "body", "date", m.PrinterDate.String(), formats); err != nil {`,
  3794  		`type AdditionalThingsNestedAnonAnon struct {`,
  3795  		"	AverageDelay strfmt.Duration `json:\"averageDelay,omitempty\"`",
  3796  		`func (m *AdditionalThingsNestedAnonAnon) Validate(formats strfmt.Registry) error {`,
  3797  		`	if err := m.validateAverageDelay(formats); err != nil {`,
  3798  		`		return errors.CompositeValidationError(res...`,
  3799  		`func (m *AdditionalThingsNestedAnonAnon) validateAverageDelay(formats strfmt.Registry) error {`,
  3800  		`	if swag.IsZero(m.AverageDelay) {`,
  3801  		`	if err := validate.FormatOf("averageDelay", "body", "duration", m.AverageDelay.String(), formats); err != nil {`,
  3802  	},
  3803  		// not expected
  3804  		todo,
  3805  		// output in log
  3806  		noLines,
  3807  		noLines)
  3808  
  3809  	// load expectations for model: no_validation_thing.go
  3810  	flattenRun.AddExpectations("no_validation_thing.go", []string{
  3811  		`type NoValidationThing struct {`,
  3812  		"	Discourse string `json:\"discourse,omitempty\"`",
  3813  		"	HoursSpent float64 `json:\"hoursSpent,omitempty\"`",
  3814  		"	NoValidationThingAdditionalProperties map[string]interface{} `json:\"-\"`",
  3815  		// empty validation
  3816  		"func (m *NoValidationThing) Validate(formats strfmt.Registry) error {\n	return nil\n}",
  3817  	},
  3818  		// not expected
  3819  		todo,
  3820  		// output in log
  3821  		noLines,
  3822  		noLines)
  3823  
  3824  	expandRun.AddExpectations("no_validation_thing.go", flattenRun.ExpectedFor("NoValidationThing").ExpectedLines, todo, noLines, noLines)
  3825  
  3826  	// load expectations for model: additional_array_of_interface.go
  3827  	flattenRun.AddExpectations("additional_array_of_interface.go", []string{
  3828  		`type AdditionalArrayOfInterface struct {`,
  3829  		"	ThisOneNotRequired int64 `json:\"thisOneNotRequired,omitempty\"`",
  3830  		"	AdditionalArrayOfInterface map[string][]interface{} `json:\"-\"`",
  3831  		`func (m *AdditionalArrayOfInterface) Validate(formats strfmt.Registry) error {`,
  3832  		`	if err := m.validateThisOneNotRequired(formats); err != nil {`,
  3833  		`	for k := range m.AdditionalArrayOfInterface {`,
  3834  		// remove undue IsZero call
  3835  		//`		if swag.IsZero(m.AdditionalArrayOfInterface[k]) {`,
  3836  		`		if err := validate.UniqueItems(k, "body", m.AdditionalArrayOfInterface[k]); err != nil {`,
  3837  		`		return errors.CompositeValidationError(res...`,
  3838  		`func (m *AdditionalArrayOfInterface) validateThisOneNotRequired(formats strfmt.Registry) error {`,
  3839  		`	if swag.IsZero(m.ThisOneNotRequired) {`,
  3840  		`	if err := validate.MaximumInt("thisOneNotRequired", "body", int64(m.ThisOneNotRequired), 10, false); err != nil {`,
  3841  	},
  3842  		// not expected
  3843  		todo,
  3844  		// output in log
  3845  		noLines,
  3846  		noLines)
  3847  
  3848  	expandRun.AddExpectations("additional_array_of_interface.go", flattenRun.ExpectedFor("AdditionalArrayOfInterface").ExpectedLines, todo, noLines, noLines)
  3849  
  3850  	// load expectations for model: additional_formated_thing.go
  3851  	flattenRun.AddExpectations("additional_formated_thing.go", []string{
  3852  		`type AdditionalFormatedThing map[string]strfmt.Date`,
  3853  		`func (m AdditionalFormatedThing) Validate(formats strfmt.Registry) error {`,
  3854  		`	for k := range m {`,
  3855  		//`		if swag.IsZero(m[k]) {`,
  3856  		`		if err := validate.FormatOf(k, "body", "date", m[k].String(), formats); err != nil {`,
  3857  		`		return errors.CompositeValidationError(res...`,
  3858  	},
  3859  		// not expected
  3860  		todo,
  3861  		// output in log
  3862  		noLines,
  3863  		noLines)
  3864  
  3865  	expandRun.AddExpectations("additional_formated_thing.go", flattenRun.ExpectedFor("AdditionalFormatedThing").ExpectedLines, todo, noLines, noLines)
  3866  
  3867  	// load expectations for model: aliased_nullable_date.go
  3868  	flattenRun.AddExpectations("aliased_nullable_date.go", []string{
  3869  		`type AliasedNullableDate strfmt.Date`,
  3870  		`func (m AliasedNullableDate) Validate(formats strfmt.Registry) error {`,
  3871  		`	if err := validate.FormatOf("", "body", "date", strfmt.Date(m).String(), formats); err != nil {`,
  3872  		`		return errors.CompositeValidationError(res...`,
  3873  	},
  3874  		// not expected
  3875  		todo,
  3876  		// output in log
  3877  		noLines,
  3878  		noLines)
  3879  
  3880  	expandRun.AddExpectations("aliased_nullable_date.go", flattenRun.ExpectedFor("AliasedNullableDate").ExpectedLines, todo, noLines, noLines)
  3881  
  3882  	// load expectations for model: additional_array_of_refed_object.go
  3883  	flattenRun.AddExpectations("additional_array_of_refed_object.go", []string{
  3884  		`type AdditionalArrayOfRefedObject struct {`,
  3885  		"	ThisOneNotRequired int64 `json:\"thisOneNotRequired,omitempty\"`",
  3886  		"	AdditionalArrayOfRefedObject map[string][]*NoValidationThing `json:\"-\"`",
  3887  		`func (m *AdditionalArrayOfRefedObject) Validate(formats strfmt.Registry) error {`,
  3888  		`	if err := m.validateThisOneNotRequired(formats); err != nil {`,
  3889  		`	for k := range m.AdditionalArrayOfRefedObject {`,
  3890  		`		if err := validate.Required(k, "body", m.AdditionalArrayOfRefedObject[k]); err != nil {`,
  3891  		`		if err := validate.UniqueItems(k, "body", m.AdditionalArrayOfRefedObject[k]); err != nil {`,
  3892  		`		for i := 0; i < len(m.AdditionalArrayOfRefedObject[k]); i++ {`,
  3893  		// do we need Required when item is nullable?
  3894  		// nullable not required:
  3895  		`			if swag.IsZero(m.AdditionalArrayOfRefedObject[k][i]) {`,
  3896  		// nullable required:
  3897  		//`			if err := validate.Required(k+"."+strconv.Itoa(i), "body", m.AdditionalArrayOfRefedObject[k][i]); err != nil {`,
  3898  		`			if m.AdditionalArrayOfRefedObject[k][i] != nil {`,
  3899  		`				if err := m.AdditionalArrayOfRefedObject[k][i].Validate(formats); err != nil {`,
  3900  		`					if ve, ok := err.(*errors.Validation); ok {`,
  3901  		`						return ve.ValidateName(k + "." + strconv.Itoa(i)`,
  3902  		`		return errors.CompositeValidationError(res...`,
  3903  		`func (m *AdditionalArrayOfRefedObject) validateThisOneNotRequired(formats strfmt.Registry) error {`,
  3904  		`	if swag.IsZero(m.ThisOneNotRequired) {`,
  3905  		`	if err := validate.MaximumInt("thisOneNotRequired", "body", int64(m.ThisOneNotRequired), 10, false); err != nil {`,
  3906  	},
  3907  		// not expected
  3908  		todo,
  3909  		// output in log
  3910  		noLines,
  3911  		noLines)
  3912  
  3913  	expandRun.AddExpectations("additional_array_of_refed_object.go", []string{
  3914  		`type AdditionalArrayOfRefedObject struct {`,
  3915  		"	ThisOneNotRequired int64 `json:\"thisOneNotRequired,omitempty\"`",
  3916  		"	AdditionalArrayOfRefedObject map[string][]*AdditionalArrayOfRefedObjectItems0 `json:\"-\"`",
  3917  		`func (m *AdditionalArrayOfRefedObject) Validate(formats strfmt.Registry) error {`,
  3918  		`	if err := m.validateThisOneNotRequired(formats); err != nil {`,
  3919  		`	for k := range m.AdditionalArrayOfRefedObject {`,
  3920  		`		if err := validate.Required(k, "body", m.AdditionalArrayOfRefedObject[k]); err != nil {`,
  3921  		`		if err := validate.UniqueItems(k, "body", m.AdditionalArrayOfRefedObject[k]); err != nil {`,
  3922  		`		for i := 0; i < len(m.AdditionalArrayOfRefedObject[k]); i++ {`,
  3923  		// do we need Required when item is nullable?
  3924  		// nullable not required:
  3925  		`			if swag.IsZero(m.AdditionalArrayOfRefedObject[k][i]) {`,
  3926  		// nullable required:
  3927  		//`			if err := validate.Required(k+"."+strconv.Itoa(i), "body", m.AdditionalArrayOfRefedObject[k][i]); err != nil {`,
  3928  		`			if m.AdditionalArrayOfRefedObject[k][i] != nil {`,
  3929  		`				if err := m.AdditionalArrayOfRefedObject[k][i].Validate(formats); err != nil {`,
  3930  		`					if ve, ok := err.(*errors.Validation); ok {`,
  3931  		`						return ve.ValidateName(k + "." + strconv.Itoa(i)`,
  3932  		`		return errors.CompositeValidationError(res...`,
  3933  		`func (m *AdditionalArrayOfRefedObject) validateThisOneNotRequired(formats strfmt.Registry) error {`,
  3934  		`	if swag.IsZero(m.ThisOneNotRequired) {`,
  3935  		`	if err := validate.MaximumInt("thisOneNotRequired", "body", int64(m.ThisOneNotRequired), 10, false); err != nil {`,
  3936  		`type AdditionalArrayOfRefedObjectItems0 struct {`,
  3937  		"	Discourse string `json:\"discourse,omitempty\"`",
  3938  		"	HoursSpent float64 `json:\"hoursSpent,omitempty\"`",
  3939  		"	AdditionalArrayOfRefedObjectItems0AdditionalProperties map[string]interface{} `json:\"-\"`",
  3940  		// empty validation
  3941  		"func (m *AdditionalArrayOfRefedObjectItems0) Validate(formats strfmt.Registry) error {\n	return nil\n}",
  3942  	},
  3943  		// not expected
  3944  		todo,
  3945  		// output in log
  3946  		noLines,
  3947  		noLines)
  3948  
  3949  	// load expectations for model: additional_slice_of_aliased_primitives.go
  3950  	flattenRun.AddExpectations("additional_slice_of_aliased_primitives.go", []string{
  3951  		`type AdditionalSliceOfAliasedPrimitives struct {`,
  3952  		"	Prop2 strfmt.UUID `json:\"prop2,omitempty\"`",
  3953  		"	AdditionalSliceOfAliasedPrimitives map[string][]AliasedDate `json:\"-\"`",
  3954  		`func (m *AdditionalSliceOfAliasedPrimitives) Validate(formats strfmt.Registry) error {`,
  3955  		`	if err := m.validateProp2(formats); err != nil {`,
  3956  		`	for k := range m.AdditionalSliceOfAliasedPrimitives {`,
  3957  		// removed undue IsZero call
  3958  		//`		if swag.IsZero(m.AdditionalSliceOfAliasedPrimitives[k]) {`,
  3959  		`		iAdditionalSliceOfAliasedPrimitivesSize := int64(len(m.AdditionalSliceOfAliasedPrimitives[k])`,
  3960  		`		if err := validate.MaxItems(k, "body", iAdditionalSliceOfAliasedPrimitivesSize, 10); err != nil {`,
  3961  		`		for i := 0; i < len(m.AdditionalSliceOfAliasedPrimitives[k]); i++ {`,
  3962  		`			if err := m.AdditionalSliceOfAliasedPrimitives[k][i].Validate(formats); err != nil {`,
  3963  		`				if ve, ok := err.(*errors.Validation); ok {`,
  3964  		`					return ve.ValidateName(k + "." + strconv.Itoa(i)`,
  3965  		`		return errors.CompositeValidationError(res...`,
  3966  		`func (m *AdditionalSliceOfAliasedPrimitives) validateProp2(formats strfmt.Registry) error {`,
  3967  		`	if swag.IsZero(m.Prop2) {`,
  3968  		`	if err := validate.FormatOf("prop2", "body", "uuid", m.Prop2.String(), formats); err != nil {`,
  3969  	},
  3970  		// not expected
  3971  		todo,
  3972  		// output in log
  3973  		noLines,
  3974  		noLines)
  3975  
  3976  	expandRun.AddExpectations("additional_slice_of_aliased_primitives.go", []string{
  3977  		`type AdditionalSliceOfAliasedPrimitives struct {`,
  3978  		"	Prop2 strfmt.UUID `json:\"prop2,omitempty\"`",
  3979  		"	AdditionalSliceOfAliasedPrimitives map[string][]strfmt.Date `json:\"-\"`",
  3980  		`func (m *AdditionalSliceOfAliasedPrimitives) Validate(formats strfmt.Registry) error {`,
  3981  		`	if err := m.validateProp2(formats); err != nil {`,
  3982  		`	for k := range m.AdditionalSliceOfAliasedPrimitives {`,
  3983  		//`		if swag.IsZero(m.AdditionalSliceOfAliasedPrimitives[k]) {`,
  3984  		`		iAdditionalSliceOfAliasedPrimitivesSize := int64(len(m.AdditionalSliceOfAliasedPrimitives[k])`,
  3985  		`		if err := validate.MaxItems(k, "body", iAdditionalSliceOfAliasedPrimitivesSize, 10); err != nil {`,
  3986  		`		for i := 0; i < len(m.AdditionalSliceOfAliasedPrimitives[k]); i++ {`,
  3987  		`			if err := validate.FormatOf(k+"."+strconv.Itoa(i), "body", "date", m.AdditionalSliceOfAliasedPrimitives[k][i].String(), formats); err != nil {`,
  3988  		`		return errors.CompositeValidationError(res...`,
  3989  		`func (m *AdditionalSliceOfAliasedPrimitives) validateProp2(formats strfmt.Registry) error {`,
  3990  		`	if swag.IsZero(m.Prop2) {`,
  3991  		`	if err := validate.FormatOf("prop2", "body", "uuid", m.Prop2.String(), formats); err != nil {`,
  3992  	},
  3993  		// not expected
  3994  		todo,
  3995  		// output in log
  3996  		noLines,
  3997  		noLines)
  3998  
  3999  	// load expectations for model: transitive_refed_thing.go
  4000  	flattenRun.AddExpectations("transitive_refed_thing.go", []string{
  4001  		`type TransitiveRefedThing struct {`,
  4002  		"	ThisOneNotRequiredEither int64 `json:\"thisOneNotRequiredEither,omitempty\"`",
  4003  		"	TransitiveRefedThing map[string]*TransitiveRefedThingAdditionalProperties `json:\"-\"`",
  4004  		`func (m *TransitiveRefedThing) Validate(formats strfmt.Registry) error {`,
  4005  		`	if err := m.validateThisOneNotRequiredEither(formats); err != nil {`,
  4006  		`	for k := range m.TransitiveRefedThing {`,
  4007  		`		if val, ok := m.TransitiveRefedThing[k]; ok {`,
  4008  		`			if val != nil {`,
  4009  		`				if err := val.Validate(formats); err != nil {`,
  4010  		`		return errors.CompositeValidationError(res...`,
  4011  		`func (m *TransitiveRefedThing) validateThisOneNotRequiredEither(formats strfmt.Registry) error {`,
  4012  		`	if swag.IsZero(m.ThisOneNotRequiredEither) {`,
  4013  		`	if err := validate.MaximumInt("thisOneNotRequiredEither", "body", int64(m.ThisOneNotRequiredEither), 20, false); err != nil {`,
  4014  	},
  4015  		// not expected
  4016  		todo,
  4017  		// output in log
  4018  		noLines,
  4019  		noLines)
  4020  
  4021  	expandRun.AddExpectations("transitive_refed_thing.go", []string{
  4022  		`type TransitiveRefedThing struct {`,
  4023  		"	ThisOneNotRequiredEither int64 `json:\"thisOneNotRequiredEither,omitempty\"`",
  4024  		"	TransitiveRefedThing map[string]*TransitiveRefedThingAnon `json:\"-\"`",
  4025  		`func (m *TransitiveRefedThing) Validate(formats strfmt.Registry) error {`,
  4026  		`	if err := m.validateThisOneNotRequiredEither(formats); err != nil {`,
  4027  		`	for k := range m.TransitiveRefedThing {`,
  4028  		`		if val, ok := m.TransitiveRefedThing[k]; ok {`,
  4029  		`			if val != nil {`,
  4030  		`				if err := val.Validate(formats); err != nil {`,
  4031  		`		return errors.CompositeValidationError(res...`,
  4032  		`func (m *TransitiveRefedThing) validateThisOneNotRequiredEither(formats strfmt.Registry) error {`,
  4033  		`	if swag.IsZero(m.ThisOneNotRequiredEither) {`,
  4034  		`	if err := validate.MaximumInt("thisOneNotRequiredEither", "body", int64(m.ThisOneNotRequiredEither), 20, false); err != nil {`,
  4035  		`type TransitiveRefedThingAnon struct {`,
  4036  		"	A1 strfmt.DateTime `json:\"a1,omitempty\"`",
  4037  		"	TransitiveRefedThingAnon map[string]*TransitiveRefedThingAnonAnon `json:\"-\"`",
  4038  		`func (m *TransitiveRefedThingAnon) Validate(formats strfmt.Registry) error {`,
  4039  		`	if err := m.validateA1(formats); err != nil {`,
  4040  		`	for k := range m.TransitiveRefedThingAnon {`,
  4041  		`		if val, ok := m.TransitiveRefedThingAnon[k]; ok {`,
  4042  		`			if val != nil {`,
  4043  		`				if err := val.Validate(formats); err != nil {`,
  4044  		`		return errors.CompositeValidationError(res...`,
  4045  		`func (m *TransitiveRefedThingAnon) validateA1(formats strfmt.Registry) error {`,
  4046  		`	if swag.IsZero(m.A1) {`,
  4047  		`	if err := validate.FormatOf("a1", "body", "date-time", m.A1.String(), formats); err != nil {`,
  4048  		`type TransitiveRefedThingAnonAnon struct {`,
  4049  		"	Discourse string `json:\"discourse,omitempty\"`",
  4050  		"	HoursSpent float64 `json:\"hoursSpent,omitempty\"`",
  4051  		"	TransitiveRefedThingAnonAnonAdditionalProperties map[string]interface{} `json:\"-\"`",
  4052  		// empty validation
  4053  		"func (m *TransitiveRefedThingAnonAnon) Validate(formats strfmt.Registry) error {\n	return nil\n}",
  4054  	},
  4055  		// not expected
  4056  		todo,
  4057  		// output in log
  4058  		noLines,
  4059  		noLines)
  4060  
  4061  	// load expectations for model: additional_empty_object.go
  4062  	flattenRun.AddExpectations("additional_empty_object.go", []string{
  4063  		`type AdditionalEmptyObject struct {`,
  4064  		"	PropA interface{} `json:\"propA,omitempty\"`",
  4065  		"	AdditionalEmptyObject map[string]interface{} `json:\"-\"`",
  4066  		// empty validation
  4067  		"func (m *AdditionalEmptyObject) Validate(formats strfmt.Registry) error {\n	return nil\n}",
  4068  	},
  4069  		// not expected
  4070  		todo,
  4071  		// output in log
  4072  		noLines,
  4073  		noLines)
  4074  
  4075  	expandRun.AddExpectations("additional_empty_object.go", flattenRun.ExpectedFor("AdditionalEmptyObject").ExpectedLines, todo, noLines, noLines)
  4076  
  4077  	// load expectations for model: additional_date_with_nullable_thing.go
  4078  	flattenRun.AddExpectations("additional_date_with_nullable_thing.go", []string{
  4079  		`type AdditionalDateWithNullableThing struct {`,
  4080  		"	Blob int64 `json:\"blob,omitempty\"`",
  4081  		"	NullableDate *AliasedNullableDate `json:\"nullableDate,omitempty\"`",
  4082  		"	AdditionalDateWithNullableThing map[string]*AliasedNullableDate `json:\"-\"`",
  4083  		`func (m *AdditionalDateWithNullableThing) Validate(formats strfmt.Registry) error {`,
  4084  		`	if err := m.validateBlob(formats); err != nil {`,
  4085  		`	if err := m.validateNullableDate(formats); err != nil {`,
  4086  		`	for k := range m.AdditionalDateWithNullableThing {`,
  4087  		`		if swag.IsZero(m.AdditionalDateWithNullableThing[k]) {`,
  4088  		`		if val, ok := m.AdditionalDateWithNullableThing[k]; ok {`,
  4089  		`			if val != nil {`,
  4090  		`				if err := val.Validate(formats); err != nil {`,
  4091  		`		return errors.CompositeValidationError(res...`,
  4092  		`func (m *AdditionalDateWithNullableThing) validateBlob(formats strfmt.Registry) error {`,
  4093  		`	if swag.IsZero(m.Blob) {`,
  4094  		`	if err := validate.MinimumInt("blob", "body", int64(m.Blob), 1, false); err != nil {`,
  4095  		`func (m *AdditionalDateWithNullableThing) validateNullableDate(formats strfmt.Registry) error {`,
  4096  		`	if swag.IsZero(m.NullableDate) {`,
  4097  		`	if m.NullableDate != nil {`,
  4098  		`		if err := m.NullableDate.Validate(formats); err != nil {`,
  4099  		`			if ve, ok := err.(*errors.Validation); ok {`,
  4100  		`				return ve.ValidateName("nullableDate"`,
  4101  	},
  4102  		// not expected
  4103  		todo,
  4104  		// output in log
  4105  		noLines,
  4106  		noLines)
  4107  
  4108  	expandRun.AddExpectations("additional_date_with_nullable_thing.go", []string{
  4109  		`type AdditionalDateWithNullableThing struct {`,
  4110  		"	Blob int64 `json:\"blob,omitempty\"`",
  4111  		"	NullableDate *strfmt.Date `json:\"nullableDate,omitempty\"`",
  4112  		"	AdditionalDateWithNullableThing map[string]*strfmt.Date `json:\"-\"`",
  4113  		`func (m *AdditionalDateWithNullableThing) Validate(formats strfmt.Registry) error {`,
  4114  		`	if err := m.validateBlob(formats); err != nil {`,
  4115  		`	if err := m.validateNullableDate(formats); err != nil {`,
  4116  		`	for k := range m.AdditionalDateWithNullableThing {`,
  4117  		`		if swag.IsZero(m.AdditionalDateWithNullableThing[k]) {`,
  4118  		`		if err := validate.FormatOf(k, "body", "date", m.AdditionalDateWithNullableThing[k].String(), formats); err != nil {`,
  4119  		`		return errors.CompositeValidationError(res...`,
  4120  		`func (m *AdditionalDateWithNullableThing) validateBlob(formats strfmt.Registry) error {`,
  4121  		`	if swag.IsZero(m.Blob) {`,
  4122  		`	if err := validate.MinimumInt("blob", "body", int64(m.Blob), 1, false); err != nil {`,
  4123  		`func (m *AdditionalDateWithNullableThing) validateNullableDate(formats strfmt.Registry) error {`,
  4124  		`	if swag.IsZero(m.NullableDate) {`,
  4125  		`	if err := validate.FormatOf("nullableDate", "body", "date", m.NullableDate.String(), formats); err != nil {`,
  4126  	},
  4127  		// not expected
  4128  		todo,
  4129  		// output in log
  4130  		noLines,
  4131  		noLines)
  4132  
  4133  }
  4134  
  4135  func initFixtureTuple() {
  4136  	// testing ../fixtures/bugs/1487/fixture-tuple.yaml with expand (--skip-flatten)
  4137  
  4138  	/* check different patterns of additionalItems validations or absence thereof
  4139  	 */
  4140  	f := newModelFixture("../fixtures/bugs/1487/fixture-tuple.yaml", "fixture for tuples and additionalItems")
  4141  	flattenRun := f.AddRun(false)
  4142  	expandRun := f.AddRun(true)
  4143  
  4144  	// load expectations for model: classics.go
  4145  	flattenRun.AddExpectations("classics.go", []string{
  4146  		`type Classics struct {`,
  4147  		"	P0 *int64 `json:\"-\"`",
  4148  		"	P1 *strfmt.ISBN `json:\"-\"`",
  4149  		"	P2 Comics `json:\"-\"`",
  4150  		"	ClassicsItems []ClassicsTupleAdditionalItems `json:\"-\"`",
  4151  		`func (m *Classics) Validate(formats strfmt.Registry) error {`,
  4152  		`	if err := m.validateP0(formats); err != nil {`,
  4153  		`	if err := m.validateP1(formats); err != nil {`,
  4154  		`	if err := m.validateP2(formats); err != nil {`,
  4155  		`	if err := m.validateClassicsItems(formats); err != nil {`,
  4156  		`		return errors.CompositeValidationError(res...`,
  4157  		`func (m *Classics) validateP0(formats strfmt.Registry) error {`,
  4158  		`	if err := validate.Required("0", "body", m.P0); err != nil {`,
  4159  		`func (m *Classics) validateP1(formats strfmt.Registry) error {`,
  4160  		`	if err := validate.Required("1", "body", m.P1); err != nil {`,
  4161  		`	if err := validate.FormatOf("1", "body", "isbn", m.P1.String(), formats); err != nil {`,
  4162  		`func (m *Classics) validateP2(formats strfmt.Registry) error {`,
  4163  		`	if err := m.P2.Validate(formats); err != nil {`,
  4164  		`		if ve, ok := err.(*errors.Validation); ok {`,
  4165  		`			return ve.ValidateName("2"`,
  4166  		`func (m *Classics) validateClassicsItems(formats strfmt.Registry) error {`,
  4167  		`	for i := range m.ClassicsItems {`,
  4168  		`		if err := m.ClassicsItems[i].Validate(formats); err != nil {`,
  4169  		`			if ve, ok := err.(*errors.Validation); ok {`,
  4170  		`				return ve.ValidateName(strconv.Itoa(i + 3)`,
  4171  	},
  4172  		// not expected
  4173  		todo,
  4174  		// output in log
  4175  		noLines,
  4176  		noLines)
  4177  
  4178  	expandRun.AddExpectations("classics.go", []string{
  4179  		`type Classics struct {`,
  4180  		"	P0 *int64 `json:\"-\"`",
  4181  		"	P1 *strfmt.ISBN `json:\"-\"`",
  4182  		"	P2 *ClassicsTuple0 `json:\"-\"`",
  4183  		// TODO: items should not be pointer
  4184  		"	ClassicsItems []*ClassicsClassicsItemsTuple0 `json:\"-\"`",
  4185  		`func (m *Classics) Validate(formats strfmt.Registry) error {`,
  4186  		`	if err := m.validateP0(formats); err != nil {`,
  4187  		`	if err := m.validateP1(formats); err != nil {`,
  4188  		`	if err := m.validateP2(formats); err != nil {`,
  4189  		`	if err := m.validateClassicsItems(formats); err != nil {`,
  4190  		`		return errors.CompositeValidationError(res...`,
  4191  		`func (m *Classics) validateP0(formats strfmt.Registry) error {`,
  4192  		`	if err := validate.Required("0", "body", m.P0); err != nil {`,
  4193  		`func (m *Classics) validateP1(formats strfmt.Registry) error {`,
  4194  		`	if err := validate.Required("1", "body", m.P1); err != nil {`,
  4195  		`	if err := validate.FormatOf("1", "body", "isbn", m.P1.String(), formats); err != nil {`,
  4196  		`func (m *Classics) validateP2(formats strfmt.Registry) error {`,
  4197  		`	if err := validate.Required("2", "body", m.P2); err != nil {`,
  4198  		`	if m.P2 != nil {`,
  4199  		`		if err := m.P2.Validate(formats); err != nil {`,
  4200  		`			if ve, ok := err.(*errors.Validation); ok {`,
  4201  		`				return ve.ValidateName("2"`,
  4202  		`func (m *Classics) validateClassicsItems(formats strfmt.Registry) error {`,
  4203  		`	for i := range m.ClassicsItems {`,
  4204  		`		if m.ClassicsItems[i] != nil {`,
  4205  		`			if err := m.ClassicsItems[i].Validate(formats); err != nil {`,
  4206  		`				if ve, ok := err.(*errors.Validation); ok {`,
  4207  		`					return ve.ValidateName(strconv.Itoa(i + 3)`,
  4208  		`type ClassicsClassicsItemsTuple0 struct {`,
  4209  		"	P0 *ClassicsClassicsItemsTuple0P0 `json:\"-\"`",
  4210  		"	P1 []strfmt.Date `json:\"-\"`",
  4211  		"	P2 *ClassicsClassicsItemsTuple0P2 `json:\"-\"`",
  4212  		"	P3 *ClassicsClassicsItemsTuple0P3Tuple0 `json:\"-\"`",
  4213  		`func (m *ClassicsClassicsItemsTuple0) Validate(formats strfmt.Registry) error {`,
  4214  		`	if err := m.validateP0(formats); err != nil {`,
  4215  		`	if err := m.validateP1(formats); err != nil {`,
  4216  		`	if err := m.validateP2(formats); err != nil {`,
  4217  		`	if err := m.validateP3(formats); err != nil {`,
  4218  		`		return errors.CompositeValidationError(res...`,
  4219  		`func (m *ClassicsClassicsItemsTuple0) validateP0(formats strfmt.Registry) error {`,
  4220  		`	if err := validate.Required("P0", "body", m.P0); err != nil {`,
  4221  		`	if m.P0 != nil {`,
  4222  		`		if err := m.P0.Validate(formats); err != nil {`,
  4223  		`			if ve, ok := err.(*errors.Validation); ok {`,
  4224  		`				return ve.ValidateName("P0"`,
  4225  		`func (m *ClassicsClassicsItemsTuple0) validateP1(formats strfmt.Registry) error {`,
  4226  		`	if err := validate.Required("P1", "body", m.P1); err != nil {`,
  4227  		`	for i := 0; i < len(m.P1); i++ {`,
  4228  		`		if err := validate.FormatOf("P1"+"."+strconv.Itoa(i), "body", "date", m.P1[i].String(), formats); err != nil {`,
  4229  		`func (m *ClassicsClassicsItemsTuple0) validateP2(formats strfmt.Registry) error {`,
  4230  		`	if err := validate.Required("P2", "body", m.P2); err != nil {`,
  4231  		`	if m.P2 != nil {`,
  4232  		`		if err := m.P2.Validate(formats); err != nil {`,
  4233  		`			if ve, ok := err.(*errors.Validation); ok {`,
  4234  		`				return ve.ValidateName("P2"`,
  4235  		`func (m *ClassicsClassicsItemsTuple0) validateP3(formats strfmt.Registry) error {`,
  4236  		`	if err := validate.Required("P3", "body", m.P3); err != nil {`,
  4237  		`	if m.P3 != nil {`,
  4238  		`		if err := m.P3.Validate(formats); err != nil {`,
  4239  		`			if ve, ok := err.(*errors.Validation); ok {`,
  4240  		`				return ve.ValidateName("P3"`,
  4241  		`type ClassicsClassicsItemsTuple0P0 struct {`,
  4242  		"	Period *string `json:\"period,omitempty\"`",
  4243  		"	Title *string `json:\"title,omitempty\"`",
  4244  		`func (m *ClassicsClassicsItemsTuple0P0) Validate(formats strfmt.Registry) error {`,
  4245  		`	if err := m.validateTitle(formats); err != nil {`,
  4246  		`		return errors.CompositeValidationError(res...`,
  4247  		`var classicsClassicsItemsTuple0P0TypeTitlePropEnum []interface{`,
  4248  		`	var res []string`,
  4249  		"	if err := json.Unmarshal([]byte(`[\"Les Misérables\",\"Bleak House\",\"Sherlock Holmes\",\"Siddhartha\"]`), &res); err != nil {",
  4250  		`	for _, v := range res {`,
  4251  		`		classicsClassicsItemsTuple0P0TypeTitlePropEnum = append(classicsClassicsItemsTuple0P0TypeTitlePropEnum, v`,
  4252  		`	ClassicsClassicsItemsTuple0P0TitleLesMisérables string = "Les Misérables"`,
  4253  		`	ClassicsClassicsItemsTuple0P0TitleBleakHouse string = "Bleak House"`,
  4254  		`	ClassicsClassicsItemsTuple0P0TitleSherlockHolmes string = "Sherlock Holmes"`,
  4255  		`	ClassicsClassicsItemsTuple0P0TitleSiddhartha string = "Siddhartha"`,
  4256  		`func (m *ClassicsClassicsItemsTuple0P0) validateTitleEnum(path, location string, value string) error {`,
  4257  		`	if err := validate.Enum(path, location, value, classicsClassicsItemsTuple0P0TypeTitlePropEnum); err != nil {`,
  4258  		`func (m *ClassicsClassicsItemsTuple0P0) validateTitle(formats strfmt.Registry) error {`,
  4259  		`	if swag.IsZero(m.Title) {`,
  4260  		`	if err := m.validateTitleEnum("P0"+"."+"title", "body", *m.Title); err != nil {`,
  4261  		`type ClassicsClassicsItemsTuple0P2 struct {`,
  4262  		"	Origin *string `json:\"origin,omitempty\"`",
  4263  		"	ClassicsClassicsItemsTuple0P2 map[string]string `json:\"-\"`",
  4264  		`var classicsClassicsItemsTuple0P2ValueEnum []interface{`,
  4265  		`	var res []string`,
  4266  		"	if err := json.Unmarshal([]byte(`[\"bookshop\",\"amazon\",\"library\"]`), &res); err != nil {",
  4267  		`	for _, v := range res {`,
  4268  		`		classicsClassicsItemsTuple0P2ValueEnum = append(classicsClassicsItemsTuple0P2ValueEnum, v`,
  4269  		`func (m *ClassicsClassicsItemsTuple0P2) validateClassicsClassicsItemsTuple0P2ValueEnum(path, location string, value string) error {`,
  4270  		`	if err := validate.Enum(path, location, value, classicsClassicsItemsTuple0P2ValueEnum); err != nil {`,
  4271  		`func (m *ClassicsClassicsItemsTuple0P2) Validate(formats strfmt.Registry) error {`,
  4272  		`	if err := m.validateOrigin(formats); err != nil {`,
  4273  		`	for k := range m.ClassicsClassicsItemsTuple0P2 {`,
  4274  		// removed undue IsZero() call
  4275  		//`		if swag.IsZero(m.ClassicsClassicsItemsTuple0P2[k]) {`,
  4276  		`		if err := m.validateClassicsClassicsItemsTuple0P2ValueEnum("P2"+"."+k, "body", m.ClassicsClassicsItemsTuple0P2[k]); err != nil {`,
  4277  		`		return errors.CompositeValidationError(res...`,
  4278  		`var classicsClassicsItemsTuple0P2TypeOriginPropEnum []interface{`,
  4279  		`	var res []string`,
  4280  		"	if err := json.Unmarshal([]byte(`[\"print\",\"e-book\",\"collection\",\"museum\"]`), &res); err != nil {",
  4281  		`	for _, v := range res {`,
  4282  		`		classicsClassicsItemsTuple0P2TypeOriginPropEnum = append(classicsClassicsItemsTuple0P2TypeOriginPropEnum, v`,
  4283  		`	ClassicsClassicsItemsTuple0P2OriginPrint string = "print"`,
  4284  		`	ClassicsClassicsItemsTuple0P2OriginEBook string = "e-book"`,
  4285  		`	ClassicsClassicsItemsTuple0P2OriginCollection string = "collection"`,
  4286  		`	ClassicsClassicsItemsTuple0P2OriginMuseum string = "museum"`,
  4287  		`func (m *ClassicsClassicsItemsTuple0P2) validateOriginEnum(path, location string, value string) error {`,
  4288  		`	if err := validate.Enum(path, location, value, classicsClassicsItemsTuple0P2TypeOriginPropEnum); err != nil {`,
  4289  		`func (m *ClassicsClassicsItemsTuple0P2) validateOrigin(formats strfmt.Registry) error {`,
  4290  		`	if swag.IsZero(m.Origin) {`,
  4291  		`	if err := m.validateOriginEnum("P2"+"."+"origin", "body", *m.Origin); err != nil {`,
  4292  		`type ClassicsClassicsItemsTuple0P3Tuple0 struct {`,
  4293  		"	P0 *string `json:\"-\"`",
  4294  		"	P1 *ClassicsClassicsItemsTuple0P3Tuple0P1 `json:\"-\"`",
  4295  		"	P2 *ClassicsClassicsItemsTuple0P3Tuple0P2 `json:\"-\"`",
  4296  		"	P3 *ClassicsClassicsItemsTuple0P3Tuple0P3 `json:\"-\"`",
  4297  		"	P4 []strfmt.ISBN `json:\"-\"`",
  4298  		"	P5 *int64 `json:\"-\"`",
  4299  		`func (m *ClassicsClassicsItemsTuple0P3Tuple0) Validate(formats strfmt.Registry) error {`,
  4300  		`	if err := m.validateP0(formats); err != nil {`,
  4301  		`	if err := m.validateP1(formats); err != nil {`,
  4302  		`	if err := m.validateP2(formats); err != nil {`,
  4303  		`	if err := m.validateP3(formats); err != nil {`,
  4304  		`	if err := m.validateP4(formats); err != nil {`,
  4305  		`	if err := m.validateP5(formats); err != nil {`,
  4306  		`		return errors.CompositeValidationError(res...`,
  4307  		`func (m *ClassicsClassicsItemsTuple0P3Tuple0) validateP0(formats strfmt.Registry) error {`,
  4308  		`	if err := validate.Required("P0", "body", m.P0); err != nil {`,
  4309  		`func (m *ClassicsClassicsItemsTuple0P3Tuple0) validateP1(formats strfmt.Registry) error {`,
  4310  		`	if err := validate.Required("P1", "body", m.P1); err != nil {`,
  4311  		`	if m.P1 != nil {`,
  4312  		`		if err := m.P1.Validate(formats); err != nil {`,
  4313  		`			if ve, ok := err.(*errors.Validation); ok {`,
  4314  		`				return ve.ValidateName("P1"`,
  4315  		`func (m *ClassicsClassicsItemsTuple0P3Tuple0) validateP2(formats strfmt.Registry) error {`,
  4316  		`	if err := validate.Required("P2", "body", m.P2); err != nil {`,
  4317  		`	if m.P2 != nil {`,
  4318  		`		if err := m.P2.Validate(formats); err != nil {`,
  4319  		`			if ve, ok := err.(*errors.Validation); ok {`,
  4320  		`				return ve.ValidateName("P2"`,
  4321  		`func (m *ClassicsClassicsItemsTuple0P3Tuple0) validateP3(formats strfmt.Registry) error {`,
  4322  		`	if err := validate.Required("P3", "body", m.P3); err != nil {`,
  4323  		`	if m.P3 != nil {`,
  4324  		`		if err := m.P3.Validate(formats); err != nil {`,
  4325  		`			if ve, ok := err.(*errors.Validation); ok {`,
  4326  		`				return ve.ValidateName("P3"`,
  4327  		`func (m *ClassicsClassicsItemsTuple0P3Tuple0) validateP4(formats strfmt.Registry) error {`,
  4328  		`	if err := validate.Required("P4", "body", m.P4); err != nil {`,
  4329  		`	for i := 0; i < len(m.P4); i++ {`,
  4330  		`		if err := validate.FormatOf("P4"+"."+strconv.Itoa(i), "body", "isbn", m.P4[i].String(), formats); err != nil {`,
  4331  		`func (m *ClassicsClassicsItemsTuple0P3Tuple0) validateP5(formats strfmt.Registry) error {`,
  4332  		`	if err := validate.Required("P5", "body", m.P5); err != nil {`,
  4333  		`type ClassicsClassicsItemsTuple0P3Tuple0P1 struct {`,
  4334  		"	Narrative *string `json:\"narrative\"`",
  4335  		`func (m *ClassicsClassicsItemsTuple0P3Tuple0P1) Validate(formats strfmt.Registry) error {`,
  4336  		`	if err := m.validateNarrative(formats); err != nil {`,
  4337  		`		return errors.CompositeValidationError(res...`,
  4338  		`func (m *ClassicsClassicsItemsTuple0P3Tuple0P1) validateNarrative(formats strfmt.Registry) error {`,
  4339  		`	if err := validate.Required("P1"+"."+"narrative", "body", m.Narrative); err != nil {`,
  4340  		`type ClassicsClassicsItemsTuple0P3Tuple0P2 struct {`,
  4341  		"	MarketingBS *string `json:\"marketingBS,omitempty\"`",
  4342  		`func (m *ClassicsClassicsItemsTuple0P3Tuple0P2) Validate(formats strfmt.Registry) error {`,
  4343  		`		return errors.CompositeValidationError(res...`,
  4344  		`type ClassicsClassicsItemsTuple0P3Tuple0P3 struct {`,
  4345  		"	Author *string `json:\"author,omitempty\"`",
  4346  		"	Character *string `json:\"character,omitempty\"`",
  4347  		`func (m *ClassicsClassicsItemsTuple0P3Tuple0P3) Validate(formats strfmt.Registry) error {`,
  4348  		`	if err := m.validateAuthor(formats); err != nil {`,
  4349  		`	if err := m.validateCharacter(formats); err != nil {`,
  4350  		`		return errors.CompositeValidationError(res...`,
  4351  		`func (m *ClassicsClassicsItemsTuple0P3Tuple0P3) validateAuthor(formats strfmt.Registry) error {`,
  4352  		`	if swag.IsZero(m.Author) {`,
  4353  		`	if err := validate.MinLength("P3"+"."+"author", "body", string(*m.Author), 1); err != nil {`,
  4354  		`func (m *ClassicsClassicsItemsTuple0P3Tuple0P3) validateCharacter(formats strfmt.Registry) error {`,
  4355  		`	if swag.IsZero(m.Character) {`,
  4356  		"	if err := validate.Pattern(\"P3\"+\".\"+\"character\", \"body\", string(*m.Character), `^[A-Z]+$`); err != nil {",
  4357  		`type ClassicsTuple0 struct {`,
  4358  		"	P0 *string `json:\"-\"`",
  4359  		"	P1 *ClassicsTuple0P1 `json:\"-\"`",
  4360  		"	P2 *ClassicsTuple0P2 `json:\"-\"`",
  4361  		"	P3 *ClassicsTuple0P3 `json:\"-\"`",
  4362  		"	P4 []strfmt.ISBN `json:\"-\"`",
  4363  		"	P5 *int64 `json:\"-\"`",
  4364  		`func (m *ClassicsTuple0) Validate(formats strfmt.Registry) error {`,
  4365  		`	if err := m.validateP0(formats); err != nil {`,
  4366  		`	if err := m.validateP1(formats); err != nil {`,
  4367  		`	if err := m.validateP2(formats); err != nil {`,
  4368  		`	if err := m.validateP3(formats); err != nil {`,
  4369  		`	if err := m.validateP4(formats); err != nil {`,
  4370  		`	if err := m.validateP5(formats); err != nil {`,
  4371  		`		return errors.CompositeValidationError(res...`,
  4372  		`func (m *ClassicsTuple0) validateP0(formats strfmt.Registry) error {`,
  4373  		`	if err := validate.Required("P0", "body", m.P0); err != nil {`,
  4374  		`func (m *ClassicsTuple0) validateP1(formats strfmt.Registry) error {`,
  4375  		`	if err := validate.Required("P1", "body", m.P1); err != nil {`,
  4376  		`	if m.P1 != nil {`,
  4377  		`		if err := m.P1.Validate(formats); err != nil {`,
  4378  		`			if ve, ok := err.(*errors.Validation); ok {`,
  4379  		`				return ve.ValidateName("P1"`,
  4380  		`func (m *ClassicsTuple0) validateP2(formats strfmt.Registry) error {`,
  4381  		`	if err := validate.Required("P2", "body", m.P2); err != nil {`,
  4382  		`	if m.P2 != nil {`,
  4383  		`		if err := m.P2.Validate(formats); err != nil {`,
  4384  		`			if ve, ok := err.(*errors.Validation); ok {`,
  4385  		`				return ve.ValidateName("P2"`,
  4386  		`func (m *ClassicsTuple0) validateP3(formats strfmt.Registry) error {`,
  4387  		`	if err := validate.Required("P3", "body", m.P3); err != nil {`,
  4388  		`	if m.P3 != nil {`,
  4389  		`		if err := m.P3.Validate(formats); err != nil {`,
  4390  		`			if ve, ok := err.(*errors.Validation); ok {`,
  4391  		`				return ve.ValidateName("P3"`,
  4392  		`func (m *ClassicsTuple0) validateP4(formats strfmt.Registry) error {`,
  4393  		`	if err := validate.Required("P4", "body", m.P4); err != nil {`,
  4394  		`	for i := 0; i < len(m.P4); i++ {`,
  4395  		`		if err := validate.FormatOf("P4"+"."+strconv.Itoa(i), "body", "isbn", m.P4[i].String(), formats); err != nil {`,
  4396  		`func (m *ClassicsTuple0) validateP5(formats strfmt.Registry) error {`,
  4397  		`	if err := validate.Required("P5", "body", m.P5); err != nil {`,
  4398  		`type ClassicsTuple0P1 struct {`,
  4399  		"	Narrative *string `json:\"narrative\"`",
  4400  		`func (m *ClassicsTuple0P1) Validate(formats strfmt.Registry) error {`,
  4401  		`	if err := m.validateNarrative(formats); err != nil {`,
  4402  		`		return errors.CompositeValidationError(res...`,
  4403  		`func (m *ClassicsTuple0P1) validateNarrative(formats strfmt.Registry) error {`,
  4404  		`	if err := validate.Required("P1"+"."+"narrative", "body", m.Narrative); err != nil {`,
  4405  		`type ClassicsTuple0P2 struct {`,
  4406  		"	MarketingBS *string `json:\"marketingBS,omitempty\"`",
  4407  		`func (m *ClassicsTuple0P2) Validate(formats strfmt.Registry) error {`,
  4408  		`		return errors.CompositeValidationError(res...`,
  4409  		`type ClassicsTuple0P3 struct {`,
  4410  		"	Author *string `json:\"author,omitempty\"`",
  4411  		"	Character *string `json:\"character,omitempty\"`",
  4412  		`func (m *ClassicsTuple0P3) Validate(formats strfmt.Registry) error {`,
  4413  		`	if err := m.validateAuthor(formats); err != nil {`,
  4414  		`	if err := m.validateCharacter(formats); err != nil {`,
  4415  		`		return errors.CompositeValidationError(res...`,
  4416  		`func (m *ClassicsTuple0P3) validateAuthor(formats strfmt.Registry) error {`,
  4417  		`	if swag.IsZero(m.Author) {`,
  4418  		`	if err := validate.MinLength("P3"+"."+"author", "body", string(*m.Author), 1); err != nil {`,
  4419  		`func (m *ClassicsTuple0P3) validateCharacter(formats strfmt.Registry) error {`,
  4420  		`	if swag.IsZero(m.Character) {`,
  4421  		"	if err := validate.Pattern(\"P3\"+\".\"+\"character\", \"body\", string(*m.Character), `^[A-Z]+$`); err != nil {",
  4422  	},
  4423  		// not expected
  4424  		todo,
  4425  		// output in log
  4426  		noLines,
  4427  		noLines)
  4428  
  4429  	// load expectations for model: comics_items2.go
  4430  	flattenRun.AddExpectations("comics_items2.go", []string{
  4431  		`type ComicsItems2 struct {`,
  4432  		"	MarketingBS string `json:\"marketingBS,omitempty\"`",
  4433  		// empty validation
  4434  		"func (m *ComicsItems2) Validate(formats strfmt.Registry) error {\n	return nil\n}",
  4435  	},
  4436  		// not expected
  4437  		todo,
  4438  		// output in log
  4439  		noLines,
  4440  		noLines)
  4441  
  4442  	// load expectations for model: classics_items_additional_items_items2.go
  4443  	flattenRun.AddExpectations("classics_items_additional_items_items2.go", []string{
  4444  		`type ClassicsItemsAdditionalItemsItems2 struct {`,
  4445  		"	Origin string `json:\"origin,omitempty\"`",
  4446  		"	ClassicsItemsAdditionalItemsItems2 map[string]string `json:\"-\"`",
  4447  		`var classicsItemsAdditionalItemsItems2ValueEnum []interface{`,
  4448  		`	var res []string`,
  4449  		"	if err := json.Unmarshal([]byte(`[\"bookshop\",\"amazon\",\"library\"]`), &res); err != nil {",
  4450  		`	for _, v := range res {`,
  4451  		`		classicsItemsAdditionalItemsItems2ValueEnum = append(classicsItemsAdditionalItemsItems2ValueEnum, v`,
  4452  		`func (m *ClassicsItemsAdditionalItemsItems2) validateClassicsItemsAdditionalItemsItems2ValueEnum(path, location string, value string) error {`,
  4453  		`	if err := validate.Enum(path, location, value, classicsItemsAdditionalItemsItems2ValueEnum); err != nil {`,
  4454  		`func (m *ClassicsItemsAdditionalItemsItems2) Validate(formats strfmt.Registry) error {`,
  4455  		`	if err := m.validateOrigin(formats); err != nil {`,
  4456  		`	for k := range m.ClassicsItemsAdditionalItemsItems2 {`,
  4457  		// removed undue IsZero()
  4458  		//`		if swag.IsZero(m.ClassicsItemsAdditionalItemsItems2[k]) {`,
  4459  		`		if err := m.validateClassicsItemsAdditionalItemsItems2ValueEnum(k, "body", m.ClassicsItemsAdditionalItemsItems2[k]); err != nil {`,
  4460  		`		return errors.CompositeValidationError(res...`,
  4461  		`var classicsItemsAdditionalItemsItems2TypeOriginPropEnum []interface{`,
  4462  		`	var res []string`,
  4463  		"	if err := json.Unmarshal([]byte(`[\"print\",\"e-book\",\"collection\",\"museum\"]`), &res); err != nil {",
  4464  		`	for _, v := range res {`,
  4465  		`		classicsItemsAdditionalItemsItems2TypeOriginPropEnum = append(classicsItemsAdditionalItemsItems2TypeOriginPropEnum, v`,
  4466  		`	ClassicsItemsAdditionalItemsItems2OriginPrint string = "print"`,
  4467  		`	ClassicsItemsAdditionalItemsItems2OriginEBook string = "e-book"`,
  4468  		`	ClassicsItemsAdditionalItemsItems2OriginCollection string = "collection"`,
  4469  		`	ClassicsItemsAdditionalItemsItems2OriginMuseum string = "museum"`,
  4470  		`func (m *ClassicsItemsAdditionalItemsItems2) validateOriginEnum(path, location string, value string) error {`,
  4471  		`	if err := validate.Enum(path, location, value, classicsItemsAdditionalItemsItems2TypeOriginPropEnum); err != nil {`,
  4472  		`func (m *ClassicsItemsAdditionalItemsItems2) validateOrigin(formats strfmt.Registry) error {`,
  4473  		`	if swag.IsZero(m.Origin) {`,
  4474  		`	if err := m.validateOriginEnum("origin", "body", m.Origin); err != nil {`,
  4475  	},
  4476  		// not expected
  4477  		todo,
  4478  		// output in log
  4479  		noLines,
  4480  		noLines)
  4481  
  4482  	// load expectations for model: comics.go
  4483  	flattenRun.AddExpectations("comics.go", []string{
  4484  		`type Comics struct {`,
  4485  		"	P0 *string `json:\"-\"`",
  4486  		"	P1 *ComicsItems1 `json:\"-\"`",
  4487  		"	P2 *ComicsItems2 `json:\"-\"`",
  4488  		"	P3 *ComicsItems3 `json:\"-\"`",
  4489  		"	P4 []strfmt.ISBN `json:\"-\"`",
  4490  		"	P5 *int64 `json:\"-\"`",
  4491  		`func (m *Comics) Validate(formats strfmt.Registry) error {`,
  4492  		`	if err := m.validateP0(formats); err != nil {`,
  4493  		`	if err := m.validateP1(formats); err != nil {`,
  4494  		`	if err := m.validateP2(formats); err != nil {`,
  4495  		`	if err := m.validateP3(formats); err != nil {`,
  4496  		`	if err := m.validateP4(formats); err != nil {`,
  4497  		`	if err := m.validateP5(formats); err != nil {`,
  4498  		`		return errors.CompositeValidationError(res...`,
  4499  		`func (m *Comics) validateP0(formats strfmt.Registry) error {`,
  4500  		`	if err := validate.Required("0", "body", m.P0); err != nil {`,
  4501  		`func (m *Comics) validateP1(formats strfmt.Registry) error {`,
  4502  		`	if err := validate.Required("1", "body", m.P1); err != nil {`,
  4503  		`	if m.P1 != nil {`,
  4504  		`		if err := m.P1.Validate(formats); err != nil {`,
  4505  		`			if ve, ok := err.(*errors.Validation); ok {`,
  4506  		`				return ve.ValidateName("1"`,
  4507  		`func (m *Comics) validateP2(formats strfmt.Registry) error {`,
  4508  		`	if err := validate.Required("2", "body", m.P2); err != nil {`,
  4509  		`	if m.P2 != nil {`,
  4510  		`		if err := m.P2.Validate(formats); err != nil {`,
  4511  		`			if ve, ok := err.(*errors.Validation); ok {`,
  4512  		`				return ve.ValidateName("2"`,
  4513  		`func (m *Comics) validateP3(formats strfmt.Registry) error {`,
  4514  		`	if err := validate.Required("3", "body", m.P3); err != nil {`,
  4515  		`	if m.P3 != nil {`,
  4516  		`		if err := m.P3.Validate(formats); err != nil {`,
  4517  		`			if ve, ok := err.(*errors.Validation); ok {`,
  4518  		`				return ve.ValidateName("3"`,
  4519  		`func (m *Comics) validateP4(formats strfmt.Registry) error {`,
  4520  		`	if err := validate.Required("4", "body", m.P4); err != nil {`,
  4521  		`	for i := 0; i < len(m.P4); i++ {`,
  4522  		`		if err := validate.FormatOf("4"+"."+strconv.Itoa(i), "body", "isbn", m.P4[i].String(), formats); err != nil {`,
  4523  		`func (m *Comics) validateP5(formats strfmt.Registry) error {`,
  4524  		`	if err := validate.Required("5", "body", m.P5); err != nil {`,
  4525  	},
  4526  		// not expected
  4527  		todo,
  4528  		// output in log
  4529  		noLines,
  4530  		noLines)
  4531  
  4532  	expandRun.AddExpectations("comics.go", []string{
  4533  		`type Comics struct {`,
  4534  		"	P0 *string `json:\"-\"`",
  4535  		"   P1 *ComicsItems1 `json:\"-\"`",
  4536  		"   P2 *ComicsItems2 `json:\"-\"`",
  4537  		"   P3 *ComicsItems3 `json:\"-\"`",
  4538  		"	P4 []strfmt.ISBN `json:\"-\"`",
  4539  		"	P5 *int64 `json:\"-\"`",
  4540  		`func (m *Comics) Validate(formats strfmt.Registry) error {`,
  4541  		`	if err := m.validateP0(formats); err != nil {`,
  4542  		`	if err := m.validateP1(formats); err != nil {`,
  4543  		`	if err := m.validateP2(formats); err != nil {`,
  4544  		`	if err := m.validateP3(formats); err != nil {`,
  4545  		`	if err := m.validateP4(formats); err != nil {`,
  4546  		`	if err := m.validateP5(formats); err != nil {`,
  4547  		`		return errors.CompositeValidationError(res...`,
  4548  		`func (m *Comics) validateP0(formats strfmt.Registry) error {`,
  4549  		`	if err := validate.Required("0", "body", m.P0); err != nil {`,
  4550  		`func (m *Comics) validateP1(formats strfmt.Registry) error {`,
  4551  		`	if err := validate.Required("1", "body", m.P1); err != nil {`,
  4552  		`func (m *Comics) validateP2(formats strfmt.Registry) error {`,
  4553  		`	if err := validate.Required("2", "body", m.P2); err != nil {`,
  4554  		`func (m *Comics) validateP3(formats strfmt.Registry) error {`,
  4555  		`	if err := validate.Required("3", "body", m.P3); err != nil {`,
  4556  		`func (m *Comics) validateP4(formats strfmt.Registry) error {`,
  4557  		`	if err := validate.Required("4", "body", m.P4); err != nil {`,
  4558  		`	for i := 0; i < len(m.P4); i++ {`,
  4559  		`		if err := validate.FormatOf("4"+"."+strconv.Itoa(i), "body", "isbn", m.P4[i].String(), formats); err != nil {`,
  4560  		`func (m *Comics) validateP5(formats strfmt.Registry) error {`,
  4561  		`	if err := validate.Required("5", "body", m.P5); err != nil {`,
  4562  		`type ComicsItems1 struct {`,
  4563  		`type ComicsItems2 struct {`,
  4564  		`type ComicsItems3 struct {`,
  4565  	},
  4566  		// not expected
  4567  		todo,
  4568  		// output in log
  4569  		noLines,
  4570  		noLines)
  4571  
  4572  	// load expectations for model: classics_items_additional_items_items0.go
  4573  	flattenRun.AddExpectations("classics_items_additional_items_items0.go", []string{
  4574  		`type ClassicsItemsAdditionalItemsItems0 struct {`,
  4575  		"	Period string `json:\"period,omitempty\"`",
  4576  		"	Title string `json:\"title,omitempty\"`",
  4577  		`func (m *ClassicsItemsAdditionalItemsItems0) Validate(formats strfmt.Registry) error {`,
  4578  		`	if err := m.validateTitle(formats); err != nil {`,
  4579  		`		return errors.CompositeValidationError(res...`,
  4580  		`var classicsItemsAdditionalItemsItems0TypeTitlePropEnum []interface{`,
  4581  		`	var res []string`,
  4582  		"	if err := json.Unmarshal([]byte(`[\"Les Misérables\",\"Bleak House\",\"Sherlock Holmes\",\"Siddhartha\"]`), &res); err != nil {",
  4583  		`	for _, v := range res {`,
  4584  		`		classicsItemsAdditionalItemsItems0TypeTitlePropEnum = append(classicsItemsAdditionalItemsItems0TypeTitlePropEnum, v`,
  4585  		`	ClassicsItemsAdditionalItemsItems0TitleLesMisérables string = "Les Misérables"`,
  4586  		`	ClassicsItemsAdditionalItemsItems0TitleBleakHouse string = "Bleak House"`,
  4587  		`	ClassicsItemsAdditionalItemsItems0TitleSherlockHolmes string = "Sherlock Holmes"`,
  4588  		`	ClassicsItemsAdditionalItemsItems0TitleSiddhartha string = "Siddhartha"`,
  4589  		`func (m *ClassicsItemsAdditionalItemsItems0) validateTitleEnum(path, location string, value string) error {`,
  4590  		`	if err := validate.Enum(path, location, value, classicsItemsAdditionalItemsItems0TypeTitlePropEnum); err != nil {`,
  4591  		`func (m *ClassicsItemsAdditionalItemsItems0) validateTitle(formats strfmt.Registry) error {`,
  4592  		`	if swag.IsZero(m.Title) {`,
  4593  		`	if err := m.validateTitleEnum("title", "body", m.Title); err != nil {`,
  4594  	},
  4595  		// not expected
  4596  		todo,
  4597  		// output in log
  4598  		noLines,
  4599  		noLines)
  4600  
  4601  	// load expectations for model: comics_items1.go
  4602  	flattenRun.AddExpectations("comics_items1.go", []string{
  4603  		`type ComicsItems1 struct {`,
  4604  		"	Narrative *string `json:\"narrative\"`",
  4605  		`func (m *ComicsItems1) Validate(formats strfmt.Registry) error {`,
  4606  		`	if err := m.validateNarrative(formats); err != nil {`,
  4607  		`		return errors.CompositeValidationError(res...`,
  4608  		`func (m *ComicsItems1) validateNarrative(formats strfmt.Registry) error {`,
  4609  		`	if err := validate.Required("narrative", "body", m.Narrative); err != nil {`,
  4610  	},
  4611  		// not expected
  4612  		todo,
  4613  		// output in log
  4614  		noLines,
  4615  		noLines)
  4616  
  4617  	// load expectations for model: comics_items3.go
  4618  	flattenRun.AddExpectations("comics_items3.go", []string{
  4619  		`type ComicsItems3 struct {`,
  4620  		"	Author string `json:\"author,omitempty\"`",
  4621  		"	Character string `json:\"character,omitempty\"`",
  4622  		`func (m *ComicsItems3) Validate(formats strfmt.Registry) error {`,
  4623  		`	if err := m.validateAuthor(formats); err != nil {`,
  4624  		`	if err := m.validateCharacter(formats); err != nil {`,
  4625  		`		return errors.CompositeValidationError(res...`,
  4626  		`func (m *ComicsItems3) validateAuthor(formats strfmt.Registry) error {`,
  4627  		`	if swag.IsZero(m.Author) {`,
  4628  		`	if err := validate.MinLength("author", "body", string(m.Author), 1); err != nil {`,
  4629  		`func (m *ComicsItems3) validateCharacter(formats strfmt.Registry) error {`,
  4630  		`	if swag.IsZero(m.Character) {`,
  4631  		"	if err := validate.Pattern(\"character\", \"body\", string(m.Character), `^[A-Z]+$`); err != nil {",
  4632  	},
  4633  		// not expected
  4634  		todo,
  4635  		// output in log
  4636  		noLines,
  4637  		noLines)
  4638  
  4639  	// load expectations for model: classics_tuple_additional_items.go
  4640  	flattenRun.AddExpectations("classics_tuple_additional_items.go", []string{
  4641  		`type ClassicsTupleAdditionalItems struct {`,
  4642  		"	P0 *ClassicsItemsAdditionalItemsItems0 `json:\"-\"`",
  4643  		"	P1 []strfmt.Date `json:\"-\"`",
  4644  		"	P2 *ClassicsItemsAdditionalItemsItems2 `json:\"-\"`",
  4645  		"	P3 Comics `json:\"-\"`",
  4646  		`func (m *ClassicsTupleAdditionalItems) Validate(formats strfmt.Registry) error {`,
  4647  		`	if err := m.validateP0(formats); err != nil {`,
  4648  		`	if err := m.validateP1(formats); err != nil {`,
  4649  		`	if err := m.validateP2(formats); err != nil {`,
  4650  		`	if err := m.validateP3(formats); err != nil {`,
  4651  		`		return errors.CompositeValidationError(res...`,
  4652  		`func (m *ClassicsTupleAdditionalItems) validateP0(formats strfmt.Registry) error {`,
  4653  		`	if err := validate.Required("0", "body", m.P0); err != nil {`,
  4654  		`	if m.P0 != nil {`,
  4655  		`		if err := m.P0.Validate(formats); err != nil {`,
  4656  		`			if ve, ok := err.(*errors.Validation); ok {`,
  4657  		`				return ve.ValidateName("0"`,
  4658  		`func (m *ClassicsTupleAdditionalItems) validateP1(formats strfmt.Registry) error {`,
  4659  		`	if err := validate.Required("1", "body", m.P1); err != nil {`,
  4660  		`	for i := 0; i < len(m.P1); i++ {`,
  4661  		`		if err := validate.FormatOf("1"+"."+strconv.Itoa(i), "body", "date", m.P1[i].String(), formats); err != nil {`,
  4662  		`func (m *ClassicsTupleAdditionalItems) validateP2(formats strfmt.Registry) error {`,
  4663  		`	if err := validate.Required("2", "body", m.P2); err != nil {`,
  4664  		`	if m.P2 != nil {`,
  4665  		`		if err := m.P2.Validate(formats); err != nil {`,
  4666  		`			if ve, ok := err.(*errors.Validation); ok {`,
  4667  		`				return ve.ValidateName("2"`,
  4668  		`func (m *ClassicsTupleAdditionalItems) validateP3(formats strfmt.Registry) error {`,
  4669  		`	if err := m.P3.Validate(formats); err != nil {`,
  4670  		`		if ve, ok := err.(*errors.Validation); ok {`,
  4671  		`			return ve.ValidateName("3"`,
  4672  	},
  4673  		// not expected
  4674  		todo,
  4675  		// output in log
  4676  		noLines,
  4677  		noLines)
  4678  
  4679  }
  4680  
  4681  func initFixture1198() {
  4682  	// testing ../fixtures/bugs/1487/fixture-1198.yaml with expand (--skip-flatten)
  4683  
  4684  	f := newModelFixture("../fixtures/bugs/1198/fixture-1198.yaml", "string-body-api")
  4685  	flattenRun := f.AddRun(false)
  4686  
  4687  	// load expectations for model: pet.go
  4688  	flattenRun.AddExpectations("pet.go", []string{
  4689  		`type Pet struct {`,
  4690  		"	Date interface{} `json:\"date\"`",
  4691  		`func (m *Pet) Validate(formats strfmt.Registry) error {`,
  4692  		`	if err := m.validateDate(formats); err != nil {`,
  4693  		`		return errors.CompositeValidationError(res...`,
  4694  		`func (m *Pet) validateDate(formats strfmt.Registry) error {`,
  4695  	},
  4696  		// not expected
  4697  		todo,
  4698  		// output in log
  4699  		noLines,
  4700  		noLines)
  4701  
  4702  }
  4703  
  4704  func initFixture1042() {
  4705  	// testing ../fixtures/bugs/1487/fixture-1042.yaml with expand (--skip-flatten)
  4706  
  4707  	/* when the specification incorrectly defines the allOf,
  4708  	generated unmarshalling is wrong.
  4709  	This fixture asserts that with correct spec, the generated models are correct.
  4710  
  4711  	*/
  4712  
  4713  	f := newModelFixture("../fixtures/bugs/1042/fixture-1042.yaml", "allOf marshalling")
  4714  	flattenRun := f.AddRun(false)
  4715  
  4716  	// load expectations for model: b.go
  4717  	flattenRun.AddExpectations("b.go", []string{
  4718  		`type B struct {`,
  4719  		`	A`,
  4720  		`	BAllOf1`,
  4721  		`func (m *B) UnmarshalJSON(raw []byte) error {`,
  4722  		`	var aO0 A`,
  4723  		`	if err := swag.ReadJSON(raw, &aO0); err != nil {`,
  4724  		`	m.A = aO0`,
  4725  		`	var aO1 BAllOf1`,
  4726  		`	if err := swag.ReadJSON(raw, &aO1); err != nil {`,
  4727  		`	m.BAllOf1 = aO1`,
  4728  		`func (m B) MarshalJSON() ([]byte, error) {`,
  4729  		//`	var _parts [][]byte`,
  4730  		// slight optimization of allocations
  4731  		`	_parts := make([][]byte, 0, 2)`,
  4732  		`	aO0, err := swag.WriteJSON(m.A`,
  4733  		`	if err != nil {`,
  4734  		`		return nil, err`,
  4735  		`	_parts = append(_parts, aO0`,
  4736  		`	aO1, err := swag.WriteJSON(m.BAllOf1`,
  4737  		`	if err != nil {`,
  4738  		`		return nil, err`,
  4739  		`	_parts = append(_parts, aO1`,
  4740  		`	return swag.ConcatJSON(_parts...), nil`,
  4741  		`func (m *B) Validate(formats strfmt.Registry) error {`,
  4742  		`	if err := m.A.Validate(formats); err != nil {`,
  4743  		`	if err := m.BAllOf1.Validate(formats); err != nil {`,
  4744  		`		return errors.CompositeValidationError(res...`,
  4745  	},
  4746  		// not expected
  4747  		todo,
  4748  		// output in log
  4749  		noLines,
  4750  		noLines)
  4751  
  4752  	// load expectations for model: b_all_of1.go
  4753  	flattenRun.AddExpectations("b_all_of1.go", []string{
  4754  		`type BAllOf1 struct {`,
  4755  		"	F3 *string `json:\"f3\"`",
  4756  		"	F4 []string `json:\"f4\"`",
  4757  		`func (m *BAllOf1) Validate(formats strfmt.Registry) error {`,
  4758  		`	if err := m.validateF3(formats); err != nil {`,
  4759  		`	if err := m.validateF4(formats); err != nil {`,
  4760  		`		return errors.CompositeValidationError(res...`,
  4761  		`func (m *BAllOf1) validateF3(formats strfmt.Registry) error {`,
  4762  		`	if err := validate.Required("f3", "body", m.F3); err != nil {`,
  4763  		`func (m *BAllOf1) validateF4(formats strfmt.Registry) error {`,
  4764  		`	if err := validate.Required("f4", "body", m.F4); err != nil {`,
  4765  	},
  4766  		// not expected
  4767  		todo,
  4768  		// output in log
  4769  		noLines,
  4770  		noLines)
  4771  
  4772  	// load expectations for model: a.go
  4773  	flattenRun.AddExpectations("a.go", []string{
  4774  		`type A struct {`,
  4775  		"	F1 string `json:\"f1,omitempty\"`",
  4776  		"	F2 string `json:\"f2,omitempty\"`",
  4777  		// empty validation
  4778  		"func (m *A) Validate(formats strfmt.Registry) error {\n	return nil\n}",
  4779  	},
  4780  		// not expected
  4781  		todo,
  4782  		// output in log
  4783  		noLines,
  4784  		noLines)
  4785  
  4786  }
  4787  
  4788  func initFixture1042V2() {
  4789  	// testing ../fixtures/bugs/1487/fixture-1042-2.yaml with expand (--skip-flatten)
  4790  
  4791  	/* when the specification incorrectly defines the allOf,
  4792  	generated unmarshalling is wrong.
  4793  	This fixture asserts that with correct spec, the generated models are correct.
  4794  
  4795  	*/
  4796  
  4797  	f := newModelFixture("../fixtures/bugs/1042/fixture-1042-2.yaml", "allOf marshalling")
  4798  	flattenRun := f.AddRun(false)
  4799  
  4800  	// load expectations for model: error_model.go
  4801  	flattenRun.AddExpectations("error_model.go", []string{
  4802  		`type ErrorModel struct {`,
  4803  		"	Code *int64 `json:\"code\"`",
  4804  		"	Message *string `json:\"message\"`",
  4805  		`func (m *ErrorModel) Validate(formats strfmt.Registry) error {`,
  4806  		`	if err := m.validateCode(formats); err != nil {`,
  4807  		`	if err := m.validateMessage(formats); err != nil {`,
  4808  		`		return errors.CompositeValidationError(res...`,
  4809  		`func (m *ErrorModel) validateCode(formats strfmt.Registry) error {`,
  4810  		`	if err := validate.Required("code", "body", m.Code); err != nil {`,
  4811  		`	if err := validate.MinimumInt("code", "body", int64(*m.Code), 100, false); err != nil {`,
  4812  		`	if err := validate.MaximumInt("code", "body", int64(*m.Code), 600, false); err != nil {`,
  4813  		`func (m *ErrorModel) validateMessage(formats strfmt.Registry) error {`,
  4814  		`	if err := validate.Required("message", "body", m.Message); err != nil {`,
  4815  	},
  4816  		// not expected
  4817  		todo,
  4818  		// output in log
  4819  		noLines,
  4820  		noLines)
  4821  
  4822  	// load expectations for model: extended_error_model.go
  4823  	flattenRun.AddExpectations("extended_error_model.go", []string{
  4824  		`type ExtendedErrorModel struct {`,
  4825  		`	ErrorModel`,
  4826  		`	ExtendedErrorModelAllOf1`,
  4827  		`func (m *ExtendedErrorModel) UnmarshalJSON(raw []byte) error {`,
  4828  		`	var aO0 ErrorModel`,
  4829  		`	if err := swag.ReadJSON(raw, &aO0); err != nil {`,
  4830  		`	m.ErrorModel = aO0`,
  4831  		`	var aO1 ExtendedErrorModelAllOf1`,
  4832  		`	if err := swag.ReadJSON(raw, &aO1); err != nil {`,
  4833  		`	m.ExtendedErrorModelAllOf1 = aO1`,
  4834  		`func (m ExtendedErrorModel) MarshalJSON() ([]byte, error) {`,
  4835  		//`	var _parts [][]byte`,
  4836  		// slight optimization of allocations
  4837  		`	_parts := make([][]byte, 0, 2)`,
  4838  		`	aO0, err := swag.WriteJSON(m.ErrorModel`,
  4839  		`	if err != nil {`,
  4840  		`		return nil, err`,
  4841  		`	_parts = append(_parts, aO0`,
  4842  		`	aO1, err := swag.WriteJSON(m.ExtendedErrorModelAllOf1`,
  4843  		`	if err != nil {`,
  4844  		`		return nil, err`,
  4845  		`	_parts = append(_parts, aO1`,
  4846  		`	return swag.ConcatJSON(_parts...), nil`,
  4847  		`func (m *ExtendedErrorModel) Validate(formats strfmt.Registry) error {`,
  4848  		`	if err := m.ErrorModel.Validate(formats); err != nil {`,
  4849  		`	if err := m.ExtendedErrorModelAllOf1.Validate(formats); err != nil {`,
  4850  		`		return errors.CompositeValidationError(res...`,
  4851  	},
  4852  		// not expected
  4853  		todo,
  4854  		// output in log
  4855  		noLines,
  4856  		noLines)
  4857  
  4858  	// load expectations for model: extended_error_model_all_of1.go
  4859  	flattenRun.AddExpectations("extended_error_model_all_of1.go", []string{
  4860  		`type ExtendedErrorModelAllOf1 struct {`,
  4861  		"	RootCause *string `json:\"rootCause\"`",
  4862  		`func (m *ExtendedErrorModelAllOf1) Validate(formats strfmt.Registry) error {`,
  4863  		`	if err := m.validateRootCause(formats); err != nil {`,
  4864  		`		return errors.CompositeValidationError(res...`,
  4865  		`func (m *ExtendedErrorModelAllOf1) validateRootCause(formats strfmt.Registry) error {`,
  4866  		`	if err := validate.Required("rootCause", "body", m.RootCause); err != nil {`,
  4867  	},
  4868  		// not expected
  4869  		todo,
  4870  		// output in log
  4871  		noLines,
  4872  		noLines)
  4873  
  4874  }
  4875  
  4876  func initFixture979() {
  4877  	// testing ../fixtures/bugs/1487/fixture-979.yaml with expand (--skip-flatten)
  4878  
  4879  	/* checking that properties is enough to figure out an object schema
  4880  	 */
  4881  
  4882  	f := newModelFixture("../fixtures/bugs/979/fixture-979.yaml", "allOf without the explicit type object")
  4883  	flattenRun := f.AddRun(false)
  4884  
  4885  	// load expectations for model: cluster.go
  4886  	flattenRun.AddExpectations("cluster.go", []string{
  4887  		`type Cluster struct {`,
  4888  		`	NewCluster`,
  4889  		`	ClusterAllOf1`,
  4890  		`func (m *Cluster) UnmarshalJSON(raw []byte) error {`,
  4891  		`	var aO0 NewCluster`,
  4892  		`	if err := swag.ReadJSON(raw, &aO0); err != nil {`,
  4893  		`	m.NewCluster = aO0`,
  4894  		`	var aO1 ClusterAllOf1`,
  4895  		`	if err := swag.ReadJSON(raw, &aO1); err != nil {`,
  4896  		`	m.ClusterAllOf1 = aO1`,
  4897  		`func (m Cluster) MarshalJSON() ([]byte, error) {`,
  4898  		//`	var _parts [][]byte`,
  4899  		// slight optimization of allocations
  4900  		`	_parts := make([][]byte, 0, 2)`,
  4901  		`	aO0, err := swag.WriteJSON(m.NewCluster`,
  4902  		`	if err != nil {`,
  4903  		`		return nil, err`,
  4904  		`	_parts = append(_parts, aO0`,
  4905  		`	aO1, err := swag.WriteJSON(m.ClusterAllOf1`,
  4906  		`	if err != nil {`,
  4907  		`		return nil, err`,
  4908  		`	_parts = append(_parts, aO1`,
  4909  		`	return swag.ConcatJSON(_parts...), nil`,
  4910  		`func (m *Cluster) Validate(formats strfmt.Registry) error {`,
  4911  		`	if err := m.NewCluster.Validate(formats); err != nil {`,
  4912  		`	if err := m.ClusterAllOf1.Validate(formats); err != nil {`,
  4913  		`		return errors.CompositeValidationError(res...`,
  4914  	},
  4915  		// not expected
  4916  		todo,
  4917  		// output in log
  4918  		noLines,
  4919  		noLines)
  4920  
  4921  	// load expectations for model: new_cluster.go
  4922  	flattenRun.AddExpectations("new_cluster.go", []string{
  4923  		`type NewCluster struct {`,
  4924  		"	DummyProp1 int64 `json:\"dummyProp1,omitempty\"`",
  4925  		// empty validation
  4926  		"func (m *NewCluster) Validate(formats strfmt.Registry) error {\n	return nil\n}",
  4927  	},
  4928  		// not expected
  4929  		todo,
  4930  		// output in log
  4931  		noLines,
  4932  		noLines)
  4933  
  4934  	// load expectations for model: cluster_all_of1.go
  4935  	flattenRun.AddExpectations("cluster_all_of1.go", []string{
  4936  		`type ClusterAllOf1 struct {`,
  4937  		"	Result string `json:\"result,omitempty\"`",
  4938  		"	Status string `json:\"status,omitempty\"`",
  4939  		// empty validation
  4940  		"func (m *ClusterAllOf1) Validate(formats strfmt.Registry) error {\n	return nil\n}",
  4941  	},
  4942  		// not expected
  4943  		todo,
  4944  		// output in log
  4945  		noLines,
  4946  		noLines)
  4947  
  4948  }
  4949  
  4950  func initFixture842() {
  4951  	// testing ../fixtures/bugs/1487/fixture-842.yaml with expand (--skip-flatten)
  4952  
  4953  	/* codegen fails to produce code that builds
  4954  	 */
  4955  
  4956  	f := newModelFixture("../fixtures/bugs/842/fixture-842.yaml", "polymorphic type containing an array of the base type")
  4957  	flattenRun := f.AddRun(false)
  4958  
  4959  	// load expectations for model: value_array_all_of1.go
  4960  	flattenRun.AddExpectations("value_array_all_of1.go", []string{
  4961  		`type ValueArrayAllOf1 struct {`,
  4962  		`	valuesField []Value`,
  4963  		`func (m *ValueArrayAllOf1) Values() []Value {`,
  4964  		`	return m.valuesField`,
  4965  		`func (m *ValueArrayAllOf1) SetValues(val []Value) {`,
  4966  		`	m.valuesField = val`,
  4967  		`func (m *ValueArrayAllOf1) Validate(formats strfmt.Registry) error {`,
  4968  		`	if err := m.validateValues(formats); err != nil {`,
  4969  		`		return errors.CompositeValidationError(res...`,
  4970  		`func (m *ValueArrayAllOf1) validateValues(formats strfmt.Registry) error {`,
  4971  		`	if err := validate.Required("Values", "body", m.Values()); err != nil {`,
  4972  		`	for i := 0; i < len(m.Values()); i++ {`,
  4973  		`		if err := m.valuesField[i].Validate(formats); err != nil {`,
  4974  		`			if ve, ok := err.(*errors.Validation); ok {`,
  4975  		`				return ve.ValidateName("Values" + "." + strconv.Itoa(i)`,
  4976  	},
  4977  		// not expected
  4978  		todo,
  4979  		// output in log
  4980  		noLines,
  4981  		noLines)
  4982  
  4983  	// load expectations for model: value_array.go
  4984  	flattenRun.AddExpectations("value_array.go", []string{
  4985  		`type ValueArray struct {`,
  4986  		`	ValueArrayAllOf1`,
  4987  		`func (m *ValueArray) ValueType() string {`,
  4988  		`	return "ValueArray"`,
  4989  		`func (m *ValueArray) SetValueType(val string) {`,
  4990  		`func (m *ValueArray) Validate(formats strfmt.Registry) error {`,
  4991  		`	if err := m.ValueArrayAllOf1.Validate(formats); err != nil {`,
  4992  		`		return errors.CompositeValidationError(res...`,
  4993  	},
  4994  		// not expected
  4995  		todo,
  4996  		// output in log
  4997  		noLines,
  4998  		noLines)
  4999  
  5000  	// load expectations for model: value.go
  5001  	flattenRun.AddExpectations("value.go", []string{
  5002  		`type Value interface {`,
  5003  		`	runtime.Validatable`,
  5004  		`	ValueType() string`,
  5005  		`	SetValueType(string`,
  5006  		`type value struct {`,
  5007  		`	valueTypeField string`,
  5008  		`func (m *value) ValueType() string {`,
  5009  		`	return "Value"`,
  5010  		`func (m *value) SetValueType(val string) {`,
  5011  		`func UnmarshalValueSlice(reader io.Reader, consumer runtime.Consumer) ([]Value, error) {`,
  5012  		`	var elements []json.RawMessage`,
  5013  		`	if err := consumer.Consume(reader, &elements); err != nil {`,
  5014  		`		return nil, err`,
  5015  		`	var result []Value`,
  5016  		`	for _, element := range elements {`,
  5017  		`		obj, err := unmarshalValue(element, consumer`,
  5018  		`		if err != nil {`,
  5019  		`			return nil, err`,
  5020  		`		result = append(result, obj`,
  5021  		`	return result, nil`,
  5022  		`func UnmarshalValue(reader io.Reader, consumer runtime.Consumer) (Value, error) {`,
  5023  		`	data, err := ioutil.ReadAll(reader`,
  5024  		`	if err != nil {`,
  5025  		`		return nil, err`,
  5026  		`	return unmarshalValue(data, consumer`,
  5027  		`func unmarshalValue(data []byte, consumer runtime.Consumer) (Value, error) {`,
  5028  		`	buf := bytes.NewBuffer(data`,
  5029  		`	buf2 := bytes.NewBuffer(data`,
  5030  		`	var getType struct {`,
  5031  		"		ValueType string `json:\"ValueType\"`",
  5032  		`	if err := consumer.Consume(buf, &getType); err != nil {`,
  5033  		`		return nil, err`,
  5034  		`	if err := validate.RequiredString("ValueType", "body", getType.ValueType); err != nil {`,
  5035  		`		return nil, err`,
  5036  		`	switch getType.ValueType {`,
  5037  		`	case "Value":`,
  5038  		`		var result value`,
  5039  		`		if err := consumer.Consume(buf2, &result); err != nil {`,
  5040  		`			return nil, err`,
  5041  		`		return &result, nil`,
  5042  		`	case "ValueArray":`,
  5043  		`		var result ValueArray`,
  5044  		`		if err := consumer.Consume(buf2, &result); err != nil {`,
  5045  		`			return nil, err`,
  5046  		`		return &result, nil`,
  5047  		`	return nil, errors.New(422, "invalid ValueType value: %q", getType.ValueType`,
  5048  		// empty validation
  5049  		"func (m *value) Validate(formats strfmt.Registry) error {\n	return nil\n}",
  5050  	},
  5051  		// not expected
  5052  		todo,
  5053  		// output in log
  5054  		noLines,
  5055  		noLines)
  5056  
  5057  }
  5058  
  5059  func initFixture607() {
  5060  	// testing ../fixtures/bugs/1487/fixture-607.yaml with expand (--skip-flatten)
  5061  
  5062  	/* broken code produced on polymorphic type
  5063  	 */
  5064  
  5065  	f := newModelFixture("../fixtures/bugs/607/fixture-607.yaml", "broken code when using array of polymorphic type")
  5066  	flattenRun := f.AddRun(false)
  5067  
  5068  	// load expectations for model: range_filter_all_of1.go
  5069  	flattenRun.AddExpectations("range_filter_all_of1.go", []string{
  5070  		`type RangeFilterAllOf1 struct {`,
  5071  		"	Config *RangeFilterAllOf1Config `json:\"config\"`",
  5072  		`func (m *RangeFilterAllOf1) Validate(formats strfmt.Registry) error {`,
  5073  		`	if err := m.validateConfig(formats); err != nil {`,
  5074  		`		return errors.CompositeValidationError(res...`,
  5075  		`func (m *RangeFilterAllOf1) validateConfig(formats strfmt.Registry) error {`,
  5076  		`	if err := validate.Required("config", "body", m.Config); err != nil {`,
  5077  		`	if m.Config != nil {`,
  5078  		`		if err := m.Config.Validate(formats); err != nil {`,
  5079  		`			if ve, ok := err.(*errors.Validation); ok {`,
  5080  		`				return ve.ValidateName("config"`,
  5081  	},
  5082  		// not expected
  5083  		todo,
  5084  		// output in log
  5085  		noLines,
  5086  		noLines)
  5087  
  5088  	// load expectations for model: filter.go
  5089  	flattenRun.AddExpectations("filter.go", []string{
  5090  		`type Filter interface {`,
  5091  		`	runtime.Validatable`,
  5092  		`	Type() string`,
  5093  		`	SetType(string`,
  5094  		`type filter struct {`,
  5095  		`	typeField string`,
  5096  		`func (m *filter) Type() string {`,
  5097  		`	return "Filter"`,
  5098  		`func (m *filter) SetType(val string) {`,
  5099  		`func UnmarshalFilterSlice(reader io.Reader, consumer runtime.Consumer) ([]Filter, error) {`,
  5100  		`	var elements []json.RawMessage`,
  5101  		`	if err := consumer.Consume(reader, &elements); err != nil {`,
  5102  		`		return nil, err`,
  5103  		`	var result []Filter`,
  5104  		`	for _, element := range elements {`,
  5105  		`		obj, err := unmarshalFilter(element, consumer`,
  5106  		`		if err != nil {`,
  5107  		`			return nil, err`,
  5108  		`		result = append(result, obj`,
  5109  		`	return result, nil`,
  5110  		`func UnmarshalFilter(reader io.Reader, consumer runtime.Consumer) (Filter, error) {`,
  5111  		`	data, err := ioutil.ReadAll(reader`,
  5112  		`	if err != nil {`,
  5113  		`		return nil, err`,
  5114  		`	return unmarshalFilter(data, consumer`,
  5115  		`func unmarshalFilter(data []byte, consumer runtime.Consumer) (Filter, error) {`,
  5116  		`	buf := bytes.NewBuffer(data`,
  5117  		`	buf2 := bytes.NewBuffer(data`,
  5118  		`	var getType struct {`,
  5119  		"		Type string `json:\"type\"`",
  5120  		`	if err := consumer.Consume(buf, &getType); err != nil {`,
  5121  		`		return nil, err`,
  5122  		`	if err := validate.RequiredString("type", "body", getType.Type); err != nil {`,
  5123  		`		return nil, err`,
  5124  		`	switch getType.Type {`,
  5125  		`	case "AndFilter":`,
  5126  		`		var result AndFilter`,
  5127  		`		if err := consumer.Consume(buf2, &result); err != nil {`,
  5128  		`			return nil, err`,
  5129  		`		return &result, nil`,
  5130  		`	case "Filter":`,
  5131  		`		var result filter`,
  5132  		`		if err := consumer.Consume(buf2, &result); err != nil {`,
  5133  		`			return nil, err`,
  5134  		`		return &result, nil`,
  5135  		`	case "RangeFilter":`,
  5136  		`		var result RangeFilter`,
  5137  		`		if err := consumer.Consume(buf2, &result); err != nil {`,
  5138  		`			return nil, err`,
  5139  		`		return &result, nil`,
  5140  		`	return nil, errors.New(422, "invalid type value: %q", getType.Type`,
  5141  		// empty validation
  5142  		"func (m *filter) Validate(formats strfmt.Registry) error {\n	return nil\n}",
  5143  	},
  5144  		// not expected
  5145  		todo,
  5146  		// output in log
  5147  		noLines,
  5148  		noLines)
  5149  
  5150  	// load expectations for model: and_filter_all_of1.go
  5151  	flattenRun.AddExpectations("and_filter_all_of1.go", []string{
  5152  		`type AndFilterAllOf1 struct {`,
  5153  		`	configField []Filter`,
  5154  		`func (m *AndFilterAllOf1) Config() []Filter {`,
  5155  		`	return m.configField`,
  5156  		`func (m *AndFilterAllOf1) SetConfig(val []Filter) {`,
  5157  		`	m.configField = val`,
  5158  		`func (m *AndFilterAllOf1) UnmarshalJSON(raw []byte) error {`,
  5159  		`	var data struct {`,
  5160  		"		Config json.RawMessage `json:\"config\"`",
  5161  		`	buf := bytes.NewBuffer(raw`,
  5162  		`	dec := json.NewDecoder(buf`,
  5163  		`	dec.UseNumber(`,
  5164  		`	if err := dec.Decode(&data); err != nil {`,
  5165  		`	propConfig, err := UnmarshalFilterSlice(bytes.NewBuffer(data.Config), runtime.JSONConsumer()`,
  5166  		`	if err != nil && err != io.EOF {`,
  5167  		`	var result AndFilterAllOf1`,
  5168  		`	result.configField = propConfig`,
  5169  		`	*m = result`,
  5170  		`func (m AndFilterAllOf1) MarshalJSON() ([]byte, error) {`,
  5171  		`	var b1, b2, b3 []byte`,
  5172  		`	var err error`,
  5173  		`	b1, err = json.Marshal(struct {`,
  5174  		`	}{},`,
  5175  		`	if err != nil {`,
  5176  		`		return nil, err`,
  5177  		`	b2, err = json.Marshal(struct {`,
  5178  		"		Config []Filter `json:\"config\"`",
  5179  		`	}{`,
  5180  		`		Config: m.configField,`,
  5181  		`	},`,
  5182  		`	if err != nil {`,
  5183  		`		return nil, err`,
  5184  		`	return swag.ConcatJSON(b1, b2, b3), nil`,
  5185  		`func (m *AndFilterAllOf1) Validate(formats strfmt.Registry) error {`,
  5186  		`	if err := m.validateConfig(formats); err != nil {`,
  5187  		`		return errors.CompositeValidationError(res...`,
  5188  		`func (m *AndFilterAllOf1) validateConfig(formats strfmt.Registry) error {`,
  5189  		`	if err := validate.Required("config", "body", m.Config()); err != nil {`,
  5190  		`	for i := 0; i < len(m.Config()); i++ {`,
  5191  		`		if err := m.configField[i].Validate(formats); err != nil {`,
  5192  		`			if ve, ok := err.(*errors.Validation); ok {`,
  5193  		`				return ve.ValidateName("config" + "." + strconv.Itoa(i)`,
  5194  	},
  5195  		// not expected
  5196  		todo,
  5197  		// output in log
  5198  		noLines,
  5199  		noLines)
  5200  
  5201  	// load expectations for model: and_filter.go
  5202  	flattenRun.AddExpectations("and_filter.go", []string{
  5203  		`type AndFilter struct {`,
  5204  		`	AndFilterAllOf1`,
  5205  		`func (m *AndFilter) Type() string {`,
  5206  		`	return "AndFilter"`,
  5207  		`func (m *AndFilter) SetType(val string) {`,
  5208  		`func (m *AndFilter) UnmarshalJSON(raw []byte) error {`,
  5209  		`	var data struct {`,
  5210  		`		AndFilterAllOf1`,
  5211  		`	buf := bytes.NewBuffer(raw`,
  5212  		`	dec := json.NewDecoder(buf`,
  5213  		`	dec.UseNumber(`,
  5214  		`	if err := dec.Decode(&data); err != nil {`,
  5215  		`	var base struct {`,
  5216  		"		Type string `json:\"type\"`",
  5217  		`	buf = bytes.NewBuffer(raw`,
  5218  		`	dec = json.NewDecoder(buf`,
  5219  		`	dec.UseNumber(`,
  5220  		`	if err := dec.Decode(&base); err != nil {`,
  5221  		`	var result AndFilter`,
  5222  		`	if base.Type != result.Type() {`,
  5223  		`		return errors.New(422, "invalid type value: %q", base.Type`,
  5224  		`	result.AndFilterAllOf1 = data.AndFilterAllOf1`,
  5225  		`	*m = result`,
  5226  		`func (m AndFilter) MarshalJSON() ([]byte, error) {`,
  5227  		`	var b1, b2, b3 []byte`,
  5228  		`	var err error`,
  5229  		`	b1, err = json.Marshal(struct {`,
  5230  		`		AndFilterAllOf1`,
  5231  		`	}{`,
  5232  		`		AndFilterAllOf1: m.AndFilterAllOf1,`,
  5233  		`	},`,
  5234  		`	if err != nil {`,
  5235  		`		return nil, err`,
  5236  		`	b2, err = json.Marshal(struct {`,
  5237  		"		Type string `json:\"type\"`",
  5238  		`	}{`,
  5239  		`		Type: m.Type(),`,
  5240  		`	},`,
  5241  		`	if err != nil {`,
  5242  		`		return nil, err`,
  5243  		`	return swag.ConcatJSON(b1, b2, b3), nil`,
  5244  		`func (m *AndFilter) Validate(formats strfmt.Registry) error {`,
  5245  		`	if err := m.AndFilterAllOf1.Validate(formats); err != nil {`,
  5246  		`		return errors.CompositeValidationError(res...`,
  5247  	},
  5248  		// not expected
  5249  		todo,
  5250  		// output in log
  5251  		noLines,
  5252  		noLines)
  5253  
  5254  	// load expectations for model: range_filter.go
  5255  	flattenRun.AddExpectations("range_filter.go", []string{
  5256  		`type RangeFilter struct {`,
  5257  		`	RangeFilterAllOf1`,
  5258  		`func (m *RangeFilter) Type() string {`,
  5259  		`	return "RangeFilter"`,
  5260  		`func (m *RangeFilter) SetType(val string) {`,
  5261  		`func (m *RangeFilter) UnmarshalJSON(raw []byte) error {`,
  5262  		`	var data struct {`,
  5263  		`		RangeFilterAllOf1`,
  5264  		`	buf := bytes.NewBuffer(raw`,
  5265  		`	dec := json.NewDecoder(buf`,
  5266  		`	dec.UseNumber(`,
  5267  		`	if err := dec.Decode(&data); err != nil {`,
  5268  		`	var base struct {`,
  5269  		"		Type string `json:\"type\"`",
  5270  		`	buf = bytes.NewBuffer(raw`,
  5271  		`	dec = json.NewDecoder(buf`,
  5272  		`	dec.UseNumber(`,
  5273  		`	if err := dec.Decode(&base); err != nil {`,
  5274  		`	var result RangeFilter`,
  5275  		`	if base.Type != result.Type() {`,
  5276  		`		return errors.New(422, "invalid type value: %q", base.Type`,
  5277  		`	result.RangeFilterAllOf1 = data.RangeFilterAllOf1`,
  5278  		`	*m = result`,
  5279  		`func (m RangeFilter) MarshalJSON() ([]byte, error) {`,
  5280  		`	var b1, b2, b3 []byte`,
  5281  		`	var err error`,
  5282  		`	b1, err = json.Marshal(struct {`,
  5283  		`		RangeFilterAllOf1`,
  5284  		`	}{`,
  5285  		`		RangeFilterAllOf1: m.RangeFilterAllOf1,`,
  5286  		`	},`,
  5287  		`	if err != nil {`,
  5288  		`		return nil, err`,
  5289  		`	b2, err = json.Marshal(struct {`,
  5290  		"		Type string `json:\"type\"`",
  5291  		`	}{`,
  5292  		`		Type: m.Type(),`,
  5293  		`	},`,
  5294  		`	if err != nil {`,
  5295  		`		return nil, err`,
  5296  		`	return swag.ConcatJSON(b1, b2, b3), nil`,
  5297  		`func (m *RangeFilter) Validate(formats strfmt.Registry) error {`,
  5298  		`	if err := m.RangeFilterAllOf1.Validate(formats); err != nil {`,
  5299  		`		return errors.CompositeValidationError(res...`,
  5300  	},
  5301  		// not expected
  5302  		todo,
  5303  		// output in log
  5304  		noLines,
  5305  		noLines)
  5306  
  5307  	// load expectations for model: range_filter_all_of1_config.go
  5308  	flattenRun.AddExpectations("range_filter_all_of1_config.go", []string{
  5309  		`type RangeFilterAllOf1Config struct {`,
  5310  		"	Gt float64 `json:\"gt,omitempty\"`",
  5311  		"	Gte float64 `json:\"gte,omitempty\"`",
  5312  		"	Lt float64 `json:\"lt,omitempty\"`",
  5313  		"	Lte float64 `json:\"lte,omitempty\"`",
  5314  		// empty validation
  5315  		"func (m *RangeFilterAllOf1Config) Validate(formats strfmt.Registry) error {\n	return nil\n}",
  5316  	},
  5317  		// not expected
  5318  		todo,
  5319  		// output in log
  5320  		noLines,
  5321  		noLines)
  5322  
  5323  }
  5324  
  5325  func initFixture1336() {
  5326  	// testing ../fixtures/bugs/1487/fixture-1336.yaml with expand (--skip-flatten)
  5327  
  5328  	/* broken code produced on polymorphic type
  5329  	 */
  5330  
  5331  	f := newModelFixture("../fixtures/bugs/1336/fixture-1336.yaml", "broken code when using array of polymorphic type")
  5332  	flattenRun := f.AddRun(false)
  5333  
  5334  	// load expectations for model: node.go
  5335  	flattenRun.AddExpectations("node.go", []string{
  5336  		`type Node interface {`,
  5337  		`	runtime.Validatable`,
  5338  		`	NodeType() string`,
  5339  		`	SetNodeType(string`,
  5340  		`type node struct {`,
  5341  		`	nodeTypeField string`,
  5342  		`func (m *node) NodeType() string {`,
  5343  		`	return "Node"`,
  5344  		`func (m *node) SetNodeType(val string) {`,
  5345  		`func UnmarshalNodeSlice(reader io.Reader, consumer runtime.Consumer) ([]Node, error) {`,
  5346  		`	var elements []json.RawMessage`,
  5347  		`	if err := consumer.Consume(reader, &elements); err != nil {`,
  5348  		`		return nil, err`,
  5349  		`	var result []Node`,
  5350  		`	for _, element := range elements {`,
  5351  		`		obj, err := unmarshalNode(element, consumer`,
  5352  		`		if err != nil {`,
  5353  		`			return nil, err`,
  5354  		`		result = append(result, obj`,
  5355  		`	return result, nil`,
  5356  		`func UnmarshalNode(reader io.Reader, consumer runtime.Consumer) (Node, error) {`,
  5357  		`	data, err := ioutil.ReadAll(reader`,
  5358  		`	if err != nil {`,
  5359  		`		return nil, err`,
  5360  		`	return unmarshalNode(data, consumer`,
  5361  		`func unmarshalNode(data []byte, consumer runtime.Consumer) (Node, error) {`,
  5362  		`	buf := bytes.NewBuffer(data`,
  5363  		`	buf2 := bytes.NewBuffer(data`,
  5364  		`	var getType struct {`,
  5365  		"		NodeType string `json:\"NodeType\"`",
  5366  		`	if err := consumer.Consume(buf, &getType); err != nil {`,
  5367  		`		return nil, err`,
  5368  		`	if err := validate.RequiredString("NodeType", "body", getType.NodeType); err != nil {`,
  5369  		`		return nil, err`,
  5370  		`	switch getType.NodeType {`,
  5371  		`	case "CodeBlockNode":`,
  5372  		`		var result CodeBlockNode`,
  5373  		`		if err := consumer.Consume(buf2, &result); err != nil {`,
  5374  		`			return nil, err`,
  5375  		`		return &result, nil`,
  5376  		`	case "DocBlockNode":`,
  5377  		`		var result DocBlockNode`,
  5378  		`		if err := consumer.Consume(buf2, &result); err != nil {`,
  5379  		`			return nil, err`,
  5380  		`		return &result, nil`,
  5381  		`	case "Node":`,
  5382  		`		var result node`,
  5383  		`		if err := consumer.Consume(buf2, &result); err != nil {`,
  5384  		`			return nil, err`,
  5385  		`		return &result, nil`,
  5386  		`	return nil, errors.New(422, "invalid NodeType value: %q", getType.NodeType`,
  5387  		// empty validation
  5388  		"func (m *node) Validate(formats strfmt.Registry) error {\n	return nil\n}",
  5389  	},
  5390  		// not expected
  5391  		todo,
  5392  		// output in log
  5393  		noLines,
  5394  		noLines)
  5395  
  5396  	// load expectations for model: code_block_node_all_of1.go
  5397  	flattenRun.AddExpectations("code_block_node_all_of1.go", []string{
  5398  		`type CodeBlockNodeAllOf1 struct {`,
  5399  		"	Code string `json:\"Code,omitempty\"`",
  5400  		// empty validation
  5401  		"func (m *CodeBlockNodeAllOf1) Validate(formats strfmt.Registry) error {\n	return nil\n}",
  5402  	},
  5403  		// not expected
  5404  		todo,
  5405  		// output in log
  5406  		noLines,
  5407  		noLines)
  5408  
  5409  	// load expectations for model: graph.go
  5410  	flattenRun.AddExpectations("graph.go", []string{
  5411  		`type Graph struct {`,
  5412  		`	nodesField []Node`,
  5413  		`func (m *Graph) Nodes() []Node {`,
  5414  		`	return m.nodesField`,
  5415  		`func (m *Graph) SetNodes(val []Node) {`,
  5416  		`	m.nodesField = val`,
  5417  		`func (m *Graph) UnmarshalJSON(raw []byte) error {`,
  5418  		`	var data struct {`,
  5419  		"		Nodes json.RawMessage `json:\"Nodes\"`",
  5420  		`	buf := bytes.NewBuffer(raw`,
  5421  		`	dec := json.NewDecoder(buf`,
  5422  		`	dec.UseNumber(`,
  5423  		`	if err := dec.Decode(&data); err != nil {`,
  5424  		`		nodes, err := UnmarshalNodeSlice(bytes.NewBuffer(data.Nodes), runtime.JSONConsumer()`,
  5425  		`	if err != nil && err != io.EOF {`,
  5426  		`	var result Graph`,
  5427  		`	result.nodesField = propNodes`,
  5428  		`	*m = result`,
  5429  		`func (m Graph) MarshalJSON() ([]byte, error) {`,
  5430  		`	var b1, b2, b3 []byte`,
  5431  		`	var err error`,
  5432  		`	b1, err = json.Marshal(struct {`,
  5433  		`	}{},`,
  5434  		`	if err != nil {`,
  5435  		`		return nil, err`,
  5436  		`	b2, err = json.Marshal(struct {`,
  5437  		"		Nodes []Node `json:\"Nodes\"`",
  5438  		`	}{`,
  5439  		`		Nodes: m.nodesField,`,
  5440  		`	},`,
  5441  		`	if err != nil {`,
  5442  		`		return nil, err`,
  5443  		`	return swag.ConcatJSON(b1, b2, b3), nil`,
  5444  		`func (m *Graph) Validate(formats strfmt.Registry) error {`,
  5445  		`		return errors.CompositeValidationError(res...`,
  5446  	},
  5447  		// not expected
  5448  		todo,
  5449  		// output in log
  5450  		noLines,
  5451  		noLines)
  5452  
  5453  	// load expectations for model: doc_block_node_all_of1.go
  5454  	flattenRun.AddExpectations("doc_block_node_all_of1.go", []string{
  5455  		`type DocBlockNodeAllOf1 struct {`,
  5456  		"	Doc string `json:\"Doc,omitempty\"`",
  5457  		// empty validation
  5458  		"func (m *DocBlockNodeAllOf1) Validate(formats strfmt.Registry) error {\n	return nil\n}",
  5459  	},
  5460  		// not expected
  5461  		todo,
  5462  		// output in log
  5463  		noLines,
  5464  		noLines)
  5465  
  5466  	// load expectations for model: doc_block_node.go
  5467  	flattenRun.AddExpectations("doc_block_node.go", []string{
  5468  		`type DocBlockNode struct {`,
  5469  		`	DocBlockNodeAllOf1`,
  5470  		`func (m *DocBlockNode) NodeType() string {`,
  5471  		`	return "DocBlockNode"`,
  5472  		`func (m *DocBlockNode) SetNodeType(val string) {`,
  5473  		`func (m *DocBlockNode) UnmarshalJSON(raw []byte) error {`,
  5474  		`	var data struct {`,
  5475  		`		DocBlockNodeAllOf1`,
  5476  		`	buf := bytes.NewBuffer(raw`,
  5477  		`	dec := json.NewDecoder(buf`,
  5478  		`	dec.UseNumber(`,
  5479  		`	if err := dec.Decode(&data); err != nil {`,
  5480  		`	var base struct {`,
  5481  		"		NodeType string `json:\"NodeType\"`",
  5482  		`	buf = bytes.NewBuffer(raw`,
  5483  		`	dec = json.NewDecoder(buf`,
  5484  		`	dec.UseNumber(`,
  5485  		`	if err := dec.Decode(&base); err != nil {`,
  5486  		`	var result DocBlockNode`,
  5487  		`	if base.NodeType != result.NodeType() {`,
  5488  		`		return errors.New(422, "invalid NodeType value: %q", base.NodeType`,
  5489  		`	result.DocBlockNodeAllOf1 = data.DocBlockNodeAllOf1`,
  5490  		`	*m = result`,
  5491  		`func (m DocBlockNode) MarshalJSON() ([]byte, error) {`,
  5492  		`	var b1, b2, b3 []byte`,
  5493  		`	var err error`,
  5494  		`	b1, err = json.Marshal(struct {`,
  5495  		`		DocBlockNodeAllOf1`,
  5496  		`	}{`,
  5497  		`		DocBlockNodeAllOf1: m.DocBlockNodeAllOf1,`,
  5498  		`	},`,
  5499  		`	if err != nil {`,
  5500  		`		return nil, err`,
  5501  		`	b2, err = json.Marshal(struct {`,
  5502  		"		NodeType string `json:\"NodeType\"`",
  5503  		`	}{`,
  5504  		`		NodeType: m.NodeType(),`,
  5505  		`	},`,
  5506  		`	if err != nil {`,
  5507  		`		return nil, err`,
  5508  		`	return swag.ConcatJSON(b1, b2, b3), nil`,
  5509  		`func (m *DocBlockNode) Validate(formats strfmt.Registry) error {`,
  5510  		`	if err := m.DocBlockNodeAllOf1.Validate(formats); err != nil {`,
  5511  		`		return errors.CompositeValidationError(res...`,
  5512  	},
  5513  		// not expected
  5514  		todo,
  5515  		// output in log
  5516  		noLines,
  5517  		noLines)
  5518  
  5519  	// load expectations for model: code_block_node.go
  5520  	flattenRun.AddExpectations("code_block_node.go", []string{
  5521  		`type CodeBlockNode struct {`,
  5522  		`	CodeBlockNodeAllOf1`,
  5523  		`func (m *CodeBlockNode) NodeType() string {`,
  5524  		`	return "CodeBlockNode"`,
  5525  		`func (m *CodeBlockNode) SetNodeType(val string) {`,
  5526  		`func (m *CodeBlockNode) UnmarshalJSON(raw []byte) error {`,
  5527  		`	var data struct {`,
  5528  		`		CodeBlockNodeAllOf1`,
  5529  		`	buf := bytes.NewBuffer(raw`,
  5530  		`	dec := json.NewDecoder(buf`,
  5531  		`	dec.UseNumber(`,
  5532  		`	if err := dec.Decode(&data); err != nil {`,
  5533  		`	var base struct {`,
  5534  		"		NodeType string `json:\"NodeType\"`",
  5535  		`	buf = bytes.NewBuffer(raw`,
  5536  		`	dec = json.NewDecoder(buf`,
  5537  		`	dec.UseNumber(`,
  5538  		`	if err := dec.Decode(&base); err != nil {`,
  5539  		`	var result CodeBlockNode`,
  5540  		`	if base.NodeType != result.NodeType() {`,
  5541  		`		return errors.New(422, "invalid NodeType value: %q", base.NodeType`,
  5542  		`	result.CodeBlockNodeAllOf1 = data.CodeBlockNodeAllOf1`,
  5543  		`	*m = result`,
  5544  		`func (m CodeBlockNode) MarshalJSON() ([]byte, error) {`,
  5545  		`	var b1, b2, b3 []byte`,
  5546  		`	var err error`,
  5547  		`	b1, err = json.Marshal(struct {`,
  5548  		`		CodeBlockNodeAllOf1`,
  5549  		`	}{`,
  5550  		`		CodeBlockNodeAllOf1: m.CodeBlockNodeAllOf1,`,
  5551  		`	},`,
  5552  		`	if err != nil {`,
  5553  		`		return nil, err`,
  5554  		`	b2, err = json.Marshal(struct {`,
  5555  		"		NodeType string `json:\"NodeType\"`",
  5556  		`	}{`,
  5557  		`		NodeType: m.NodeType(),`,
  5558  		`	},`,
  5559  		`	if err != nil {`,
  5560  		`		return nil, err`,
  5561  		`	return swag.ConcatJSON(b1, b2, b3), nil`,
  5562  		`func (m *CodeBlockNode) Validate(formats strfmt.Registry) error {`,
  5563  		`	if err := m.CodeBlockNodeAllOf1.Validate(formats); err != nil {`,
  5564  		`		return errors.CompositeValidationError(res...`,
  5565  	},
  5566  		// not expected
  5567  		todo,
  5568  		// output in log
  5569  		noLines,
  5570  		noLines)
  5571  
  5572  }
  5573  
  5574  func initFixtureErrors() {
  5575  	// testing ../fixtures/bugs/1487/fixture-errors.yaml with expand (--skip-flatten)
  5576  
  5577  	/*
  5578  		invalid specs supported by go-swagger
  5579  	*/
  5580  
  5581  	f := newModelFixture("../fixtures/bugs/1487/fixture-errors.yaml", "broken spec to exercise error handling")
  5582  	flattenRun := f.AddRun(false)
  5583  	expandRun := f.AddRun(true)
  5584  
  5585  	// load expectations for model: node.go
  5586  	flattenRun.AddExpectations("array_without_items.go", []string{
  5587  		`type ArrayWithoutItems []interface{}`,
  5588  		// empty validation
  5589  		"func (m ArrayWithoutItems) Validate(formats strfmt.Registry) error {\n	return nil\n}",
  5590  	},
  5591  		// not expected
  5592  		todo,
  5593  		// output in log
  5594  		// NOTE would expect warning for a non-swagger compliant, but nonetheless supposed construct (not implemented)
  5595  		noLines,
  5596  		noLines)
  5597  
  5598  	expandRun.AddExpectations("array_without_items.go", flattenRun.ExpectedFor("ArrayWithoutItems").ExpectedLines, todo, noLines, noLines)
  5599  
  5600  	flattenRun.AddExpectations("multiple_types.go", []string{
  5601  		`type MultipleTypes interface{`,
  5602  	},
  5603  		// not expected
  5604  		validatable,
  5605  		// output in log
  5606  		// expect warning
  5607  		warning,
  5608  		noLines)
  5609  
  5610  	expandRun.AddExpectations("multiple_types.go", flattenRun.ExpectedFor("MultipleTypes").ExpectedLines, validatable, noLines, noLines)
  5611  }
  5612  
  5613  func initTodolistSchemavalidation() {
  5614  	// testing todolist.schemavalidation.yaml with flatten and expand (--skip-flatten)
  5615  
  5616  	/*
  5617  	   A very simple api description that makes a json only API to submit to do's.
  5618  
  5619  	*/
  5620  
  5621  	f := newModelFixture("../fixtures/codegen/todolist.schemavalidation.yml", "Private to-do list")
  5622  	flattenRun := f.AddRun(false)
  5623  	expandRun := f.AddRun(true)
  5624  
  5625  	// load expectations for model: all_of_validations_meta_all_of6.go
  5626  	flattenRun.AddExpectations("all_of_validations_meta_all_of6.go", []string{
  5627  		`type AllOfValidationsMetaAllOf6 struct {`,
  5628  		"	Coords *AllOfValidationsMetaAllOf6Coords `json:\"coords,omitempty\"`",
  5629  		`func (m *AllOfValidationsMetaAllOf6) Validate(formats strfmt.Registry) error {`,
  5630  		`	if err := m.validateCoords(formats); err != nil {`,
  5631  		`		return errors.CompositeValidationError(res...`,
  5632  		`func (m *AllOfValidationsMetaAllOf6) validateCoords(formats strfmt.Registry) error {`,
  5633  		`	if swag.IsZero(m.Coords) {`,
  5634  		`	if m.Coords != nil {`,
  5635  		`		if err := m.Coords.Validate(formats); err != nil {`,
  5636  		`			if ve, ok := err.(*errors.Validation); ok {`,
  5637  		`				return ve.ValidateName("coords"`,
  5638  	},
  5639  		// not expected
  5640  		todo,
  5641  		// output in log
  5642  		noLines,
  5643  		noLines)
  5644  
  5645  	// load expectations for model: nested_array_validations.go
  5646  	flattenRun.AddExpectations("nested_array_validations.go", []string{
  5647  		`type NestedArrayValidations struct {`,
  5648  		"	Tags [][][]string `json:\"tags\"`",
  5649  		`func (m *NestedArrayValidations) Validate(formats strfmt.Registry) error {`,
  5650  		`	if err := m.validateTags(formats); err != nil {`,
  5651  		`		return errors.CompositeValidationError(res...`,
  5652  		`func (m *NestedArrayValidations) validateTags(formats strfmt.Registry) error {`,
  5653  		`	if swag.IsZero(m.Tags) {`,
  5654  		`	iTagsSize := int64(len(m.Tags)`,
  5655  		`	if err := validate.MinItems("tags", "body", iTagsSize, 3); err != nil {`,
  5656  		`	if err := validate.MaxItems("tags", "body", iTagsSize, 10); err != nil {`,
  5657  		`	for i := 0; i < len(m.Tags); i++ {`,
  5658  		`		iiTagsSize := int64(len(m.Tags[i])`,
  5659  		`		if err := validate.MinItems("tags"+"."+strconv.Itoa(i), "body", iiTagsSize, 3); err != nil {`,
  5660  		`		if err := validate.MaxItems("tags"+"."+strconv.Itoa(i), "body", iiTagsSize, 10); err != nil {`,
  5661  		`		for ii := 0; ii < len(m.Tags[i]); ii++ {`,
  5662  		`			iiiTagsSize := int64(len(m.Tags[i][ii])`,
  5663  		`			if err := validate.MinItems("tags"+"."+strconv.Itoa(i)+"."+strconv.Itoa(ii), "body", iiiTagsSize, 3); err != nil {`,
  5664  		`			if err := validate.MaxItems("tags"+"."+strconv.Itoa(i)+"."+strconv.Itoa(ii), "body", iiiTagsSize, 10); err != nil {`,
  5665  		`			for iii := 0; iii < len(m.Tags[i][ii]); iii++ {`,
  5666  		`				if err := validate.MinLength("tags"+"."+strconv.Itoa(i)+"."+strconv.Itoa(ii)+"."+strconv.Itoa(iii), "body", string(m.Tags[i][ii][iii]), 3); err != nil {`,
  5667  		`				if err := validate.MaxLength("tags"+"."+strconv.Itoa(i)+"."+strconv.Itoa(ii)+"."+strconv.Itoa(iii), "body", string(m.Tags[i][ii][iii]), 10); err != nil {`,
  5668  		"				if err := validate.Pattern(\"tags\"+\".\"+strconv.Itoa(i)+\".\"+strconv.Itoa(ii)+\".\"+strconv.Itoa(iii), \"body\", string(m.Tags[i][ii][iii]), `\\w+`); err != nil {",
  5669  	},
  5670  		// not expected
  5671  		todo,
  5672  		// output in log
  5673  		noLines,
  5674  		noLines)
  5675  
  5676  	expandRun.AddExpectations("nested_array_validations.go", flattenRun.ExpectedFor("NestedArrayValidations").ExpectedLines, todo, noLines, noLines)
  5677  
  5678  	// load expectations for model: all_of_validations_meta_all_of4.go
  5679  	flattenRun.AddExpectations("all_of_validations_meta_all_of4.go", []string{
  5680  		`type AllOfValidationsMetaAllOf4 struct {`,
  5681  		"	Opts map[string]int32 `json:\"opts,omitempty\"`",
  5682  		`func (m *AllOfValidationsMetaAllOf4) Validate(formats strfmt.Registry) error {`,
  5683  		`	if err := m.validateOpts(formats); err != nil {`,
  5684  		`		return errors.CompositeValidationError(res...`,
  5685  		`func (m *AllOfValidationsMetaAllOf4) validateOpts(formats strfmt.Registry) error {`,
  5686  		`	if swag.IsZero(m.Opts) {`,
  5687  		`	for k := range m.Opts {`,
  5688  		//`		if swag.IsZero(m.Opts[k]) {`,
  5689  		`		if err := validate.MinimumInt("opts"+"."+k, "body", int64(m.Opts[k]), 2, false); err != nil {`,
  5690  		`		if err := validate.MaximumInt("opts"+"."+k, "body", int64(m.Opts[k]), 50, false); err != nil {`,
  5691  		`		if err := validate.MultipleOf("opts"+"."+k, "body", float64(m.Opts[k]), 1.5); err != nil {`,
  5692  	},
  5693  		// not expected
  5694  		todo,
  5695  		// output in log
  5696  		noLines,
  5697  		noLines)
  5698  
  5699  	// load expectations for model: simple_zero_allowed.go
  5700  	flattenRun.AddExpectations("simple_zero_allowed.go", []string{
  5701  		`type SimpleZeroAllowed struct {`,
  5702  		"	ID string `json:\"id,omitempty\"`",
  5703  		"	Name *string `json:\"name\"`",
  5704  		"	Urls []string `json:\"urls\"`",
  5705  		`func (m *SimpleZeroAllowed) Validate(formats strfmt.Registry) error {`,
  5706  		`	if err := m.validateID(formats); err != nil {`,
  5707  		`	if err := m.validateName(formats); err != nil {`,
  5708  		`	if err := m.validateUrls(formats); err != nil {`,
  5709  		`		return errors.CompositeValidationError(res...`,
  5710  		`func (m *SimpleZeroAllowed) validateID(formats strfmt.Registry) error {`,
  5711  		`	if swag.IsZero(m.ID) {`,
  5712  		`	if err := validate.MinLength("id", "body", string(m.ID), 2); err != nil {`,
  5713  		`	if err := validate.MaxLength("id", "body", string(m.ID), 50); err != nil {`,
  5714  		"	if err := validate.Pattern(\"id\", \"body\", string(m.ID), `[A-Za-z0-9][\\w- ]+`); err != nil {",
  5715  		`func (m *SimpleZeroAllowed) validateName(formats strfmt.Registry) error {`,
  5716  		`	if err := validate.Required("name", "body", m.Name); err != nil {`,
  5717  		`	if err := validate.MinLength("name", "body", string(*m.Name), 2); err != nil {`,
  5718  		`	if err := validate.MaxLength("name", "body", string(*m.Name), 50); err != nil {`,
  5719  		"	if err := validate.Pattern(\"name\", \"body\", string(*m.Name), `[A-Za-z0-9][\\w- ]+`); err != nil {",
  5720  		`func (m *SimpleZeroAllowed) validateUrls(formats strfmt.Registry) error {`,
  5721  		`	if err := validate.Required("urls", "body", m.Urls); err != nil {`,
  5722  	},
  5723  		// not expected
  5724  		todo,
  5725  		// output in log
  5726  		noLines,
  5727  		noLines)
  5728  
  5729  	expandRun.AddExpectations("simple_zero_allowed.go", flattenRun.ExpectedFor("SimpleZeroAllowed").ExpectedLines, todo, noLines, noLines)
  5730  
  5731  	// load expectations for model: named_all_of_all_of6_coords_all_of0.go
  5732  	flattenRun.AddExpectations("named_all_of_all_of6_coords_all_of0.go", []string{
  5733  		`type NamedAllOfAllOf6CoordsAllOf0 struct {`,
  5734  		"	Name string `json:\"name,omitempty\"`",
  5735  		`func (m *NamedAllOfAllOf6CoordsAllOf0) Validate(formats strfmt.Registry) error {`,
  5736  		`	if err := m.validateName(formats); err != nil {`,
  5737  		`		return errors.CompositeValidationError(res...`,
  5738  		`func (m *NamedAllOfAllOf6CoordsAllOf0) validateName(formats strfmt.Registry) error {`,
  5739  		`	if swag.IsZero(m.Name) {`,
  5740  		`	if err := validate.MinLength("name", "body", string(m.Name), 2); err != nil {`,
  5741  		`	if err := validate.MaxLength("name", "body", string(m.Name), 50); err != nil {`,
  5742  		"	if err := validate.Pattern(\"name\", \"body\", string(m.Name), `[A-Za-z0-9][\\w- ]+`); err != nil {",
  5743  	},
  5744  		// not expected
  5745  		todo,
  5746  		// output in log
  5747  		noLines,
  5748  		noLines)
  5749  
  5750  	// load expectations for model: named_all_of_all_of6.go
  5751  	flattenRun.AddExpectations("named_all_of_all_of6.go", []string{
  5752  		`type NamedAllOfAllOf6 struct {`,
  5753  		"	Coords *NamedAllOfAllOf6Coords `json:\"coords,omitempty\"`",
  5754  		`func (m *NamedAllOfAllOf6) Validate(formats strfmt.Registry) error {`,
  5755  		`	if err := m.validateCoords(formats); err != nil {`,
  5756  		`		return errors.CompositeValidationError(res...`,
  5757  		`func (m *NamedAllOfAllOf6) validateCoords(formats strfmt.Registry) error {`,
  5758  		`	if swag.IsZero(m.Coords) {`,
  5759  		`	if m.Coords != nil {`,
  5760  		`		if err := m.Coords.Validate(formats); err != nil {`,
  5761  		`			if ve, ok := err.(*errors.Validation); ok {`,
  5762  		`				return ve.ValidateName("coords"`,
  5763  	},
  5764  		// not expected
  5765  		todo,
  5766  		// output in log
  5767  		noLines,
  5768  		noLines)
  5769  
  5770  	// load expectations for model: named_array_multi.go
  5771  	flattenRun.AddExpectations("named_array_multi.go", []string{
  5772  		`type NamedArrayMulti struct {`,
  5773  		"	P0 *string `json:\"-\"`",
  5774  		"	P1 *float64 `json:\"-\"`",
  5775  		`func (m *NamedArrayMulti) Validate(formats strfmt.Registry) error {`,
  5776  		`	if err := m.validateP0(formats); err != nil {`,
  5777  		`	if err := m.validateP1(formats); err != nil {`,
  5778  		`		return errors.CompositeValidationError(res...`,
  5779  		`func (m *NamedArrayMulti) validateP0(formats strfmt.Registry) error {`,
  5780  		`	if err := validate.Required("0", "body", m.P0); err != nil {`,
  5781  		`	if err := validate.MinLength("0", "body", string(*m.P0), 3); err != nil {`,
  5782  		`	if err := validate.MaxLength("0", "body", string(*m.P0), 10); err != nil {`,
  5783  		"	if err := validate.Pattern(\"0\", \"body\", string(*m.P0), `\\w+`); err != nil {",
  5784  		`func (m *NamedArrayMulti) validateP1(formats strfmt.Registry) error {`,
  5785  		`	if err := validate.Required("1", "body", m.P1); err != nil {`,
  5786  		`	if err := validate.Minimum("1", "body", float64(*m.P1), 3, false); err != nil {`,
  5787  		`	if err := validate.Maximum("1", "body", float64(*m.P1), 12, false); err != nil {`,
  5788  		`	if err := validate.MultipleOf("1", "body", float64(*m.P1), 1.5); err != nil {`,
  5789  	},
  5790  		// not expected
  5791  		todo,
  5792  		// output in log
  5793  		noLines,
  5794  		noLines)
  5795  
  5796  	expandRun.AddExpectations("named_array_multi.go", flattenRun.ExpectedFor("NamedArrayMulti").ExpectedLines, todo, noLines, noLines)
  5797  
  5798  	// load expectations for model: named_array.go
  5799  	flattenRun.AddExpectations("named_array.go", []string{
  5800  		`type NamedArray []string`,
  5801  		`func (m NamedArray) Validate(formats strfmt.Registry) error {`,
  5802  		`	iNamedArraySize := int64(len(m)`,
  5803  		`	if err := validate.MinItems("", "body", iNamedArraySize, 3); err != nil {`,
  5804  		`	if err := validate.MaxItems("", "body", iNamedArraySize, 10); err != nil {`,
  5805  		`	for i := 0; i < len(m); i++ {`,
  5806  		`		if err := validate.MinLength(strconv.Itoa(i), "body", string(m[i]), 3); err != nil {`,
  5807  		`		if err := validate.MaxLength(strconv.Itoa(i), "body", string(m[i]), 10); err != nil {`,
  5808  		"		if err := validate.Pattern(strconv.Itoa(i), \"body\", string(m[i]), `\\w+`); err != nil {",
  5809  		`		return errors.CompositeValidationError(res...`,
  5810  	},
  5811  		// not expected
  5812  		todo,
  5813  		// output in log
  5814  		noLines,
  5815  		noLines)
  5816  
  5817  	expandRun.AddExpectations("named_array.go", flattenRun.ExpectedFor("NamedArray").ExpectedLines, todo, noLines, noLines)
  5818  
  5819  	// load expectations for model: named_number.go
  5820  	flattenRun.AddExpectations("named_number.go", []string{
  5821  		`type NamedNumber int32`,
  5822  		`func (m NamedNumber) Validate(formats strfmt.Registry) error {`,
  5823  		`	if err := validate.MinimumInt("", "body", int64(m), 0, true); err != nil {`,
  5824  		`	if err := validate.MaximumInt("", "body", int64(m), 500, false); err != nil {`,
  5825  		`	if err := validate.MultipleOf("", "body", float64(m), 1.5); err != nil {`,
  5826  		`		return errors.CompositeValidationError(res...`,
  5827  	},
  5828  		// not expected
  5829  		todo,
  5830  		// output in log
  5831  		noLines,
  5832  		noLines)
  5833  
  5834  	expandRun.AddExpectations("named_number.go", flattenRun.ExpectedFor("NamedNumber").ExpectedLines, todo, noLines, noLines)
  5835  
  5836  	// load expectations for model: nested_map_validations.go
  5837  	flattenRun.AddExpectations("nested_map_validations.go", []string{
  5838  		`type NestedMapValidations struct {`,
  5839  		"	Meta map[string]map[string]map[string]int64 `json:\"meta,omitempty\"`",
  5840  		`func (m *NestedMapValidations) Validate(formats strfmt.Registry) error {`,
  5841  		`	if err := m.validateMeta(formats); err != nil {`,
  5842  		`		return errors.CompositeValidationError(res...`,
  5843  		`func (m *NestedMapValidations) validateMeta(formats strfmt.Registry) error {`,
  5844  		`	if swag.IsZero(m.Meta) {`,
  5845  		`	for k := range m.Meta {`,
  5846  		//`		if swag.IsZero(m.Meta[k]) {`,
  5847  		`		for kk := range m.Meta[k] {`,
  5848  		//`			if swag.IsZero(m.Meta[k][kk]) {`,
  5849  		`			for kkk := range m.Meta[k][kk] {`,
  5850  		//`				if swag.IsZero(m.Meta[k][kk][kkk]) {`,
  5851  		`				if err := validate.MinimumInt("meta"+"."+k+"."+kk+"."+kkk, "body", int64(m.Meta[k][kk][kkk]), 3, false); err != nil {`,
  5852  		`				if err := validate.MaximumInt("meta"+"."+k+"."+kk+"."+kkk, "body", int64(m.Meta[k][kk][kkk]), 6, false); err != nil {`,
  5853  		`				if err := validate.MultipleOf("meta"+"."+k+"."+kk+"."+kkk, "body", float64(m.Meta[k][kk][kkk]), 1); err != nil {`,
  5854  	},
  5855  		// not expected
  5856  		todo,
  5857  		// output in log
  5858  		noLines,
  5859  		noLines)
  5860  
  5861  	expandRun.AddExpectations("nested_map_validations.go", flattenRun.ExpectedFor("NestedMapValidations").ExpectedLines, todo, noLines, noLines)
  5862  
  5863  	// load expectations for model: array_multi_validations_args.go
  5864  	flattenRun.AddExpectations("array_multi_validations_args.go", []string{
  5865  		`type ArrayMultiValidationsArgs struct {`,
  5866  		"	P0 *string `json:\"-\"`",
  5867  		"	P1 *float64 `json:\"-\"`",
  5868  		`func (m *ArrayMultiValidationsArgs) Validate(formats strfmt.Registry) error {`,
  5869  		`	if err := m.validateP0(formats); err != nil {`,
  5870  		`	if err := m.validateP1(formats); err != nil {`,
  5871  		`		return errors.CompositeValidationError(res...`,
  5872  		`func (m *ArrayMultiValidationsArgs) validateP0(formats strfmt.Registry) error {`,
  5873  		`	if err := validate.Required("0", "body", m.P0); err != nil {`,
  5874  		`	if err := validate.MinLength("0", "body", string(*m.P0), 3); err != nil {`,
  5875  		`	if err := validate.MaxLength("0", "body", string(*m.P0), 10); err != nil {`,
  5876  		"	if err := validate.Pattern(\"0\", \"body\", string(*m.P0), `\\w+`); err != nil {",
  5877  		`func (m *ArrayMultiValidationsArgs) validateP1(formats strfmt.Registry) error {`,
  5878  		`	if err := validate.Required("1", "body", m.P1); err != nil {`,
  5879  		`	if err := validate.Minimum("1", "body", float64(*m.P1), 3, false); err != nil {`,
  5880  		`	if err := validate.Maximum("1", "body", float64(*m.P1), 12, false); err != nil {`,
  5881  		`	if err := validate.MultipleOf("1", "body", float64(*m.P1), 1.5); err != nil {`,
  5882  	},
  5883  		// not expected
  5884  		todo,
  5885  		// output in log
  5886  		noLines,
  5887  		noLines)
  5888  
  5889  	// load expectations for model: named_map_complex_additional_properties.go
  5890  	flattenRun.AddExpectations("named_map_complex_additional_properties.go", []string{
  5891  		`type NamedMapComplexAdditionalProperties struct {`,
  5892  		"	Age int32 `json:\"age,omitempty\"`",
  5893  		"	Name string `json:\"name,omitempty\"`",
  5894  		`func (m *NamedMapComplexAdditionalProperties) Validate(formats strfmt.Registry) error {`,
  5895  		`	if err := m.validateAge(formats); err != nil {`,
  5896  		`	if err := m.validateName(formats); err != nil {`,
  5897  		`		return errors.CompositeValidationError(res...`,
  5898  		`func (m *NamedMapComplexAdditionalProperties) validateAge(formats strfmt.Registry) error {`,
  5899  		`	if swag.IsZero(m.Age) {`,
  5900  		`	if err := validate.MinimumInt("age", "body", int64(m.Age), 1, true); err != nil {`,
  5901  		`	if err := validate.MaximumInt("age", "body", int64(m.Age), 200, true); err != nil {`,
  5902  		`	if err := validate.MultipleOf("age", "body", float64(m.Age), 1); err != nil {`,
  5903  		`func (m *NamedMapComplexAdditionalProperties) validateName(formats strfmt.Registry) error {`,
  5904  		`	if swag.IsZero(m.Name) {`,
  5905  		`	if err := validate.MinLength("name", "body", string(m.Name), 10); err != nil {`,
  5906  		`	if err := validate.MaxLength("name", "body", string(m.Name), 50); err != nil {`,
  5907  		"	if err := validate.Pattern(\"name\", \"body\", string(m.Name), `\\w+`); err != nil {",
  5908  	},
  5909  		// not expected
  5910  		todo,
  5911  		// output in log
  5912  		noLines,
  5913  		noLines)
  5914  
  5915  	// load expectations for model: named_nested_map_complex.go
  5916  	flattenRun.AddExpectations("named_nested_map_complex.go", []string{
  5917  		// maps are now simple types
  5918  		//`type NamedNestedMapComplex map[string]NamedNestedMapComplexAdditionalProperties`,
  5919  		`type NamedNestedMapComplex map[string]map[string]map[string]NamedNestedMapComplexAdditionalPropertiesAdditionalPropertiesAdditionalProperties`,
  5920  		`func (m NamedNestedMapComplex) Validate(formats strfmt.Registry) error {`,
  5921  		`	for k := range m {`,
  5922  		//`		if swag.IsZero(m[k]) {`,
  5923  		`		for kk := range m[k] {`,
  5924  		//`			if swag.IsZero(m[k][kk]) {`,
  5925  		`			for kkk := range m[k][kk] {`,
  5926  		`				if err := validate.Required(k+"."+kk+"."+kkk, "body", m[k][kk][kkk]); err != nil {`,
  5927  		`				if val, ok := m[k][kk][kkk]; ok {`,
  5928  		`					if err := val.Validate(formats); err != nil {`,
  5929  		`		return errors.CompositeValidationError(res...`,
  5930  	},
  5931  		// not expected
  5932  		todo,
  5933  		// output in log
  5934  		noLines,
  5935  		noLines)
  5936  
  5937  	expandRun.AddExpectations("named_nested_map_complex.go", []string{
  5938  		`type NamedNestedMapComplex map[string]map[string]map[string]NamedNestedMapComplexAnon`,
  5939  		`func (m NamedNestedMapComplex) Validate(formats strfmt.Registry) error {`,
  5940  		`	for k := range m {`,
  5941  		//`		if swag.IsZero(m[k]) {`,
  5942  		`		for kk := range m[k] {`,
  5943  		//`			if swag.IsZero(m[k][kk]) {`,
  5944  		`			for kkk := range m[k][kk] {`,
  5945  		//`				if swag.IsZero(m[k][kk][kkk]) {`,
  5946  		`				if val, ok := m[k][kk][kkk]; ok {`,
  5947  		`					if err := val.Validate(formats); err != nil {`,
  5948  		`		return errors.CompositeValidationError(res...`,
  5949  		`type NamedNestedMapComplexAnon struct {`,
  5950  		"	Age int32 `json:\"age,omitempty\"`",
  5951  		"	Name string `json:\"name,omitempty\"`",
  5952  		`func (m *NamedNestedMapComplexAnon) Validate(formats strfmt.Registry) error {`,
  5953  		`	if err := m.validateAge(formats); err != nil {`,
  5954  		`	if err := m.validateName(formats); err != nil {`,
  5955  		`		return errors.CompositeValidationError(res...`,
  5956  		`func (m *NamedNestedMapComplexAnon) validateAge(formats strfmt.Registry) error {`,
  5957  		`	if swag.IsZero(m.Age) {`,
  5958  		`	if err := validate.MinimumInt("age", "body", int64(m.Age), 1, true); err != nil {`,
  5959  		`	if err := validate.MaximumInt("age", "body", int64(m.Age), 200, true); err != nil {`,
  5960  		`	if err := validate.MultipleOf("age", "body", float64(m.Age), 1); err != nil {`,
  5961  		`func (m *NamedNestedMapComplexAnon) validateName(formats strfmt.Registry) error {`,
  5962  		`	if swag.IsZero(m.Name) {`,
  5963  		`	if err := validate.MinLength("name", "body", string(m.Name), 10); err != nil {`,
  5964  		`	if err := validate.MaxLength("name", "body", string(m.Name), 50); err != nil {`,
  5965  		"	if err := validate.Pattern(\"name\", \"body\", string(m.Name), `\\w+`); err != nil {",
  5966  	},
  5967  		// not expected
  5968  		todo,
  5969  		// output in log
  5970  		noLines,
  5971  		noLines)
  5972  
  5973  	// load expectations for model: all_of_validations_meta_all_of1.go
  5974  	flattenRun.AddExpectations("all_of_validations_meta_all_of1.go", []string{
  5975  		`type AllOfValidationsMetaAllOf1 struct {`,
  5976  		"	Age int32 `json:\"age,omitempty\"`",
  5977  		`func (m *AllOfValidationsMetaAllOf1) Validate(formats strfmt.Registry) error {`,
  5978  		`	if err := m.validateAge(formats); err != nil {`,
  5979  		`		return errors.CompositeValidationError(res...`,
  5980  		`func (m *AllOfValidationsMetaAllOf1) validateAge(formats strfmt.Registry) error {`,
  5981  		`	if swag.IsZero(m.Age) {`,
  5982  		`	if err := validate.MinimumInt("age", "body", int64(m.Age), 2, false); err != nil {`,
  5983  		`	if err := validate.MaximumInt("age", "body", int64(m.Age), 50, false); err != nil {`,
  5984  		`	if err := validate.MultipleOf("age", "body", float64(m.Age), 1.5); err != nil {`,
  5985  	},
  5986  		// not expected
  5987  		todo,
  5988  		// output in log
  5989  		noLines,
  5990  		noLines)
  5991  
  5992  	// load expectations for model: nested_map_complex_validations_meta_additional_properties_additional_properties.go
  5993  	// NOTE(fredbi): maps are now simple types - this definition is no more generated
  5994  
  5995  	// load expectations for model: tag.go
  5996  	flattenRun.AddExpectations("tag.go", []string{
  5997  		`type Tag struct {`,
  5998  		"	ID int64 `json:\"id,omitempty\"`",
  5999  		"	Name string `json:\"name,omitempty\"`",
  6000  		// empty validation
  6001  		"func (m *Tag) Validate(formats strfmt.Registry) error {\n	return nil\n}",
  6002  	},
  6003  		// not expected
  6004  		todo,
  6005  		// output in log
  6006  		noLines,
  6007  		noLines)
  6008  
  6009  	expandRun.AddExpectations("tag.go", flattenRun.ExpectedFor("Tag").ExpectedLines, todo, noLines, noLines)
  6010  
  6011  	// load expectations for model: nested_object_validations_args.go
  6012  	flattenRun.AddExpectations("nested_object_validations_args.go", []string{
  6013  		`type NestedObjectValidationsArgs struct {`,
  6014  		"	Meta *NestedObjectValidationsArgsMeta `json:\"meta,omitempty\"`",
  6015  		`func (m *NestedObjectValidationsArgs) Validate(formats strfmt.Registry) error {`,
  6016  		`	if err := m.validateMeta(formats); err != nil {`,
  6017  		`		return errors.CompositeValidationError(res...`,
  6018  		`func (m *NestedObjectValidationsArgs) validateMeta(formats strfmt.Registry) error {`,
  6019  		`	if swag.IsZero(m.Meta) {`,
  6020  		`	if m.Meta != nil {`,
  6021  		`		if err := m.Meta.Validate(formats); err != nil {`,
  6022  		`			if ve, ok := err.(*errors.Validation); ok {`,
  6023  		`				return ve.ValidateName("meta"`,
  6024  	},
  6025  		// not expected
  6026  		todo,
  6027  		// output in log
  6028  		noLines,
  6029  		noLines)
  6030  
  6031  	// load expectations for model: named_all_of_all_of6_coords_all_of1.go
  6032  	flattenRun.AddExpectations("named_all_of_all_of6_coords_all_of1.go", []string{
  6033  		`type NamedAllOfAllOf6CoordsAllOf1 struct {`,
  6034  		"	Age int32 `json:\"age,omitempty\"`",
  6035  		`func (m *NamedAllOfAllOf6CoordsAllOf1) Validate(formats strfmt.Registry) error {`,
  6036  		`	if err := m.validateAge(formats); err != nil {`,
  6037  		`		return errors.CompositeValidationError(res...`,
  6038  		`func (m *NamedAllOfAllOf6CoordsAllOf1) validateAge(formats strfmt.Registry) error {`,
  6039  		`	if swag.IsZero(m.Age) {`,
  6040  		`	if err := validate.MinimumInt("age", "body", int64(m.Age), 2, false); err != nil {`,
  6041  		`	if err := validate.MaximumInt("age", "body", int64(m.Age), 50, false); err != nil {`,
  6042  		`	if err := validate.MultipleOf("age", "body", float64(m.Age), 1.5); err != nil {`,
  6043  	},
  6044  		// not expected
  6045  		todo,
  6046  		// output in log
  6047  		noLines,
  6048  		noLines)
  6049  
  6050  	// load expectations for model: named_all_of_all_of6_coords.go
  6051  	flattenRun.AddExpectations("named_all_of_all_of6_coords.go", []string{
  6052  		`type NamedAllOfAllOf6Coords struct {`,
  6053  		`	NamedAllOfAllOf6CoordsAllOf0`,
  6054  		`	NamedAllOfAllOf6CoordsAllOf1`,
  6055  		`func (m *NamedAllOfAllOf6Coords) Validate(formats strfmt.Registry) error {`,
  6056  		`	if err := m.NamedAllOfAllOf6CoordsAllOf0.Validate(formats); err != nil {`,
  6057  		`	if err := m.NamedAllOfAllOf6CoordsAllOf1.Validate(formats); err != nil {`,
  6058  		`		return errors.CompositeValidationError(res...`,
  6059  	},
  6060  		// not expected
  6061  		todo,
  6062  		// output in log
  6063  		noLines,
  6064  		noLines)
  6065  
  6066  	// load expectations for model: array_multi_validations.go
  6067  	flattenRun.AddExpectations("array_multi_validations.go", []string{
  6068  		`type ArrayMultiValidations struct {`,
  6069  		"	Args ArrayMultiValidationsArgs `json:\"args,omitempty\"`",
  6070  		`func (m *ArrayMultiValidations) Validate(formats strfmt.Registry) error {`,
  6071  		`		return errors.CompositeValidationError(res...`,
  6072  	},
  6073  		// not expected
  6074  		todo,
  6075  		// output in log
  6076  		noLines,
  6077  		noLines)
  6078  
  6079  	expandRun.AddExpectations("array_multi_validations.go", []string{
  6080  		`type ArrayMultiValidations struct {`,
  6081  		"	Args *ArrayMultiValidationsArgsTuple0 `json:\"args,omitempty\"`",
  6082  		`func (m *ArrayMultiValidations) Validate(formats strfmt.Registry) error {`,
  6083  		`	if err := m.validateArgs(formats); err != nil {`,
  6084  		`		return errors.CompositeValidationError(res...`,
  6085  		`func (m *ArrayMultiValidations) validateArgs(formats strfmt.Registry) error {`,
  6086  		`	if swag.IsZero(m.Args) {`,
  6087  		`	if m.Args != nil {`,
  6088  		`		if err := m.Args.Validate(formats); err != nil {`,
  6089  		`			if ve, ok := err.(*errors.Validation); ok {`,
  6090  		`				return ve.ValidateName("args"`,
  6091  		`type ArrayMultiValidationsArgsTuple0 struct {`,
  6092  		"	P0 *string `json:\"-\"`",
  6093  		"	P1 *float64 `json:\"-\"`",
  6094  		`func (m *ArrayMultiValidationsArgsTuple0) Validate(formats strfmt.Registry) error {`,
  6095  		`	if err := m.validateP0(formats); err != nil {`,
  6096  		`	if err := m.validateP1(formats); err != nil {`,
  6097  		`		return errors.CompositeValidationError(res...`,
  6098  		`func (m *ArrayMultiValidationsArgsTuple0) validateP0(formats strfmt.Registry) error {`,
  6099  		`	if err := validate.Required("P0", "body", m.P0); err != nil {`,
  6100  		`	if err := validate.MinLength("P0", "body", string(*m.P0), 3); err != nil {`,
  6101  		`	if err := validate.MaxLength("P0", "body", string(*m.P0), 10); err != nil {`,
  6102  		"	if err := validate.Pattern(\"P0\", \"body\", string(*m.P0), `\\w+`); err != nil {",
  6103  		`func (m *ArrayMultiValidationsArgsTuple0) validateP1(formats strfmt.Registry) error {`,
  6104  		`	if err := validate.Required("P1", "body", m.P1); err != nil {`,
  6105  		`	if err := validate.Minimum("P1", "body", float64(*m.P1), 3, false); err != nil {`,
  6106  		`	if err := validate.Maximum("P1", "body", float64(*m.P1), 12, false); err != nil {`,
  6107  		`	if err := validate.MultipleOf("P1", "body", float64(*m.P1), 1.5); err != nil {`,
  6108  	},
  6109  		// not expected
  6110  		todo,
  6111  		// output in log
  6112  		noLines,
  6113  		noLines)
  6114  
  6115  	// load expectations for model: string_validations.go
  6116  	flattenRun.AddExpectations("string_validations.go", []string{
  6117  		`type StringValidations struct {`,
  6118  		"	Name string `json:\"name,omitempty\"`",
  6119  		`func (m *StringValidations) Validate(formats strfmt.Registry) error {`,
  6120  		`	if err := m.validateName(formats); err != nil {`,
  6121  		`		return errors.CompositeValidationError(res...`,
  6122  		`func (m *StringValidations) validateName(formats strfmt.Registry) error {`,
  6123  		`	if swag.IsZero(m.Name) {`,
  6124  		`	if err := validate.MinLength("name", "body", string(m.Name), 2); err != nil {`,
  6125  		`	if err := validate.MaxLength("name", "body", string(m.Name), 50); err != nil {`,
  6126  		"	if err := validate.Pattern(\"name\", \"body\", string(m.Name), `[A-Za-z0-9][\\w- ]+`); err != nil {",
  6127  	},
  6128  		// not expected
  6129  		todo,
  6130  		// output in log
  6131  		noLines,
  6132  		noLines)
  6133  
  6134  	expandRun.AddExpectations("string_validations.go", flattenRun.ExpectedFor("StringValidations").ExpectedLines, todo, noLines, noLines)
  6135  
  6136  	// load expectations for model: required_props.go
  6137  	flattenRun.AddExpectations("required_props.go", []string{
  6138  		`type RequiredProps struct {`,
  6139  		"	Age *int32 `json:\"age\"`",
  6140  		"	CreatedAt *strfmt.DateTime `json:\"createdAt\"`",
  6141  		"	ID *int64 `json:\"id\"`",
  6142  		"	Name *string `json:\"name\"`",
  6143  		"	Score *float32 `json:\"score\"`",
  6144  		"	Tags []string `json:\"tags\"`",
  6145  		`func (m *RequiredProps) Validate(formats strfmt.Registry) error {`,
  6146  		`	if err := m.validateAge(formats); err != nil {`,
  6147  		`	if err := m.validateCreatedAt(formats); err != nil {`,
  6148  		`	if err := m.validateID(formats); err != nil {`,
  6149  		`	if err := m.validateName(formats); err != nil {`,
  6150  		`	if err := m.validateScore(formats); err != nil {`,
  6151  		`	if err := m.validateTags(formats); err != nil {`,
  6152  		`		return errors.CompositeValidationError(res...`,
  6153  		`func (m *RequiredProps) validateAge(formats strfmt.Registry) error {`,
  6154  		`	if err := validate.Required("age", "body", m.Age); err != nil {`,
  6155  		`func (m *RequiredProps) validateCreatedAt(formats strfmt.Registry) error {`,
  6156  		`	if err := validate.Required("createdAt", "body", m.CreatedAt); err != nil {`,
  6157  		`	if err := validate.FormatOf("createdAt", "body", "date-time", m.CreatedAt.String(), formats); err != nil {`,
  6158  		`func (m *RequiredProps) validateID(formats strfmt.Registry) error {`,
  6159  		`	if err := validate.Required("id", "body", m.ID); err != nil {`,
  6160  		`func (m *RequiredProps) validateName(formats strfmt.Registry) error {`,
  6161  		`	if err := validate.Required("name", "body", m.Name); err != nil {`,
  6162  		`func (m *RequiredProps) validateScore(formats strfmt.Registry) error {`,
  6163  		`	if err := validate.Required("score", "body", m.Score); err != nil {`,
  6164  		`func (m *RequiredProps) validateTags(formats strfmt.Registry) error {`,
  6165  		`	if err := validate.Required("tags", "body", m.Tags); err != nil {`,
  6166  	},
  6167  		// not expected
  6168  		todo,
  6169  		// output in log
  6170  		noLines,
  6171  		noLines)
  6172  
  6173  	expandRun.AddExpectations("required_props.go", flattenRun.ExpectedFor("RequiredProps").ExpectedLines, todo, noLines, noLines)
  6174  
  6175  	// load expectations for model: named_all_of_all_of5.go
  6176  	flattenRun.AddExpectations("named_all_of_all_of5.go", []string{
  6177  		`type NamedAllOfAllOf5 struct {`,
  6178  		"	ExtOpts map[string]map[string]map[string]int32 `json:\"extOpts,omitempty\"`",
  6179  		`func (m *NamedAllOfAllOf5) Validate(formats strfmt.Registry) error {`,
  6180  		`	if err := m.validateExtOpts(formats); err != nil {`,
  6181  		`		return errors.CompositeValidationError(res...`,
  6182  		`func (m *NamedAllOfAllOf5) validateExtOpts(formats strfmt.Registry) error {`,
  6183  		`	if swag.IsZero(m.ExtOpts) {`,
  6184  		`	for k := range m.ExtOpts {`,
  6185  		//`		if swag.IsZero(m.ExtOpts[k]) {`,
  6186  		`		for kk := range m.ExtOpts[k] {`,
  6187  		//`			if swag.IsZero(m.ExtOpts[k][kk]) {`,
  6188  		`			for kkk := range m.ExtOpts[k][kk] {`,
  6189  		//`				if swag.IsZero(m.ExtOpts[k][kk][kkk]) {`,
  6190  		`				if err := validate.MinimumInt("extOpts"+"."+k+"."+kk+"."+kkk, "body", int64(m.ExtOpts[k][kk][kkk]), 2, false); err != nil {`,
  6191  		`				if err := validate.MaximumInt("extOpts"+"."+k+"."+kk+"."+kkk, "body", int64(m.ExtOpts[k][kk][kkk]), 50, false); err != nil {`,
  6192  		`				if err := validate.MultipleOf("extOpts"+"."+k+"."+kk+"."+kkk, "body", float64(m.ExtOpts[k][kk][kkk]), 1.5); err != nil {`,
  6193  	},
  6194  		// not expected
  6195  		todo,
  6196  		// output in log
  6197  		noLines,
  6198  		noLines)
  6199  
  6200  	// load expectations for model: named_map.go
  6201  	flattenRun.AddExpectations("named_map.go", []string{
  6202  		`type NamedMap map[string]int64`,
  6203  		`func (m NamedMap) Validate(formats strfmt.Registry) error {`,
  6204  		`	for k := range m {`,
  6205  		//`		if swag.IsZero(m[k]) {`,
  6206  		`		if err := validate.MinimumInt(k, "body", int64(m[k]), 3, false); err != nil {`,
  6207  		`		if err := validate.MaximumInt(k, "body", int64(m[k]), 6, false); err != nil {`,
  6208  		`		if err := validate.MultipleOf(k, "body", float64(m[k]), 1); err != nil {`,
  6209  		`		return errors.CompositeValidationError(res...`,
  6210  	},
  6211  		// not expected
  6212  		todo,
  6213  		// output in log
  6214  		noLines,
  6215  		noLines)
  6216  
  6217  	expandRun.AddExpectations("named_map.go", flattenRun.ExpectedFor("NamedMap").ExpectedLines, todo, noLines, noLines)
  6218  
  6219  	// load expectations for model: named_string.go
  6220  	flattenRun.AddExpectations("named_string.go", []string{
  6221  		`type NamedString string`,
  6222  		`func (m NamedString) Validate(formats strfmt.Registry) error {`,
  6223  		`	if err := validate.MinLength("", "body", string(m), 2); err != nil {`,
  6224  		`	if err := validate.MaxLength("", "body", string(m), 50); err != nil {`,
  6225  		"	if err := validate.Pattern(\"\", \"body\", string(m), `[A-Za-z0-9][\\w- ]+`); err != nil {",
  6226  		`		return errors.CompositeValidationError(res...`,
  6227  	},
  6228  		// not expected
  6229  		todo,
  6230  		// output in log
  6231  		noLines,
  6232  		noLines)
  6233  
  6234  	expandRun.AddExpectations("named_string.go", flattenRun.ExpectedFor("NamedString").ExpectedLines, todo, noLines, noLines)
  6235  
  6236  	// load expectations for model: named_all_of_all_of3.go
  6237  	flattenRun.AddExpectations("named_all_of_all_of3.go", []string{
  6238  		`type NamedAllOfAllOf3 struct {`,
  6239  		"	Assoc [][][]string `json:\"assoc\"`",
  6240  		`func (m *NamedAllOfAllOf3) Validate(formats strfmt.Registry) error {`,
  6241  		`	if err := m.validateAssoc(formats); err != nil {`,
  6242  		`		return errors.CompositeValidationError(res...`,
  6243  		`func (m *NamedAllOfAllOf3) validateAssoc(formats strfmt.Registry) error {`,
  6244  		`	if swag.IsZero(m.Assoc) {`,
  6245  		`	iAssocSize := int64(len(m.Assoc)`,
  6246  		`	if err := validate.MinItems("assoc", "body", iAssocSize, 5); err != nil {`,
  6247  		`	if err := validate.MaxItems("assoc", "body", iAssocSize, 20); err != nil {`,
  6248  		`	for i := 0; i < len(m.Assoc); i++ {`,
  6249  		`		iiAssocSize := int64(len(m.Assoc[i])`,
  6250  		`		if err := validate.MinItems("assoc"+"."+strconv.Itoa(i), "body", iiAssocSize, 5); err != nil {`,
  6251  		`		if err := validate.MaxItems("assoc"+"."+strconv.Itoa(i), "body", iiAssocSize, 20); err != nil {`,
  6252  		`		for ii := 0; ii < len(m.Assoc[i]); ii++ {`,
  6253  		`			iiiAssocSize := int64(len(m.Assoc[i][ii])`,
  6254  		`			if err := validate.MinItems("assoc"+"."+strconv.Itoa(i)+"."+strconv.Itoa(ii), "body", iiiAssocSize, 5); err != nil {`,
  6255  		`			if err := validate.MaxItems("assoc"+"."+strconv.Itoa(i)+"."+strconv.Itoa(ii), "body", iiiAssocSize, 20); err != nil {`,
  6256  		`			for iii := 0; iii < len(m.Assoc[i][ii]); iii++ {`,
  6257  		`				if err := validate.MinLength("assoc"+"."+strconv.Itoa(i)+"."+strconv.Itoa(ii)+"."+strconv.Itoa(iii), "body", string(m.Assoc[i][ii][iii]), 2); err != nil {`,
  6258  		`				if err := validate.MaxLength("assoc"+"."+strconv.Itoa(i)+"."+strconv.Itoa(ii)+"."+strconv.Itoa(iii), "body", string(m.Assoc[i][ii][iii]), 50); err != nil {`,
  6259  		"				if err := validate.Pattern(\"assoc\"+\".\"+strconv.Itoa(i)+\".\"+strconv.Itoa(ii)+\".\"+strconv.Itoa(iii), \"body\", string(m.Assoc[i][ii][iii]), `[A-Za-z0-9][\\w- ]+`); err != nil {",
  6260  	},
  6261  		// not expected
  6262  		todo,
  6263  		// output in log
  6264  		noLines,
  6265  		noLines)
  6266  
  6267  	// load expectations for model: map_complex_validations.go
  6268  	flattenRun.AddExpectations("map_complex_validations.go", []string{
  6269  		`type MapComplexValidations struct {`,
  6270  		// maps are now simple types
  6271  		//"	Meta MapComplexValidationsMeta `json:\"meta,omitempty\"`",
  6272  		"Meta map[string]MapComplexValidationsMetaAdditionalProperties `json:\"meta,omitempty\"`",
  6273  		`func (m *MapComplexValidations) Validate(formats strfmt.Registry) error {`,
  6274  		`	if err := m.validateMeta(formats); err != nil {`,
  6275  		`		return errors.CompositeValidationError(res...`,
  6276  		`func (m *MapComplexValidations) validateMeta(formats strfmt.Registry) error {`,
  6277  		`	if swag.IsZero(m.Meta) {`,
  6278  		//`	if err := m.Meta.Validate(formats); err != nil {`,
  6279  		//`		if ve, ok := err.(*errors.Validation); ok {`,
  6280  		//`			return ve.ValidateName("meta"`,
  6281  		`            		for k := range m.Meta {`,
  6282  		`            			if val, ok := m.Meta[k]; ok {`,
  6283  		`            				if err := val.Validate(formats); err != nil {`,
  6284  	},
  6285  		// not expected
  6286  		todo,
  6287  		// output in log
  6288  		noLines,
  6289  		noLines)
  6290  
  6291  	expandRun.AddExpectations("map_complex_validations.go", []string{
  6292  		`type MapComplexValidations struct {`,
  6293  		"	Meta map[string]MapComplexValidationsMetaAnon `json:\"meta,omitempty\"`",
  6294  		`func (m *MapComplexValidations) Validate(formats strfmt.Registry) error {`,
  6295  		`	if err := m.validateMeta(formats); err != nil {`,
  6296  		`		return errors.CompositeValidationError(res...`,
  6297  		`func (m *MapComplexValidations) validateMeta(formats strfmt.Registry) error {`,
  6298  		`	if swag.IsZero(m.Meta) {`,
  6299  		`	for k := range m.Meta {`,
  6300  		//`		if swag.IsZero(m.Meta[k]) {`,
  6301  		`		if val, ok := m.Meta[k]; ok {`,
  6302  		`			if err := val.Validate(formats); err != nil {`,
  6303  		`type MapComplexValidationsMetaAnon struct {`,
  6304  		"	Age int32 `json:\"age,omitempty\"`",
  6305  		"	Name string `json:\"name,omitempty\"`",
  6306  		`func (m *MapComplexValidationsMetaAnon) Validate(formats strfmt.Registry) error {`,
  6307  		`	if err := m.validateAge(formats); err != nil {`,
  6308  		`	if err := m.validateName(formats); err != nil {`,
  6309  		`		return errors.CompositeValidationError(res...`,
  6310  		`func (m *MapComplexValidationsMetaAnon) validateAge(formats strfmt.Registry) error {`,
  6311  		`	if swag.IsZero(m.Age) {`,
  6312  		`	if err := validate.MinimumInt("age", "body", int64(m.Age), 1, true); err != nil {`,
  6313  		`	if err := validate.MaximumInt("age", "body", int64(m.Age), 200, true); err != nil {`,
  6314  		`	if err := validate.MultipleOf("age", "body", float64(m.Age), 1); err != nil {`,
  6315  		`func (m *MapComplexValidationsMetaAnon) validateName(formats strfmt.Registry) error {`,
  6316  		`	if swag.IsZero(m.Name) {`,
  6317  		`	if err := validate.MinLength("name", "body", string(m.Name), 10); err != nil {`,
  6318  		`	if err := validate.MaxLength("name", "body", string(m.Name), 50); err != nil {`,
  6319  		"	if err := validate.Pattern(\"name\", \"body\", string(m.Name), `\\w+`); err != nil {",
  6320  	},
  6321  		// not expected
  6322  		todo,
  6323  		// output in log
  6324  		noLines,
  6325  		noLines)
  6326  
  6327  	// load expectations for model: named_nested_map_complex_additional_properties_additional_properties_additional_properties.go
  6328  	flattenRun.AddExpectations("named_nested_map_complex_additional_properties_additional_properties_additional_properties.go", []string{
  6329  		`type NamedNestedMapComplexAdditionalPropertiesAdditionalPropertiesAdditionalProperties struct {`,
  6330  		"	Age int32 `json:\"age,omitempty\"`",
  6331  		"	Name string `json:\"name,omitempty\"`",
  6332  		`func (m *NamedNestedMapComplexAdditionalPropertiesAdditionalPropertiesAdditionalProperties) Validate(formats strfmt.Registry) error {`,
  6333  		`	if err := m.validateAge(formats); err != nil {`,
  6334  		`	if err := m.validateName(formats); err != nil {`,
  6335  		`		return errors.CompositeValidationError(res...`,
  6336  		`func (m *NamedNestedMapComplexAdditionalPropertiesAdditionalPropertiesAdditionalProperties) validateAge(formats strfmt.Registry) error {`,
  6337  		`	if swag.IsZero(m.Age) {`,
  6338  		`	if err := validate.MinimumInt("age", "body", int64(m.Age), 1, true); err != nil {`,
  6339  		`	if err := validate.MaximumInt("age", "body", int64(m.Age), 200, true); err != nil {`,
  6340  		`	if err := validate.MultipleOf("age", "body", float64(m.Age), 1); err != nil {`,
  6341  		`func (m *NamedNestedMapComplexAdditionalPropertiesAdditionalPropertiesAdditionalProperties) validateName(formats strfmt.Registry) error {`,
  6342  		`	if swag.IsZero(m.Name) {`,
  6343  		`	if err := validate.MinLength("name", "body", string(m.Name), 10); err != nil {`,
  6344  		`	if err := validate.MaxLength("name", "body", string(m.Name), 50); err != nil {`,
  6345  		"	if err := validate.Pattern(\"name\", \"body\", string(m.Name), `\\w+`); err != nil {",
  6346  	},
  6347  		// not expected
  6348  		todo,
  6349  		// output in log
  6350  		noLines,
  6351  		noLines)
  6352  
  6353  	// load expectations for model: all_of_validations_meta_all_of6_coords.go
  6354  	flattenRun.AddExpectations("all_of_validations_meta_all_of6_coords.go", []string{
  6355  		`type AllOfValidationsMetaAllOf6Coords struct {`,
  6356  		`	AllOfValidationsMetaAllOf6CoordsAllOf0`,
  6357  		`	AllOfValidationsMetaAllOf6CoordsAllOf1`,
  6358  		`func (m *AllOfValidationsMetaAllOf6Coords) Validate(formats strfmt.Registry) error {`,
  6359  		`	if err := m.AllOfValidationsMetaAllOf6CoordsAllOf0.Validate(formats); err != nil {`,
  6360  		`	if err := m.AllOfValidationsMetaAllOf6CoordsAllOf1.Validate(formats); err != nil {`,
  6361  		`		return errors.CompositeValidationError(res...`,
  6362  	},
  6363  		// not expected
  6364  		todo,
  6365  		// output in log
  6366  		noLines,
  6367  		noLines)
  6368  
  6369  	// load expectations for model: array_validations.go
  6370  	flattenRun.AddExpectations("array_validations.go", []string{
  6371  		`type ArrayValidations struct {`,
  6372  		"	Tags []string `json:\"tags\"`",
  6373  		`func (m *ArrayValidations) Validate(formats strfmt.Registry) error {`,
  6374  		`	if err := m.validateTags(formats); err != nil {`,
  6375  		`		return errors.CompositeValidationError(res...`,
  6376  		`func (m *ArrayValidations) validateTags(formats strfmt.Registry) error {`,
  6377  		`	if swag.IsZero(m.Tags) {`,
  6378  		`	iTagsSize := int64(len(m.Tags)`,
  6379  		`	if err := validate.MinItems("tags", "body", iTagsSize, 3); err != nil {`,
  6380  		`	if err := validate.MaxItems("tags", "body", iTagsSize, 10); err != nil {`,
  6381  		`	for i := 0; i < len(m.Tags); i++ {`,
  6382  		`		if err := validate.MinLength("tags"+"."+strconv.Itoa(i), "body", string(m.Tags[i]), 3); err != nil {`,
  6383  		`		if err := validate.MaxLength("tags"+"."+strconv.Itoa(i), "body", string(m.Tags[i]), 10); err != nil {`,
  6384  		"		if err := validate.Pattern(\"tags\"+\".\"+strconv.Itoa(i), \"body\", string(m.Tags[i]), `\\w+`); err != nil {",
  6385  	},
  6386  		// not expected
  6387  		todo,
  6388  		// output in log
  6389  		noLines,
  6390  		noLines)
  6391  
  6392  	expandRun.AddExpectations("array_validations.go", flattenRun.ExpectedFor("ArrayValidations").ExpectedLines, todo, noLines, noLines)
  6393  
  6394  	// load expectations for model: all_of_validations_meta.go
  6395  	flattenRun.AddExpectations("all_of_validations_meta.go", []string{
  6396  		`type AllOfValidationsMeta struct {`,
  6397  		`	AllOfValidationsMetaAllOf0`,
  6398  		`	AllOfValidationsMetaAllOf1`,
  6399  		`	AllOfValidationsMetaAllOf2`,
  6400  		`	AllOfValidationsMetaAllOf3`,
  6401  		`	AllOfValidationsMetaAllOf4`,
  6402  		`	AllOfValidationsMetaAllOf5`,
  6403  		`	AllOfValidationsMetaAllOf6`,
  6404  		`func (m *AllOfValidationsMeta) Validate(formats strfmt.Registry) error {`,
  6405  		`	if err := m.AllOfValidationsMetaAllOf0.Validate(formats); err != nil {`,
  6406  		`	if err := m.AllOfValidationsMetaAllOf1.Validate(formats); err != nil {`,
  6407  		`	if err := m.AllOfValidationsMetaAllOf2.Validate(formats); err != nil {`,
  6408  		`	if err := m.AllOfValidationsMetaAllOf3.Validate(formats); err != nil {`,
  6409  		`	if err := m.AllOfValidationsMetaAllOf4.Validate(formats); err != nil {`,
  6410  		`	if err := m.AllOfValidationsMetaAllOf5.Validate(formats); err != nil {`,
  6411  		`	if err := m.AllOfValidationsMetaAllOf6.Validate(formats); err != nil {`,
  6412  		`		return errors.CompositeValidationError(res...`,
  6413  	},
  6414  		// not expected
  6415  		todo,
  6416  		// output in log
  6417  		noLines,
  6418  		noLines)
  6419  
  6420  	// load expectations for model: map_complex_validations_meta_additional_properties.go
  6421  	flattenRun.AddExpectations("map_complex_validations_meta_additional_properties.go", []string{
  6422  		`type MapComplexValidationsMetaAdditionalProperties struct {`,
  6423  		"	Age int32 `json:\"age,omitempty\"`",
  6424  		"	Name string `json:\"name,omitempty\"`",
  6425  		`func (m *MapComplexValidationsMetaAdditionalProperties) Validate(formats strfmt.Registry) error {`,
  6426  		`	if err := m.validateAge(formats); err != nil {`,
  6427  		`	if err := m.validateName(formats); err != nil {`,
  6428  		`		return errors.CompositeValidationError(res...`,
  6429  		`func (m *MapComplexValidationsMetaAdditionalProperties) validateAge(formats strfmt.Registry) error {`,
  6430  		`	if swag.IsZero(m.Age) {`,
  6431  		`	if err := validate.MinimumInt("age", "body", int64(m.Age), 1, true); err != nil {`,
  6432  		`	if err := validate.MaximumInt("age", "body", int64(m.Age), 200, true); err != nil {`,
  6433  		`	if err := validate.MultipleOf("age", "body", float64(m.Age), 1); err != nil {`,
  6434  		`func (m *MapComplexValidationsMetaAdditionalProperties) validateName(formats strfmt.Registry) error {`,
  6435  		`	if swag.IsZero(m.Name) {`,
  6436  		`	if err := validate.MinLength("name", "body", string(m.Name), 10); err != nil {`,
  6437  		`	if err := validate.MaxLength("name", "body", string(m.Name), 50); err != nil {`,
  6438  		"	if err := validate.Pattern(\"name\", \"body\", string(m.Name), `\\w+`); err != nil {",
  6439  	},
  6440  		// not expected
  6441  		todo,
  6442  		// output in log
  6443  		noLines,
  6444  		noLines)
  6445  
  6446  	// load expectations for model: nested_map_complex_validations_meta_additional_properties.go
  6447  	// NOTE(fredbi): maps are simple types and this definition is no more generated
  6448  
  6449  	// load expectations for model: all_of_validations_meta_all_of6_coords_all_of1.go
  6450  	flattenRun.AddExpectations("all_of_validations_meta_all_of6_coords_all_of1.go", []string{
  6451  		`type AllOfValidationsMetaAllOf6CoordsAllOf1 struct {`,
  6452  		"	Age int32 `json:\"age,omitempty\"`",
  6453  		`func (m *AllOfValidationsMetaAllOf6CoordsAllOf1) Validate(formats strfmt.Registry) error {`,
  6454  		`	if err := m.validateAge(formats); err != nil {`,
  6455  		`		return errors.CompositeValidationError(res...`,
  6456  		`func (m *AllOfValidationsMetaAllOf6CoordsAllOf1) validateAge(formats strfmt.Registry) error {`,
  6457  		`	if swag.IsZero(m.Age) {`,
  6458  		`	if err := validate.MinimumInt("age", "body", int64(m.Age), 2, false); err != nil {`,
  6459  		`	if err := validate.MaximumInt("age", "body", int64(m.Age), 50, false); err != nil {`,
  6460  		`	if err := validate.MultipleOf("age", "body", float64(m.Age), 1.5); err != nil {`,
  6461  	},
  6462  		// not expected
  6463  		todo,
  6464  		// output in log
  6465  		noLines,
  6466  		noLines)
  6467  
  6468  	// load expectations for model: all_of_validations_meta_all_of3.go
  6469  	flattenRun.AddExpectations("all_of_validations_meta_all_of3.go", []string{
  6470  		`type AllOfValidationsMetaAllOf3 struct {`,
  6471  		"	Assoc [][][]string `json:\"assoc\"`",
  6472  		`func (m *AllOfValidationsMetaAllOf3) Validate(formats strfmt.Registry) error {`,
  6473  		`	if err := m.validateAssoc(formats); err != nil {`,
  6474  		`		return errors.CompositeValidationError(res...`,
  6475  		`func (m *AllOfValidationsMetaAllOf3) validateAssoc(formats strfmt.Registry) error {`,
  6476  		`	if swag.IsZero(m.Assoc) {`,
  6477  		`	iAssocSize := int64(len(m.Assoc)`,
  6478  		`	if err := validate.MinItems("assoc", "body", iAssocSize, 5); err != nil {`,
  6479  		`	if err := validate.MaxItems("assoc", "body", iAssocSize, 20); err != nil {`,
  6480  		`	for i := 0; i < len(m.Assoc); i++ {`,
  6481  		`		iiAssocSize := int64(len(m.Assoc[i])`,
  6482  		`		if err := validate.MinItems("assoc"+"."+strconv.Itoa(i), "body", iiAssocSize, 5); err != nil {`,
  6483  		`		if err := validate.MaxItems("assoc"+"."+strconv.Itoa(i), "body", iiAssocSize, 20); err != nil {`,
  6484  		`		for ii := 0; ii < len(m.Assoc[i]); ii++ {`,
  6485  		`			iiiAssocSize := int64(len(m.Assoc[i][ii])`,
  6486  		`			if err := validate.MinItems("assoc"+"."+strconv.Itoa(i)+"."+strconv.Itoa(ii), "body", iiiAssocSize, 5); err != nil {`,
  6487  		`			if err := validate.MaxItems("assoc"+"."+strconv.Itoa(i)+"."+strconv.Itoa(ii), "body", iiiAssocSize, 20); err != nil {`,
  6488  		`			for iii := 0; iii < len(m.Assoc[i][ii]); iii++ {`,
  6489  		`				if err := validate.MinLength("assoc"+"."+strconv.Itoa(i)+"."+strconv.Itoa(ii)+"."+strconv.Itoa(iii), "body", string(m.Assoc[i][ii][iii]), 2); err != nil {`,
  6490  		`				if err := validate.MaxLength("assoc"+"."+strconv.Itoa(i)+"."+strconv.Itoa(ii)+"."+strconv.Itoa(iii), "body", string(m.Assoc[i][ii][iii]), 50); err != nil {`,
  6491  		"				if err := validate.Pattern(\"assoc\"+\".\"+strconv.Itoa(i)+\".\"+strconv.Itoa(ii)+\".\"+strconv.Itoa(iii), \"body\", string(m.Assoc[i][ii][iii]), `[A-Za-z0-9][\\w- ]+`); err != nil {",
  6492  	},
  6493  		// not expected
  6494  		todo,
  6495  		// output in log
  6496  		noLines,
  6497  		noLines)
  6498  
  6499  	// load expectations for model: nested_object_validations.go
  6500  	flattenRun.AddExpectations("nested_object_validations.go", []string{
  6501  		`type NestedObjectValidations struct {`,
  6502  		"	Args *NestedObjectValidationsArgs `json:\"args,omitempty\"`",
  6503  		`func (m *NestedObjectValidations) Validate(formats strfmt.Registry) error {`,
  6504  		`	if err := m.validateArgs(formats); err != nil {`,
  6505  		`		return errors.CompositeValidationError(res...`,
  6506  		`func (m *NestedObjectValidations) validateArgs(formats strfmt.Registry) error {`,
  6507  		`	if swag.IsZero(m.Args) {`,
  6508  		`	if m.Args != nil {`,
  6509  		`		if err := m.Args.Validate(formats); err != nil {`,
  6510  		`			if ve, ok := err.(*errors.Validation); ok {`,
  6511  		`				return ve.ValidateName("args"`,
  6512  	},
  6513  		// not expected
  6514  		todo,
  6515  		// output in log
  6516  		noLines,
  6517  		noLines)
  6518  
  6519  	expandRun.AddExpectations("nested_object_validations.go", []string{
  6520  		`type NestedObjectValidations struct {`,
  6521  		"	Args *NestedObjectValidationsArgs `json:\"args,omitempty\"`",
  6522  		`func (m *NestedObjectValidations) Validate(formats strfmt.Registry) error {`,
  6523  		`	if err := m.validateArgs(formats); err != nil {`,
  6524  		`		return errors.CompositeValidationError(res...`,
  6525  		`func (m *NestedObjectValidations) validateArgs(formats strfmt.Registry) error {`,
  6526  		`	if swag.IsZero(m.Args) {`,
  6527  		`	if m.Args != nil {`,
  6528  		`		if err := m.Args.Validate(formats); err != nil {`,
  6529  		`			if ve, ok := err.(*errors.Validation); ok {`,
  6530  		`				return ve.ValidateName("args"`,
  6531  		`type NestedObjectValidationsArgs struct {`,
  6532  		"	Meta *NestedObjectValidationsArgsMeta `json:\"meta,omitempty\"`",
  6533  		`func (m *NestedObjectValidationsArgs) Validate(formats strfmt.Registry) error {`,
  6534  		`	if err := m.validateMeta(formats); err != nil {`,
  6535  		`		return errors.CompositeValidationError(res...`,
  6536  		`func (m *NestedObjectValidationsArgs) validateMeta(formats strfmt.Registry) error {`,
  6537  		`	if swag.IsZero(m.Meta) {`,
  6538  		`	if m.Meta != nil {`,
  6539  		`		if err := m.Meta.Validate(formats); err != nil {`,
  6540  		`			if ve, ok := err.(*errors.Validation); ok {`,
  6541  		`				return ve.ValidateName("args" + "." + "meta"`,
  6542  		`type NestedObjectValidationsArgsMeta struct {`,
  6543  		"	First string `json:\"first,omitempty\"`",
  6544  		"	Fourth [][][]float32 `json:\"fourth\"`",
  6545  		"	Second float64 `json:\"second,omitempty\"`",
  6546  		"	Third []float32 `json:\"third\"`",
  6547  		`func (m *NestedObjectValidationsArgsMeta) Validate(formats strfmt.Registry) error {`,
  6548  		`	if err := m.validateFirst(formats); err != nil {`,
  6549  		`	if err := m.validateFourth(formats); err != nil {`,
  6550  		`	if err := m.validateSecond(formats); err != nil {`,
  6551  		`	if err := m.validateThird(formats); err != nil {`,
  6552  		`		return errors.CompositeValidationError(res...`,
  6553  		`func (m *NestedObjectValidationsArgsMeta) validateFirst(formats strfmt.Registry) error {`,
  6554  		`	if swag.IsZero(m.First) {`,
  6555  		`	if err := validate.MinLength("args"+"."+"meta"+"."+"first", "body", string(m.First), 2); err != nil {`,
  6556  		`	if err := validate.MaxLength("args"+"."+"meta"+"."+"first", "body", string(m.First), 50); err != nil {`,
  6557  		"	if err := validate.Pattern(\"args\"+\".\"+\"meta\"+\".\"+\"first\", \"body\", string(m.First), `^\\w+`); err != nil {",
  6558  		`func (m *NestedObjectValidationsArgsMeta) validateFourth(formats strfmt.Registry) error {`,
  6559  		`	if swag.IsZero(m.Fourth) {`,
  6560  		`	iFourthSize := int64(len(m.Fourth)`,
  6561  		`	if err := validate.MinItems("args"+"."+"meta"+"."+"fourth", "body", iFourthSize, 5); err != nil {`,
  6562  		`	if err := validate.MaxItems("args"+"."+"meta"+"."+"fourth", "body", iFourthSize, 93); err != nil {`,
  6563  		`	for i := 0; i < len(m.Fourth); i++ {`,
  6564  		`		iiFourthSize := int64(len(m.Fourth[i])`,
  6565  		`		if err := validate.MinItems("args"+"."+"meta"+"."+"fourth"+"."+strconv.Itoa(i), "body", iiFourthSize, 5); err != nil {`,
  6566  		`		if err := validate.MaxItems("args"+"."+"meta"+"."+"fourth"+"."+strconv.Itoa(i), "body", iiFourthSize, 93); err != nil {`,
  6567  		`		for ii := 0; ii < len(m.Fourth[i]); ii++ {`,
  6568  		`			iiiFourthSize := int64(len(m.Fourth[i][ii])`,
  6569  		`			if err := validate.MinItems("args"+"."+"meta"+"."+"fourth"+"."+strconv.Itoa(i)+"."+strconv.Itoa(ii), "body", iiiFourthSize, 5); err != nil {`,
  6570  		`			if err := validate.MaxItems("args"+"."+"meta"+"."+"fourth"+"."+strconv.Itoa(i)+"."+strconv.Itoa(ii), "body", iiiFourthSize, 93); err != nil {`,
  6571  		`			for iii := 0; iii < len(m.Fourth[i][ii]); iii++ {`,
  6572  		`				if err := validate.Minimum("args"+"."+"meta"+"."+"fourth"+"."+strconv.Itoa(i)+"."+strconv.Itoa(ii)+"."+strconv.Itoa(iii), "body", float64(m.Fourth[i][ii][iii]), 3, false); err != nil {`,
  6573  		`				if err := validate.Maximum("args"+"."+"meta"+"."+"fourth"+"."+strconv.Itoa(i)+"."+strconv.Itoa(ii)+"."+strconv.Itoa(iii), "body", float64(m.Fourth[i][ii][iii]), 6, false); err != nil {`,
  6574  		`				if err := validate.MultipleOf("args"+"."+"meta"+"."+"fourth"+"."+strconv.Itoa(i)+"."+strconv.Itoa(ii)+"."+strconv.Itoa(iii), "body", float64(m.Fourth[i][ii][iii]), 0.5); err != nil {`,
  6575  		`func (m *NestedObjectValidationsArgsMeta) validateSecond(formats strfmt.Registry) error {`,
  6576  		`	if swag.IsZero(m.Second) {`,
  6577  		`	if err := validate.Minimum("args"+"."+"meta"+"."+"second", "body", float64(m.Second), 3, false); err != nil {`,
  6578  		`	if err := validate.Maximum("args"+"."+"meta"+"."+"second", "body", float64(m.Second), 51, false); err != nil {`,
  6579  		`	if err := validate.MultipleOf("args"+"."+"meta"+"."+"second", "body", float64(m.Second), 1.5); err != nil {`,
  6580  		`func (m *NestedObjectValidationsArgsMeta) validateThird(formats strfmt.Registry) error {`,
  6581  		`	if swag.IsZero(m.Third) {`,
  6582  		`	iThirdSize := int64(len(m.Third)`,
  6583  		`	if err := validate.MinItems("args"+"."+"meta"+"."+"third", "body", iThirdSize, 5); err != nil {`,
  6584  		`	if err := validate.MaxItems("args"+"."+"meta"+"."+"third", "body", iThirdSize, 93); err != nil {`,
  6585  		`	for i := 0; i < len(m.Third); i++ {`,
  6586  		`		if err := validate.Minimum("args"+"."+"meta"+"."+"third"+"."+strconv.Itoa(i), "body", float64(m.Third[i]), 3, false); err != nil {`,
  6587  		`		if err := validate.Maximum("args"+"."+"meta"+"."+"third"+"."+strconv.Itoa(i), "body", float64(m.Third[i]), 6, false); err != nil {`,
  6588  		`		if err := validate.MultipleOf("args"+"."+"meta"+"."+"third"+"."+strconv.Itoa(i), "body", float64(m.Third[i]), 0.5); err != nil {`,
  6589  	},
  6590  		// not expected
  6591  		todo,
  6592  		// output in log
  6593  		noLines,
  6594  		noLines)
  6595  
  6596  	// load expectations for model: named_array_additional.go
  6597  	flattenRun.AddExpectations("named_array_additional.go", []string{
  6598  		`type NamedArrayAdditional struct {`,
  6599  		"	P0 *string `json:\"-\"`",
  6600  		"	P1 *float64 `json:\"-\"`",
  6601  		"	NamedArrayAdditionalItems []int64 `json:\"-\"`",
  6602  		`func (m *NamedArrayAdditional) Validate(formats strfmt.Registry) error {`,
  6603  		`	if err := m.validateP0(formats); err != nil {`,
  6604  		`	if err := m.validateP1(formats); err != nil {`,
  6605  		`	if err := m.validateNamedArrayAdditionalItems(formats); err != nil {`,
  6606  		`		return errors.CompositeValidationError(res...`,
  6607  		`func (m *NamedArrayAdditional) validateP0(formats strfmt.Registry) error {`,
  6608  		`	if err := validate.Required("0", "body", m.P0); err != nil {`,
  6609  		`	if err := validate.MinLength("0", "body", string(*m.P0), 3); err != nil {`,
  6610  		`	if err := validate.MaxLength("0", "body", string(*m.P0), 10); err != nil {`,
  6611  		"	if err := validate.Pattern(\"0\", \"body\", string(*m.P0), `\\w+`); err != nil {",
  6612  		`func (m *NamedArrayAdditional) validateP1(formats strfmt.Registry) error {`,
  6613  		`	if err := validate.Required("1", "body", m.P1); err != nil {`,
  6614  		`	if err := validate.Minimum("1", "body", float64(*m.P1), 3, false); err != nil {`,
  6615  		`	if err := validate.Maximum("1", "body", float64(*m.P1), 12, false); err != nil {`,
  6616  		`	if err := validate.MultipleOf("1", "body", float64(*m.P1), 1.5); err != nil {`,
  6617  		`func (m *NamedArrayAdditional) validateNamedArrayAdditionalItems(formats strfmt.Registry) error {`,
  6618  		`	for i := range m.NamedArrayAdditionalItems {`,
  6619  		`		if err := validate.MinimumInt(strconv.Itoa(i+2), "body", int64(m.NamedArrayAdditionalItems[i]), 3, false); err != nil {`,
  6620  		`		if err := validate.MaximumInt(strconv.Itoa(i+2), "body", int64(m.NamedArrayAdditionalItems[i]), 6, false); err != nil {`,
  6621  		`		if err := validate.MultipleOf(strconv.Itoa(i+2), "body", float64(m.NamedArrayAdditionalItems[i]), 1); err != nil {`,
  6622  	},
  6623  		// not expected
  6624  		todo,
  6625  		// output in log
  6626  		noLines,
  6627  		noLines)
  6628  
  6629  	expandRun.AddExpectations("named_array_additional.go", flattenRun.ExpectedFor("NamedArrayAdditional").ExpectedLines, todo, noLines, noLines)
  6630  
  6631  	// load expectations for model: pet.go
  6632  	flattenRun.AddExpectations("pet.go", []string{
  6633  		`type Pet struct {`,
  6634  		"	Category *Category `json:\"category,omitempty\"`",
  6635  		"	ID int64 `json:\"id,omitempty\"`",
  6636  		"	Name *string `json:\"name\"`",
  6637  		"	PhotoUrls []string `json:\"photoUrls\" xml:\"photoUrl\"`",
  6638  		"	Status string `json:\"status,omitempty\"`",
  6639  		"	Tags []*Tag `json:\"tags\" xml:\"tag\"`",
  6640  		`func (m *Pet) Validate(formats strfmt.Registry) error {`,
  6641  		`	if err := m.validateCategory(formats); err != nil {`,
  6642  		`	if err := m.validateName(formats); err != nil {`,
  6643  		`	if err := m.validatePhotoUrls(formats); err != nil {`,
  6644  		`	if err := m.validateStatus(formats); err != nil {`,
  6645  		`	if err := m.validateTags(formats); err != nil {`,
  6646  		`		return errors.CompositeValidationError(res...`,
  6647  		`func (m *Pet) validateCategory(formats strfmt.Registry) error {`,
  6648  		`	if swag.IsZero(m.Category) {`,
  6649  		`	if m.Category != nil {`,
  6650  		`		if err := m.Category.Validate(formats); err != nil {`,
  6651  		`			if ve, ok := err.(*errors.Validation); ok {`,
  6652  		`				return ve.ValidateName("category"`,
  6653  		`func (m *Pet) validateName(formats strfmt.Registry) error {`,
  6654  		`	if err := validate.Required("name", "body", m.Name); err != nil {`,
  6655  		`func (m *Pet) validatePhotoUrls(formats strfmt.Registry) error {`,
  6656  		`	if err := validate.Required("photoUrls", "body", m.PhotoUrls); err != nil {`,
  6657  		`var petTypeStatusPropEnum []interface{`,
  6658  		`	var res []string`,
  6659  		"	if err := json.Unmarshal([]byte(`[\"available\",\"pending\",\"sold\"]`), &res); err != nil {",
  6660  		`	for _, v := range res {`,
  6661  		`		petTypeStatusPropEnum = append(petTypeStatusPropEnum, v`,
  6662  		`	PetStatusAvailable string = "available"`,
  6663  		`	PetStatusPending string = "pending"`,
  6664  		`	PetStatusSold string = "sold"`,
  6665  		`func (m *Pet) validateStatusEnum(path, location string, value string) error {`,
  6666  		`	if err := validate.Enum(path, location, value, petTypeStatusPropEnum); err != nil {`,
  6667  		`func (m *Pet) validateStatus(formats strfmt.Registry) error {`,
  6668  		`	if swag.IsZero(m.Status) {`,
  6669  		`	if err := m.validateStatusEnum("status", "body", m.Status); err != nil {`,
  6670  		`func (m *Pet) validateTags(formats strfmt.Registry) error {`,
  6671  		`	if swag.IsZero(m.Tags) {`,
  6672  		`	for i := 0; i < len(m.Tags); i++ {`,
  6673  		// do we need Required when item is nullable?
  6674  		// nullable not required:
  6675  		`		if swag.IsZero(m.Tags[i]) {`,
  6676  		// nullable required:
  6677  		//`if err := validate.Required("tags"+"."+strconv.Itoa(i), "body", m.Tags[i]); err != nil {`,
  6678  		`		if m.Tags[i] != nil {`,
  6679  		`			if err := m.Tags[i].Validate(formats); err != nil {`,
  6680  		`				if ve, ok := err.(*errors.Validation); ok {`,
  6681  		`					return ve.ValidateName("tags" + "." + strconv.Itoa(i)`,
  6682  	},
  6683  		// not expected
  6684  		todo,
  6685  		// output in log
  6686  		noLines,
  6687  		noLines)
  6688  
  6689  	expandRun.AddExpectations("pet.go", []string{
  6690  		`type Pet struct {`,
  6691  		"	Category *PetCategory `json:\"category,omitempty\"`",
  6692  		"	ID int64 `json:\"id,omitempty\"`",
  6693  		"	Name *string `json:\"name\"`",
  6694  		"	PhotoUrls []string `json:\"photoUrls\" xml:\"photoUrl\"`",
  6695  		"	Status string `json:\"status,omitempty\"`",
  6696  		"	Tags []*PetTagsItems0 `json:\"tags\" xml:\"tag\"`",
  6697  		`func (m *Pet) Validate(formats strfmt.Registry) error {`,
  6698  		`	if err := m.validateCategory(formats); err != nil {`,
  6699  		`	if err := m.validateName(formats); err != nil {`,
  6700  		`	if err := m.validatePhotoUrls(formats); err != nil {`,
  6701  		`	if err := m.validateStatus(formats); err != nil {`,
  6702  		`	if err := m.validateTags(formats); err != nil {`,
  6703  		`		return errors.CompositeValidationError(res...`,
  6704  		`func (m *Pet) validateCategory(formats strfmt.Registry) error {`,
  6705  		`	if swag.IsZero(m.Category) {`,
  6706  		`	if m.Category != nil {`,
  6707  		`		if err := m.Category.Validate(formats); err != nil {`,
  6708  		`			if ve, ok := err.(*errors.Validation); ok {`,
  6709  		`				return ve.ValidateName("category"`,
  6710  		`func (m *Pet) validateName(formats strfmt.Registry) error {`,
  6711  		`	if err := validate.Required("name", "body", m.Name); err != nil {`,
  6712  		`func (m *Pet) validatePhotoUrls(formats strfmt.Registry) error {`,
  6713  		`	if err := validate.Required("photoUrls", "body", m.PhotoUrls); err != nil {`,
  6714  		`var petTypeStatusPropEnum []interface{`,
  6715  		`	var res []string`,
  6716  		"	if err := json.Unmarshal([]byte(`[\"available\",\"pending\",\"sold\"]`), &res); err != nil {",
  6717  		`	for _, v := range res {`,
  6718  		`		petTypeStatusPropEnum = append(petTypeStatusPropEnum, v`,
  6719  		`	PetStatusAvailable string = "available"`,
  6720  		`	PetStatusPending string = "pending"`,
  6721  		`	PetStatusSold string = "sold"`,
  6722  		`func (m *Pet) validateStatusEnum(path, location string, value string) error {`,
  6723  		`	if err := validate.Enum(path, location, value, petTypeStatusPropEnum); err != nil {`,
  6724  		`func (m *Pet) validateStatus(formats strfmt.Registry) error {`,
  6725  		`	if swag.IsZero(m.Status) {`,
  6726  		`	if err := m.validateStatusEnum("status", "body", m.Status); err != nil {`,
  6727  		`func (m *Pet) validateTags(formats strfmt.Registry) error {`,
  6728  		`	if swag.IsZero(m.Tags) {`,
  6729  		`	for i := 0; i < len(m.Tags); i++ {`,
  6730  		// do we need Required when item is nullable?
  6731  		// nullable not required:
  6732  		`		if swag.IsZero(m.Tags[i]) {`,
  6733  		// nullable required:
  6734  		//`		if err := validate.Required("tags"+"."+strconv.Itoa(i), "body", m.Tags[i]); err != nil {`,
  6735  		`		if m.Tags[i] != nil {`,
  6736  		`			if err := m.Tags[i].Validate(formats); err != nil {`,
  6737  		`				if ve, ok := err.(*errors.Validation); ok {`,
  6738  		`					return ve.ValidateName("tags" + "." + strconv.Itoa(i)`,
  6739  		`type PetCategory struct {`,
  6740  		"	ID int64 `json:\"id,omitempty\"`",
  6741  		"	Name string `json:\"name,omitempty\"`",
  6742  		// empty validation
  6743  		"func (m *PetCategory) Validate(formats strfmt.Registry) error {\n	return nil\n}",
  6744  		`type PetTagsItems0 struct {`,
  6745  		"	ID int64 `json:\"id,omitempty\"`",
  6746  		"	Name string `json:\"name,omitempty\"`",
  6747  		// empty validation
  6748  		"func (m *PetTagsItems0) Validate(formats strfmt.Registry) error {\n	return nil\n}",
  6749  	},
  6750  		// not expected
  6751  		todo,
  6752  		// output in log
  6753  		noLines,
  6754  		noLines)
  6755  
  6756  	// load expectations for model: map_complex_validations_meta.go
  6757  	// NOTE(fredbi): maps are simple types and this definition is no more generated
  6758  
  6759  	// load expectations for model: array_additional_validations_args.go
  6760  	flattenRun.AddExpectations("array_additional_validations_args.go", []string{
  6761  		`type ArrayAdditionalValidationsArgs struct {`,
  6762  		"	P0 *string `json:\"-\"`",
  6763  		"	P1 *float64 `json:\"-\"`",
  6764  		"	ArrayAdditionalValidationsArgsItems []int64 `json:\"-\"`",
  6765  		`func (m *ArrayAdditionalValidationsArgs) Validate(formats strfmt.Registry) error {`,
  6766  		`	if err := m.validateP0(formats); err != nil {`,
  6767  		`	if err := m.validateP1(formats); err != nil {`,
  6768  		`	if err := m.validateArrayAdditionalValidationsArgsItems(formats); err != nil {`,
  6769  		`		return errors.CompositeValidationError(res...`,
  6770  		`func (m *ArrayAdditionalValidationsArgs) validateP0(formats strfmt.Registry) error {`,
  6771  		`	if err := validate.Required("0", "body", m.P0); err != nil {`,
  6772  		`	if err := validate.MinLength("0", "body", string(*m.P0), 3); err != nil {`,
  6773  		`	if err := validate.MaxLength("0", "body", string(*m.P0), 10); err != nil {`,
  6774  		"	if err := validate.Pattern(\"0\", \"body\", string(*m.P0), `\\w+`); err != nil {",
  6775  		`func (m *ArrayAdditionalValidationsArgs) validateP1(formats strfmt.Registry) error {`,
  6776  		`	if err := validate.Required("1", "body", m.P1); err != nil {`,
  6777  		`	if err := validate.Minimum("1", "body", float64(*m.P1), 3, false); err != nil {`,
  6778  		`	if err := validate.Maximum("1", "body", float64(*m.P1), 12, false); err != nil {`,
  6779  		`	if err := validate.MultipleOf("1", "body", float64(*m.P1), 1.5); err != nil {`,
  6780  		`func (m *ArrayAdditionalValidationsArgs) validateArrayAdditionalValidationsArgsItems(formats strfmt.Registry) error {`,
  6781  		`	for i := range m.ArrayAdditionalValidationsArgsItems {`,
  6782  		`		if err := validate.MinimumInt(strconv.Itoa(i+2), "body", int64(m.ArrayAdditionalValidationsArgsItems[i]), 3, false); err != nil {`,
  6783  		`		if err := validate.MaximumInt(strconv.Itoa(i+2), "body", int64(m.ArrayAdditionalValidationsArgsItems[i]), 6, false); err != nil {`,
  6784  		`		if err := validate.MultipleOf(strconv.Itoa(i+2), "body", float64(m.ArrayAdditionalValidationsArgsItems[i]), 1); err != nil {`,
  6785  	},
  6786  		// not expected
  6787  		todo,
  6788  		// output in log
  6789  		noLines,
  6790  		noLines)
  6791  
  6792  	// load expectations for model: all_of_validations_meta_all_of2.go
  6793  	flattenRun.AddExpectations("all_of_validations_meta_all_of2.go", []string{
  6794  		`type AllOfValidationsMetaAllOf2 struct {`,
  6795  		"	Args []string `json:\"args\"`",
  6796  		`func (m *AllOfValidationsMetaAllOf2) Validate(formats strfmt.Registry) error {`,
  6797  		`	if err := m.validateArgs(formats); err != nil {`,
  6798  		`		return errors.CompositeValidationError(res...`,
  6799  		`func (m *AllOfValidationsMetaAllOf2) validateArgs(formats strfmt.Registry) error {`,
  6800  		`	if swag.IsZero(m.Args) {`,
  6801  		`	iArgsSize := int64(len(m.Args)`,
  6802  		`	if err := validate.MinItems("args", "body", iArgsSize, 5); err != nil {`,
  6803  		`	if err := validate.MaxItems("args", "body", iArgsSize, 20); err != nil {`,
  6804  		`	for i := 0; i < len(m.Args); i++ {`,
  6805  		`		if err := validate.MinLength("args"+"."+strconv.Itoa(i), "body", string(m.Args[i]), 2); err != nil {`,
  6806  		`		if err := validate.MaxLength("args"+"."+strconv.Itoa(i), "body", string(m.Args[i]), 50); err != nil {`,
  6807  		"		if err := validate.Pattern(\"args\"+\".\"+strconv.Itoa(i), \"body\", string(m.Args[i]), `[A-Za-z0-9][\\w- ]+`); err != nil {",
  6808  	},
  6809  		// not expected
  6810  		todo,
  6811  		// output in log
  6812  		noLines,
  6813  		noLines)
  6814  
  6815  	// load expectations for model: all_of_validations_meta_all_of0.go
  6816  	flattenRun.AddExpectations("all_of_validations_meta_all_of0.go", []string{
  6817  		`type AllOfValidationsMetaAllOf0 struct {`,
  6818  		"	Name string `json:\"name,omitempty\"`",
  6819  		`func (m *AllOfValidationsMetaAllOf0) Validate(formats strfmt.Registry) error {`,
  6820  		`	if err := m.validateName(formats); err != nil {`,
  6821  		`		return errors.CompositeValidationError(res...`,
  6822  		`func (m *AllOfValidationsMetaAllOf0) validateName(formats strfmt.Registry) error {`,
  6823  		`	if swag.IsZero(m.Name) {`,
  6824  		`	if err := validate.MinLength("name", "body", string(m.Name), 2); err != nil {`,
  6825  		`	if err := validate.MaxLength("name", "body", string(m.Name), 50); err != nil {`,
  6826  		"	if err := validate.Pattern(\"name\", \"body\", string(m.Name), `[A-Za-z0-9][\\w- ]+`); err != nil {",
  6827  	},
  6828  		// not expected
  6829  		todo,
  6830  		// output in log
  6831  		noLines,
  6832  		noLines)
  6833  
  6834  	// load expectations for model: named_all_of_all_of4.go
  6835  	flattenRun.AddExpectations("named_all_of_all_of4.go", []string{
  6836  		`type NamedAllOfAllOf4 struct {`,
  6837  		"	Opts map[string]float64 `json:\"opts,omitempty\"`",
  6838  		`func (m *NamedAllOfAllOf4) Validate(formats strfmt.Registry) error {`,
  6839  		`	if err := m.validateOpts(formats); err != nil {`,
  6840  		`		return errors.CompositeValidationError(res...`,
  6841  		`func (m *NamedAllOfAllOf4) validateOpts(formats strfmt.Registry) error {`,
  6842  		`	if swag.IsZero(m.Opts) {`,
  6843  		`	for k := range m.Opts {`,
  6844  		//`		if swag.IsZero(m.Opts[k]) {`,
  6845  		`		if err := validate.Minimum("opts"+"."+k, "body", float64(m.Opts[k]), 2, false); err != nil {`,
  6846  		`		if err := validate.Maximum("opts"+"."+k, "body", float64(m.Opts[k]), 50, false); err != nil {`,
  6847  		`		if err := validate.MultipleOf("opts"+"."+k, "body", float64(m.Opts[k]), 1.5); err != nil {`,
  6848  	},
  6849  		// not expected
  6850  		todo,
  6851  		// output in log
  6852  		noLines,
  6853  		noLines)
  6854  
  6855  	// load expectations for model: named_all_of_all_of0.go
  6856  	flattenRun.AddExpectations("named_all_of_all_of0.go", []string{
  6857  		`type NamedAllOfAllOf0 struct {`,
  6858  		"	Name string `json:\"name,omitempty\"`",
  6859  		`func (m *NamedAllOfAllOf0) Validate(formats strfmt.Registry) error {`,
  6860  		`	if err := m.validateName(formats); err != nil {`,
  6861  		`		return errors.CompositeValidationError(res...`,
  6862  		`func (m *NamedAllOfAllOf0) validateName(formats strfmt.Registry) error {`,
  6863  		`	if swag.IsZero(m.Name) {`,
  6864  		`	if err := validate.MinLength("name", "body", string(m.Name), 2); err != nil {`,
  6865  		`	if err := validate.MaxLength("name", "body", string(m.Name), 50); err != nil {`,
  6866  		"	if err := validate.Pattern(\"name\", \"body\", string(m.Name), `[A-Za-z0-9][\\w- ]+`); err != nil {",
  6867  	},
  6868  		// not expected
  6869  		todo,
  6870  		// output in log
  6871  		noLines,
  6872  		noLines)
  6873  
  6874  	// load expectations for model: nested_map_complex_validations_meta_additional_properties_additional_properties_additional_properties.go
  6875  	flattenRun.AddExpectations("nested_map_complex_validations_meta_additional_properties_additional_properties_additional_properties.go", []string{
  6876  		`type NestedMapComplexValidationsMetaAdditionalPropertiesAdditionalPropertiesAdditionalProperties struct {`,
  6877  		"	Age int32 `json:\"age,omitempty\"`",
  6878  		"	Name string `json:\"name,omitempty\"`",
  6879  		`func (m *NestedMapComplexValidationsMetaAdditionalPropertiesAdditionalPropertiesAdditionalProperties) Validate(formats strfmt.Registry) error {`,
  6880  		`	if err := m.validateAge(formats); err != nil {`,
  6881  		`	if err := m.validateName(formats); err != nil {`,
  6882  		`		return errors.CompositeValidationError(res...`,
  6883  		`func (m *NestedMapComplexValidationsMetaAdditionalPropertiesAdditionalPropertiesAdditionalProperties) validateAge(formats strfmt.Registry) error {`,
  6884  		`	if swag.IsZero(m.Age) {`,
  6885  		`	if err := validate.MinimumInt("age", "body", int64(m.Age), 1, true); err != nil {`,
  6886  		`	if err := validate.MaximumInt("age", "body", int64(m.Age), 200, true); err != nil {`,
  6887  		`	if err := validate.MultipleOf("age", "body", float64(m.Age), 1); err != nil {`,
  6888  		`func (m *NestedMapComplexValidationsMetaAdditionalPropertiesAdditionalPropertiesAdditionalProperties) validateName(formats strfmt.Registry) error {`,
  6889  		`	if swag.IsZero(m.Name) {`,
  6890  		`	if err := validate.MinLength("name", "body", string(m.Name), 10); err != nil {`,
  6891  		`	if err := validate.MaxLength("name", "body", string(m.Name), 50); err != nil {`,
  6892  		"	if err := validate.Pattern(\"name\", \"body\", string(m.Name), `\\w+`); err != nil {",
  6893  	},
  6894  		// not expected
  6895  		todo,
  6896  		// output in log
  6897  		noLines,
  6898  		noLines)
  6899  
  6900  	// load expectations for model: refed_all_of_validations.go
  6901  	flattenRun.AddExpectations("refed_all_of_validations.go", []string{
  6902  		`type RefedAllOfValidations struct {`,
  6903  		`	NamedString`,
  6904  		`	NamedNumber`,
  6905  		`func (m *RefedAllOfValidations) Validate(formats strfmt.Registry) error {`,
  6906  		`	if err := m.NamedString.Validate(formats); err != nil {`,
  6907  		`	if err := m.NamedNumber.Validate(formats); err != nil {`,
  6908  		`		return errors.CompositeValidationError(res...`,
  6909  	},
  6910  		// not expected
  6911  		todo,
  6912  		// output in log
  6913  		noLines,
  6914  		noLines)
  6915  
  6916  	expandRun.AddExpectations("refed_all_of_validations.go", []string{
  6917  		`type RefedAllOfValidations struct {`,
  6918  		`	RefedAllOfValidationsAllOf0`,
  6919  		`	RefedAllOfValidationsAllOf1`,
  6920  		`func (m *RefedAllOfValidations) Validate(formats strfmt.Registry) error {`,
  6921  		`	if err := m.RefedAllOfValidationsAllOf0.Validate(formats); err != nil {`,
  6922  		`	if err := m.RefedAllOfValidationsAllOf1.Validate(formats); err != nil {`,
  6923  		`		return errors.CompositeValidationError(res...`,
  6924  		`type RefedAllOfValidationsAllOf0 string`,
  6925  		`func (m RefedAllOfValidationsAllOf0) Validate(formats strfmt.Registry) error {`,
  6926  		`	if err := validate.MinLength("", "body", string(m), 2); err != nil {`,
  6927  		`	if err := validate.MaxLength("", "body", string(m), 50); err != nil {`,
  6928  		"	if err := validate.Pattern(\"\", \"body\", string(m), `[A-Za-z0-9][\\w- ]+`); err != nil {",
  6929  		`		return errors.CompositeValidationError(res...`,
  6930  		`type RefedAllOfValidationsAllOf1 int32`,
  6931  		`func (m RefedAllOfValidationsAllOf1) Validate(formats strfmt.Registry) error {`,
  6932  		`	if err := validate.MinimumInt("", "body", int64(m), 0, true); err != nil {`,
  6933  		`	if err := validate.MaximumInt("", "body", int64(m), 500, false); err != nil {`,
  6934  		`	if err := validate.MultipleOf("", "body", float64(m), 1.5); err != nil {`,
  6935  		`		return errors.CompositeValidationError(res...`,
  6936  	},
  6937  		// not expected
  6938  		todo,
  6939  		// output in log
  6940  		noLines,
  6941  		noLines)
  6942  
  6943  	// load expectations for model: update_org.go
  6944  	flattenRun.AddExpectations("update_org.go", []string{
  6945  		`type UpdateOrg struct {`,
  6946  		"	Email string `json:\"email,omitempty\"`",
  6947  		"	InvoiceEmail bool `json:\"invoice_email,omitempty\"`",
  6948  		"	TagExpiration *int64 `json:\"tag_expiration,omitempty\"`",
  6949  		`func (m *UpdateOrg) Validate(formats strfmt.Registry) error {`,
  6950  		`	if err := m.validateTagExpiration(formats); err != nil {`,
  6951  		`		return errors.CompositeValidationError(res...`,
  6952  		`func (m *UpdateOrg) validateTagExpiration(formats strfmt.Registry) error {`,
  6953  		`	if swag.IsZero(m.TagExpiration) {`,
  6954  		`	if err := validate.MinimumInt("tag_expiration", "body", int64(*m.TagExpiration), 0, false); err != nil {`,
  6955  		`	if err := validate.MaximumInt("tag_expiration", "body", int64(*m.TagExpiration), 2.592e+06, false); err != nil {`,
  6956  	},
  6957  		// not expected
  6958  		todo,
  6959  		// output in log
  6960  		noLines,
  6961  		noLines)
  6962  
  6963  	expandRun.AddExpectations("update_org.go", flattenRun.ExpectedFor("UpdateOrg").ExpectedLines, todo, noLines, noLines)
  6964  
  6965  	// load expectations for model: number_validations.go
  6966  	flattenRun.AddExpectations("number_validations.go", []string{
  6967  		`type NumberValidations struct {`,
  6968  		"	Age int32 `json:\"age,omitempty\"`",
  6969  		`func (m *NumberValidations) Validate(formats strfmt.Registry) error {`,
  6970  		`	if err := m.validateAge(formats); err != nil {`,
  6971  		`		return errors.CompositeValidationError(res...`,
  6972  		`func (m *NumberValidations) validateAge(formats strfmt.Registry) error {`,
  6973  		`	if swag.IsZero(m.Age) {`,
  6974  		`	if err := validate.MinimumInt("age", "body", int64(m.Age), 0, true); err != nil {`,
  6975  		`	if err := validate.MaximumInt("age", "body", int64(m.Age), 500, false); err != nil {`,
  6976  		`	if err := validate.MultipleOf("age", "body", float64(m.Age), 1.5); err != nil {`,
  6977  	},
  6978  		// not expected
  6979  		todo,
  6980  		// output in log
  6981  		noLines,
  6982  		noLines)
  6983  
  6984  	expandRun.AddExpectations("number_validations.go", flattenRun.ExpectedFor("NumberValidations").ExpectedLines, todo, noLines, noLines)
  6985  
  6986  	// load expectations for model: nested_map_complex_validations.go
  6987  	flattenRun.AddExpectations("nested_map_complex_validations.go", []string{
  6988  		`type NestedMapComplexValidations struct {`,
  6989  		// maps are now simple types
  6990  		//"	Meta NestedMapComplexValidationsMeta `json:\"meta,omitempty\"`",
  6991  		"	Meta map[string]map[string]map[string]NestedMapComplexValidationsMetaAdditionalPropertiesAdditionalPropertiesAdditionalProperties `json:\"meta,omitempty\"`",
  6992  		`func (m *NestedMapComplexValidations) Validate(formats strfmt.Registry) error {`,
  6993  		`	if err := m.validateMeta(formats); err != nil {`,
  6994  		`		return errors.CompositeValidationError(res...`,
  6995  		`func (m *NestedMapComplexValidations) validateMeta(formats strfmt.Registry) error {`,
  6996  		`	if swag.IsZero(m.Meta) {`,
  6997  		//`	if err := m.Meta.Validate(formats); err != nil {`,
  6998  		`            		for k := range m.Meta {`,
  6999  		//`            			if swag.IsZero(m.Meta[k]) { // not required`,
  7000  		`            			for kk := range m.Meta[k] {`,
  7001  		//`            				if swag.IsZero(m.Meta[k][kk]) { // not required`,
  7002  		`            				for kkk := range m.Meta[k][kk] {`,
  7003  		`	            				if err := validate.Required("meta"+"."+k+"."+kk+"."+kkk, "body", m.Meta[k][kk][kkk]); err != nil {`,
  7004  		`            					if val, ok := m.Meta[k][kk][kkk]; ok {`,
  7005  		`            						if err := val.Validate(formats); err != nil {`,
  7006  	},
  7007  		// not expected
  7008  		todo,
  7009  		// output in log
  7010  		noLines,
  7011  		noLines)
  7012  
  7013  	expandRun.AddExpectations("nested_map_complex_validations.go", []string{
  7014  		`type NestedMapComplexValidations struct {`,
  7015  		"	Meta map[string]map[string]map[string]NestedMapComplexValidationsMetaAnon `json:\"meta,omitempty\"`",
  7016  		`func (m *NestedMapComplexValidations) Validate(formats strfmt.Registry) error {`,
  7017  		`	if err := m.validateMeta(formats); err != nil {`,
  7018  		`		return errors.CompositeValidationError(res...`,
  7019  		`func (m *NestedMapComplexValidations) validateMeta(formats strfmt.Registry) error {`,
  7020  		`	if swag.IsZero(m.Meta) {`,
  7021  		`	for k := range m.Meta {`,
  7022  		//`		if swag.IsZero(m.Meta[k]) {`,
  7023  		`		for kk := range m.Meta[k] {`,
  7024  		//`			if swag.IsZero(m.Meta[k][kk]) {`,
  7025  		`			for kkk := range m.Meta[k][kk] {`,
  7026  		//`				if swag.IsZero(m.Meta[k][kk][kkk]) {`,
  7027  		`				if val, ok := m.Meta[k][kk][kkk]; ok {`,
  7028  		`					if err := val.Validate(formats); err != nil {`,
  7029  		`type NestedMapComplexValidationsMetaAnon struct {`,
  7030  		"	Age int32 `json:\"age,omitempty\"`",
  7031  		"	Name string `json:\"name,omitempty\"`",
  7032  		`func (m *NestedMapComplexValidationsMetaAnon) Validate(formats strfmt.Registry) error {`,
  7033  		`	if err := m.validateAge(formats); err != nil {`,
  7034  		`	if err := m.validateName(formats); err != nil {`,
  7035  		`		return errors.CompositeValidationError(res...`,
  7036  		`func (m *NestedMapComplexValidationsMetaAnon) validateAge(formats strfmt.Registry) error {`,
  7037  		`	if swag.IsZero(m.Age) {`,
  7038  		`	if err := validate.MinimumInt("age", "body", int64(m.Age), 1, true); err != nil {`,
  7039  		`	if err := validate.MaximumInt("age", "body", int64(m.Age), 200, true); err != nil {`,
  7040  		`	if err := validate.MultipleOf("age", "body", float64(m.Age), 1); err != nil {`,
  7041  		`func (m *NestedMapComplexValidationsMetaAnon) validateName(formats strfmt.Registry) error {`,
  7042  		`	if swag.IsZero(m.Name) {`,
  7043  		`	if err := validate.MinLength("name", "body", string(m.Name), 10); err != nil {`,
  7044  		`	if err := validate.MaxLength("name", "body", string(m.Name), 50); err != nil {`,
  7045  		"	if err := validate.Pattern(\"name\", \"body\", string(m.Name), `\\w+`); err != nil {",
  7046  	},
  7047  		// not expected
  7048  		todo,
  7049  		// output in log
  7050  		noLines,
  7051  		noLines)
  7052  
  7053  	// load expectations for model: category.go
  7054  	flattenRun.AddExpectations("category.go", []string{
  7055  		`type Category struct {`,
  7056  		"	ID int64 `json:\"id,omitempty\"`",
  7057  		"	Name string `json:\"name,omitempty\"`",
  7058  		// empty validation
  7059  		"func (m *Category) Validate(formats strfmt.Registry) error {\n	return nil\n}",
  7060  	},
  7061  		// not expected
  7062  		todo,
  7063  		// output in log
  7064  		noLines,
  7065  		noLines)
  7066  
  7067  	expandRun.AddExpectations("category.go", flattenRun.ExpectedFor("Category").ExpectedLines, todo, noLines, noLines)
  7068  
  7069  	// load expectations for model: named_all_of_all_of2.go
  7070  	flattenRun.AddExpectations("named_all_of_all_of2.go", []string{
  7071  		`type NamedAllOfAllOf2 struct {`,
  7072  		"	Args []string `json:\"args\"`",
  7073  		`func (m *NamedAllOfAllOf2) Validate(formats strfmt.Registry) error {`,
  7074  		`	if err := m.validateArgs(formats); err != nil {`,
  7075  		`		return errors.CompositeValidationError(res...`,
  7076  		`func (m *NamedAllOfAllOf2) validateArgs(formats strfmt.Registry) error {`,
  7077  		`	if swag.IsZero(m.Args) {`,
  7078  		`	iArgsSize := int64(len(m.Args)`,
  7079  		`	if err := validate.MinItems("args", "body", iArgsSize, 5); err != nil {`,
  7080  		`	if err := validate.MaxItems("args", "body", iArgsSize, 20); err != nil {`,
  7081  		`	for i := 0; i < len(m.Args); i++ {`,
  7082  		`		if err := validate.MinLength("args"+"."+strconv.Itoa(i), "body", string(m.Args[i]), 2); err != nil {`,
  7083  		`		if err := validate.MaxLength("args"+"."+strconv.Itoa(i), "body", string(m.Args[i]), 50); err != nil {`,
  7084  		"		if err := validate.Pattern(\"args\"+\".\"+strconv.Itoa(i), \"body\", string(m.Args[i]), `[A-Za-z0-9][\\w- ]+`); err != nil {",
  7085  	},
  7086  		// not expected
  7087  		todo,
  7088  		// output in log
  7089  		noLines,
  7090  		noLines)
  7091  
  7092  	// load expectations for model: named_nested_map_complex_additional_properties_additional_properties.go
  7093  	// NOTE(fredbi): maps are now simple types - this definition is no more generated
  7094  
  7095  	// load expectations for model: named_nested_map_complex_additional_properties.go
  7096  	// NOTE(fredbi): maps are now simple types - this definition is no more generated
  7097  
  7098  	// load expectations for model: named_nested_array.go
  7099  	flattenRun.AddExpectations("named_nested_array.go", []string{
  7100  		`type NamedNestedArray [][][]string`,
  7101  		`func (m NamedNestedArray) Validate(formats strfmt.Registry) error {`,
  7102  		`	iNamedNestedArraySize := int64(len(m)`,
  7103  		`	if err := validate.MinItems("", "body", iNamedNestedArraySize, 3); err != nil {`,
  7104  		`	if err := validate.MaxItems("", "body", iNamedNestedArraySize, 10); err != nil {`,
  7105  		`	for i := 0; i < len(m); i++ {`,
  7106  		`		iiNamedNestedArraySize := int64(len(m[i])`,
  7107  		`		if err := validate.MinItems(strconv.Itoa(i), "body", iiNamedNestedArraySize, 3); err != nil {`,
  7108  		`		if err := validate.MaxItems(strconv.Itoa(i), "body", iiNamedNestedArraySize, 10); err != nil {`,
  7109  		`		for ii := 0; ii < len(m[i]); ii++ {`,
  7110  		`			iiiNamedNestedArraySize := int64(len(m[i][ii])`,
  7111  		`			if err := validate.MinItems(strconv.Itoa(i)+"."+strconv.Itoa(ii), "body", iiiNamedNestedArraySize, 3); err != nil {`,
  7112  		`			if err := validate.MaxItems(strconv.Itoa(i)+"."+strconv.Itoa(ii), "body", iiiNamedNestedArraySize, 10); err != nil {`,
  7113  		`			for iii := 0; iii < len(m[i][ii]); iii++ {`,
  7114  		`				if err := validate.MinLength(strconv.Itoa(i)+"."+strconv.Itoa(ii)+"."+strconv.Itoa(iii), "body", string(m[i][ii][iii]), 3); err != nil {`,
  7115  		`				if err := validate.MaxLength(strconv.Itoa(i)+"."+strconv.Itoa(ii)+"."+strconv.Itoa(iii), "body", string(m[i][ii][iii]), 10); err != nil {`,
  7116  		"				if err := validate.Pattern(strconv.Itoa(i)+\".\"+strconv.Itoa(ii)+\".\"+strconv.Itoa(iii), \"body\", string(m[i][ii][iii]), `\\w+`); err != nil {",
  7117  		`		return errors.CompositeValidationError(res...`,
  7118  	},
  7119  		// not expected
  7120  		todo,
  7121  		// output in log
  7122  		noLines,
  7123  		noLines)
  7124  
  7125  	expandRun.AddExpectations("named_nested_array.go", flattenRun.ExpectedFor("NamedNestedArray").ExpectedLines, todo, noLines, noLines)
  7126  
  7127  	// load expectations for model: named_all_of.go
  7128  	flattenRun.AddExpectations("named_all_of.go", []string{
  7129  		`type NamedAllOf struct {`,
  7130  		`	NamedAllOfAllOf0`,
  7131  		`	NamedAllOfAllOf1`,
  7132  		`	NamedAllOfAllOf2`,
  7133  		`	NamedAllOfAllOf3`,
  7134  		`	NamedAllOfAllOf4`,
  7135  		`	NamedAllOfAllOf5`,
  7136  		`	NamedAllOfAllOf6`,
  7137  		`func (m *NamedAllOf) Validate(formats strfmt.Registry) error {`,
  7138  		`	if err := m.NamedAllOfAllOf0.Validate(formats); err != nil {`,
  7139  		`	if err := m.NamedAllOfAllOf1.Validate(formats); err != nil {`,
  7140  		`	if err := m.NamedAllOfAllOf2.Validate(formats); err != nil {`,
  7141  		`	if err := m.NamedAllOfAllOf3.Validate(formats); err != nil {`,
  7142  		`	if err := m.NamedAllOfAllOf4.Validate(formats); err != nil {`,
  7143  		`	if err := m.NamedAllOfAllOf5.Validate(formats); err != nil {`,
  7144  		`	if err := m.NamedAllOfAllOf6.Validate(formats); err != nil {`,
  7145  		`		return errors.CompositeValidationError(res...`,
  7146  	},
  7147  		// not expected
  7148  		todo,
  7149  		// output in log
  7150  		noLines,
  7151  		noLines)
  7152  
  7153  	expandRun.AddExpectations("named_all_of.go", []string{
  7154  		`type NamedAllOf struct {`,
  7155  		"	Name string `json:\"name,omitempty\"`",
  7156  		"	Age int32 `json:\"age,omitempty\"`",
  7157  		"	Args []string `json:\"args\"`",
  7158  		"	Assoc [][][]string `json:\"assoc\"`",
  7159  		"	Opts map[string]float64 `json:\"opts,omitempty\"`",
  7160  		"	ExtOpts map[string]map[string]map[string]int32 `json:\"extOpts,omitempty\"`",
  7161  		`	Coords struct {`,
  7162  		"		Name string `json:\"name,omitempty\"`",
  7163  		"		Age int32 `json:\"age,omitempty\"`",
  7164  		"	} `json:\"coords,omitempty\"`",
  7165  		`func (m *NamedAllOf) Validate(formats strfmt.Registry) error {`,
  7166  		`	if err := m.validateName(formats); err != nil {`,
  7167  		`	if err := m.validateAge(formats); err != nil {`,
  7168  		`	if err := m.validateArgs(formats); err != nil {`,
  7169  		`	if err := m.validateAssoc(formats); err != nil {`,
  7170  		`	if err := m.validateOpts(formats); err != nil {`,
  7171  		`	if err := m.validateExtOpts(formats); err != nil {`,
  7172  		`	if err := m.validateCoords(formats); err != nil {`,
  7173  		`		return errors.CompositeValidationError(res...`,
  7174  		`func (m *NamedAllOf) validateName(formats strfmt.Registry) error {`,
  7175  		`	if swag.IsZero(m.Name) {`,
  7176  		`	if err := validate.MinLength("name", "body", string(m.Name), 2); err != nil {`,
  7177  		`	if err := validate.MaxLength("name", "body", string(m.Name), 50); err != nil {`,
  7178  		"	if err := validate.Pattern(\"name\", \"body\", string(m.Name), `[A-Za-z0-9][\\w- ]+`); err != nil {",
  7179  		`func (m *NamedAllOf) validateAge(formats strfmt.Registry) error {`,
  7180  		`	if swag.IsZero(m.Age) {`,
  7181  		`	if err := validate.MinimumInt("age", "body", int64(m.Age), 2, false); err != nil {`,
  7182  		`	if err := validate.MaximumInt("age", "body", int64(m.Age), 50, false); err != nil {`,
  7183  		`	if err := validate.MultipleOf("age", "body", float64(m.Age), 1.5); err != nil {`,
  7184  		`func (m *NamedAllOf) validateArgs(formats strfmt.Registry) error {`,
  7185  		`	if swag.IsZero(m.Args) {`,
  7186  		`	iArgsSize := int64(len(m.Args)`,
  7187  		`	if err := validate.MinItems("args", "body", iArgsSize, 5); err != nil {`,
  7188  		`	if err := validate.MaxItems("args", "body", iArgsSize, 20); err != nil {`,
  7189  		`	for i := 0; i < len(m.Args); i++ {`,
  7190  		`		if err := validate.MinLength("args"+"."+strconv.Itoa(i), "body", string(m.Args[i]), 2); err != nil {`,
  7191  		`		if err := validate.MaxLength("args"+"."+strconv.Itoa(i), "body", string(m.Args[i]), 50); err != nil {`,
  7192  		"		if err := validate.Pattern(\"args\"+\".\"+strconv.Itoa(i), \"body\", string(m.Args[i]), `[A-Za-z0-9][\\w- ]+`); err != nil {",
  7193  		`func (m *NamedAllOf) validateAssoc(formats strfmt.Registry) error {`,
  7194  		`	if swag.IsZero(m.Assoc) {`,
  7195  		`	iAssocSize := int64(len(m.Assoc)`,
  7196  		`	if err := validate.MinItems("assoc", "body", iAssocSize, 5); err != nil {`,
  7197  		`	if err := validate.MaxItems("assoc", "body", iAssocSize, 20); err != nil {`,
  7198  		`	for i := 0; i < len(m.Assoc); i++ {`,
  7199  		`		iiAssocSize := int64(len(m.Assoc[i])`,
  7200  		`		if err := validate.MinItems("assoc"+"."+strconv.Itoa(i), "body", iiAssocSize, 5); err != nil {`,
  7201  		`		if err := validate.MaxItems("assoc"+"."+strconv.Itoa(i), "body", iiAssocSize, 20); err != nil {`,
  7202  		`		for ii := 0; ii < len(m.Assoc[i]); ii++ {`,
  7203  		`			iiiAssocSize := int64(len(m.Assoc[i][ii])`,
  7204  		`			if err := validate.MinItems("assoc"+"."+strconv.Itoa(i)+"."+strconv.Itoa(ii), "body", iiiAssocSize, 5); err != nil {`,
  7205  		`			if err := validate.MaxItems("assoc"+"."+strconv.Itoa(i)+"."+strconv.Itoa(ii), "body", iiiAssocSize, 20); err != nil {`,
  7206  		`			for iii := 0; iii < len(m.Assoc[i][ii]); iii++ {`,
  7207  		`				if err := validate.MinLength("assoc"+"."+strconv.Itoa(i)+"."+strconv.Itoa(ii)+"."+strconv.Itoa(iii), "body", string(m.Assoc[i][ii][iii]), 2); err != nil {`,
  7208  		`				if err := validate.MaxLength("assoc"+"."+strconv.Itoa(i)+"."+strconv.Itoa(ii)+"."+strconv.Itoa(iii), "body", string(m.Assoc[i][ii][iii]), 50); err != nil {`,
  7209  		"				if err := validate.Pattern(\"assoc\"+\".\"+strconv.Itoa(i)+\".\"+strconv.Itoa(ii)+\".\"+strconv.Itoa(iii), \"body\", string(m.Assoc[i][ii][iii]), `[A-Za-z0-9][\\w- ]+`); err != nil {",
  7210  		`func (m *NamedAllOf) validateOpts(formats strfmt.Registry) error {`,
  7211  		`	if swag.IsZero(m.Opts) {`,
  7212  		`	for k := range m.Opts {`,
  7213  		//`		if swag.IsZero(m.Opts[k]) {`,
  7214  		`		if err := validate.Minimum("opts"+"."+k, "body", float64(m.Opts[k]), 2, false); err != nil {`,
  7215  		`		if err := validate.Maximum("opts"+"."+k, "body", float64(m.Opts[k]), 50, false); err != nil {`,
  7216  		`		if err := validate.MultipleOf("opts"+"."+k, "body", float64(m.Opts[k]), 1.5); err != nil {`,
  7217  		`func (m *NamedAllOf) validateExtOpts(formats strfmt.Registry) error {`,
  7218  		`	if swag.IsZero(m.ExtOpts) {`,
  7219  		`	for k := range m.ExtOpts {`,
  7220  		//`		if swag.IsZero(m.ExtOpts[k]) {`,
  7221  		`		for kk := range m.ExtOpts[k] {`,
  7222  		//`			if swag.IsZero(m.ExtOpts[k][kk]) {`,
  7223  		`			for kkk := range m.ExtOpts[k][kk] {`,
  7224  		//`				if swag.IsZero(m.ExtOpts[k][kk][kkk]) {`,
  7225  		`				if err := validate.MinimumInt("extOpts"+"."+k+"."+kk+"."+kkk, "body", int64(m.ExtOpts[k][kk][kkk]), 2, false); err != nil {`,
  7226  		`				if err := validate.MaximumInt("extOpts"+"."+k+"."+kk+"."+kkk, "body", int64(m.ExtOpts[k][kk][kkk]), 50, false); err != nil {`,
  7227  		`				if err := validate.MultipleOf("extOpts"+"."+k+"."+kk+"."+kkk, "body", float64(m.ExtOpts[k][kk][kkk]), 1.5); err != nil {`,
  7228  		`func (m *NamedAllOf) validateCoords(formats strfmt.Registry) error {`,
  7229  		`	if swag.IsZero(m.Coords) {`,
  7230  		`	if err := validate.MinLength("coords"+"."+"name", "body", string(m.Coords.Name), 2); err != nil {`,
  7231  		`	if err := validate.MaxLength("coords"+"."+"name", "body", string(m.Coords.Name), 50); err != nil {`,
  7232  		"	if err := validate.Pattern(\"coords\"+\".\"+\"name\", \"body\", string(m.Coords.Name), `[A-Za-z0-9][\\w- ]+`); err != nil {",
  7233  		`	if err := validate.MinimumInt("coords"+"."+"age", "body", int64(m.Coords.Age), 2, false); err != nil {`,
  7234  		`	if err := validate.MaximumInt("coords"+"."+"age", "body", int64(m.Coords.Age), 50, false); err != nil {`,
  7235  		`	if err := validate.MultipleOf("coords"+"."+"age", "body", float64(m.Coords.Age), 1.5); err != nil {`,
  7236  	},
  7237  		// not expected
  7238  		todo,
  7239  		// output in log
  7240  		noLines,
  7241  		noLines)
  7242  
  7243  	// load expectations for model: named_map_complex.go
  7244  	flattenRun.AddExpectations("named_map_complex.go", []string{
  7245  		`type NamedMapComplex map[string]NamedMapComplexAdditionalProperties`,
  7246  		`func (m NamedMapComplex) Validate(formats strfmt.Registry) error {`,
  7247  		`	for k := range m {`,
  7248  		`		if err := validate.Required(k, "body", m[k]); err != nil {`,
  7249  		`		if val, ok := m[k]; ok {`,
  7250  		`			if err := val.Validate(formats); err != nil {`,
  7251  		`		return errors.CompositeValidationError(res...`,
  7252  	},
  7253  		// not expected
  7254  		todo,
  7255  		// output in log
  7256  		noLines,
  7257  		noLines)
  7258  
  7259  	expandRun.AddExpectations("named_map_complex.go", []string{
  7260  		`type NamedMapComplex map[string]NamedMapComplexAnon`,
  7261  		`func (m NamedMapComplex) Validate(formats strfmt.Registry) error {`,
  7262  		`	for k := range m {`,
  7263  		//`		if swag.IsZero(m[k]) {`,
  7264  		`		if val, ok := m[k]; ok {`,
  7265  		`			if err := val.Validate(formats); err != nil {`,
  7266  		`		return errors.CompositeValidationError(res...`,
  7267  		`type NamedMapComplexAnon struct {`,
  7268  		"	Age int32 `json:\"age,omitempty\"`",
  7269  		"	Name string `json:\"name,omitempty\"`",
  7270  		`func (m *NamedMapComplexAnon) Validate(formats strfmt.Registry) error {`,
  7271  		`	if err := m.validateAge(formats); err != nil {`,
  7272  		`	if err := m.validateName(formats); err != nil {`,
  7273  		`		return errors.CompositeValidationError(res...`,
  7274  		`func (m *NamedMapComplexAnon) validateAge(formats strfmt.Registry) error {`,
  7275  		`	if swag.IsZero(m.Age) {`,
  7276  		`	if err := validate.MinimumInt("age", "body", int64(m.Age), 1, true); err != nil {`,
  7277  		`	if err := validate.MaximumInt("age", "body", int64(m.Age), 200, true); err != nil {`,
  7278  		`	if err := validate.MultipleOf("age", "body", float64(m.Age), 1); err != nil {`,
  7279  		`func (m *NamedMapComplexAnon) validateName(formats strfmt.Registry) error {`,
  7280  		`	if swag.IsZero(m.Name) {`,
  7281  		`	if err := validate.MinLength("name", "body", string(m.Name), 10); err != nil {`,
  7282  		`	if err := validate.MaxLength("name", "body", string(m.Name), 50); err != nil {`,
  7283  		"	if err := validate.Pattern(\"name\", \"body\", string(m.Name), `\\w+`); err != nil {",
  7284  	},
  7285  		// not expected
  7286  		todo,
  7287  		// output in log
  7288  		noLines,
  7289  		noLines)
  7290  
  7291  	// load expectations for model: nested_map_complex_validations_meta.go
  7292  	// NOTE(fredbi): maps are now simple types - this definition is no more generated
  7293  
  7294  	// load expectations for model: array_additional_validations.go
  7295  	flattenRun.AddExpectations("array_additional_validations.go", []string{
  7296  		`type ArrayAdditionalValidations struct {`,
  7297  		"	Args ArrayAdditionalValidationsArgs `json:\"args,omitempty\"`",
  7298  		`func (m *ArrayAdditionalValidations) Validate(formats strfmt.Registry) error {`,
  7299  		`	if err := m.validateArgs(formats); err != nil {`,
  7300  		`		return errors.CompositeValidationError(res...`,
  7301  		`func (m *ArrayAdditionalValidations) validateArgs(formats strfmt.Registry) error {`,
  7302  		`	if swag.IsZero(m.Args) {`,
  7303  		`	if err := m.Args.Validate(formats); err != nil {`,
  7304  		`		if ve, ok := err.(*errors.Validation); ok {`,
  7305  		`			return ve.ValidateName("args"`,
  7306  	},
  7307  		// not expected
  7308  		todo,
  7309  		// output in log
  7310  		noLines,
  7311  		noLines)
  7312  
  7313  	expandRun.AddExpectations("array_additional_validations.go", []string{
  7314  		`type ArrayAdditionalValidations struct {`,
  7315  		"	Args *ArrayAdditionalValidationsArgsTuple0 `json:\"args,omitempty\"`",
  7316  		`func (m *ArrayAdditionalValidations) Validate(formats strfmt.Registry) error {`,
  7317  		`	if err := m.validateArgs(formats); err != nil {`,
  7318  		`		return errors.CompositeValidationError(res...`,
  7319  		`func (m *ArrayAdditionalValidations) validateArgs(formats strfmt.Registry) error {`,
  7320  		`	if swag.IsZero(m.Args) {`,
  7321  		`	if m.Args != nil {`,
  7322  		`		if err := m.Args.Validate(formats); err != nil {`,
  7323  		`			if ve, ok := err.(*errors.Validation); ok {`,
  7324  		`				return ve.ValidateName("args"`,
  7325  		`type ArrayAdditionalValidationsArgsTuple0 struct {`,
  7326  		"	P0 *string `json:\"-\"`",
  7327  		"	P1 *float64 `json:\"-\"`",
  7328  		"	ArrayAdditionalValidationsArgsTuple0Items []int64 `json:\"-\"`",
  7329  		`func (m *ArrayAdditionalValidationsArgsTuple0) Validate(formats strfmt.Registry) error {`,
  7330  		`	if err := m.validateP0(formats); err != nil {`,
  7331  		`	if err := m.validateP1(formats); err != nil {`,
  7332  		`	if err := m.validateArrayAdditionalValidationsArgsTuple0Items(formats); err != nil {`,
  7333  		`		return errors.CompositeValidationError(res...`,
  7334  		`func (m *ArrayAdditionalValidationsArgsTuple0) validateP0(formats strfmt.Registry) error {`,
  7335  		`	if err := validate.Required("P0", "body", m.P0); err != nil {`,
  7336  		`	if err := validate.MinLength("P0", "body", string(*m.P0), 3); err != nil {`,
  7337  		`	if err := validate.MaxLength("P0", "body", string(*m.P0), 10); err != nil {`,
  7338  		"	if err := validate.Pattern(\"P0\", \"body\", string(*m.P0), `\\w+`); err != nil {",
  7339  		`func (m *ArrayAdditionalValidationsArgsTuple0) validateP1(formats strfmt.Registry) error {`,
  7340  		`	if err := validate.Required("P1", "body", m.P1); err != nil {`,
  7341  		`	if err := validate.Minimum("P1", "body", float64(*m.P1), 3, false); err != nil {`,
  7342  		`	if err := validate.Maximum("P1", "body", float64(*m.P1), 12, false); err != nil {`,
  7343  		`	if err := validate.MultipleOf("P1", "body", float64(*m.P1), 1.5); err != nil {`,
  7344  		`func (m *ArrayAdditionalValidationsArgsTuple0) validateArrayAdditionalValidationsArgsTuple0Items(formats strfmt.Registry) error {`,
  7345  		`	for i := range m.ArrayAdditionalValidationsArgsTuple0Items {`,
  7346  		`		if err := validate.MinimumInt(strconv.Itoa(i), "body", int64(m.ArrayAdditionalValidationsArgsTuple0Items[i]), 3, false); err != nil {`,
  7347  		`		if err := validate.MaximumInt(strconv.Itoa(i), "body", int64(m.ArrayAdditionalValidationsArgsTuple0Items[i]), 6, false); err != nil {`,
  7348  		`		if err := validate.MultipleOf(strconv.Itoa(i), "body", float64(m.ArrayAdditionalValidationsArgsTuple0Items[i]), 1); err != nil {`,
  7349  	},
  7350  		// not expected
  7351  		todo,
  7352  		// output in log
  7353  		noLines,
  7354  		noLines)
  7355  
  7356  	// load expectations for model: nested_object_validations_args_meta.go
  7357  	flattenRun.AddExpectations("nested_object_validations_args_meta.go", []string{
  7358  		`type NestedObjectValidationsArgsMeta struct {`,
  7359  		"	First string `json:\"first,omitempty\"`",
  7360  		"	Fourth [][][]float32 `json:\"fourth\"`",
  7361  		"	Second float64 `json:\"second,omitempty\"`",
  7362  		"	Third []float32 `json:\"third\"`",
  7363  		`func (m *NestedObjectValidationsArgsMeta) Validate(formats strfmt.Registry) error {`,
  7364  		`	if err := m.validateFirst(formats); err != nil {`,
  7365  		`	if err := m.validateFourth(formats); err != nil {`,
  7366  		`	if err := m.validateSecond(formats); err != nil {`,
  7367  		`	if err := m.validateThird(formats); err != nil {`,
  7368  		`		return errors.CompositeValidationError(res...`,
  7369  		`func (m *NestedObjectValidationsArgsMeta) validateFirst(formats strfmt.Registry) error {`,
  7370  		`	if swag.IsZero(m.First) {`,
  7371  		`	if err := validate.MinLength("first", "body", string(m.First), 2); err != nil {`,
  7372  		`	if err := validate.MaxLength("first", "body", string(m.First), 50); err != nil {`,
  7373  		"	if err := validate.Pattern(\"first\", \"body\", string(m.First), `^\\w+`); err != nil {",
  7374  		`func (m *NestedObjectValidationsArgsMeta) validateFourth(formats strfmt.Registry) error {`,
  7375  		`	if swag.IsZero(m.Fourth) {`,
  7376  		`	iFourthSize := int64(len(m.Fourth)`,
  7377  		`	if err := validate.MinItems("fourth", "body", iFourthSize, 5); err != nil {`,
  7378  		`	if err := validate.MaxItems("fourth", "body", iFourthSize, 93); err != nil {`,
  7379  		`	for i := 0; i < len(m.Fourth); i++ {`,
  7380  		`		iiFourthSize := int64(len(m.Fourth[i])`,
  7381  		`		if err := validate.MinItems("fourth"+"."+strconv.Itoa(i), "body", iiFourthSize, 5); err != nil {`,
  7382  		`		if err := validate.MaxItems("fourth"+"."+strconv.Itoa(i), "body", iiFourthSize, 93); err != nil {`,
  7383  		`		for ii := 0; ii < len(m.Fourth[i]); ii++ {`,
  7384  		`			iiiFourthSize := int64(len(m.Fourth[i][ii])`,
  7385  		`			if err := validate.MinItems("fourth"+"."+strconv.Itoa(i)+"."+strconv.Itoa(ii), "body", iiiFourthSize, 5); err != nil {`,
  7386  		`			if err := validate.MaxItems("fourth"+"."+strconv.Itoa(i)+"."+strconv.Itoa(ii), "body", iiiFourthSize, 93); err != nil {`,
  7387  		`			for iii := 0; iii < len(m.Fourth[i][ii]); iii++ {`,
  7388  		`				if err := validate.Minimum("fourth"+"."+strconv.Itoa(i)+"."+strconv.Itoa(ii)+"."+strconv.Itoa(iii), "body", float64(m.Fourth[i][ii][iii]), 3, false); err != nil {`,
  7389  		`				if err := validate.Maximum("fourth"+"."+strconv.Itoa(i)+"."+strconv.Itoa(ii)+"."+strconv.Itoa(iii), "body", float64(m.Fourth[i][ii][iii]), 6, false); err != nil {`,
  7390  		`				if err := validate.MultipleOf("fourth"+"."+strconv.Itoa(i)+"."+strconv.Itoa(ii)+"."+strconv.Itoa(iii), "body", float64(m.Fourth[i][ii][iii]), 0.5); err != nil {`,
  7391  		`func (m *NestedObjectValidationsArgsMeta) validateSecond(formats strfmt.Registry) error {`,
  7392  		`	if swag.IsZero(m.Second) {`,
  7393  		`	if err := validate.Minimum("second", "body", float64(m.Second), 3, false); err != nil {`,
  7394  		`	if err := validate.Maximum("second", "body", float64(m.Second), 51, false); err != nil {`,
  7395  		`	if err := validate.MultipleOf("second", "body", float64(m.Second), 1.5); err != nil {`,
  7396  		`func (m *NestedObjectValidationsArgsMeta) validateThird(formats strfmt.Registry) error {`,
  7397  		`	if swag.IsZero(m.Third) {`,
  7398  		`	iThirdSize := int64(len(m.Third)`,
  7399  		`	if err := validate.MinItems("third", "body", iThirdSize, 5); err != nil {`,
  7400  		`	if err := validate.MaxItems("third", "body", iThirdSize, 93); err != nil {`,
  7401  		`	for i := 0; i < len(m.Third); i++ {`,
  7402  		`		if err := validate.Minimum("third"+"."+strconv.Itoa(i), "body", float64(m.Third[i]), 3, false); err != nil {`,
  7403  		`		if err := validate.Maximum("third"+"."+strconv.Itoa(i), "body", float64(m.Third[i]), 6, false); err != nil {`,
  7404  		`		if err := validate.MultipleOf("third"+"."+strconv.Itoa(i), "body", float64(m.Third[i]), 0.5); err != nil {`,
  7405  	},
  7406  		// not expected
  7407  		todo,
  7408  		// output in log
  7409  		noLines,
  7410  		noLines)
  7411  
  7412  	// load expectations for model: map_validations.go
  7413  	flattenRun.AddExpectations("map_validations.go", []string{
  7414  		`type MapValidations struct {`,
  7415  		"	Meta map[string]int64 `json:\"meta,omitempty\"`",
  7416  		`func (m *MapValidations) Validate(formats strfmt.Registry) error {`,
  7417  		`	if err := m.validateMeta(formats); err != nil {`,
  7418  		`		return errors.CompositeValidationError(res...`,
  7419  		`func (m *MapValidations) validateMeta(formats strfmt.Registry) error {`,
  7420  		`	if swag.IsZero(m.Meta) {`,
  7421  		`	for k := range m.Meta {`,
  7422  		//`		if swag.IsZero(m.Meta[k]) {`,
  7423  		`		if err := validate.MinimumInt("meta"+"."+k, "body", int64(m.Meta[k]), 3, false); err != nil {`,
  7424  		`		if err := validate.MaximumInt("meta"+"."+k, "body", int64(m.Meta[k]), 6, false); err != nil {`,
  7425  		`		if err := validate.MultipleOf("meta"+"."+k, "body", float64(m.Meta[k]), 1); err != nil {`,
  7426  	},
  7427  		// not expected
  7428  		todo,
  7429  		// output in log
  7430  		noLines,
  7431  		noLines)
  7432  
  7433  	expandRun.AddExpectations("map_validations.go", flattenRun.ExpectedFor("MapValidations").ExpectedLines, todo, noLines, noLines)
  7434  
  7435  	// load expectations for model: named_all_of_all_of1.go
  7436  	flattenRun.AddExpectations("named_all_of_all_of1.go", []string{
  7437  		`type NamedAllOfAllOf1 struct {`,
  7438  		"	Age int32 `json:\"age,omitempty\"`",
  7439  		`func (m *NamedAllOfAllOf1) Validate(formats strfmt.Registry) error {`,
  7440  		`	if err := m.validateAge(formats); err != nil {`,
  7441  		`		return errors.CompositeValidationError(res...`,
  7442  		`func (m *NamedAllOfAllOf1) validateAge(formats strfmt.Registry) error {`,
  7443  		`	if swag.IsZero(m.Age) {`,
  7444  		`	if err := validate.MinimumInt("age", "body", int64(m.Age), 2, false); err != nil {`,
  7445  		`	if err := validate.MaximumInt("age", "body", int64(m.Age), 50, false); err != nil {`,
  7446  		`	if err := validate.MultipleOf("age", "body", float64(m.Age), 1.5); err != nil {`,
  7447  	},
  7448  		// not expected
  7449  		todo,
  7450  		// output in log
  7451  		noLines,
  7452  		noLines)
  7453  
  7454  	// load expectations for model: all_of_validations_meta_all_of5.go
  7455  	flattenRun.AddExpectations("all_of_validations_meta_all_of5.go", []string{
  7456  		`type AllOfValidationsMetaAllOf5 struct {`,
  7457  		"	ExtOpts map[string]map[string]map[string]int32 `json:\"extOpts,omitempty\"`",
  7458  		`func (m *AllOfValidationsMetaAllOf5) Validate(formats strfmt.Registry) error {`,
  7459  		`	if err := m.validateExtOpts(formats); err != nil {`,
  7460  		`		return errors.CompositeValidationError(res...`,
  7461  		`func (m *AllOfValidationsMetaAllOf5) validateExtOpts(formats strfmt.Registry) error {`,
  7462  		`	if swag.IsZero(m.ExtOpts) {`,
  7463  		`	for k := range m.ExtOpts {`,
  7464  		//`		if swag.IsZero(m.ExtOpts[k]) {`,
  7465  		`		for kk := range m.ExtOpts[k] {`,
  7466  		//`			if swag.IsZero(m.ExtOpts[k][kk]) {`,
  7467  		`			for kkk := range m.ExtOpts[k][kk] {`,
  7468  		//`				if swag.IsZero(m.ExtOpts[k][kk][kkk]) {`,
  7469  		`				if err := validate.MinimumInt("extOpts"+"."+k+"."+kk+"."+kkk, "body", int64(m.ExtOpts[k][kk][kkk]), 2, false); err != nil {`,
  7470  		`				if err := validate.MaximumInt("extOpts"+"."+k+"."+kk+"."+kkk, "body", int64(m.ExtOpts[k][kk][kkk]), 50, false); err != nil {`,
  7471  		`				if err := validate.MultipleOf("extOpts"+"."+k+"."+kk+"."+kkk, "body", float64(m.ExtOpts[k][kk][kkk]), 1.5); err != nil {`,
  7472  	},
  7473  		// not expected
  7474  		todo,
  7475  		// output in log
  7476  		noLines,
  7477  		noLines)
  7478  
  7479  	// load expectations for model: all_of_validations.go
  7480  	flattenRun.AddExpectations("all_of_validations.go", []string{
  7481  		`type AllOfValidations struct {`,
  7482  		"	Meta *AllOfValidationsMeta `json:\"meta,omitempty\"`",
  7483  		`func (m *AllOfValidations) Validate(formats strfmt.Registry) error {`,
  7484  		`	if err := m.validateMeta(formats); err != nil {`,
  7485  		`		return errors.CompositeValidationError(res...`,
  7486  		`func (m *AllOfValidations) validateMeta(formats strfmt.Registry) error {`,
  7487  		`	if swag.IsZero(m.Meta) {`,
  7488  		`	if m.Meta != nil {`,
  7489  		`		if err := m.Meta.Validate(formats); err != nil {`,
  7490  		`			if ve, ok := err.(*errors.Validation); ok {`,
  7491  		`				return ve.ValidateName("meta"`,
  7492  	},
  7493  		// not expected
  7494  		todo,
  7495  		// output in log
  7496  		noLines,
  7497  		noLines)
  7498  
  7499  	expandRun.AddExpectations("all_of_validations.go", []string{
  7500  		`type AllOfValidations struct {`,
  7501  		`	Meta struct {`,
  7502  		"		Name string `json:\"name,omitempty\"`",
  7503  		"		Age int32 `json:\"age,omitempty\"`",
  7504  		"		Args []string `json:\"args\"`",
  7505  		"		Assoc [][][]string `json:\"assoc\"`",
  7506  		"		Opts map[string]int32 `json:\"opts,omitempty\"`",
  7507  		"		ExtOpts map[string]map[string]map[string]int32 `json:\"extOpts,omitempty\"`",
  7508  		`		Coords struct {`,
  7509  		"			Name string `json:\"name,omitempty\"`",
  7510  		"			Age int32 `json:\"age,omitempty\"`",
  7511  		"		} `json:\"coords,omitempty\"`",
  7512  		"	} `json:\"meta,omitempty\"`",
  7513  		`func (m *AllOfValidations) Validate(formats strfmt.Registry) error {`,
  7514  		`	if err := m.validateMeta(formats); err != nil {`,
  7515  		`		return errors.CompositeValidationError(res...`,
  7516  		`func (m *AllOfValidations) validateMeta(formats strfmt.Registry) error {`,
  7517  		`	if swag.IsZero(m.Meta) {`,
  7518  		`	if err := validate.MinLength("meta"+"."+"name", "body", string(m.Meta.Name), 2); err != nil {`,
  7519  		`	if err := validate.MaxLength("meta"+"."+"name", "body", string(m.Meta.Name), 50); err != nil {`,
  7520  		"	if err := validate.Pattern(\"meta\"+\".\"+\"name\", \"body\", string(m.Meta.Name), `[A-Za-z0-9][\\w- ]+`); err != nil {",
  7521  		`	if err := validate.MinimumInt("meta"+"."+"age", "body", int64(m.Meta.Age), 2, false); err != nil {`,
  7522  		`	if err := validate.MaximumInt("meta"+"."+"age", "body", int64(m.Meta.Age), 50, false); err != nil {`,
  7523  		`	if err := validate.MultipleOf("meta"+"."+"age", "body", float64(m.Meta.Age), 1.5); err != nil {`,
  7524  		`	iArgsSize := int64(len(m.Meta.Args)`,
  7525  		`	if err := validate.MinItems("meta"+"."+"args", "body", iArgsSize, 5); err != nil {`,
  7526  		`	if err := validate.MaxItems("meta"+"."+"args", "body", iArgsSize, 20); err != nil {`,
  7527  		`	for i := 0; i < len(m.Meta.Args); i++ {`,
  7528  		`		if err := validate.MinLength("meta"+"."+"args"+"."+strconv.Itoa(i), "body", string(m.Meta.Args[i]), 2); err != nil {`,
  7529  		`		if err := validate.MaxLength("meta"+"."+"args"+"."+strconv.Itoa(i), "body", string(m.Meta.Args[i]), 50); err != nil {`,
  7530  		"		if err := validate.Pattern(\"meta\"+\".\"+\"args\"+\".\"+strconv.Itoa(i), \"body\", string(m.Meta.Args[i]), `[A-Za-z0-9][\\w- ]+`); err != nil {",
  7531  		`	iAssocSize := int64(len(m.Meta.Assoc)`,
  7532  		`	if err := validate.MinItems("meta"+"."+"assoc", "body", iAssocSize, 5); err != nil {`,
  7533  		`	if err := validate.MaxItems("meta"+"."+"assoc", "body", iAssocSize, 20); err != nil {`,
  7534  		`	for i := 0; i < len(m.Meta.Assoc); i++ {`,
  7535  		`		iiAssocSize := int64(len(m.Meta.Assoc[i])`,
  7536  		`		if err := validate.MinItems("meta"+"."+"assoc"+"."+strconv.Itoa(i), "body", iiAssocSize, 5); err != nil {`,
  7537  		`		if err := validate.MaxItems("meta"+"."+"assoc"+"."+strconv.Itoa(i), "body", iiAssocSize, 20); err != nil {`,
  7538  		`		for ii := 0; ii < len(m.Meta.Assoc[i]); ii++ {`,
  7539  		`			iiiAssocSize := int64(len(m.Meta.Assoc[i][ii])`,
  7540  		`			if err := validate.MinItems("meta"+"."+"assoc"+"."+strconv.Itoa(i)+"."+strconv.Itoa(ii), "body", iiiAssocSize, 5); err != nil {`,
  7541  		`			if err := validate.MaxItems("meta"+"."+"assoc"+"."+strconv.Itoa(i)+"."+strconv.Itoa(ii), "body", iiiAssocSize, 20); err != nil {`,
  7542  		`			for iii := 0; iii < len(m.Meta.Assoc[i][ii]); iii++ {`,
  7543  		`				if err := validate.MinLength("meta"+"."+"assoc"+"."+strconv.Itoa(i)+"."+strconv.Itoa(ii)+"."+strconv.Itoa(iii), "body", string(m.Meta.Assoc[i][ii][iii]), 2); err != nil {`,
  7544  		`				if err := validate.MaxLength("meta"+"."+"assoc"+"."+strconv.Itoa(i)+"."+strconv.Itoa(ii)+"."+strconv.Itoa(iii), "body", string(m.Meta.Assoc[i][ii][iii]), 50); err != nil {`,
  7545  		"				if err := validate.Pattern(\"meta\"+\".\"+\"assoc\"+\".\"+strconv.Itoa(i)+\".\"+strconv.Itoa(ii)+\".\"+strconv.Itoa(iii), \"body\", string(m.Meta.Assoc[i][ii][iii]), `[A-Za-z0-9][\\w- ]+`); err != nil {",
  7546  		`	for k := range m.Meta.Opts {`,
  7547  		//`		if swag.IsZero(m.Meta.Opts[k]) {`,
  7548  		`		if err := validate.MinimumInt("meta"+"."+"opts"+"."+k, "body", int64(m.Meta.Opts[k]), 2, false); err != nil {`,
  7549  		`		if err := validate.MaximumInt("meta"+"."+"opts"+"."+k, "body", int64(m.Meta.Opts[k]), 50, false); err != nil {`,
  7550  		`		if err := validate.MultipleOf("meta"+"."+"opts"+"."+k, "body", float64(m.Meta.Opts[k]), 1.5); err != nil {`,
  7551  		`	for k := range m.Meta.ExtOpts {`,
  7552  		//`		if swag.IsZero(m.Meta.ExtOpts[k]) {`,
  7553  		`		for kk := range m.Meta.ExtOpts[k] {`,
  7554  		//`			if swag.IsZero(m.Meta.ExtOpts[k][kk]) {`,
  7555  		`			for kkk := range m.Meta.ExtOpts[k][kk] {`,
  7556  		//`				if swag.IsZero(m.Meta.ExtOpts[k][kk][kkk]) {`,
  7557  		`				if err := validate.MinimumInt("meta"+"."+"extOpts"+"."+k+"."+kk+"."+kkk, "body", int64(m.Meta.ExtOpts[k][kk][kkk]), 2, false); err != nil {`,
  7558  		`				if err := validate.MaximumInt("meta"+"."+"extOpts"+"."+k+"."+kk+"."+kkk, "body", int64(m.Meta.ExtOpts[k][kk][kkk]), 50, false); err != nil {`,
  7559  		`				if err := validate.MultipleOf("meta"+"."+"extOpts"+"."+k+"."+kk+"."+kkk, "body", float64(m.Meta.ExtOpts[k][kk][kkk]), 1.5); err != nil {`,
  7560  		`	if err := validate.MinLength("meta"+"."+"coords"+"."+"name", "body", string(m.Meta.Coords.Name), 2); err != nil {`,
  7561  		`	if err := validate.MaxLength("meta"+"."+"coords"+"."+"name", "body", string(m.Meta.Coords.Name), 50); err != nil {`,
  7562  		"	if err := validate.Pattern(\"meta\"+\".\"+\"coords\"+\".\"+\"name\", \"body\", string(m.Meta.Coords.Name), `[A-Za-z0-9][\\w- ]+`); err != nil {",
  7563  		`	if err := validate.MinimumInt("meta"+"."+"coords"+"."+"age", "body", int64(m.Meta.Coords.Age), 2, false); err != nil {`,
  7564  		`	if err := validate.MaximumInt("meta"+"."+"coords"+"."+"age", "body", int64(m.Meta.Coords.Age), 50, false); err != nil {`,
  7565  		`	if err := validate.MultipleOf("meta"+"."+"coords"+"."+"age", "body", float64(m.Meta.Coords.Age), 1.5); err != nil {`,
  7566  	},
  7567  		// not expected
  7568  		todo,
  7569  		// output in log
  7570  		noLines,
  7571  		noLines)
  7572  
  7573  	// load expectations for model: named_nested_object_meta.go
  7574  	flattenRun.AddExpectations("named_nested_object_meta.go", []string{
  7575  		`type NamedNestedObjectMeta struct {`,
  7576  		"	First string `json:\"first,omitempty\"`",
  7577  		"	Fourth [][][]float32 `json:\"fourth\"`",
  7578  		"	Second float64 `json:\"second,omitempty\"`",
  7579  		"	Third []float32 `json:\"third\"`",
  7580  		`func (m *NamedNestedObjectMeta) Validate(formats strfmt.Registry) error {`,
  7581  		`	if err := m.validateFirst(formats); err != nil {`,
  7582  		`	if err := m.validateFourth(formats); err != nil {`,
  7583  		`	if err := m.validateSecond(formats); err != nil {`,
  7584  		`	if err := m.validateThird(formats); err != nil {`,
  7585  		`		return errors.CompositeValidationError(res...`,
  7586  		`func (m *NamedNestedObjectMeta) validateFirst(formats strfmt.Registry) error {`,
  7587  		`	if swag.IsZero(m.First) {`,
  7588  		`	if err := validate.MinLength("first", "body", string(m.First), 2); err != nil {`,
  7589  		`	if err := validate.MaxLength("first", "body", string(m.First), 50); err != nil {`,
  7590  		"	if err := validate.Pattern(\"first\", \"body\", string(m.First), `^\\w+`); err != nil {",
  7591  		`func (m *NamedNestedObjectMeta) validateFourth(formats strfmt.Registry) error {`,
  7592  		`	if swag.IsZero(m.Fourth) {`,
  7593  		`	iFourthSize := int64(len(m.Fourth)`,
  7594  		`	if err := validate.MinItems("fourth", "body", iFourthSize, 5); err != nil {`,
  7595  		`	if err := validate.MaxItems("fourth", "body", iFourthSize, 93); err != nil {`,
  7596  		`	for i := 0; i < len(m.Fourth); i++ {`,
  7597  		`		iiFourthSize := int64(len(m.Fourth[i])`,
  7598  		`		if err := validate.MinItems("fourth"+"."+strconv.Itoa(i), "body", iiFourthSize, 5); err != nil {`,
  7599  		`		if err := validate.MaxItems("fourth"+"."+strconv.Itoa(i), "body", iiFourthSize, 93); err != nil {`,
  7600  		`		for ii := 0; ii < len(m.Fourth[i]); ii++ {`,
  7601  		`			iiiFourthSize := int64(len(m.Fourth[i][ii])`,
  7602  		`			if err := validate.MinItems("fourth"+"."+strconv.Itoa(i)+"."+strconv.Itoa(ii), "body", iiiFourthSize, 5); err != nil {`,
  7603  		`			if err := validate.MaxItems("fourth"+"."+strconv.Itoa(i)+"."+strconv.Itoa(ii), "body", iiiFourthSize, 93); err != nil {`,
  7604  		`			for iii := 0; iii < len(m.Fourth[i][ii]); iii++ {`,
  7605  		`				if err := validate.Minimum("fourth"+"."+strconv.Itoa(i)+"."+strconv.Itoa(ii)+"."+strconv.Itoa(iii), "body", float64(m.Fourth[i][ii][iii]), 3, false); err != nil {`,
  7606  		`				if err := validate.Maximum("fourth"+"."+strconv.Itoa(i)+"."+strconv.Itoa(ii)+"."+strconv.Itoa(iii), "body", float64(m.Fourth[i][ii][iii]), 6, false); err != nil {`,
  7607  		`				if err := validate.MultipleOf("fourth"+"."+strconv.Itoa(i)+"."+strconv.Itoa(ii)+"."+strconv.Itoa(iii), "body", float64(m.Fourth[i][ii][iii]), 0.5); err != nil {`,
  7608  		`func (m *NamedNestedObjectMeta) validateSecond(formats strfmt.Registry) error {`,
  7609  		`	if swag.IsZero(m.Second) {`,
  7610  		`	if err := validate.Minimum("second", "body", float64(m.Second), 3, false); err != nil {`,
  7611  		`	if err := validate.Maximum("second", "body", float64(m.Second), 51, false); err != nil {`,
  7612  		`	if err := validate.MultipleOf("second", "body", float64(m.Second), 1.5); err != nil {`,
  7613  		`func (m *NamedNestedObjectMeta) validateThird(formats strfmt.Registry) error {`,
  7614  		`	if swag.IsZero(m.Third) {`,
  7615  		`	iThirdSize := int64(len(m.Third)`,
  7616  		`	if err := validate.MinItems("third", "body", iThirdSize, 5); err != nil {`,
  7617  		`	if err := validate.MaxItems("third", "body", iThirdSize, 93); err != nil {`,
  7618  		`	for i := 0; i < len(m.Third); i++ {`,
  7619  		`		if err := validate.Minimum("third"+"."+strconv.Itoa(i), "body", float64(m.Third[i]), 3, false); err != nil {`,
  7620  		`		if err := validate.Maximum("third"+"."+strconv.Itoa(i), "body", float64(m.Third[i]), 6, false); err != nil {`,
  7621  		`		if err := validate.MultipleOf("third"+"."+strconv.Itoa(i), "body", float64(m.Third[i]), 0.5); err != nil {`,
  7622  	},
  7623  		// not expected
  7624  		todo,
  7625  		// output in log
  7626  		noLines,
  7627  		noLines)
  7628  
  7629  	// load expectations for model: named_nested_object.go
  7630  	flattenRun.AddExpectations("named_nested_object.go", []string{
  7631  		`type NamedNestedObject struct {`,
  7632  		"	Meta *NamedNestedObjectMeta `json:\"meta,omitempty\"`",
  7633  		`func (m *NamedNestedObject) Validate(formats strfmt.Registry) error {`,
  7634  		`	if err := m.validateMeta(formats); err != nil {`,
  7635  		`		return errors.CompositeValidationError(res...`,
  7636  		`func (m *NamedNestedObject) validateMeta(formats strfmt.Registry) error {`,
  7637  		`	if swag.IsZero(m.Meta) {`,
  7638  		`	if m.Meta != nil {`,
  7639  		`		if err := m.Meta.Validate(formats); err != nil {`,
  7640  		`			if ve, ok := err.(*errors.Validation); ok {`,
  7641  		`				return ve.ValidateName("meta"`,
  7642  	},
  7643  		// not expected
  7644  		todo,
  7645  		// output in log
  7646  		noLines,
  7647  		noLines)
  7648  
  7649  	expandRun.AddExpectations("named_nested_object.go", []string{
  7650  		`type NamedNestedObject struct {`,
  7651  		"	Meta *NamedNestedObjectMeta `json:\"meta,omitempty\"`",
  7652  		`func (m *NamedNestedObject) Validate(formats strfmt.Registry) error {`,
  7653  		`	if err := m.validateMeta(formats); err != nil {`,
  7654  		`		return errors.CompositeValidationError(res...`,
  7655  		`func (m *NamedNestedObject) validateMeta(formats strfmt.Registry) error {`,
  7656  		`	if swag.IsZero(m.Meta) {`,
  7657  		`	if m.Meta != nil {`,
  7658  		`		if err := m.Meta.Validate(formats); err != nil {`,
  7659  		`			if ve, ok := err.(*errors.Validation); ok {`,
  7660  		`				return ve.ValidateName("meta"`,
  7661  		`type NamedNestedObjectMeta struct {`,
  7662  		"	First string `json:\"first,omitempty\"`",
  7663  		"	Fourth [][][]float32 `json:\"fourth\"`",
  7664  		"	Second float64 `json:\"second,omitempty\"`",
  7665  		"	Third []float32 `json:\"third\"`",
  7666  		`func (m *NamedNestedObjectMeta) Validate(formats strfmt.Registry) error {`,
  7667  		`	if err := m.validateFirst(formats); err != nil {`,
  7668  		`	if err := m.validateFourth(formats); err != nil {`,
  7669  		`	if err := m.validateSecond(formats); err != nil {`,
  7670  		`	if err := m.validateThird(formats); err != nil {`,
  7671  		`		return errors.CompositeValidationError(res...`,
  7672  		`func (m *NamedNestedObjectMeta) validateFirst(formats strfmt.Registry) error {`,
  7673  		`	if swag.IsZero(m.First) {`,
  7674  		`	if err := validate.MinLength("meta"+"."+"first", "body", string(m.First), 2); err != nil {`,
  7675  		`	if err := validate.MaxLength("meta"+"."+"first", "body", string(m.First), 50); err != nil {`,
  7676  		"	if err := validate.Pattern(\"meta\"+\".\"+\"first\", \"body\", string(m.First), `^\\w+`); err != nil {",
  7677  		`func (m *NamedNestedObjectMeta) validateFourth(formats strfmt.Registry) error {`,
  7678  		`	if swag.IsZero(m.Fourth) {`,
  7679  		`	iFourthSize := int64(len(m.Fourth)`,
  7680  		`	if err := validate.MinItems("meta"+"."+"fourth", "body", iFourthSize, 5); err != nil {`,
  7681  		`	if err := validate.MaxItems("meta"+"."+"fourth", "body", iFourthSize, 93); err != nil {`,
  7682  		`	for i := 0; i < len(m.Fourth); i++ {`,
  7683  		`		iiFourthSize := int64(len(m.Fourth[i])`,
  7684  		`		if err := validate.MinItems("meta"+"."+"fourth"+"."+strconv.Itoa(i), "body", iiFourthSize, 5); err != nil {`,
  7685  		`		if err := validate.MaxItems("meta"+"."+"fourth"+"."+strconv.Itoa(i), "body", iiFourthSize, 93); err != nil {`,
  7686  		`		for ii := 0; ii < len(m.Fourth[i]); ii++ {`,
  7687  		`			iiiFourthSize := int64(len(m.Fourth[i][ii])`,
  7688  		`			if err := validate.MinItems("meta"+"."+"fourth"+"."+strconv.Itoa(i)+"."+strconv.Itoa(ii), "body", iiiFourthSize, 5); err != nil {`,
  7689  		`			if err := validate.MaxItems("meta"+"."+"fourth"+"."+strconv.Itoa(i)+"."+strconv.Itoa(ii), "body", iiiFourthSize, 93); err != nil {`,
  7690  		`			for iii := 0; iii < len(m.Fourth[i][ii]); iii++ {`,
  7691  		`				if err := validate.Minimum("meta"+"."+"fourth"+"."+strconv.Itoa(i)+"."+strconv.Itoa(ii)+"."+strconv.Itoa(iii), "body", float64(m.Fourth[i][ii][iii]), 3, false); err != nil {`,
  7692  		`				if err := validate.Maximum("meta"+"."+"fourth"+"."+strconv.Itoa(i)+"."+strconv.Itoa(ii)+"."+strconv.Itoa(iii), "body", float64(m.Fourth[i][ii][iii]), 6, false); err != nil {`,
  7693  		`				if err := validate.MultipleOf("meta"+"."+"fourth"+"."+strconv.Itoa(i)+"."+strconv.Itoa(ii)+"."+strconv.Itoa(iii), "body", float64(m.Fourth[i][ii][iii]), 0.5); err != nil {`,
  7694  		`func (m *NamedNestedObjectMeta) validateSecond(formats strfmt.Registry) error {`,
  7695  		`	if swag.IsZero(m.Second) {`,
  7696  		`	if err := validate.Minimum("meta"+"."+"second", "body", float64(m.Second), 3, false); err != nil {`,
  7697  		`	if err := validate.Maximum("meta"+"."+"second", "body", float64(m.Second), 51, false); err != nil {`,
  7698  		`	if err := validate.MultipleOf("meta"+"."+"second", "body", float64(m.Second), 1.5); err != nil {`,
  7699  		`func (m *NamedNestedObjectMeta) validateThird(formats strfmt.Registry) error {`,
  7700  		`	if swag.IsZero(m.Third) {`,
  7701  		`	iThirdSize := int64(len(m.Third)`,
  7702  		`	if err := validate.MinItems("meta"+"."+"third", "body", iThirdSize, 5); err != nil {`,
  7703  		`	if err := validate.MaxItems("meta"+"."+"third", "body", iThirdSize, 93); err != nil {`,
  7704  		`	for i := 0; i < len(m.Third); i++ {`,
  7705  		`		if err := validate.Minimum("meta"+"."+"third"+"."+strconv.Itoa(i), "body", float64(m.Third[i]), 3, false); err != nil {`,
  7706  		`		if err := validate.Maximum("meta"+"."+"third"+"."+strconv.Itoa(i), "body", float64(m.Third[i]), 6, false); err != nil {`,
  7707  		`		if err := validate.MultipleOf("meta"+"."+"third"+"."+strconv.Itoa(i), "body", float64(m.Third[i]), 0.5); err != nil {`,
  7708  	},
  7709  		// not expected
  7710  		todo,
  7711  		// output in log
  7712  		noLines,
  7713  		noLines)
  7714  
  7715  	// load expectations for model: all_of_validations_meta_all_of6_coords_all_of0.go
  7716  	flattenRun.AddExpectations("all_of_validations_meta_all_of6_coords_all_of0.go", []string{
  7717  		`type AllOfValidationsMetaAllOf6CoordsAllOf0 struct {`,
  7718  		"	Name string `json:\"name,omitempty\"`",
  7719  		`func (m *AllOfValidationsMetaAllOf6CoordsAllOf0) Validate(formats strfmt.Registry) error {`,
  7720  		`	if err := m.validateName(formats); err != nil {`,
  7721  		`		return errors.CompositeValidationError(res...`,
  7722  		`func (m *AllOfValidationsMetaAllOf6CoordsAllOf0) validateName(formats strfmt.Registry) error {`,
  7723  		`	if swag.IsZero(m.Name) {`,
  7724  		`	if err := validate.MinLength("name", "body", string(m.Name), 2); err != nil {`,
  7725  		`	if err := validate.MaxLength("name", "body", string(m.Name), 50); err != nil {`,
  7726  		"	if err := validate.Pattern(\"name\", \"body\", string(m.Name), `[A-Za-z0-9][\\w- ]+`); err != nil {",
  7727  	},
  7728  		// not expected
  7729  		todo,
  7730  		// output in log
  7731  		noLines,
  7732  		noLines)
  7733  
  7734  	// load expectations for model: named_nested_map.go
  7735  	flattenRun.AddExpectations("named_nested_map.go", []string{
  7736  		`type NamedNestedMap map[string]map[string]map[string]int64`,
  7737  		`func (m NamedNestedMap) Validate(formats strfmt.Registry) error {`,
  7738  		`	for k := range m {`,
  7739  		//`		if swag.IsZero(m[k]) {`,
  7740  		`		for kk := range m[k] {`,
  7741  		//`			if swag.IsZero(m[k][kk]) {`,
  7742  		`			for kkk := range m[k][kk] {`,
  7743  		//`				if swag.IsZero(m[k][kk][kkk]) {`,
  7744  		`				if err := validate.MinimumInt(k+"."+kk+"."+kkk, "body", int64(m[k][kk][kkk]), 3, false); err != nil {`,
  7745  		`				if err := validate.MaximumInt(k+"."+kk+"."+kkk, "body", int64(m[k][kk][kkk]), 6, false); err != nil {`,
  7746  		`				if err := validate.MultipleOf(k+"."+kk+"."+kkk, "body", float64(m[k][kk][kkk]), 1); err != nil {`,
  7747  		`		return errors.CompositeValidationError(res...`,
  7748  	},
  7749  		// not expected
  7750  		todo,
  7751  		// output in log
  7752  		noLines,
  7753  		noLines)
  7754  
  7755  	expandRun.AddExpectations("named_nested_map.go", flattenRun.ExpectedFor("NamedNestedMap").ExpectedLines, todo, noLines, noLines)
  7756  }
  7757  
  7758  func initFixtureNestedMaps() {
  7759  	// testing fixture-nested-maps.yaml with flatten and expand (--skip-flatten)
  7760  
  7761  	/*
  7762  	   Test specifically focused on nested maps (e.g.nested additionalProperties)
  7763  
  7764  	*/
  7765  
  7766  	f := newModelFixture("../fixtures/bugs/1487/fixture-nested-maps.yaml", "Nested maps")
  7767  	flattenRun := f.AddRun(false)
  7768  	expandRun := f.AddRun(true)
  7769  
  7770  	// load expectations for model: alias_interface.go
  7771  	flattenRun.AddExpectations("alias_interface.go", []string{
  7772  		`type AliasInterface interface{`,
  7773  	},
  7774  		// not expected
  7775  		validatable,
  7776  		// output in log
  7777  		noLines,
  7778  		noLines)
  7779  
  7780  	expandRun.AddExpectations("alias_interface.go", flattenRun.ExpectedFor("AliasInterface").ExpectedLines, validatable, noLines, noLines)
  7781  
  7782  	// load expectations for model: test_nested_aliased_interface.go
  7783  	flattenRun.AddExpectations("test_nested_aliased_interface.go", []string{
  7784  		`type TestNestedAliasedInterface struct {`,
  7785  		"	Meta map[string]map[string]map[string]AliasInterface `json:\"meta,omitempty\"`",
  7786  		// empty validation
  7787  		"func (m *TestNestedAliasedInterface) Validate(formats strfmt.Registry) error {\n	return nil\n}",
  7788  	},
  7789  		// not expected
  7790  		todo,
  7791  		// output in log
  7792  		noLines,
  7793  		noLines)
  7794  
  7795  	expandRun.AddExpectations("test_nested_aliased_interface.go", []string{
  7796  		`type TestNestedAliasedInterface struct {`,
  7797  		"	Meta map[string]map[string]map[string]interface{} `json:\"meta,omitempty\"`",
  7798  		// empty validation
  7799  		"func (m *TestNestedAliasedInterface) Validate(formats strfmt.Registry) error {\n	return nil\n}",
  7800  	},
  7801  		// not expected
  7802  		todo,
  7803  		// output in log
  7804  		noLines,
  7805  		noLines)
  7806  
  7807  	// load expectations for model: nested_map_validations.go
  7808  	flattenRun.AddExpectations("nested_map_validations.go", []string{
  7809  		`type NestedMapValidations struct {`,
  7810  		"	Meta map[string]map[string]map[string]int64 `json:\"meta,omitempty\"`",
  7811  		`func (m *NestedMapValidations) Validate(formats strfmt.Registry) error {`,
  7812  		`	if err := m.validateMeta(formats); err != nil {`,
  7813  		`		return errors.CompositeValidationError(res...`,
  7814  		`func (m *NestedMapValidations) validateMeta(formats strfmt.Registry) error {`,
  7815  		`	if swag.IsZero(m.Meta) {`,
  7816  		`	for k := range m.Meta {`,
  7817  		//`		if swag.IsZero(m.Meta[k]) {`,
  7818  		`		for kk := range m.Meta[k] {`,
  7819  		//`			if swag.IsZero(m.Meta[k][kk]) {`,
  7820  		`			for kkk := range m.Meta[k][kk] {`,
  7821  		//`				if swag.IsZero(m.Meta[k][kk][kkk]) {`,
  7822  		`				if err := validate.MinimumInt("meta"+"."+k+"."+kk+"."+kkk, "body", int64(m.Meta[k][kk][kkk]), 3, false); err != nil {`,
  7823  		`				if err := validate.MaximumInt("meta"+"."+k+"."+kk+"."+kkk, "body", int64(m.Meta[k][kk][kkk]), 6, false); err != nil {`,
  7824  		`				if err := validate.MultipleOf("meta"+"."+k+"."+kk+"."+kkk, "body", float64(m.Meta[k][kk][kkk]), 1); err != nil {`,
  7825  	},
  7826  		// not expected
  7827  		todo,
  7828  		// output in log
  7829  		noLines,
  7830  		noLines)
  7831  
  7832  	expandRun.AddExpectations("nested_map_validations.go", flattenRun.ExpectedFor("NestedMapValidations").ExpectedLines, todo, noLines, noLines)
  7833  
  7834  	// load expectations for model: named_nested_map_complex.go
  7835  	flattenRun.AddExpectations("named_nested_map_complex.go", []string{
  7836  		//`type NamedNestedMapComplex map[string]NamedNestedMapComplexAdditionalProperties`,
  7837  		`type NamedNestedMapComplex map[string]map[string]map[string]NamedNestedMapComplexAdditionalPropertiesAdditionalPropertiesAdditionalProperties`,
  7838  		`func (m NamedNestedMapComplex) Validate(formats strfmt.Registry) error {`,
  7839  		`	for k := range m {`,
  7840  		//`		if swag.IsZero(m[k]) {`,
  7841  		`		for kk := range m[k] {`,
  7842  		//`			if swag.IsZero(m[k][kk]) {`,
  7843  		`			for kkk := range m[k][kk] {`,
  7844  		`				if err := validate.Required(k+"."+kk+"."+kkk, "body", m[k][kk][kkk]); err != nil {`,
  7845  		`				if val, ok := m[k][kk][kkk]; ok {`,
  7846  		`					if err := val.Validate(formats); err != nil {`,
  7847  		`		return errors.CompositeValidationError(res...`,
  7848  	},
  7849  		// not expected
  7850  		todo,
  7851  		// output in log
  7852  		noLines,
  7853  		noLines)
  7854  
  7855  	expandRun.AddExpectations("named_nested_map_complex.go", []string{
  7856  		`type NamedNestedMapComplex map[string]map[string]map[string]NamedNestedMapComplexAnon`,
  7857  		`func (m NamedNestedMapComplex) Validate(formats strfmt.Registry) error {`,
  7858  		`	for k := range m {`,
  7859  		//`		if swag.IsZero(m[k]) {`,
  7860  		`		for kk := range m[k] {`,
  7861  		//`			if swag.IsZero(m[k][kk]) {`,
  7862  		`			for kkk := range m[k][kk] {`,
  7863  		//`				if swag.IsZero(m[k][kk][kkk]) {`,
  7864  		`				if val, ok := m[k][kk][kkk]; ok {`,
  7865  		`					if err := val.Validate(formats); err != nil {`,
  7866  		`		return errors.CompositeValidationError(res...`,
  7867  		`type NamedNestedMapComplexAnon struct {`,
  7868  		"	Age int32 `json:\"age,omitempty\"`",
  7869  		"	Name string `json:\"name,omitempty\"`",
  7870  		`func (m *NamedNestedMapComplexAnon) Validate(formats strfmt.Registry) error {`,
  7871  		`	if err := m.validateAge(formats); err != nil {`,
  7872  		`	if err := m.validateName(formats); err != nil {`,
  7873  		`		return errors.CompositeValidationError(res...`,
  7874  		`func (m *NamedNestedMapComplexAnon) validateAge(formats strfmt.Registry) error {`,
  7875  		`	if swag.IsZero(m.Age) {`,
  7876  		`	if err := validate.MinimumInt("age", "body", int64(m.Age), 1, true); err != nil {`,
  7877  		`	if err := validate.MaximumInt("age", "body", int64(m.Age), 200, true); err != nil {`,
  7878  		`	if err := validate.MultipleOf("age", "body", float64(m.Age), 1); err != nil {`,
  7879  		`func (m *NamedNestedMapComplexAnon) validateName(formats strfmt.Registry) error {`,
  7880  		`	if swag.IsZero(m.Name) {`,
  7881  		`	if err := validate.MinLength("name", "body", string(m.Name), 10); err != nil {`,
  7882  		`	if err := validate.MaxLength("name", "body", string(m.Name), 50); err != nil {`,
  7883  		"	if err := validate.Pattern(\"name\", \"body\", string(m.Name), `\\w+`); err != nil {",
  7884  	},
  7885  		// not expected
  7886  		todo,
  7887  		// output in log
  7888  		noLines,
  7889  		noLines)
  7890  
  7891  	// load expectations for model: nested_map_complex_validations_meta_additional_properties_additional_properties.go
  7892  	// NOTE(fredbi): maps are now simple types - this definition is no more generated
  7893  
  7894  	// load expectations for model: nested_map_no_validations_additional_properties_additional_properties.go
  7895  	// NOTE(fredbi): maps are now simple types - this definition is no more generated
  7896  
  7897  	// load expectations for model: test_nested_interface.go
  7898  	flattenRun.AddExpectations("test_nested_interface.go", []string{
  7899  		`type TestNestedInterface struct {`,
  7900  		"	Meta map[string]map[string]map[string]interface{} `json:\"meta,omitempty\"`",
  7901  		// empty validation
  7902  		"func (m *TestNestedInterface) Validate(formats strfmt.Registry) error {\n	return nil\n}",
  7903  	},
  7904  		// not expected
  7905  		todo,
  7906  		// output in log
  7907  		noLines,
  7908  		noLines)
  7909  
  7910  	expandRun.AddExpectations("test_nested_interface.go", flattenRun.ExpectedFor("TestNestedInterface").ExpectedLines, todo, noLines, noLines)
  7911  
  7912  	// load expectations for model: named_nested_map_complex_additional_properties_additional_properties_additional_properties.go
  7913  	flattenRun.AddExpectations("named_nested_map_complex_additional_properties_additional_properties_additional_properties.go", []string{
  7914  		`type NamedNestedMapComplexAdditionalPropertiesAdditionalPropertiesAdditionalProperties struct {`,
  7915  		"	Age int32 `json:\"age,omitempty\"`",
  7916  		"	Name string `json:\"name,omitempty\"`",
  7917  		`func (m *NamedNestedMapComplexAdditionalPropertiesAdditionalPropertiesAdditionalProperties) Validate(formats strfmt.Registry) error {`,
  7918  		`	if err := m.validateAge(formats); err != nil {`,
  7919  		`	if err := m.validateName(formats); err != nil {`,
  7920  		`		return errors.CompositeValidationError(res...`,
  7921  		`func (m *NamedNestedMapComplexAdditionalPropertiesAdditionalPropertiesAdditionalProperties) validateAge(formats strfmt.Registry) error {`,
  7922  		`	if swag.IsZero(m.Age) {`,
  7923  		`	if err := validate.MinimumInt("age", "body", int64(m.Age), 1, true); err != nil {`,
  7924  		`	if err := validate.MaximumInt("age", "body", int64(m.Age), 200, true); err != nil {`,
  7925  		`	if err := validate.MultipleOf("age", "body", float64(m.Age), 1); err != nil {`,
  7926  		`func (m *NamedNestedMapComplexAdditionalPropertiesAdditionalPropertiesAdditionalProperties) validateName(formats strfmt.Registry) error {`,
  7927  		`	if swag.IsZero(m.Name) {`,
  7928  		`	if err := validate.MinLength("name", "body", string(m.Name), 10); err != nil {`,
  7929  		`	if err := validate.MaxLength("name", "body", string(m.Name), 50); err != nil {`,
  7930  		"	if err := validate.Pattern(\"name\", \"body\", string(m.Name), `\\w+`); err != nil {",
  7931  	},
  7932  		// not expected
  7933  		todo,
  7934  		// output in log
  7935  		noLines,
  7936  		noLines)
  7937  
  7938  	// load expectations for model: nested_map_no_validations_additional_properties.go
  7939  	// NOTE(fredbi): maps are simple types and this definition is no more generated
  7940  
  7941  	expandRun.AddExpectations("nested_map_no_validations.go", []string{
  7942  		`type NestedMapNoValidations map[string]map[string]map[string]NestedMapNoValidationsAnon`,
  7943  		`func (m NestedMapNoValidations) Validate(formats strfmt.Registry) error {`,
  7944  		`	for k := range m {`,
  7945  		//`		if swag.IsZero(m[k]) {`,
  7946  		`		for kk := range m[k] {`,
  7947  		//`			if swag.IsZero(m[k][kk]) {`,
  7948  		`			for kkk := range m[k][kk] {`,
  7949  		//`				if swag.IsZero(m[k][kk][kkk]) {`,
  7950  		`				if val, ok := m[k][kk][kkk]; ok {`,
  7951  		`					if err := val.Validate(formats); err != nil {`,
  7952  		`		return errors.CompositeValidationError(res...`,
  7953  		`type NestedMapNoValidationsAnon struct {`,
  7954  		"	Age int64 `json:\"age,omitempty\"`",
  7955  		"	Name string `json:\"name,omitempty\"`",
  7956  		// empty validation
  7957  		"func (m *NestedMapNoValidationsAnon) Validate(formats strfmt.Registry) error {\n	return nil\n}",
  7958  	},
  7959  		// not expected
  7960  		todo,
  7961  		// output in log
  7962  		noLines,
  7963  		noLines)
  7964  
  7965  	// load expectations for model: nested_map_complex_validations_meta_additional_properties.go
  7966  	// NOTE(fredbi): maps are simple types and this definition is no more generated
  7967  
  7968  	// load expectations for model: nested_map_no_validations_additional_properties_additional_properties_additional_properties.go
  7969  	// NOTE: maps are now simple types - this definition is no more generated
  7970  
  7971  	// load expectations for model: nested_map_no_validations.go
  7972  	flattenRun.AddExpectations("nested_map_no_validations.go", []string{
  7973  		//`type NestedMapNoValidations map[string]NestedMapNoValidationsAdditionalProperties`,
  7974  		`type NestedMapNoValidations map[string]map[string]map[string]NestedMapNoValidationsAdditionalPropertiesAdditionalPropertiesAdditionalProperties`,
  7975  		`func (m NestedMapNoValidations) Validate(formats strfmt.Registry) error {`,
  7976  		`	for k := range m {`,
  7977  		//`		if swag.IsZero(m[k]) {`,
  7978  		`       	for kk := range m[k] {`,
  7979  		//`        		if swag.IsZero(m[k][kk]) { // not required`,
  7980  		`            		for kkk := range m[k][kk] {`,
  7981  		`            			if val, ok := m[k][kk][kkk]; ok {`,
  7982  		`            			if err := validate.Required(k+"."+kk+"."+kkk, "body", m[k][kk][kkk]); err != nil {`,
  7983  		`            				if err := val.Validate(formats); err != nil {`,
  7984  		`		return errors.CompositeValidationError(res...`,
  7985  	},
  7986  		// not expected
  7987  		todo,
  7988  		// output in log
  7989  		noLines,
  7990  		noLines)
  7991  
  7992  	// load expectations for model: nested_map_complex_validations_meta_additional_properties_additional_properties_additional_properties.go
  7993  	flattenRun.AddExpectations("nested_map_complex_validations_meta_additional_properties_additional_properties_additional_properties.go", []string{
  7994  		`type NestedMapComplexValidationsMetaAdditionalPropertiesAdditionalPropertiesAdditionalProperties struct {`,
  7995  		"	Age int32 `json:\"age,omitempty\"`",
  7996  		"	Name string `json:\"name,omitempty\"`",
  7997  		`func (m *NestedMapComplexValidationsMetaAdditionalPropertiesAdditionalPropertiesAdditionalProperties) Validate(formats strfmt.Registry) error {`,
  7998  		`	if err := m.validateAge(formats); err != nil {`,
  7999  		`	if err := m.validateName(formats); err != nil {`,
  8000  		`		return errors.CompositeValidationError(res...`,
  8001  		`func (m *NestedMapComplexValidationsMetaAdditionalPropertiesAdditionalPropertiesAdditionalProperties) validateAge(formats strfmt.Registry) error {`,
  8002  		`	if swag.IsZero(m.Age) {`,
  8003  		`	if err := validate.MinimumInt("age", "body", int64(m.Age), 1, true); err != nil {`,
  8004  		`	if err := validate.MaximumInt("age", "body", int64(m.Age), 200, true); err != nil {`,
  8005  		`	if err := validate.MultipleOf("age", "body", float64(m.Age), 1); err != nil {`,
  8006  		`func (m *NestedMapComplexValidationsMetaAdditionalPropertiesAdditionalPropertiesAdditionalProperties) validateName(formats strfmt.Registry) error {`,
  8007  		`	if swag.IsZero(m.Name) {`,
  8008  		`	if err := validate.MinLength("name", "body", string(m.Name), 10); err != nil {`,
  8009  		`	if err := validate.MaxLength("name", "body", string(m.Name), 50); err != nil {`,
  8010  		"	if err := validate.Pattern(\"name\", \"body\", string(m.Name), `\\w+`); err != nil {",
  8011  	},
  8012  		// not expected
  8013  		todo,
  8014  		// output in log
  8015  		noLines,
  8016  		noLines)
  8017  
  8018  	// load expectations for model: nested_map_complex_validations.go
  8019  	flattenRun.AddExpectations("nested_map_complex_validations.go", []string{
  8020  		`type NestedMapComplexValidations struct {`,
  8021  		// maps are now simple types
  8022  		//"	Meta NestedMapComplexValidationsMeta `json:\"meta,omitempty\"`",
  8023  		"	Meta map[string]map[string]map[string]NestedMapComplexValidationsMetaAdditionalPropertiesAdditionalPropertiesAdditionalProperties `json:\"meta,omitempty\"`",
  8024  		`func (m *NestedMapComplexValidations) Validate(formats strfmt.Registry) error {`,
  8025  		`	if err := m.validateMeta(formats); err != nil {`,
  8026  		`		return errors.CompositeValidationError(res...`,
  8027  		`func (m *NestedMapComplexValidations) validateMeta(formats strfmt.Registry) error {`,
  8028  		`	if swag.IsZero(m.Meta) {`,
  8029  		`          		for k := range m.Meta {`,
  8030  		//`          			if swag.IsZero(m.Meta[k]) { // not required`,
  8031  		`          			for kk := range m.Meta[k] {`,
  8032  		//`          				if swag.IsZero(m.Meta[k][kk]) { // not required`,
  8033  		`          				for kkk := range m.Meta[k][kk] {`,
  8034  		`          				if err := validate.Required("meta"+"."+k+"."+kk+"."+kkk, "body", m.Meta[k][kk][kkk]); err != nil {`,
  8035  		`          					if val, ok := m.Meta[k][kk][kkk]; ok {`,
  8036  		`          						if err := val.Validate(formats); err != nil {`,
  8037  	},
  8038  		// not expected
  8039  		todo,
  8040  		// output in log
  8041  		noLines,
  8042  		noLines)
  8043  
  8044  	// load expectations for model: named_nested_map_complex_additional_properties_additional_properties.go
  8045  	// NOTE(fredbi): maps are now simple types - this definition is no more generated
  8046  
  8047  	// load expectations for model: named_nested_map_complex_additional_properties.go
  8048  	// NOTE(fredbi): maps are now simple types - this definition is no more generated
  8049  
  8050  	// load expectations for model: nested_map_complex_validations_meta.go
  8051  	// NOTE(fredbi): maps are now simple types - this definition is no more generated
  8052  }
  8053  
  8054  func initFixture844Variations() {
  8055  	// testing fixture-844-variations.yaml with flatten and expand (--skip-flatten)
  8056  
  8057  	/*
  8058  	   repro
  8059  	*/
  8060  
  8061  	f := newModelFixture("../fixtures/bugs/1487/fixture-844-variations.yaml", "allOf bugs with empty objects")
  8062  	flattenRun := f.AddRun(false)
  8063  	expandRun := f.AddRun(true)
  8064  
  8065  	// load expectations for model: foo.go
  8066  	flattenRun.AddExpectations("foo.go", []string{
  8067  		`type Foo interface{`,
  8068  	},
  8069  		// not expected
  8070  		validatable,
  8071  		// output in log
  8072  		noLines,
  8073  		noLines)
  8074  
  8075  	expandRun.AddExpectations("foo.go", flattenRun.ExpectedFor("Foo").ExpectedLines, validatable, noLines, noLines)
  8076  
  8077  	// load expectations for model: variation2.go
  8078  	flattenRun.AddExpectations("variation2.go", []string{
  8079  		`type Variation2 struct {`,
  8080  		"	Prop1 EmptyEnum `json:\"prop1,omitempty\"`",
  8081  		// empty validation
  8082  		"func (m *Variation2) Validate(formats strfmt.Registry) error {\n	return nil\n}",
  8083  	},
  8084  		// not expected
  8085  		todo,
  8086  		// output in log
  8087  		noLines,
  8088  		noLines)
  8089  
  8090  	expandRun.AddExpectations("variation2.go", []string{
  8091  		`type Variation2 struct {`,
  8092  		"	Prop1 interface{} `json:\"prop1,omitempty\"`",
  8093  		// empty validation
  8094  		"func (m *Variation2) Validate(formats strfmt.Registry) error {\n	return nil\n}",
  8095  	},
  8096  		// not expected
  8097  		todo,
  8098  		// output in log
  8099  		noLines,
  8100  		noLines)
  8101  
  8102  	// load expectations for model: bar.go
  8103  	flattenRun.AddExpectations("bar.go", []string{
  8104  		`type Bar interface{`,
  8105  	},
  8106  		// not expected
  8107  		validatable,
  8108  		// output in log
  8109  		noLines,
  8110  		noLines)
  8111  
  8112  	expandRun.AddExpectations("bar.go", flattenRun.ExpectedFor("Bar").ExpectedLines, validatable, noLines, noLines)
  8113  
  8114  	// load expectations for model: variation3.go
  8115  	flattenRun.AddExpectations("variation3.go", []string{
  8116  		`type Variation3 struct {`,
  8117  		"	Prop1 []EmptyEnum `json:\"prop1\"`",
  8118  		`func (m *Variation3) Validate(formats strfmt.Registry) error {`,
  8119  		`	if err := m.validateProp1(formats); err != nil {`,
  8120  		`		return errors.CompositeValidationError(res...`,
  8121  		`func (m *Variation3) validateProp1(formats strfmt.Registry) error {`,
  8122  		`	if swag.IsZero(m.Prop1) {`,
  8123  		`	iProp1Size := int64(len(m.Prop1)`,
  8124  		`	if err := validate.MinItems("prop1", "body", iProp1Size, 10); err != nil {`,
  8125  	},
  8126  		// not expected
  8127  		todo,
  8128  		// output in log
  8129  		noLines,
  8130  		noLines)
  8131  
  8132  	expandRun.AddExpectations("variation3.go", []string{
  8133  		`type Variation3 struct {`,
  8134  		"	Prop1 []interface{} `json:\"prop1\"`",
  8135  		`func (m *Variation3) Validate(formats strfmt.Registry) error {`,
  8136  		`	if err := m.validateProp1(formats); err != nil {`,
  8137  		`		return errors.CompositeValidationError(res...`,
  8138  		`var variation3Prop1ItemsEnum []interface{`,
  8139  		`	var res []interface{`,
  8140  		"	if err := json.Unmarshal([]byte(`[\"abc\",\"def\"]`), &res); err != nil {",
  8141  		`	for _, v := range res {`,
  8142  		`		variation3Prop1ItemsEnum = append(variation3Prop1ItemsEnum, v`,
  8143  		`func (m *Variation3) validateProp1ItemsEnum(path, location string, value interface{}) error {`,
  8144  		`	if err := validate.Enum(path, location, value, variation3Prop1ItemsEnum); err != nil {`,
  8145  		`func (m *Variation3) validateProp1(formats strfmt.Registry) error {`,
  8146  		`	if swag.IsZero(m.Prop1) {`,
  8147  		`	iProp1Size := int64(len(m.Prop1)`,
  8148  		`	if err := validate.MinItems("prop1", "body", iProp1Size, 10); err != nil {`,
  8149  	},
  8150  		// not expected
  8151  		todo,
  8152  		// output in log
  8153  		noLines,
  8154  		noLines)
  8155  
  8156  	// load expectations for model: tuple_variation.go
  8157  	flattenRun.AddExpectations("tuple_variation.go", []string{
  8158  		`type TupleVariation struct {`,
  8159  		"	P0 *int64 `json:\"-\"`",
  8160  		"	P1 Bar `json:\"-\"`",
  8161  		"	P2 NonInterface `json:\"-\"`",
  8162  		"	P3 []Bar `json:\"-\"`",
  8163  		"	TupleVariationItems []interface{} `json:\"-\"`",
  8164  		`func (m *TupleVariation) Validate(formats strfmt.Registry) error {`,
  8165  		`	if err := m.validateP0(formats); err != nil {`,
  8166  		`	if err := m.validateP1(formats); err != nil {`,
  8167  		`	if err := m.validateP2(formats); err != nil {`,
  8168  		`	if err := m.validateP3(formats); err != nil {`,
  8169  		`	if err := m.validateTupleVariationItems(formats); err != nil {`,
  8170  		`		return errors.CompositeValidationError(res...`,
  8171  		`func (m *TupleVariation) validateP0(formats strfmt.Registry) error {`,
  8172  		`	if err := validate.Required("0", "body", m.P0); err != nil {`,
  8173  		`	if err := validate.MaximumInt("0", "body", int64(*m.P0), 10, false); err != nil {`,
  8174  		`func (m *TupleVariation) validateP1(formats strfmt.Registry) error {`,
  8175  		`	if err := validate.Required("1", "body", m.P1); err != nil {`,
  8176  		`func (m *TupleVariation) validateP2(formats strfmt.Registry) error {`,
  8177  		`	if err := m.P2.Validate(formats); err != nil {`,
  8178  		`		if ve, ok := err.(*errors.Validation); ok {`,
  8179  		`			return ve.ValidateName("2"`,
  8180  		`func (m *TupleVariation) validateP3(formats strfmt.Registry) error {`,
  8181  		`	if err := validate.Required("3", "body", m.P3); err != nil {`,
  8182  		`	iP3Size := int64(len(m.P3)`,
  8183  		`	if err := validate.MaxItems("3", "body", iP3Size, 10); err != nil {`,
  8184  		// empty validation
  8185  		"func (m *TupleVariation) validateTupleVariationItems(formats strfmt.Registry) error {\n\n	return nil\n}",
  8186  	},
  8187  		// not expected
  8188  		todo,
  8189  		// output in log
  8190  		noLines,
  8191  		noLines)
  8192  
  8193  	expandRun.AddExpectations("tuple_variation.go", []string{
  8194  		`type TupleVariation struct {`,
  8195  		"	P0 *int64 `json:\"-\"`",
  8196  		"	P1 interface{} `json:\"-\"`",
  8197  		"	P2 map[string]strfmt.Date `json:\"-\"`",
  8198  		"	P3 []interface{} `json:\"-\"`",
  8199  		"	TupleVariationItems []interface{} `json:\"-\"`",
  8200  		`func (m *TupleVariation) Validate(formats strfmt.Registry) error {`,
  8201  		`	if err := m.validateP0(formats); err != nil {`,
  8202  		`	if err := m.validateP1(formats); err != nil {`,
  8203  		`	if err := m.validateP2(formats); err != nil {`,
  8204  		`	if err := m.validateP3(formats); err != nil {`,
  8205  		`	if err := m.validateTupleVariationItems(formats); err != nil {`,
  8206  		`		return errors.CompositeValidationError(res...`,
  8207  		`func (m *TupleVariation) validateP0(formats strfmt.Registry) error {`,
  8208  		`	if err := validate.Required("0", "body", m.P0); err != nil {`,
  8209  		`	if err := validate.MaximumInt("0", "body", int64(*m.P0), 10, false); err != nil {`,
  8210  		`func (m *TupleVariation) validateP1(formats strfmt.Registry) error {`,
  8211  		`	if err := validate.Required("1", "body", m.P1); err != nil {`,
  8212  		`func (m *TupleVariation) validateP2(formats strfmt.Registry) error {`,
  8213  		`	for k := range m.P2 {`,
  8214  		//`		if swag.IsZero(m.P2[k]) {`,
  8215  		`		if err := validate.FormatOf("2"+"."+k, "body", "date", m.P2[k].String(), formats); err != nil {`,
  8216  		`func (m *TupleVariation) validateP3(formats strfmt.Registry) error {`,
  8217  		`	if err := validate.Required("3", "body", m.P3); err != nil {`,
  8218  		`	iP3Size := int64(len(m.P3)`,
  8219  		`	if err := validate.MaxItems("3", "body", iP3Size, 10); err != nil {`,
  8220  		// empty validation
  8221  		"func (m *TupleVariation) validateTupleVariationItems(formats strfmt.Registry) error {\n\n	return nil\n}",
  8222  	},
  8223  		// not expected
  8224  		todo,
  8225  		// output in log
  8226  		noLines,
  8227  		noLines)
  8228  
  8229  	// load expectations for model: add_items_variation.go
  8230  	flattenRun.AddExpectations("add_items_variation.go", []string{
  8231  		`type AddItemsVariation struct {`,
  8232  		"	P0 *int64 `json:\"-\"`",
  8233  		"	P1 Bar `json:\"-\"`",
  8234  		"	AddItemsVariationItems [][]Foo `json:\"-\"`",
  8235  		`func (m *AddItemsVariation) Validate(formats strfmt.Registry) error {`,
  8236  		`	if err := m.validateP0(formats); err != nil {`,
  8237  		`	if err := m.validateP1(formats); err != nil {`,
  8238  		`	if err := m.validateAddItemsVariationItems(formats); err != nil {`,
  8239  		`		return errors.CompositeValidationError(res...`,
  8240  		`func (m *AddItemsVariation) validateP0(formats strfmt.Registry) error {`,
  8241  		`	if err := validate.Required("0", "body", m.P0); err != nil {`,
  8242  		`	if err := validate.MaximumInt("0", "body", int64(*m.P0), 10, false); err != nil {`,
  8243  		`func (m *AddItemsVariation) validateP1(formats strfmt.Registry) error {`,
  8244  		`	if err := validate.Required("1", "body", m.P1); err != nil {`,
  8245  		`func (m *AddItemsVariation) validateAddItemsVariationItems(formats strfmt.Registry) error {`,
  8246  		`	for i := range m.AddItemsVariationItems {`,
  8247  		`		if err := validate.UniqueItems(strconv.Itoa(i+2), "body", m.AddItemsVariationItems[i]); err != nil {`,
  8248  	},
  8249  		// not expected
  8250  		todo,
  8251  		// output in log
  8252  		noLines,
  8253  		noLines)
  8254  
  8255  	expandRun.AddExpectations("add_items_variation.go", []string{
  8256  		`type AddItemsVariation struct {`,
  8257  		"	P0 *int64 `json:\"-\"`",
  8258  		"	P1 interface{} `json:\"-\"`",
  8259  		"	AddItemsVariationItems [][]interface{} `json:\"-\"`",
  8260  		`func (m *AddItemsVariation) Validate(formats strfmt.Registry) error {`,
  8261  		`	if err := m.validateP0(formats); err != nil {`,
  8262  		`	if err := m.validateP1(formats); err != nil {`,
  8263  		`	if err := m.validateAddItemsVariationItems(formats); err != nil {`,
  8264  		`		return errors.CompositeValidationError(res...`,
  8265  		`func (m *AddItemsVariation) validateP0(formats strfmt.Registry) error {`,
  8266  		`	if err := validate.Required("0", "body", m.P0); err != nil {`,
  8267  		`	if err := validate.MaximumInt("0", "body", int64(*m.P0), 10, false); err != nil {`,
  8268  		`func (m *AddItemsVariation) validateP1(formats strfmt.Registry) error {`,
  8269  		`	if err := validate.Required("1", "body", m.P1); err != nil {`,
  8270  		`func (m *AddItemsVariation) validateAddItemsVariationItems(formats strfmt.Registry) error {`,
  8271  		`	for i := range m.AddItemsVariationItems {`,
  8272  		`		if err := validate.UniqueItems(strconv.Itoa(i+2), "body", m.AddItemsVariationItems[i]); err != nil {`,
  8273  	},
  8274  		// not expected
  8275  		todo,
  8276  		// output in log
  8277  		noLines,
  8278  		noLines)
  8279  
  8280  	// load expectations for model: non_interface.go
  8281  	flattenRun.AddExpectations("non_interface.go", []string{
  8282  		`type NonInterface map[string]strfmt.Date`,
  8283  		`func (m NonInterface) Validate(formats strfmt.Registry) error {`,
  8284  		`	for k := range m {`,
  8285  		//`		if swag.IsZero(m[k]) {`,
  8286  		`		if err := validate.FormatOf(k, "body", "date", m[k].String(), formats); err != nil {`,
  8287  		`		return errors.CompositeValidationError(res...`,
  8288  	},
  8289  		// not expected
  8290  		todo,
  8291  		// output in log
  8292  		noLines,
  8293  		noLines)
  8294  
  8295  	expandRun.AddExpectations("non_interface.go", flattenRun.ExpectedFor("NonInterface").ExpectedLines, todo, noLines, noLines)
  8296  
  8297  	// load expectations for model: variation0.go
  8298  	flattenRun.AddExpectations("variation0.go", []string{
  8299  		`type Variation0 struct {`,
  8300  		`	Foo`,
  8301  		`	Bar`,
  8302  		// empty validation
  8303  		"func (m *Variation0) Validate(formats strfmt.Registry) error {\n	return nil\n}",
  8304  	},
  8305  		// not expected
  8306  		todo,
  8307  		// output in log
  8308  		noLines,
  8309  		noLines)
  8310  
  8311  	expandRun.AddExpectations("variation0.go", []string{
  8312  		`type Variation0 struct {`,
  8313  		`	Variation0AllOf0`,
  8314  		`	Variation0AllOf1`,
  8315  		`type Variation0AllOf0 interface{}`,
  8316  		`type Variation0AllOf1 interface{}`,
  8317  		// empty validation
  8318  		"func (m *Variation0) Validate(formats strfmt.Registry) error {\n	return nil\n}",
  8319  	},
  8320  		// not expected
  8321  		todo,
  8322  		// output in log
  8323  		noLines,
  8324  		noLines)
  8325  
  8326  	// load expectations for model: variation1.go
  8327  	flattenRun.AddExpectations("variation1.go", []string{
  8328  		`type Variation1 struct {`,
  8329  		`	Foo`,
  8330  		`	NonInterface`,
  8331  		`func (m *Variation1) Validate(formats strfmt.Registry) error {`,
  8332  		`	if err := m.NonInterface.Validate(formats); err != nil {`,
  8333  		`		return errors.CompositeValidationError(res...`,
  8334  	},
  8335  		// not expected
  8336  		todo,
  8337  		// output in log
  8338  		noLines,
  8339  		noLines)
  8340  
  8341  	expandRun.AddExpectations("variation1.go", []string{
  8342  		`type Variation1 struct {`,
  8343  		`	Variation1AllOf0`,
  8344  		"	AO1 map[string]strfmt.Date `json:\"-\"`",
  8345  		`func (m *Variation1) Validate(formats strfmt.Registry) error {`,
  8346  		`	for k := range m.AO1 {`,
  8347  		//`		if swag.IsZero(m.AO1[k]) {`,
  8348  		`		if err := validate.FormatOf(k, "body", "date", m.AO1[k].String(), formats); err != nil {`,
  8349  		`		return errors.CompositeValidationError(res...`,
  8350  		`type Variation1AllOf0 interface{}`,
  8351  	},
  8352  		// not expected
  8353  		todo,
  8354  		// output in log
  8355  		noLines,
  8356  		noLines)
  8357  
  8358  	// load expectations for model: empty_enum.go
  8359  	flattenRun.AddExpectations("empty_enum.go", []string{
  8360  		`type EmptyEnum interface{}`,
  8361  	},
  8362  		// not expected
  8363  		validatable,
  8364  		// output in log
  8365  		noLines,
  8366  		noLines)
  8367  
  8368  	expandRun.AddExpectations("empty_enum.go", flattenRun.ExpectedFor("EmptyEnum").ExpectedLines, validatable, noLines, noLines)
  8369  
  8370  	// load expectations for model: get_o_k_body.go
  8371  	flattenRun.AddExpectations("get_o_k_body.go", []string{
  8372  		`type GetOKBody struct {`,
  8373  		`	Foo`,
  8374  		`	Bar`,
  8375  		// empty validation
  8376  		"func (m *GetOKBody) Validate(formats strfmt.Registry) error {\n	return nil\n}",
  8377  	},
  8378  		// not expected
  8379  		todo,
  8380  		// output in log
  8381  		noLines,
  8382  		noLines)
  8383  
  8384  }
  8385  
  8386  func initFixtureMoreAddProps() {
  8387  	// testing fixture-moreAddProps.yaml with flatten and expand (--skip-flatten)
  8388  
  8389  	/*
  8390  	   various patterns of additionalProperties
  8391  	*/
  8392  
  8393  	f := newModelFixture("../fixtures/bugs/1487/fixture-moreAddProps.yaml", "fixture for additionalProperties")
  8394  	flattenRun := f.AddRun(false)
  8395  	expandRun := f.AddRun(true)
  8396  
  8397  	// load expectations for model: trial.go
  8398  	flattenRun.AddExpectations("trial.go", []string{
  8399  		`type Trial struct {`,
  8400  		"	A1 strfmt.DateTime `json:\"a1,omitempty\"`",
  8401  		"	AdditionalProperties *TrialAdditionalProperties `json:\"additionalProperties,omitempty\"`",
  8402  		`func (m *Trial) Validate(formats strfmt.Registry) error {`,
  8403  		`	if err := m.validateA1(formats); err != nil {`,
  8404  		`	if err := m.validateAdditionalProperties(formats); err != nil {`,
  8405  		`		return errors.CompositeValidationError(res...`,
  8406  		`func (m *Trial) validateA1(formats strfmt.Registry) error {`,
  8407  		`	if swag.IsZero(m.A1) {`,
  8408  		`	if err := validate.FormatOf("a1", "body", "date-time", m.A1.String(), formats); err != nil {`,
  8409  		`func (m *Trial) validateAdditionalProperties(formats strfmt.Registry) error {`,
  8410  		`	if swag.IsZero(m.AdditionalProperties) {`,
  8411  		`	if m.AdditionalProperties != nil {`,
  8412  		`		if err := m.AdditionalProperties.Validate(formats); err != nil {`,
  8413  		`			if ve, ok := err.(*errors.Validation); ok {`,
  8414  		`				return ve.ValidateName("additionalProperties"`,
  8415  	},
  8416  		// not expected
  8417  		todo,
  8418  		// output in log
  8419  		noLines,
  8420  		noLines)
  8421  
  8422  	// load expectations for model: trial_additional_properties.go
  8423  	flattenRun.AddExpectations("trial_additional_properties.go", []string{
  8424  		`type TrialAdditionalProperties struct {`,
  8425  		"	Discourse string `json:\"discourse,omitempty\"`",
  8426  		"	HoursSpent float64 `json:\"hoursSpent,omitempty\"`",
  8427  		"	TrialAdditionalPropertiesAdditionalProperties map[string]interface{} `json:\"-\"`",
  8428  		// empty validation
  8429  		"func (m *TrialAdditionalProperties) Validate(formats strfmt.Registry) error {\n	return nil\n}",
  8430  	},
  8431  		// not expected
  8432  		todo,
  8433  		// output in log
  8434  		noLines,
  8435  		noLines)
  8436  
  8437  	// load expectations for model: additional_transitive_refed_object_thing_additional_properties.go
  8438  	flattenRun.AddExpectations("additional_transitive_refed_object_thing_additional_properties.go", []string{
  8439  		`type AdditionalTransitiveRefedObjectThingAdditionalProperties struct {`,
  8440  		"	Prop1 *AdditionalTransitiveRefedObjectThingAdditionalPropertiesProp1 `json:\"prop1,omitempty\"`",
  8441  		"	AdditionalTransitiveRefedObjectThingAdditionalProperties map[string]*AdditionalTransitiveRefedObjectThingAdditionalPropertiesAdditionalProperties `json:\"-\"`",
  8442  		`func (m *AdditionalTransitiveRefedObjectThingAdditionalProperties) Validate(formats strfmt.Registry) error {`,
  8443  		`	if err := m.validateProp1(formats); err != nil {`,
  8444  		`	for k := range m.AdditionalTransitiveRefedObjectThingAdditionalProperties {`,
  8445  		`		if val, ok := m.AdditionalTransitiveRefedObjectThingAdditionalProperties[k]; ok {`,
  8446  		`			if val != nil {`,
  8447  		`				if err := val.Validate(formats); err != nil {`,
  8448  		`		return errors.CompositeValidationError(res...`,
  8449  		`func (m *AdditionalTransitiveRefedObjectThingAdditionalProperties) validateProp1(formats strfmt.Registry) error {`,
  8450  		`	if swag.IsZero(m.Prop1) {`,
  8451  		`	if m.Prop1 != nil {`,
  8452  		`		if err := m.Prop1.Validate(formats); err != nil {`,
  8453  		`			if ve, ok := err.(*errors.Validation); ok {`,
  8454  		`				return ve.ValidateName("prop1"`,
  8455  	},
  8456  		// not expected
  8457  		todo,
  8458  		// output in log
  8459  		noLines,
  8460  		noLines)
  8461  
  8462  	// load expectations for model: additional_transitive_refed_object_thing_additional_properties_prop1.go
  8463  	flattenRun.AddExpectations("additional_transitive_refed_object_thing_additional_properties_prop1.go", []string{
  8464  		`type AdditionalTransitiveRefedObjectThingAdditionalPropertiesProp1 struct {`,
  8465  		"	ThisOneNotRequiredEither int64 `json:\"thisOneNotRequiredEither,omitempty\"`",
  8466  		"	AdditionalTransitiveRefedObjectThingAdditionalPropertiesProp1 map[string]*AdditionalTransitiveRefedObjectThingAdditionalPropertiesProp1AdditionalProperties `json:\"-\"`",
  8467  		`func (m *AdditionalTransitiveRefedObjectThingAdditionalPropertiesProp1) Validate(formats strfmt.Registry) error {`,
  8468  		`	if err := m.validateThisOneNotRequiredEither(formats); err != nil {`,
  8469  		`	for k := range m.AdditionalTransitiveRefedObjectThingAdditionalPropertiesProp1 {`,
  8470  		`		if val, ok := m.AdditionalTransitiveRefedObjectThingAdditionalPropertiesProp1[k]; ok {`,
  8471  		`			if val != nil {`,
  8472  		`				if err := val.Validate(formats); err != nil {`,
  8473  		`		return errors.CompositeValidationError(res...`,
  8474  		`func (m *AdditionalTransitiveRefedObjectThingAdditionalPropertiesProp1) validateThisOneNotRequiredEither(formats strfmt.Registry) error {`,
  8475  		`	if swag.IsZero(m.ThisOneNotRequiredEither) {`,
  8476  		`	if err := validate.MaximumInt("thisOneNotRequiredEither", "body", int64(m.ThisOneNotRequiredEither), 20, false); err != nil {`,
  8477  	},
  8478  		// not expected
  8479  		todo,
  8480  		// output in log
  8481  		noLines,
  8482  		noLines)
  8483  
  8484  	// load expectations for model: additional_transitive_refed_thing.go
  8485  	flattenRun.AddExpectations("additional_transitive_refed_thing.go", []string{
  8486  		`type AdditionalTransitiveRefedThing struct {`,
  8487  		"	ThisOneNotRequired int64 `json:\"thisOneNotRequired,omitempty\"`",
  8488  		"	AdditionalTransitiveRefedThing map[string][]*AdditionalTransitiveRefedThingAdditionalPropertiesItems `json:\"-\"`",
  8489  		`func (m *AdditionalTransitiveRefedThing) Validate(formats strfmt.Registry) error {`,
  8490  		`	if err := m.validateThisOneNotRequired(formats); err != nil {`,
  8491  		`	for k := range m.AdditionalTransitiveRefedThing {`,
  8492  		`		if err := validate.Required(k, "body", m.AdditionalTransitiveRefedThing[k]); err != nil {`,
  8493  		`		if err := validate.UniqueItems(k, "body", m.AdditionalTransitiveRefedThing[k]); err != nil {`,
  8494  		`		for i := 0; i < len(m.AdditionalTransitiveRefedThing[k]); i++ {`,
  8495  		// do we need Required when item is nullable?
  8496  		// nullable not required:
  8497  		`			if swag.IsZero(m.AdditionalTransitiveRefedThing[k][i]) {`,
  8498  		// nullable not required:
  8499  		//`			if err := validate.Required(k+"."+strconv.Itoa(i), "body", m.AdditionalTransitiveRefedThing[k][i]); err != nil {`,
  8500  		`			if m.AdditionalTransitiveRefedThing[k][i] != nil {`,
  8501  		`				if err := m.AdditionalTransitiveRefedThing[k][i].Validate(formats); err != nil {`,
  8502  		`					if ve, ok := err.(*errors.Validation); ok {`,
  8503  		`						return ve.ValidateName(k + "." + strconv.Itoa(i)`,
  8504  		`		return errors.CompositeValidationError(res...`,
  8505  		`func (m *AdditionalTransitiveRefedThing) validateThisOneNotRequired(formats strfmt.Registry) error {`,
  8506  		`	if swag.IsZero(m.ThisOneNotRequired) {`,
  8507  		`	if err := validate.MaximumInt("thisOneNotRequired", "body", int64(m.ThisOneNotRequired), 10, false); err != nil {`,
  8508  	},
  8509  		// not expected
  8510  		todo,
  8511  		// output in log
  8512  		noLines,
  8513  		noLines)
  8514  
  8515  	// load expectations for model: additional_transitive_refed_thing_additional_properties_items_additional_properties_additional_properties.go
  8516  	flattenRun.AddExpectations("additional_transitive_refed_thing_additional_properties_items_additional_properties_additional_properties.go", []string{
  8517  		`type AdditionalTransitiveRefedThingAdditionalPropertiesItemsAdditionalPropertiesAdditionalProperties struct {`,
  8518  		"	Discourse string `json:\"discourse,omitempty\"`",
  8519  		"	HoursSpent float64 `json:\"hoursSpent,omitempty\"`",
  8520  		"	AdditionalTransitiveRefedThingAdditionalPropertiesItemsAdditionalPropertiesAdditionalPropertiesAdditionalProperties map[string]interface{} `json:\"-\"`",
  8521  		// empty validation
  8522  		"func (m *AdditionalTransitiveRefedThingAdditionalPropertiesItemsAdditionalPropertiesAdditionalProperties) Validate(formats strfmt.Registry) error {\n	return nil\n}",
  8523  	},
  8524  		// not expected
  8525  		todo,
  8526  		// output in log
  8527  		noLines,
  8528  		noLines)
  8529  
  8530  	// load expectations for model: additional_transitive_refed_object_thing.go
  8531  	flattenRun.AddExpectations("additional_transitive_refed_object_thing.go", []string{
  8532  		`type AdditionalTransitiveRefedObjectThing struct {`,
  8533  		"	ThisOneNotRequired int64 `json:\"thisOneNotRequired,omitempty\"`",
  8534  		"	AdditionalTransitiveRefedObjectThing map[string]*AdditionalTransitiveRefedObjectThingAdditionalProperties `json:\"-\"`",
  8535  		`func (m *AdditionalTransitiveRefedObjectThing) Validate(formats strfmt.Registry) error {`,
  8536  		`	if err := m.validateThisOneNotRequired(formats); err != nil {`,
  8537  		`	for k := range m.AdditionalTransitiveRefedObjectThing {`,
  8538  		`		if val, ok := m.AdditionalTransitiveRefedObjectThing[k]; ok {`,
  8539  		`			if val != nil {`,
  8540  		`				if err := val.Validate(formats); err != nil {`,
  8541  		`		return errors.CompositeValidationError(res...`,
  8542  		`func (m *AdditionalTransitiveRefedObjectThing) validateThisOneNotRequired(formats strfmt.Registry) error {`,
  8543  		`	if swag.IsZero(m.ThisOneNotRequired) {`,
  8544  		`	if err := validate.MaximumInt("thisOneNotRequired", "body", int64(m.ThisOneNotRequired), 10, false); err != nil {`,
  8545  	},
  8546  		// not expected
  8547  		todo,
  8548  		// output in log
  8549  		noLines,
  8550  		noLines)
  8551  
  8552  	// load expectations for model: additional_transitive_refed_object_thing_additional_properties_additional_properties.go
  8553  	flattenRun.AddExpectations("additional_transitive_refed_object_thing_additional_properties_additional_properties.go", []string{
  8554  		`type AdditionalTransitiveRefedObjectThingAdditionalPropertiesAdditionalProperties struct {`,
  8555  		"	Discourse string `json:\"discourse,omitempty\"`",
  8556  		"	HoursSpent float64 `json:\"hoursSpent,omitempty\"`",
  8557  		"	AdditionalTransitiveRefedObjectThingAdditionalPropertiesAdditionalPropertiesAdditionalProperties map[string]interface{} `json:\"-\"`",
  8558  		// empty validation
  8559  		"func (m *AdditionalTransitiveRefedObjectThingAdditionalPropertiesAdditionalProperties) Validate(formats strfmt.Registry) error {\n	return nil\n}",
  8560  	},
  8561  		// not expected
  8562  		todo,
  8563  		// output in log
  8564  		noLines,
  8565  		noLines)
  8566  
  8567  	// load expectations for model: additional_transitive_refed_object_thing_additional_properties_prop1_additional_properties.go
  8568  	flattenRun.AddExpectations("additional_transitive_refed_object_thing_additional_properties_prop1_additional_properties.go", []string{
  8569  		`type AdditionalTransitiveRefedObjectThingAdditionalPropertiesProp1AdditionalProperties struct {`,
  8570  		"	A1 strfmt.DateTime `json:\"a1,omitempty\"`",
  8571  		"	B1 strfmt.Date `json:\"b1,omitempty\"`",
  8572  		"	AdditionalTransitiveRefedObjectThingAdditionalPropertiesProp1AdditionalPropertiesAdditionalProperties map[string]interface{} `json:\"-\"`",
  8573  		`func (m *AdditionalTransitiveRefedObjectThingAdditionalPropertiesProp1AdditionalProperties) Validate(formats strfmt.Registry) error {`,
  8574  		`	if err := m.validateA1(formats); err != nil {`,
  8575  		`	if err := m.validateB1(formats); err != nil {`,
  8576  		`		return errors.CompositeValidationError(res...`,
  8577  		`func (m *AdditionalTransitiveRefedObjectThingAdditionalPropertiesProp1AdditionalProperties) validateA1(formats strfmt.Registry) error {`,
  8578  		`	if swag.IsZero(m.A1) {`,
  8579  		`	if err := validate.FormatOf("a1", "body", "date-time", m.A1.String(), formats); err != nil {`,
  8580  		`func (m *AdditionalTransitiveRefedObjectThingAdditionalPropertiesProp1AdditionalProperties) validateB1(formats strfmt.Registry) error {`,
  8581  		`	if swag.IsZero(m.B1) {`,
  8582  		`	if err := validate.FormatOf("b1", "body", "date", m.B1.String(), formats); err != nil {`,
  8583  	},
  8584  		// not expected
  8585  		todo,
  8586  		// output in log
  8587  		noLines,
  8588  		noLines)
  8589  
  8590  	// load expectations for model: additional_transitive_refed_thing_additional_properties_items.go
  8591  	flattenRun.AddExpectations("additional_transitive_refed_thing_additional_properties_items.go", []string{
  8592  		`type AdditionalTransitiveRefedThingAdditionalPropertiesItems struct {`,
  8593  		"	ThisOneNotRequiredEither int64 `json:\"thisOneNotRequiredEither,omitempty\"`",
  8594  		"	AdditionalTransitiveRefedThingAdditionalPropertiesItems map[string]*AdditionalTransitiveRefedThingAdditionalPropertiesItemsAdditionalProperties `json:\"-\"`",
  8595  		`func (m *AdditionalTransitiveRefedThingAdditionalPropertiesItems) Validate(formats strfmt.Registry) error {`,
  8596  		`	if err := m.validateThisOneNotRequiredEither(formats); err != nil {`,
  8597  		`	for k := range m.AdditionalTransitiveRefedThingAdditionalPropertiesItems {`,
  8598  		`		if val, ok := m.AdditionalTransitiveRefedThingAdditionalPropertiesItems[k]; ok {`,
  8599  		`			if val != nil {`,
  8600  		`				if err := val.Validate(formats); err != nil {`,
  8601  		`		return errors.CompositeValidationError(res...`,
  8602  		`func (m *AdditionalTransitiveRefedThingAdditionalPropertiesItems) validateThisOneNotRequiredEither(formats strfmt.Registry) error {`,
  8603  		`	if swag.IsZero(m.ThisOneNotRequiredEither) {`,
  8604  		`	if err := validate.MaximumInt("thisOneNotRequiredEither", "body", int64(m.ThisOneNotRequiredEither), 20, false); err != nil {`,
  8605  	},
  8606  		// not expected
  8607  		todo,
  8608  		// output in log
  8609  		noLines,
  8610  		noLines)
  8611  
  8612  	// load expectations for model: additional_transitive_refed_thing_additional_properties_items_additional_properties.go
  8613  	flattenRun.AddExpectations("additional_transitive_refed_thing_additional_properties_items_additional_properties.go", []string{
  8614  		`type AdditionalTransitiveRefedThingAdditionalPropertiesItemsAdditionalProperties struct {`,
  8615  		"	A1 strfmt.DateTime `json:\"a1,omitempty\"`",
  8616  		"	B1 strfmt.DateTime `json:\"b1,omitempty\"`",
  8617  		"	AdditionalTransitiveRefedThingAdditionalPropertiesItemsAdditionalProperties map[string]*AdditionalTransitiveRefedThingAdditionalPropertiesItemsAdditionalPropertiesAdditionalProperties `json:\"-\"`",
  8618  		`func (m *AdditionalTransitiveRefedThingAdditionalPropertiesItemsAdditionalProperties) Validate(formats strfmt.Registry) error {`,
  8619  		`	if err := m.validateA1(formats); err != nil {`,
  8620  		`	if err := m.validateB1(formats); err != nil {`,
  8621  		`	for k := range m.AdditionalTransitiveRefedThingAdditionalPropertiesItemsAdditionalProperties {`,
  8622  		`		if val, ok := m.AdditionalTransitiveRefedThingAdditionalPropertiesItemsAdditionalProperties[k]; ok {`,
  8623  		`			if val != nil {`,
  8624  		`				if err := val.Validate(formats); err != nil {`,
  8625  		`		return errors.CompositeValidationError(res...`,
  8626  		`func (m *AdditionalTransitiveRefedThingAdditionalPropertiesItemsAdditionalProperties) validateA1(formats strfmt.Registry) error {`,
  8627  		`	if swag.IsZero(m.A1) {`,
  8628  		`	if err := validate.FormatOf("a1", "body", "date-time", m.A1.String(), formats); err != nil {`,
  8629  		`func (m *AdditionalTransitiveRefedThingAdditionalPropertiesItemsAdditionalProperties) validateB1(formats strfmt.Registry) error {`,
  8630  		`	if swag.IsZero(m.B1) {`,
  8631  		`	if err := validate.FormatOf("b1", "body", "date-time", m.B1.String(), formats); err != nil {`,
  8632  	},
  8633  		// not expected
  8634  		todo,
  8635  		// output in log
  8636  		noLines,
  8637  		noLines)
  8638  
  8639  	// load expectations for model: trial.go
  8640  	expandRun.AddExpectations("trial.go", []string{
  8641  		`type Trial struct {`,
  8642  		"	A1 strfmt.DateTime `json:\"a1,omitempty\"`",
  8643  		"	AdditionalProperties *TrialAdditionalProperties `json:\"additionalProperties,omitempty\"`",
  8644  		`func (m *Trial) Validate(formats strfmt.Registry) error {`,
  8645  		`	if err := m.validateA1(formats); err != nil {`,
  8646  		`	if err := m.validateAdditionalProperties(formats); err != nil {`,
  8647  		`		return errors.CompositeValidationError(res...`,
  8648  		`func (m *Trial) validateA1(formats strfmt.Registry) error {`,
  8649  		`	if swag.IsZero(m.A1) {`,
  8650  		`	if err := validate.FormatOf("a1", "body", "date-time", m.A1.String(), formats); err != nil {`,
  8651  		`func (m *Trial) validateAdditionalProperties(formats strfmt.Registry) error {`,
  8652  		`	if swag.IsZero(m.AdditionalProperties) {`,
  8653  		`	if m.AdditionalProperties != nil {`,
  8654  		`		if err := m.AdditionalProperties.Validate(formats); err != nil {`,
  8655  		`			if ve, ok := err.(*errors.Validation); ok {`,
  8656  		`				return ve.ValidateName("additionalProperties"`,
  8657  		`type TrialAdditionalProperties struct {`,
  8658  		"	Discourse string `json:\"discourse,omitempty\"`",
  8659  		"	HoursSpent float64 `json:\"hoursSpent,omitempty\"`",
  8660  		"	TrialAdditionalPropertiesAdditionalProperties map[string]interface{} `json:\"-\"`",
  8661  		// empty validation
  8662  		"func (m *TrialAdditionalProperties) Validate(formats strfmt.Registry) error {\n	return nil\n}",
  8663  	},
  8664  		// not expected
  8665  		todo,
  8666  		// output in log
  8667  		noLines,
  8668  		noLines)
  8669  
  8670  	// load expectations for model: additional_transitive_refed_thing.go
  8671  	expandRun.AddExpectations("additional_transitive_refed_thing.go", []string{
  8672  		`type AdditionalTransitiveRefedThing struct {`,
  8673  		"	ThisOneNotRequired int64 `json:\"thisOneNotRequired,omitempty\"`",
  8674  		"	AdditionalTransitiveRefedThing map[string][]*AdditionalTransitiveRefedThingItems0 `json:\"-\"`",
  8675  		`func (m *AdditionalTransitiveRefedThing) Validate(formats strfmt.Registry) error {`,
  8676  		`	if err := m.validateThisOneNotRequired(formats); err != nil {`,
  8677  		`	for k := range m.AdditionalTransitiveRefedThing {`,
  8678  		`		if err := validate.Required(k, "body", m.AdditionalTransitiveRefedThing[k]); err != nil {`,
  8679  		`		if err := validate.UniqueItems(k, "body", m.AdditionalTransitiveRefedThing[k]); err != nil {`,
  8680  		`		for i := 0; i < len(m.AdditionalTransitiveRefedThing[k]); i++ {`,
  8681  		// do we need Required when item is nullable?
  8682  		// nullable not required:
  8683  		`			if swag.IsZero(m.AdditionalTransitiveRefedThing[k][i]) {`,
  8684  		// nullable required:
  8685  		//`			if err := validate.Required(k+"."+strconv.Itoa(i), "body", m.AdditionalTransitiveRefedThing[k][i]); err != nil {`,
  8686  		`			if m.AdditionalTransitiveRefedThing[k][i] != nil {`,
  8687  		`				if err := m.AdditionalTransitiveRefedThing[k][i].Validate(formats); err != nil {`,
  8688  		`					if ve, ok := err.(*errors.Validation); ok {`,
  8689  		`						return ve.ValidateName(k + "." + strconv.Itoa(i)`,
  8690  		`		return errors.CompositeValidationError(res...`,
  8691  		`func (m *AdditionalTransitiveRefedThing) validateThisOneNotRequired(formats strfmt.Registry) error {`,
  8692  		`	if swag.IsZero(m.ThisOneNotRequired) {`,
  8693  		`	if err := validate.MaximumInt("thisOneNotRequired", "body", int64(m.ThisOneNotRequired), 10, false); err != nil {`,
  8694  		`type AdditionalTransitiveRefedThingItems0 struct {`,
  8695  		"	ThisOneNotRequiredEither int64 `json:\"thisOneNotRequiredEither,omitempty\"`",
  8696  		"	AdditionalTransitiveRefedThingItems0 map[string]*AdditionalTransitiveRefedThingItems0Anon `json:\"-\"`",
  8697  		`func (m *AdditionalTransitiveRefedThingItems0) Validate(formats strfmt.Registry) error {`,
  8698  		`	if err := m.validateThisOneNotRequiredEither(formats); err != nil {`,
  8699  		`	for k := range m.AdditionalTransitiveRefedThingItems0 {`,
  8700  		`		if val, ok := m.AdditionalTransitiveRefedThingItems0[k]; ok {`,
  8701  		`			if val != nil {`,
  8702  		`				if err := val.Validate(formats); err != nil {`,
  8703  		`		return errors.CompositeValidationError(res...`,
  8704  		`func (m *AdditionalTransitiveRefedThingItems0) validateThisOneNotRequiredEither(formats strfmt.Registry) error {`,
  8705  		`	if swag.IsZero(m.ThisOneNotRequiredEither) {`,
  8706  		`	if err := validate.MaximumInt("thisOneNotRequiredEither", "body", int64(m.ThisOneNotRequiredEither), 20, false); err != nil {`,
  8707  		`type AdditionalTransitiveRefedThingItems0Anon struct {`,
  8708  		"	A1 strfmt.DateTime `json:\"a1,omitempty\"`",
  8709  		"	B1 strfmt.DateTime `json:\"b1,omitempty\"`",
  8710  		"	AdditionalTransitiveRefedThingItems0Anon map[string]*AdditionalTransitiveRefedThingItems0AnonAnon `json:\"-\"`",
  8711  		`func (m *AdditionalTransitiveRefedThingItems0Anon) Validate(formats strfmt.Registry) error {`,
  8712  		`	if err := m.validateA1(formats); err != nil {`,
  8713  		`	if err := m.validateB1(formats); err != nil {`,
  8714  		`	for k := range m.AdditionalTransitiveRefedThingItems0Anon {`,
  8715  		`		if val, ok := m.AdditionalTransitiveRefedThingItems0Anon[k]; ok {`,
  8716  		`			if val != nil {`,
  8717  		`				if err := val.Validate(formats); err != nil {`,
  8718  		`		return errors.CompositeValidationError(res...`,
  8719  		`func (m *AdditionalTransitiveRefedThingItems0Anon) validateA1(formats strfmt.Registry) error {`,
  8720  		`	if swag.IsZero(m.A1) {`,
  8721  		`	if err := validate.FormatOf("a1", "body", "date-time", m.A1.String(), formats); err != nil {`,
  8722  		`func (m *AdditionalTransitiveRefedThingItems0Anon) validateB1(formats strfmt.Registry) error {`,
  8723  		`	if swag.IsZero(m.B1) {`,
  8724  		`	if err := validate.FormatOf("b1", "body", "date-time", m.B1.String(), formats); err != nil {`,
  8725  		`type AdditionalTransitiveRefedThingItems0AnonAnon struct {`,
  8726  		"	Discourse string `json:\"discourse,omitempty\"`",
  8727  		"	HoursSpent float64 `json:\"hoursSpent,omitempty\"`",
  8728  		"	AdditionalTransitiveRefedThingItems0AnonAnonAdditionalProperties map[string]interface{} `json:\"-\"`",
  8729  		// empty validation
  8730  		"func (m *AdditionalTransitiveRefedThingItems0AnonAnon) Validate(formats strfmt.Registry) error {\n	return nil\n}",
  8731  	},
  8732  		// not expected
  8733  		todo,
  8734  		// output in log
  8735  		noLines,
  8736  		noLines)
  8737  
  8738  	// load expectations for model: additional_transitive_refed_object_thing.go
  8739  	expandRun.AddExpectations("additional_transitive_refed_object_thing.go", []string{
  8740  		`type AdditionalTransitiveRefedObjectThing struct {`,
  8741  		"	ThisOneNotRequired int64 `json:\"thisOneNotRequired,omitempty\"`",
  8742  		"	AdditionalTransitiveRefedObjectThing map[string]*AdditionalTransitiveRefedObjectThingAnon `json:\"-\"`",
  8743  		`func (m *AdditionalTransitiveRefedObjectThing) Validate(formats strfmt.Registry) error {`,
  8744  		`	if err := m.validateThisOneNotRequired(formats); err != nil {`,
  8745  		`	for k := range m.AdditionalTransitiveRefedObjectThing {`,
  8746  		`		if val, ok := m.AdditionalTransitiveRefedObjectThing[k]; ok {`,
  8747  		`			if val != nil {`,
  8748  		`				if err := val.Validate(formats); err != nil {`,
  8749  		`		return errors.CompositeValidationError(res...`,
  8750  		`func (m *AdditionalTransitiveRefedObjectThing) validateThisOneNotRequired(formats strfmt.Registry) error {`,
  8751  		`	if swag.IsZero(m.ThisOneNotRequired) {`,
  8752  		`	if err := validate.MaximumInt("thisOneNotRequired", "body", int64(m.ThisOneNotRequired), 10, false); err != nil {`,
  8753  		`type AdditionalTransitiveRefedObjectThingAnon struct {`,
  8754  		"	Prop1 *AdditionalTransitiveRefedObjectThingAnonProp1 `json:\"prop1,omitempty\"`",
  8755  		"	AdditionalTransitiveRefedObjectThingAnon map[string]*AdditionalTransitiveRefedObjectThingAnonAnon `json:\"-\"`",
  8756  		`func (m *AdditionalTransitiveRefedObjectThingAnon) Validate(formats strfmt.Registry) error {`,
  8757  		`	if err := m.validateProp1(formats); err != nil {`,
  8758  		`	for k := range m.AdditionalTransitiveRefedObjectThingAnon {`,
  8759  		`		if val, ok := m.AdditionalTransitiveRefedObjectThingAnon[k]; ok {`,
  8760  		`			if val != nil {`,
  8761  		`				if err := val.Validate(formats); err != nil {`,
  8762  		`		return errors.CompositeValidationError(res...`,
  8763  		`func (m *AdditionalTransitiveRefedObjectThingAnon) validateProp1(formats strfmt.Registry) error {`,
  8764  		`	if swag.IsZero(m.Prop1) {`,
  8765  		`	if m.Prop1 != nil {`,
  8766  		`		if err := m.Prop1.Validate(formats); err != nil {`,
  8767  		`			if ve, ok := err.(*errors.Validation); ok {`,
  8768  		`				return ve.ValidateName("prop1"`,
  8769  		`type AdditionalTransitiveRefedObjectThingAnonAnon struct {`,
  8770  		"	Discourse string `json:\"discourse,omitempty\"`",
  8771  		"	HoursSpent float64 `json:\"hoursSpent,omitempty\"`",
  8772  		"	AdditionalTransitiveRefedObjectThingAnonAnonAdditionalProperties map[string]interface{} `json:\"-\"`",
  8773  		`type AdditionalTransitiveRefedObjectThingAnonProp1 struct {`,
  8774  		"	ThisOneNotRequiredEither int64 `json:\"thisOneNotRequiredEither,omitempty\"`",
  8775  		"	AdditionalTransitiveRefedObjectThingAnonProp1 map[string]*AdditionalTransitiveRefedObjectThingAnonProp1Anon `json:\"-\"`",
  8776  		`func (m *AdditionalTransitiveRefedObjectThingAnonProp1) Validate(formats strfmt.Registry) error {`,
  8777  		`	if err := m.validateThisOneNotRequiredEither(formats); err != nil {`,
  8778  		`	for k := range m.AdditionalTransitiveRefedObjectThingAnonProp1 {`,
  8779  		`		if val, ok := m.AdditionalTransitiveRefedObjectThingAnonProp1[k]; ok {`,
  8780  		`			if val != nil {`,
  8781  		`				if err := val.Validate(formats); err != nil {`,
  8782  		`		return errors.CompositeValidationError(res...`,
  8783  		`func (m *AdditionalTransitiveRefedObjectThingAnonProp1) validateThisOneNotRequiredEither(formats strfmt.Registry) error {`,
  8784  		`	if swag.IsZero(m.ThisOneNotRequiredEither) {`,
  8785  		`	if err := validate.MaximumInt("prop1"+"."+"thisOneNotRequiredEither", "body", int64(m.ThisOneNotRequiredEither), 20, false); err != nil {`,
  8786  		`type AdditionalTransitiveRefedObjectThingAnonProp1Anon struct {`,
  8787  		"	A1 strfmt.DateTime `json:\"a1,omitempty\"`",
  8788  		"	B1 strfmt.Date `json:\"b1,omitempty\"`",
  8789  		"	AdditionalTransitiveRefedObjectThingAnonProp1AnonAdditionalProperties map[string]interface{} `json:\"-\"`",
  8790  		`func (m *AdditionalTransitiveRefedObjectThingAnonProp1Anon) Validate(formats strfmt.Registry) error {`,
  8791  		`	if err := m.validateA1(formats); err != nil {`,
  8792  		`	if err := m.validateB1(formats); err != nil {`,
  8793  		`		return errors.CompositeValidationError(res...`,
  8794  		`func (m *AdditionalTransitiveRefedObjectThingAnonProp1Anon) validateA1(formats strfmt.Registry) error {`,
  8795  		`	if swag.IsZero(m.A1) {`,
  8796  		`	if err := validate.FormatOf("a1", "body", "date-time", m.A1.String(), formats); err != nil {`,
  8797  		`func (m *AdditionalTransitiveRefedObjectThingAnonProp1Anon) validateB1(formats strfmt.Registry) error {`,
  8798  		`	if swag.IsZero(m.B1) {`,
  8799  		`	if err := validate.FormatOf("b1", "body", "date", m.B1.String(), formats); err != nil {`,
  8800  		// empty validation
  8801  		"func (m *AdditionalTransitiveRefedObjectThingAnonAnon) Validate(formats strfmt.Registry) error {\n	return nil\n}",
  8802  	},
  8803  		// not expected
  8804  		todo,
  8805  		// output in log
  8806  		noLines,
  8807  		noLines)
  8808  
  8809  }
  8810  
  8811  func initFixture1537() {
  8812  	// testing fixture-1537.yaml with flatten and expand (--skip-flatten)
  8813  	// TODO: expand
  8814  
  8815  	/*
  8816  	   repro issue 1537
  8817  	*/
  8818  
  8819  	f := newModelFixture("../fixtures/bugs/1537/fixture-1537.yaml", "param body required with array of objects")
  8820  	thisRun := f.AddRun(false)
  8821  
  8822  	// load expectations for model: profile_array.go
  8823  	thisRun.AddExpectations("profile_array.go", []string{
  8824  		`type ProfileArray struct {`,
  8825  		"	ProfileCfg []*ProfileCfg `json:\"profileCfg\"`",
  8826  		`func (m *ProfileArray) Validate(formats strfmt.Registry) error {`,
  8827  		`	if err := m.validateProfileCfg(formats); err != nil {`,
  8828  		`		return errors.CompositeValidationError(res...`,
  8829  		`func (m *ProfileArray) validateProfileCfg(formats strfmt.Registry) error {`,
  8830  		`	if err := validate.Required("profileCfg", "body", m.ProfileCfg); err != nil {`,
  8831  		`	for i := 0; i < len(m.ProfileCfg); i++ {`,
  8832  		// do we need Required when item is nullable?
  8833  		// nullable not required:
  8834  		`		if swag.IsZero(m.ProfileCfg[i]) {`,
  8835  		// nullable required:
  8836  		//`if err := validate.Required("profileCfg"+"."+strconv.Itoa(i), "body", m.ProfileCfg[i]); err != nil {`,
  8837  		`		if m.ProfileCfg[i] != nil {`,
  8838  		`			if err := m.ProfileCfg[i].Validate(formats); err != nil {`,
  8839  		`				if ve, ok := err.(*errors.Validation); ok {`,
  8840  		`					return ve.ValidateName("profileCfg" + "." + strconv.Itoa(i)`,
  8841  	},
  8842  		// not expected
  8843  		todo,
  8844  		// output in log
  8845  		noLines,
  8846  		noLines)
  8847  
  8848  	// load expectations for model: profile.go
  8849  	thisRun.AddExpectations("profile.go", []string{
  8850  		`type Profile struct {`,
  8851  		"	ProfileCfg ProfileCfgs `json:\"profileCfg,omitempty\"`",
  8852  		`func (m *Profile) Validate(formats strfmt.Registry) error {`,
  8853  		`	if err := m.validateProfileCfg(formats); err != nil {`,
  8854  		`		return errors.CompositeValidationError(res...`,
  8855  		`func (m *Profile) validateProfileCfg(formats strfmt.Registry) error {`,
  8856  		`	if swag.IsZero(m.ProfileCfg) {`,
  8857  		`	if err := m.ProfileCfg.Validate(formats); err != nil {`,
  8858  		`		if ve, ok := err.(*errors.Validation); ok {`,
  8859  		`			return ve.ValidateName("profileCfg"`,
  8860  	},
  8861  		// not expected
  8862  		todo,
  8863  		// output in log
  8864  		noLines,
  8865  		noLines)
  8866  
  8867  	// load expectations for model: profile_cfgs.go
  8868  	thisRun.AddExpectations("profile_cfgs.go", []string{
  8869  		`type ProfileCfgs []*ProfileCfg`,
  8870  		`func (m ProfileCfgs) Validate(formats strfmt.Registry) error {`,
  8871  		`	for i := 0; i < len(m); i++ {`,
  8872  		// do we need Required when item is nullable?
  8873  		// nullable not required:
  8874  		`		if swag.IsZero(m[i]) {`,
  8875  		// nullable required:
  8876  		//`if err := validate.Required(strconv.Itoa(i), "body", m[i]); err != nil {`,
  8877  		`		if m[i] != nil {`,
  8878  		`			if err := m[i].Validate(formats); err != nil {`,
  8879  		`				if ve, ok := err.(*errors.Validation); ok {`,
  8880  		`					return ve.ValidateName(strconv.Itoa(i)`,
  8881  		`		return errors.CompositeValidationError(res...`,
  8882  	},
  8883  		// not expected
  8884  		todo,
  8885  		// output in log
  8886  		noLines,
  8887  		noLines)
  8888  
  8889  	// load expectations for model: profile_cfg.go
  8890  	thisRun.AddExpectations("profile_cfg.go", []string{
  8891  		`type ProfileCfg struct {`,
  8892  		"	Value1 int32 `json:\"value1,omitempty\"`",
  8893  		"	Value2 int32 `json:\"value2,omitempty\"`",
  8894  		// empty validation
  8895  		"func (m *ProfileCfg) Validate(formats strfmt.Registry) error {\n	return nil\n}",
  8896  	},
  8897  		// not expected
  8898  		todo,
  8899  		// output in log
  8900  		noLines,
  8901  		noLines)
  8902  
  8903  	// load expectations for model: profile_required.go
  8904  	thisRun.AddExpectations("profile_required.go", []string{
  8905  		`type ProfileRequired struct {`,
  8906  		"	ProfileCfg ProfileCfgs `json:\"profileCfg\"`",
  8907  		`func (m *ProfileRequired) Validate(formats strfmt.Registry) error {`,
  8908  		`	if err := m.validateProfileCfg(formats); err != nil {`,
  8909  		`		return errors.CompositeValidationError(res...`,
  8910  		`func (m *ProfileRequired) validateProfileCfg(formats strfmt.Registry) error {`,
  8911  		`	if err := validate.Required("profileCfg", "body", m.ProfileCfg); err != nil {`,
  8912  		`	if err := m.ProfileCfg.Validate(formats); err != nil {`,
  8913  		`		if ve, ok := err.(*errors.Validation); ok {`,
  8914  		`			return ve.ValidateName("profileCfg"`,
  8915  	},
  8916  		// not expected
  8917  		todo,
  8918  		// output in log
  8919  		noLines,
  8920  		noLines)
  8921  
  8922  }
  8923  
  8924  func initFixture1537v2() {
  8925  	// testing fixture-1537-2.yaml with flatten and expand (--skip-flatten)
  8926  	// TODO: expand
  8927  
  8928  	/*
  8929  	   repro issue 1537, with aliased items
  8930  	*/
  8931  
  8932  	f := newModelFixture("../fixtures/bugs/1537/fixture-1537-2.yaml", "param body required with array of aliased items")
  8933  	thisRun := f.AddRun(false)
  8934  
  8935  	// load expectations for model: profiles.go
  8936  	thisRun.AddExpectations("profiles.go", []string{
  8937  		`type Profiles []ProfileCfgs`,
  8938  		`func (m Profiles) Validate(formats strfmt.Registry) error {`,
  8939  		`	for i := 0; i < len(m); i++ {`,
  8940  		`		if err := m[i].Validate(formats); err != nil {`,
  8941  		`			if ve, ok := err.(*errors.Validation); ok {`,
  8942  		`				return ve.ValidateName(strconv.Itoa(i)`,
  8943  		`		return errors.CompositeValidationError(res...`,
  8944  	},
  8945  		// not expected
  8946  		todo,
  8947  		// output in log
  8948  		noLines,
  8949  		noLines)
  8950  
  8951  	// load expectations for model: profile_cfgs_no_validation.go
  8952  	thisRun.AddExpectations("profile_cfgs_no_validation.go", []string{
  8953  		`type ProfileCfgsNoValidation []*ProfileCfg`,
  8954  		`func (m ProfileCfgsNoValidation) Validate(formats strfmt.Registry) error {`,
  8955  		`	for i := 0; i < len(m); i++ {`,
  8956  		// do we need Required when item is nullable?
  8957  		// nullable not required:
  8958  		`		if swag.IsZero(m[i]) {`,
  8959  		// nullable required:
  8960  		//`		if err := validate.Required(strconv.Itoa(i), "body", m[i]); err != nil {`,
  8961  		`		if m[i] != nil {`,
  8962  		`			if err := m[i].Validate(formats); err != nil {`,
  8963  		`				if ve, ok := err.(*errors.Validation); ok {`,
  8964  		`					return ve.ValidateName(strconv.Itoa(i)`,
  8965  		`		return errors.CompositeValidationError(res...`,
  8966  	},
  8967  		// not expected
  8968  		todo,
  8969  		// output in log
  8970  		noLines,
  8971  		noLines)
  8972  
  8973  	// load expectations for model: profile_cfgs.go
  8974  	thisRun.AddExpectations("profile_cfgs.go", []string{
  8975  		`type ProfileCfgs []*ProfileCfg`,
  8976  		`func (m ProfileCfgs) Validate(formats strfmt.Registry) error {`,
  8977  		`	iProfileCfgsSize := int64(len(m)`,
  8978  		`	if err := validate.MaxItems("", "body", iProfileCfgsSize, 10); err != nil {`,
  8979  		`	for i := 0; i < len(m); i++ {`,
  8980  		// do we need Required when item is nullable?
  8981  		// nullable not required:
  8982  		`		if swag.IsZero(m[i]) {`,
  8983  		// nullable required:
  8984  		//`		if err := validate.Required(strconv.Itoa(i), "body", m[i]); err != nil {`,
  8985  		`		if m[i] != nil {`,
  8986  		`			if err := m[i].Validate(formats); err != nil {`,
  8987  		`				if ve, ok := err.(*errors.Validation); ok {`,
  8988  		`					return ve.ValidateName(strconv.Itoa(i)`,
  8989  		`		return errors.CompositeValidationError(res...`,
  8990  	},
  8991  		// not expected
  8992  		todo,
  8993  		// output in log
  8994  		noLines,
  8995  		noLines)
  8996  
  8997  	// load expectations for model: profile_cfg.go
  8998  	thisRun.AddExpectations("profile_cfg.go", []string{
  8999  		`type ProfileCfg struct {`,
  9000  		"	Value1 int32 `json:\"value1,omitempty\"`",
  9001  		"	Value2 int32 `json:\"value2,omitempty\"`",
  9002  		// empty validation
  9003  		"func (m *ProfileCfg) Validate(formats strfmt.Registry) error {\n	return nil\n}",
  9004  	},
  9005  		// not expected
  9006  		todo,
  9007  		// output in log
  9008  		noLines,
  9009  		noLines)
  9010  
  9011  	// load expectations for model: profiles_no_validation.go
  9012  	thisRun.AddExpectations("profiles_no_validation.go", []string{
  9013  		`type ProfilesNoValidation []ProfileCfgsNoValidation`,
  9014  		`func (m ProfilesNoValidation) Validate(formats strfmt.Registry) error {`,
  9015  		`	for i := 0; i < len(m); i++ {`,
  9016  		`		if err := m[i].Validate(formats); err != nil {`,
  9017  		`			if ve, ok := err.(*errors.Validation); ok {`,
  9018  		`				return ve.ValidateName(strconv.Itoa(i)`,
  9019  		`		return errors.CompositeValidationError(res...`,
  9020  	},
  9021  		// not expected
  9022  		todo,
  9023  		// output in log
  9024  		noLines,
  9025  		noLines)
  9026  
  9027  }
  9028  
  9029  func initFixture15365() {
  9030  	// testing fixture-1536-5.yaml with flatten but NOT expand (--skip-flatten)
  9031  
  9032  	f := newModelFixture("../fixtures/bugs/1536/fixture-1536-5.yaml", "param body with maps")
  9033  	thisRun := f.AddRun(false)
  9034  
  9035  	// load expectations for model: model_array_of_nullable.go
  9036  	thisRun.AddExpectations("model_array_of_nullable.go", []string{
  9037  		`type ModelArrayOfNullable []*int64`,
  9038  		`func (m ModelArrayOfNullable) Validate(formats strfmt.Registry) error {`,
  9039  		`	for i := 0; i < len(m); i++ {`,
  9040  		// do we need Required when item is nullable?
  9041  		// nullable not required:
  9042  		`		if swag.IsZero(m[i]) {`,
  9043  		// nullable required:
  9044  		//`		if err := validate.Required(strconv.Itoa(i), "body", m[i]); err != nil {`,
  9045  		`		if err := validate.MinimumInt(strconv.Itoa(i), "body", int64(*m[i]), 0, false); err != nil {`,
  9046  		`		return errors.CompositeValidationError(res...`,
  9047  	},
  9048  		// not expected
  9049  		todo,
  9050  		// output in log
  9051  		noLines,
  9052  		noLines)
  9053  
  9054  	// load expectations for model: model_map_of_nullable_primitive.go
  9055  	thisRun.AddExpectations("model_map_of_nullable_primitive.go", []string{
  9056  		`type ModelMapOfNullablePrimitive map[string]*int64`,
  9057  		`func (m ModelMapOfNullablePrimitive) Validate(formats strfmt.Registry) error {`,
  9058  		`	for k := range m {`,
  9059  		// do we need Required when element is nullable?
  9060  		// nullable not required:
  9061  		`		if swag.IsZero(m[k]) {`,
  9062  		`		if err := validate.MinimumInt(k, "body", int64(*m[k]), 0, false); err != nil {`,
  9063  		`		return errors.CompositeValidationError(res...`,
  9064  	},
  9065  		// not expected
  9066  		todo,
  9067  		// output in log
  9068  		noLines,
  9069  		noLines)
  9070  
  9071  	// load expectations for model: model_array_with_max.go
  9072  	thisRun.AddExpectations("model_array_with_max.go", []string{
  9073  		`type ModelArrayWithMax []interface{`,
  9074  		`func (m ModelArrayWithMax) Validate(formats strfmt.Registry) error {`,
  9075  		`	iModelArrayWithMaxSize := int64(len(m)`,
  9076  		`	if err := validate.MaxItems("", "body", iModelArrayWithMaxSize, 10); err != nil {`,
  9077  		`		return errors.CompositeValidationError(res...`,
  9078  	},
  9079  		// not expected
  9080  		todo,
  9081  		// output in log
  9082  		noLines,
  9083  		noLines)
  9084  
  9085  	// load expectations for model: model_array_of_x_nullable.go
  9086  	thisRun.AddExpectations("model_array_of_x_nullable.go", []string{
  9087  		`type ModelArrayOfXNullable []*int64`,
  9088  		// do we need Required when item is nullable?
  9089  		// nullable not required:
  9090  		"func (m ModelArrayOfXNullable) Validate(formats strfmt.Registry) error {\n	return nil\n}",
  9091  		// nullable required:
  9092  		//`func (m ModelArrayOfXNullable) Validate(formats strfmt.Registry) error {`,
  9093  		//`func (m ModelArrayOfXNullable) Validate(formats strfmt.Registry) error {`,
  9094  		//`for i := 0; i < len(m); i++ {`,
  9095  		//`	if swag.IsZero(m[k]) {`,
  9096  		//`	if err := validate.Required(strconv.Itoa(i), "body", m[i]); err != nil {`,
  9097  	},
  9098  		// not expected
  9099  		todo,
  9100  		// output in log
  9101  		noLines,
  9102  		noLines)
  9103  
  9104  	// load expectations for model: model_array_of_nullable_format.go
  9105  	thisRun.AddExpectations("model_array_of_nullable_format.go", []string{
  9106  		`type ModelArrayOfNullableFormat []*strfmt.UUID`,
  9107  		`func (m ModelArrayOfNullableFormat) Validate(formats strfmt.Registry) error {`,
  9108  		`	for i := 0; i < len(m); i++ {`,
  9109  		// do we need Required when item is nullable?
  9110  		// nullable not required:
  9111  		`		if swag.IsZero(m[i]) {`,
  9112  		// nullable required:
  9113  		//`		if err := validate.Required(strconv.Itoa(i), "body", m[i]); err != nil {`,
  9114  		`		if err := validate.FormatOf(strconv.Itoa(i), "body", "uuid", m[i].String(), formats); err != nil {`,
  9115  		`		return errors.CompositeValidationError(res...`,
  9116  	},
  9117  		// not expected
  9118  		todo,
  9119  		// output in log
  9120  		noLines,
  9121  		noLines)
  9122  
  9123  	// load expectations for model: model_map_of_of_slice_of_nullable_primitive.go
  9124  	thisRun.AddExpectations("model_map_of_of_slice_of_nullable_primitive.go", []string{
  9125  		`type ModelMapOfOfSliceOfNullablePrimitive map[string][]*int64`,
  9126  		`func (m ModelMapOfOfSliceOfNullablePrimitive) Validate(formats strfmt.Registry) error {`,
  9127  		`	for k := range m {`,
  9128  		// do we need Required when element is nullable?
  9129  		// nullable not required:
  9130  		//`		if swag.IsZero(m[k]) {`,
  9131  		`		for i := 0; i < len(m[k]); i++ {`,
  9132  		// do we need Required when item is nullable?
  9133  		// nullable not required:
  9134  		//`			if swag.IsZero(m[k][i]) {`,
  9135  		`			if err := validate.MinimumInt(k+"."+strconv.Itoa(i), "body", int64(*m[k][i]), 0, false); err != nil {`,
  9136  		`		return errors.CompositeValidationError(res...`,
  9137  	},
  9138  		// not expected
  9139  		todo,
  9140  		// output in log
  9141  		noLines,
  9142  		noLines)
  9143  
  9144  	// load expectations for model: model_map_of_ref.go
  9145  	thisRun.AddExpectations("model_map_of_ref.go", []string{
  9146  		`type ModelMapOfRef map[string]ModelArrayWithMax`,
  9147  		`func (m ModelMapOfRef) Validate(formats strfmt.Registry) error {`,
  9148  		`	for k := range m {`,
  9149  		//`		if swag.IsZero(m[k]) {`,
  9150  		`		if err := m[k].Validate(formats); err != nil {`,
  9151  		`			if ve, ok := err.(*errors.Validation); ok {`,
  9152  		`				return ve.ValidateName(k`,
  9153  		`		return errors.CompositeValidationError(res...`,
  9154  	},
  9155  		// not expected
  9156  		todo,
  9157  		// output in log
  9158  		noLines,
  9159  		noLines)
  9160  
  9161  	// load expectations for model: model_array_of_format.go
  9162  	thisRun.AddExpectations("model_array_of_format.go", []string{
  9163  		`type ModelArrayOfFormat []strfmt.UUID`,
  9164  		`func (m ModelArrayOfFormat) Validate(formats strfmt.Registry) error {`,
  9165  		`	for i := 0; i < len(m); i++ {`,
  9166  		`		if err := validate.FormatOf(strconv.Itoa(i), "body", "uuid", m[i].String(), formats); err != nil {`,
  9167  		`		return errors.CompositeValidationError(res...`,
  9168  	},
  9169  		// not expected
  9170  		todo,
  9171  		// output in log
  9172  		noLines,
  9173  		noLines)
  9174  
  9175  	// load expectations for model: model_array_of_ref_no_validations.go
  9176  	thisRun.AddExpectations("model_array_of_ref_no_validations.go", []string{
  9177  		`type ModelArrayOfRefNoValidations []ModelInterface`,
  9178  		// empty validation
  9179  		"func (m ModelArrayOfRefNoValidations) Validate(formats strfmt.Registry) error {\n	return nil\n}",
  9180  	},
  9181  		// not expected
  9182  		todo,
  9183  		// output in log
  9184  		noLines,
  9185  		noLines)
  9186  
  9187  	// load expectations for model: model_array_of_not_nullable.go
  9188  	thisRun.AddExpectations("model_array_of_not_nullable.go", []string{
  9189  		`type ModelArrayOfNotNullable []int64`,
  9190  		`func (m ModelArrayOfNotNullable) Validate(formats strfmt.Registry) error {`,
  9191  		`	for i := 0; i < len(m); i++ {`,
  9192  		`		if err := validate.MinimumInt(strconv.Itoa(i), "body", int64(m[i]), 10, false); err != nil {`,
  9193  		`		return errors.CompositeValidationError(res...`,
  9194  	},
  9195  		// not expected
  9196  		todo,
  9197  		// output in log
  9198  		noLines,
  9199  		noLines)
  9200  
  9201  	// load expectations for model: model_array_of_nullable_string.go
  9202  	thisRun.AddExpectations("model_array_of_nullable_string.go", []string{
  9203  		`type ModelArrayOfNullableString []*string`,
  9204  		// do we need Required when item is nullable?
  9205  		// nullable not required:
  9206  		// empty validation
  9207  		"func (m ModelArrayOfNullableString) Validate(formats strfmt.Registry) error {\n	return nil\n}",
  9208  		// nullable required:
  9209  		//`func (m ModelArrayOfNullableString) Validate(formats strfmt.Registry) error {`,
  9210  		//`for i := 0; i < len(m); i++ {`,
  9211  		//`	if err := validate.Required(strconv.Itoa(i), "body", m[i]); err != nil {`,
  9212  	},
  9213  		// not expected
  9214  		todo,
  9215  		// output in log
  9216  		noLines,
  9217  		noLines)
  9218  
  9219  	// load expectations for model: model_map_of_x_nullable_primitive.go
  9220  	thisRun.AddExpectations("model_map_of_x_nullable_primitive.go", []string{
  9221  		`type ModelMapOfXNullablePrimitive map[string]*int64`,
  9222  		`func (m ModelMapOfXNullablePrimitive) Validate(formats strfmt.Registry) error {`,
  9223  		`	for k := range m {`,
  9224  		// do we need...?
  9225  		`		if swag.IsZero(m[k]) {`,
  9226  		`		if err := validate.MinimumInt(k, "body", int64(*m[k]), 100, false); err != nil {`,
  9227  		`		return errors.CompositeValidationError(res...`,
  9228  	},
  9229  		// not expected
  9230  		todo,
  9231  		// output in log
  9232  		noLines,
  9233  		noLines)
  9234  
  9235  	// load expectations for model: model_array_of_not_nullable_string.go
  9236  	thisRun.AddExpectations("model_array_of_not_nullable_string.go", []string{
  9237  		`type ModelArrayOfNotNullableString []string`,
  9238  		// empty validation
  9239  		"func (m ModelArrayOfNotNullableString) Validate(formats strfmt.Registry) error {\n	return nil\n}",
  9240  	},
  9241  		// not expected
  9242  		todo,
  9243  		// output in log
  9244  		noLines,
  9245  		noLines)
  9246  
  9247  	// load expectations for model: model_array_of_ref_slice_validations.go
  9248  	thisRun.AddExpectations("model_array_of_ref_slice_validations.go", []string{
  9249  		`type ModelArrayOfRefSliceValidations []ModelInterface`,
  9250  		`func (m ModelArrayOfRefSliceValidations) Validate(formats strfmt.Registry) error {`,
  9251  		`	iModelArrayOfRefSliceValidationsSize := int64(len(m)`,
  9252  		`	if err := validate.MaxItems("", "body", iModelArrayOfRefSliceValidationsSize, 10); err != nil {`,
  9253  		`		return errors.CompositeValidationError(res...`,
  9254  	},
  9255  		// not expected
  9256  		todo,
  9257  		// output in log
  9258  		noLines,
  9259  		noLines)
  9260  
  9261  	// load expectations for model: model_interface.go
  9262  	thisRun.AddExpectations("model_interface.go", []string{
  9263  		`type ModelInterface interface{`,
  9264  	},
  9265  		// not expected
  9266  		todo,
  9267  		// output in log
  9268  		noLines,
  9269  		noLines)
  9270  
  9271  	// load expectations for model: model_array_of_ref.go
  9272  	thisRun.AddExpectations("model_array_of_ref.go", []string{
  9273  		`type ModelArrayOfRef []ModelArrayOfXNullable`,
  9274  		`func (m ModelArrayOfRef) Validate(formats strfmt.Registry) error {`,
  9275  		`	for i := 0; i < len(m); i++ {`,
  9276  		`		if err := m[i].Validate(formats); err != nil {`,
  9277  		`			if ve, ok := err.(*errors.Validation); ok {`,
  9278  		`				return ve.ValidateName(strconv.Itoa(i)`,
  9279  		`		return errors.CompositeValidationError(res...`,
  9280  	},
  9281  		// not expected
  9282  		todo,
  9283  		// output in log
  9284  		noLines,
  9285  		noLines)
  9286  }
  9287  
  9288  func initFixture1548() {
  9289  	// testing fixture-1548.yaml with flatten
  9290  
  9291  	/*
  9292  		My App API: check that there is no format validation on Base64 types
  9293  	*/
  9294  
  9295  	f := newModelFixture("../fixtures/bugs/1548/fixture-1548.yaml", "My App API")
  9296  	thisRun := f.AddRun(false)
  9297  
  9298  	// load expectations for model: base64_alias.go
  9299  	thisRun.AddExpectations("base64_alias.go", []string{
  9300  		`type Base64Alias strfmt.Base64`,
  9301  		`func (m *Base64Alias) UnmarshalJSON(b []byte) error {`,
  9302  		`	return ((*strfmt.Base64)(m)).UnmarshalJSON(b`,
  9303  		`func (m Base64Alias) MarshalJSON() ([]byte, error) {`,
  9304  		`	return (strfmt.Base64(m)).MarshalJSON(`,
  9305  		`func (m Base64Alias) Validate(formats strfmt.Registry) error {`,
  9306  		`		return errors.CompositeValidationError(res...`,
  9307  	},
  9308  		// not expected
  9309  		[]string{"TODO", "validate.FormatOf("},
  9310  		// output in log
  9311  		noLines,
  9312  		noLines)
  9313  
  9314  	// load expectations for model: base64_map.go
  9315  	thisRun.AddExpectations("base64_map.go", []string{
  9316  		`type Base64Map map[string]strfmt.Base64`,
  9317  		`func (m Base64Map) Validate(formats strfmt.Registry) error {`,
  9318  		`	for k := range m {`,
  9319  		`		if err := validate.MaxLength(k, "body", string(m[k]), 100); err != nil {`,
  9320  		`		return errors.CompositeValidationError(res...`,
  9321  	},
  9322  		// not expected
  9323  		[]string{"TODO", "validate.FormatOf("},
  9324  		// output in log
  9325  		noLines,
  9326  		noLines)
  9327  
  9328  	// load expectations for model: base64_array.go
  9329  	thisRun.AddExpectations("base64_array.go", []string{
  9330  		`type Base64Array []strfmt.Base64`,
  9331  		`func (m Base64Array) Validate(formats strfmt.Registry) error {`,
  9332  		`	for i := 0; i < len(m); i++ {`,
  9333  		`		return errors.CompositeValidationError(res...`,
  9334  	},
  9335  		// not expected
  9336  		[]string{"TODO", "validate.FormatOf("},
  9337  		// output in log
  9338  		noLines,
  9339  		noLines)
  9340  
  9341  	// load expectations for model: base64_model.go
  9342  	thisRun.AddExpectations("base64_model.go", []string{
  9343  		`type Base64Model struct {`,
  9344  		"	Prop1 strfmt.Base64 `json:\"prop1,omitempty\"`",
  9345  		`func (m *Base64Model) Validate(formats strfmt.Registry) error {`,
  9346  		`	if err := m.validateProp1(formats); err != nil {`,
  9347  		`		return errors.CompositeValidationError(res...`,
  9348  		`func (m *Base64Model) validateProp1(formats strfmt.Registry) error {`,
  9349  		`	if swag.IsZero(m.Prop1) {`,
  9350  	},
  9351  		// not expected
  9352  		[]string{"TODO", "validate.FormatOf("},
  9353  		// output in log
  9354  		noLines,
  9355  		noLines)
  9356  }
  9357  
  9358  func initFixtureSimpleTuple() {
  9359  	// testing fixture-simple-tuple.yaml with flatten
  9360  
  9361  	/*
  9362  	   A basic test of for serialization generation for tuples and additionalItems.
  9363  
  9364  	*/
  9365  	f := newModelFixture("../fixtures/bugs/1571/fixture-simple-tuple.yaml", "fixture for serializing tuples")
  9366  	flattenRun := f.AddRun(false).WithMinimalFlatten(true)
  9367  	expandRun := f.AddRun(true)
  9368  
  9369  	// load expectations for model: tuple_thing_with_map_element.go
  9370  	flattenRun.AddExpectations("tuple_thing_with_map_element.go", []string{
  9371  		`type TupleThingWithMapElement struct {`,
  9372  		"	P0 map[string]string `json:\"-\"`",
  9373  		"	P1 map[string]int64 `json:\"-\"`",
  9374  		"	TupleThingWithMapElementItems []map[string]strfmt.Date `json:\"-\"`",
  9375  		`func (m *TupleThingWithMapElement) UnmarshalJSON(raw []byte) error {`,
  9376  		`	var stage1 []json.RawMessage`,
  9377  		`	buf := bytes.NewBuffer(raw`,
  9378  		`	dec := json.NewDecoder(buf`,
  9379  		`	dec.UseNumber(`,
  9380  		`	if err := dec.Decode(&stage1); err != nil {`,
  9381  		`	var lastIndex int`,
  9382  		`	if len(stage1) > 0 {`,
  9383  		`		var dataP0 map[string]string`,
  9384  		`		buf = bytes.NewBuffer(stage1[0]`,
  9385  		`		dec := json.NewDecoder(buf`,
  9386  		`		dec.UseNumber(`,
  9387  		`		if err := dec.Decode(&dataP0); err != nil {`,
  9388  		`		m.P0 = dataP0`,
  9389  		`		lastIndex = 0`,
  9390  		`	if len(stage1) > 1 {`,
  9391  		`		var dataP1 map[string]int64`,
  9392  		`		buf = bytes.NewBuffer(stage1[1]`,
  9393  		`		dec := json.NewDecoder(buf`,
  9394  		`		dec.UseNumber(`,
  9395  		`		if err := dec.Decode(&dataP1); err != nil {`,
  9396  		`		m.P1 = dataP1`,
  9397  		`		lastIndex = 1`,
  9398  		`	if len(stage1) > lastIndex+1 {`,
  9399  		`		for _, val := range stage1[lastIndex+1:] {`,
  9400  		`			var toadd map[string]strfmt.Date`,
  9401  		`			buf = bytes.NewBuffer(val`,
  9402  		`			dec := json.NewDecoder(buf`,
  9403  		`			dec.UseNumber(`,
  9404  		`			if err := dec.Decode(&toadd); err != nil {`,
  9405  		`			m.TupleThingWithMapElementItems = append(m.TupleThingWithMapElementItems, toadd`,
  9406  		`func (m TupleThingWithMapElement) MarshalJSON() ([]byte, error) {`,
  9407  		`	data := []interface{}{`,
  9408  		`		m.P0,`,
  9409  		`		m.P1,`,
  9410  		`	for _, v := range m.TupleThingWithMapElementItems {`,
  9411  		`		data = append(data, v`,
  9412  		`	return json.Marshal(data`,
  9413  		`func (m *TupleThingWithMapElement) Validate(formats strfmt.Registry) error {`,
  9414  		`	if err := m.validateP0(formats); err != nil {`,
  9415  		`	if err := m.validateP1(formats); err != nil {`,
  9416  		`	if err := m.validateTupleThingWithMapElementItems(formats); err != nil {`,
  9417  		`		return errors.CompositeValidationError(res...`,
  9418  		`func (m *TupleThingWithMapElement) validateP0(formats strfmt.Registry) error {`,
  9419  		`	if err := validate.Required("0", "body", m.P0); err != nil {`,
  9420  		`	for k := range m.P0 {`,
  9421  		`		if err := validate.MaxLength("0"+"."+k, "body", string(m.P0[k]), 10); err != nil {`,
  9422  		`func (m *TupleThingWithMapElement) validateP1(formats strfmt.Registry) error {`,
  9423  		`	if err := validate.Required("1", "body", m.P1); err != nil {`,
  9424  		`	for k := range m.P1 {`,
  9425  		`		if err := validate.MinimumInt("1"+"."+k, "body", int64(m.P1[k]), 10, false); err != nil {`,
  9426  		`func (m *TupleThingWithMapElement) validateTupleThingWithMapElementItems(formats strfmt.Registry) error {`,
  9427  		`	for i := range m.TupleThingWithMapElementItems {`,
  9428  		`		for k := range m.TupleThingWithMapElementItems[i] {`,
  9429  		`			if err := validate.FormatOf(strconv.Itoa(i+2)+"."+k, "body", "date", ` +
  9430  			`m.TupleThingWithMapElementItems[i][k].String(), formats); err != nil {`,
  9431  	},
  9432  		// not expected
  9433  		todo,
  9434  		// output in log
  9435  		noLines,
  9436  		noLines)
  9437  
  9438  	expandRun.AddExpectations("tuple_thing_with_map_element.go",
  9439  		flattenRun.ExpectedFor("TupleThingWithMapElement").ExpectedLines, todo, noLines, noLines)
  9440  
  9441  	// load expectations for model: true_tuple_thing.go
  9442  	flattenRun.AddExpectations("true_tuple_thing.go", []string{
  9443  		`type TrueTupleThing struct {`,
  9444  		"	P0 *float64 `json:\"-\"`",
  9445  		"	P1 *string `json:\"-\"`",
  9446  		"	TrueTupleThingItems []interface{} `json:\"-\"`",
  9447  		`func (m *TrueTupleThing) UnmarshalJSON(raw []byte) error {`,
  9448  		`	var stage1 []json.RawMessage`,
  9449  		`	buf := bytes.NewBuffer(raw`,
  9450  		`	dec := json.NewDecoder(buf`,
  9451  		`	dec.UseNumber(`,
  9452  		`	if err := dec.Decode(&stage1); err != nil {`,
  9453  		`	var lastIndex int`,
  9454  		`	if len(stage1) > 0 {`,
  9455  		`		var dataP0 float64`,
  9456  		`		buf = bytes.NewBuffer(stage1[0]`,
  9457  		`		dec := json.NewDecoder(buf`,
  9458  		`		dec.UseNumber(`,
  9459  		`		if err := dec.Decode(&dataP0); err != nil {`,
  9460  		`		m.P0 = &dataP0`,
  9461  		`		lastIndex = 0`,
  9462  		`	if len(stage1) > 1 {`,
  9463  		`		var dataP1 string`,
  9464  		`		buf = bytes.NewBuffer(stage1[1]`,
  9465  		`		dec := json.NewDecoder(buf`,
  9466  		`		dec.UseNumber(`,
  9467  		`		if err := dec.Decode(&dataP1); err != nil {`,
  9468  		`		m.P1 = &dataP1`,
  9469  		`		lastIndex = 1`,
  9470  		`	if len(stage1) > lastIndex+1 {`,
  9471  		`		for _, val := range stage1[lastIndex+1:] {`,
  9472  		`			var toadd interface{`,
  9473  		`			buf = bytes.NewBuffer(val`,
  9474  		`			dec := json.NewDecoder(buf`,
  9475  		`			dec.UseNumber(`,
  9476  		`			if err := dec.Decode(&toadd); err != nil {`,
  9477  		`			m.TrueTupleThingItems = append(m.TrueTupleThingItems, toadd`,
  9478  		`func (m TrueTupleThing) MarshalJSON() ([]byte, error) {`,
  9479  		`	data := []interface{}{`,
  9480  		`		m.P0,`,
  9481  		`		m.P1,`,
  9482  		`	for _, v := range m.TrueTupleThingItems {`,
  9483  		`		data = append(data, v`,
  9484  		`	return json.Marshal(data`,
  9485  		`func (m *TrueTupleThing) Validate(formats strfmt.Registry) error {`,
  9486  		`	if err := m.validateP0(formats); err != nil {`,
  9487  		`	if err := m.validateP1(formats); err != nil {`,
  9488  		`	if err := m.validateTrueTupleThingItems(formats); err != nil {`,
  9489  		`		return errors.CompositeValidationError(res...`,
  9490  		`func (m *TrueTupleThing) validateP0(formats strfmt.Registry) error {`,
  9491  		`	if err := validate.Required("0", "body", m.P0); err != nil {`,
  9492  		`func (m *TrueTupleThing) validateP1(formats strfmt.Registry) error {`,
  9493  		`	if err := validate.Required("1", "body", m.P1); err != nil {`,
  9494  		`func (m *TrueTupleThing) validateTrueTupleThingItems(formats strfmt.Registry) error {`,
  9495  	},
  9496  		// not expected
  9497  		todo,
  9498  		// output in log
  9499  		noLines,
  9500  		noLines)
  9501  
  9502  	expandRun.AddExpectations("true_tuple_thing.go",
  9503  		flattenRun.ExpectedFor("TrueTupleThing").ExpectedLines, todo, noLines, noLines)
  9504  
  9505  	// load expectations for model: false_tuple_thing.go
  9506  	flattenRun.AddExpectations("false_tuple_thing.go", []string{
  9507  		`type FalseTupleThing struct {`,
  9508  		"	P0 *float64 `json:\"-\"`",
  9509  		"	P1 *string `json:\"-\"`",
  9510  		`func (m *FalseTupleThing) UnmarshalJSON(raw []byte) error {`,
  9511  		`	var stage1 []json.RawMessage`,
  9512  		`	buf := bytes.NewBuffer(raw`,
  9513  		`	dec := json.NewDecoder(buf`,
  9514  		`	dec.UseNumber(`,
  9515  		`	if err := dec.Decode(&stage1); err != nil {`,
  9516  		`	if len(stage1) > 0 {`,
  9517  		`		var dataP0 float64`,
  9518  		`		buf = bytes.NewBuffer(stage1[0]`,
  9519  		`		dec := json.NewDecoder(buf`,
  9520  		`		dec.UseNumber(`,
  9521  		`		if err := dec.Decode(&dataP0); err != nil {`,
  9522  		`		m.P0 = &dataP0`,
  9523  		`	if len(stage1) > 1 {`,
  9524  		`		var dataP1 string`,
  9525  		`		buf = bytes.NewBuffer(stage1[1]`,
  9526  		`		dec := json.NewDecoder(buf`,
  9527  		`		dec.UseNumber(`,
  9528  		`		if err := dec.Decode(&dataP1); err != nil {`,
  9529  		`		m.P1 = &dataP1`,
  9530  		`func (m FalseTupleThing) MarshalJSON() ([]byte, error) {`,
  9531  		`	data := []interface{}{`,
  9532  		`		m.P0,`,
  9533  		`		m.P1,`,
  9534  		`	return json.Marshal(data`,
  9535  		`func (m *FalseTupleThing) Validate(formats strfmt.Registry) error {`,
  9536  		`	if err := m.validateP0(formats); err != nil {`,
  9537  		`	if err := m.validateP1(formats); err != nil {`,
  9538  		`		return errors.CompositeValidationError(res...`,
  9539  		`func (m *FalseTupleThing) validateP0(formats strfmt.Registry) error {`,
  9540  		`	if err := validate.Required("0", "body", m.P0); err != nil {`,
  9541  		`func (m *FalseTupleThing) validateP1(formats strfmt.Registry) error {`,
  9542  		`	if err := validate.Required("1", "body", m.P1); err != nil {`,
  9543  	},
  9544  		// not expected
  9545  		todo,
  9546  		// output in log
  9547  		noLines,
  9548  		noLines)
  9549  
  9550  	expandRun.AddExpectations("false_tuple_thing.go",
  9551  		flattenRun.ExpectedFor("FalseTupleThing").ExpectedLines, todo, noLines, noLines)
  9552  
  9553  	// load expectations for model: tuple_thing_with_not_nullable.go
  9554  	flattenRun.AddExpectations("tuple_thing_with_not_nullable.go", []string{
  9555  		`type TupleThingWithNotNullable struct {`,
  9556  		"	P0 string `json:\"-\"`",
  9557  		"	P1 *int64 `json:\"-\"`",
  9558  		"	TupleThingWithNotNullableItems []interface{} `json:\"-\"`",
  9559  		`func (m *TupleThingWithNotNullable) UnmarshalJSON(raw []byte) error {`,
  9560  		`	var stage1 []json.RawMessage`,
  9561  		`	buf := bytes.NewBuffer(raw`,
  9562  		`	dec := json.NewDecoder(buf`,
  9563  		`	dec.UseNumber(`,
  9564  		`	if err := dec.Decode(&stage1); err != nil {`,
  9565  		`	var lastIndex int`,
  9566  		`	if len(stage1) > 0 {`,
  9567  		`		var dataP0 string`,
  9568  		`		buf = bytes.NewBuffer(stage1[0]`,
  9569  		`		dec := json.NewDecoder(buf`,
  9570  		`		dec.UseNumber(`,
  9571  		`		if err := dec.Decode(&dataP0); err != nil {`,
  9572  		`		m.P0 = dataP0`,
  9573  		`		lastIndex = 0`,
  9574  		`	if len(stage1) > 1 {`,
  9575  		`		var dataP1 int64`,
  9576  		`		buf = bytes.NewBuffer(stage1[1]`,
  9577  		`		dec := json.NewDecoder(buf`,
  9578  		`		dec.UseNumber(`,
  9579  		`		if err := dec.Decode(&dataP1); err != nil {`,
  9580  		`		m.P1 = &dataP1`,
  9581  		`		lastIndex = 1`,
  9582  		`	if len(stage1) > lastIndex+1 {`,
  9583  		`		for _, val := range stage1[lastIndex+1:] {`,
  9584  		`			var toadd interface{`,
  9585  		`			buf = bytes.NewBuffer(val`,
  9586  		`			dec := json.NewDecoder(buf`,
  9587  		`			dec.UseNumber(`,
  9588  		`			if err := dec.Decode(&toadd); err != nil {`,
  9589  		`			m.TupleThingWithNotNullableItems = append(m.TupleThingWithNotNullableItems, toadd`,
  9590  		`func (m TupleThingWithNotNullable) MarshalJSON() ([]byte, error) {`,
  9591  		`	data := []interface{}{`,
  9592  		`		m.P0,`,
  9593  		`		m.P1,`,
  9594  		`	for _, v := range m.TupleThingWithNotNullableItems {`,
  9595  		`		data = append(data, v`,
  9596  		`	return json.Marshal(data`,
  9597  		`func (m *TupleThingWithNotNullable) Validate(formats strfmt.Registry) error {`,
  9598  		`	if err := m.validateP0(formats); err != nil {`,
  9599  		`	if err := m.validateP1(formats); err != nil {`,
  9600  		`	if err := m.validateTupleThingWithNotNullableItems(formats); err != nil {`,
  9601  		`		return errors.CompositeValidationError(res...`,
  9602  		`func (m *TupleThingWithNotNullable) validateP0(formats strfmt.Registry) error {`,
  9603  		`	if err := validate.RequiredString("0", "body", string(m.P0)); err != nil {`,
  9604  		`	if err := validate.MaxLength("0", "body", string(m.P0), 10); err != nil {`,
  9605  		`func (m *TupleThingWithNotNullable) validateP1(formats strfmt.Registry) error {`,
  9606  		`	if err := validate.Required("1", "body", m.P1); err != nil {`,
  9607  		`	if err := validate.MaximumInt("1", "body", int64(*m.P1), 10, false); err != nil {`,
  9608  		`func (m *TupleThingWithNotNullable) validateTupleThingWithNotNullableItems(formats strfmt.Registry) error {`,
  9609  	},
  9610  		// not expected
  9611  		todo,
  9612  		// output in log
  9613  		noLines,
  9614  		noLines)
  9615  
  9616  	expandRun.AddExpectations("tuple_thing_with_not_nullable.go",
  9617  		flattenRun.ExpectedFor("TupleThingWithNotNullable").ExpectedLines, todo, noLines, noLines)
  9618  
  9619  	// load expectations for model: tuple_thing.go
  9620  	flattenRun.AddExpectations("tuple_thing.go", []string{
  9621  		`type TupleThing struct {`,
  9622  		"	P0 *string `json:\"-\"`",
  9623  		"	P1 *string `json:\"-\"`",
  9624  		`func (m *TupleThing) UnmarshalJSON(raw []byte) error {`,
  9625  		`	var stage1 []json.RawMessage`,
  9626  		`	buf := bytes.NewBuffer(raw`,
  9627  		`	dec := json.NewDecoder(buf`,
  9628  		`	dec.UseNumber(`,
  9629  		`	if err := dec.Decode(&stage1); err != nil {`,
  9630  		`	if len(stage1) > 0 {`,
  9631  		`		var dataP0 string`,
  9632  		`		buf = bytes.NewBuffer(stage1[0]`,
  9633  		`		dec := json.NewDecoder(buf`,
  9634  		`		dec.UseNumber(`,
  9635  		`		if err := dec.Decode(&dataP0); err != nil {`,
  9636  		`		m.P0 = &dataP0`,
  9637  		`	if len(stage1) > 1 {`,
  9638  		`		var dataP1 string`,
  9639  		`		buf = bytes.NewBuffer(stage1[1]`,
  9640  		`		dec := json.NewDecoder(buf`,
  9641  		`		dec.UseNumber(`,
  9642  		`		if err := dec.Decode(&dataP1); err != nil {`,
  9643  		`		m.P1 = &dataP1`,
  9644  		`func (m TupleThing) MarshalJSON() ([]byte, error) {`,
  9645  		`	data := []interface{}{`,
  9646  		`		m.P0,`,
  9647  		`		m.P1,`,
  9648  		`	return json.Marshal(data`,
  9649  		`func (m *TupleThing) Validate(formats strfmt.Registry) error {`,
  9650  		`	if err := m.validateP0(formats); err != nil {`,
  9651  		`	if err := m.validateP1(formats); err != nil {`,
  9652  		`		return errors.CompositeValidationError(res...`,
  9653  		`var tupleThingTypeP0PropEnum []interface{`,
  9654  		`	var res []string`,
  9655  		"	if err := json.Unmarshal([]byte(`[\"CONST1\",\"CONST2\"]`), &res); err != nil {",
  9656  		`	for _, v := range res {`,
  9657  		`		tupleThingTypeP0PropEnum = append(tupleThingTypeP0PropEnum, v`,
  9658  		`	TupleThingP0CONST1 string = "CONST1"`,
  9659  		`	TupleThingP0CONST2 string = "CONST2"`,
  9660  		`func (m *TupleThing) validateP0Enum(path, location string, value string) error {`,
  9661  		`	if err := validate.Enum(path, location, value, tupleThingTypeP0PropEnum); err != nil {`,
  9662  		`func (m *TupleThing) validateP0(formats strfmt.Registry) error {`,
  9663  		`	if err := validate.Required("0", "body", m.P0); err != nil {`,
  9664  		`	if err := m.validateP0Enum("0", "body", *m.P0); err != nil {`,
  9665  		`var tupleThingTypeP1PropEnum []interface{`,
  9666  		`	var res []string`,
  9667  		"	if err := json.Unmarshal([]byte(`[\"CONST3\",\"CONST4\"]`), &res); err != nil {",
  9668  		`	for _, v := range res {`,
  9669  		`		tupleThingTypeP1PropEnum = append(tupleThingTypeP1PropEnum, v`,
  9670  		`	TupleThingP1CONST3 string = "CONST3"`,
  9671  		`	TupleThingP1CONST4 string = "CONST4"`,
  9672  		`func (m *TupleThing) validateP1Enum(path, location string, value string) error {`,
  9673  		`	if err := validate.Enum(path, location, value, tupleThingTypeP1PropEnum); err != nil {`,
  9674  		`func (m *TupleThing) validateP1(formats strfmt.Registry) error {`,
  9675  		`	if err := validate.Required("1", "body", m.P1); err != nil {`,
  9676  		`	if err := m.validateP1Enum("1", "body", *m.P1); err != nil {`,
  9677  	},
  9678  		// not expected
  9679  		todo,
  9680  		// output in log
  9681  		noLines,
  9682  		noLines)
  9683  
  9684  	expandRun.AddExpectations("tuple_thing.go",
  9685  		flattenRun.ExpectedFor("TupleThing").ExpectedLines, todo, noLines, noLines)
  9686  
  9687  	// load expectations for model: tuple_thing_with_additional_items.go
  9688  	flattenRun.AddExpectations("tuple_thing_with_additional_items.go", []string{
  9689  		`type TupleThingWithAdditionalItems struct {`,
  9690  		"	P0 *string `json:\"-\"`",
  9691  		"	P1 *int64 `json:\"-\"`",
  9692  		"	TupleThingWithAdditionalItemsItems []int64 `json:\"-\"`",
  9693  		`func (m *TupleThingWithAdditionalItems) UnmarshalJSON(raw []byte) error {`,
  9694  		`	var stage1 []json.RawMessage`,
  9695  		`	buf := bytes.NewBuffer(raw`,
  9696  		`	dec := json.NewDecoder(buf`,
  9697  		`	dec.UseNumber(`,
  9698  		`	if err := dec.Decode(&stage1); err != nil {`,
  9699  		`	var lastIndex int`,
  9700  		`	if len(stage1) > 0 {`,
  9701  		`		var dataP0 string`,
  9702  		`		buf = bytes.NewBuffer(stage1[0]`,
  9703  		`		dec := json.NewDecoder(buf`,
  9704  		`		dec.UseNumber(`,
  9705  		`		if err := dec.Decode(&dataP0); err != nil {`,
  9706  		`		m.P0 = &dataP0`,
  9707  		`		lastIndex = 0`,
  9708  		`	if len(stage1) > 1 {`,
  9709  		`		var dataP1 int64`,
  9710  		`		buf = bytes.NewBuffer(stage1[1]`,
  9711  		`		dec := json.NewDecoder(buf`,
  9712  		`		dec.UseNumber(`,
  9713  		`		if err := dec.Decode(&dataP1); err != nil {`,
  9714  		`		m.P1 = &dataP1`,
  9715  		`		lastIndex = 1`,
  9716  		`	if len(stage1) > lastIndex+1 {`,
  9717  		`		for _, val := range stage1[lastIndex+1:] {`,
  9718  		`			var toadd int64`,
  9719  		`			buf = bytes.NewBuffer(val`,
  9720  		`			dec := json.NewDecoder(buf`,
  9721  		`			dec.UseNumber(`,
  9722  		`			if err := dec.Decode(&toadd); err != nil {`,
  9723  		`			m.TupleThingWithAdditionalItemsItems = append(m.TupleThingWithAdditionalItemsItems, toadd`,
  9724  		`func (m TupleThingWithAdditionalItems) MarshalJSON() ([]byte, error) {`,
  9725  		`	data := []interface{}{`,
  9726  		`		m.P0,`,
  9727  		`		m.P1,`,
  9728  		`	for _, v := range m.TupleThingWithAdditionalItemsItems {`,
  9729  		`		data = append(data, v`,
  9730  		`	return json.Marshal(data`,
  9731  		`func (m *TupleThingWithAdditionalItems) Validate(formats strfmt.Registry) error {`,
  9732  		`	if err := m.validateP0(formats); err != nil {`,
  9733  		`	if err := m.validateP1(formats); err != nil {`,
  9734  		`	if err := m.validateTupleThingWithAdditionalItemsItems(formats); err != nil {`,
  9735  		`		return errors.CompositeValidationError(res...`,
  9736  		`func (m *TupleThingWithAdditionalItems) validateP0(formats strfmt.Registry) error {`,
  9737  		`	if err := validate.Required("0", "body", m.P0); err != nil {`,
  9738  		`func (m *TupleThingWithAdditionalItems) validateP1(formats strfmt.Registry) error {`,
  9739  		`	if err := validate.Required("1", "body", m.P1); err != nil {`,
  9740  		`	if err := validate.MaximumInt("1", "body", int64(*m.P1), 10, false); err != nil {`,
  9741  		`var tupleThingWithAdditionalItemsItemsEnum []interface{`,
  9742  		`	var res []int64`,
  9743  		"	if err := json.Unmarshal([]byte(`[1,2]`), &res); err != nil {",
  9744  		`	for _, v := range res {`,
  9745  		`		tupleThingWithAdditionalItemsItemsEnum = append(tupleThingWithAdditionalItemsItemsEnum, v`,
  9746  		`func (m *TupleThingWithAdditionalItems) validateTupleThingWithAdditionalItemsItemsEnum(path,` +
  9747  			` location string, value int64) error {`,
  9748  		`	if err := validate.Enum(path, location, value, tupleThingWithAdditionalItemsItemsEnum); err != nil {`,
  9749  		`func (m *TupleThingWithAdditionalItems) validateTupleThingWithAdditionalItemsItems(formats strfmt.Registry)` +
  9750  			` error {`,
  9751  		`	for i := range m.TupleThingWithAdditionalItemsItems {`,
  9752  		`		if err := m.validateTupleThingWithAdditionalItemsItemsEnum(strconv.Itoa(i+2), "body", ` +
  9753  			`m.TupleThingWithAdditionalItemsItems[i]); err != nil {`,
  9754  	},
  9755  		// not expected
  9756  		todo,
  9757  		// output in log
  9758  		noLines,
  9759  		noLines)
  9760  
  9761  	expandRun.AddExpectations("tuple_thing_with_additional_items.go",
  9762  		flattenRun.ExpectedFor("TupleThingWithAdditionalItems").ExpectedLines, todo, noLines, noLines)
  9763  
  9764  	// load expectations for model: tuple_thing_with_array_element.go
  9765  	flattenRun.AddExpectations("tuple_thing_with_array_element.go", []string{
  9766  		`type TupleThingWithArrayElement struct {`,
  9767  		"	P0 []string `json:\"-\"`",
  9768  		"	P1 []int64 `json:\"-\"`",
  9769  		"	TupleThingWithArrayElementItems [][]strfmt.Date `json:\"-\"`",
  9770  		`func (m *TupleThingWithArrayElement) UnmarshalJSON(raw []byte) error {`,
  9771  		`	var stage1 []json.RawMessage`,
  9772  		`	buf := bytes.NewBuffer(raw`,
  9773  		`	dec := json.NewDecoder(buf`,
  9774  		`	dec.UseNumber(`,
  9775  		`	if err := dec.Decode(&stage1); err != nil {`,
  9776  		`	var lastIndex int`,
  9777  		`	if len(stage1) > 0 {`,
  9778  		`		var dataP0 []string`,
  9779  		`		buf = bytes.NewBuffer(stage1[0]`,
  9780  		`		dec := json.NewDecoder(buf`,
  9781  		`		dec.UseNumber(`,
  9782  		`		if err := dec.Decode(&dataP0); err != nil {`,
  9783  		`		m.P0 = dataP0`,
  9784  		`		lastIndex = 0`,
  9785  		`	if len(stage1) > 1 {`,
  9786  		`		var dataP1 []int64`,
  9787  		`		buf = bytes.NewBuffer(stage1[1]`,
  9788  		`		dec := json.NewDecoder(buf`,
  9789  		`		dec.UseNumber(`,
  9790  		`		if err := dec.Decode(&dataP1); err != nil {`,
  9791  		`		m.P1 = dataP1`,
  9792  		`		lastIndex = 1`,
  9793  		`	if len(stage1) > lastIndex+1 {`,
  9794  		`		for _, val := range stage1[lastIndex+1:] {`,
  9795  		`			var toadd []strfmt.Date`,
  9796  		`			buf = bytes.NewBuffer(val`,
  9797  		`			dec := json.NewDecoder(buf`,
  9798  		`			dec.UseNumber(`,
  9799  		`			if err := dec.Decode(&toadd); err != nil {`,
  9800  		`			m.TupleThingWithArrayElementItems = append(m.TupleThingWithArrayElementItems, toadd`,
  9801  		`func (m TupleThingWithArrayElement) MarshalJSON() ([]byte, error) {`,
  9802  		`	data := []interface{}{`,
  9803  		`		m.P0,`,
  9804  		`		m.P1,`,
  9805  		`	for _, v := range m.TupleThingWithArrayElementItems {`,
  9806  		`		data = append(data, v`,
  9807  		`	return json.Marshal(data`,
  9808  		`func (m *TupleThingWithArrayElement) Validate(formats strfmt.Registry) error {`,
  9809  		`	if err := m.validateP0(formats); err != nil {`,
  9810  		`	if err := m.validateP1(formats); err != nil {`,
  9811  		`	if err := m.validateTupleThingWithArrayElementItems(formats); err != nil {`,
  9812  		`		return errors.CompositeValidationError(res...`,
  9813  		`func (m *TupleThingWithArrayElement) validateP0(formats strfmt.Registry) error {`,
  9814  		`	if err := validate.Required("0", "body", m.P0); err != nil {`,
  9815  		`	iP0Size := int64(len(m.P0)`,
  9816  		`	if err := validate.MaxItems("0", "body", iP0Size, 10); err != nil {`,
  9817  		`	for i := 0; i < len(m.P0); i++ {`,
  9818  		`		if err := validate.MaxLength("0"+"."+strconv.Itoa(i), "body", string(m.P0[i]), 10); err != nil {`,
  9819  		`func (m *TupleThingWithArrayElement) validateP1(formats strfmt.Registry) error {`,
  9820  		`	if err := validate.Required("1", "body", m.P1); err != nil {`,
  9821  		`	iP1Size := int64(len(m.P1)`,
  9822  		`	if err := validate.MinItems("1", "body", iP1Size, 20); err != nil {`,
  9823  		`	for i := 0; i < len(m.P1); i++ {`,
  9824  		`		if err := validate.MinimumInt("1"+"."+strconv.Itoa(i), "body", int64(m.P1[i]), 10, false); err != nil {`,
  9825  		`func (m *TupleThingWithArrayElement) validateTupleThingWithArrayElementItems(formats strfmt.Registry) error {`,
  9826  		`	for i := range m.TupleThingWithArrayElementItems {`,
  9827  		`		for ii := 0; ii < len(m.TupleThingWithArrayElementItems[i]); ii++ {`,
  9828  		`			if err := validate.FormatOf(strconv.Itoa(i+2)+"."+strconv.Itoa(ii), "body", ` +
  9829  			`"date", m.TupleThingWithArrayElementItems[i][ii].String(), formats); err != nil {`,
  9830  	},
  9831  		// not expected
  9832  		todo,
  9833  		// output in log
  9834  		noLines,
  9835  		noLines)
  9836  
  9837  	expandRun.AddExpectations("tuple_thing_with_array_element.go",
  9838  		flattenRun.ExpectedFor("TupleThingWithArrayElement").ExpectedLines, todo, noLines, noLines)
  9839  
  9840  	// load expectations for model: array_of_tuples.go
  9841  	flattenRun.AddExpectations("array_of_tuples.go", []string{
  9842  		`type ArrayOfTuples []ArrayOfTuplesTuple0`,
  9843  		`func (m ArrayOfTuples) Validate(formats strfmt.Registry) error {`,
  9844  		`	iArrayOfTuplesSize := int64(len(m)`,
  9845  		`	if err := validate.MinItems("", "body", iArrayOfTuplesSize, 1); err != nil {`,
  9846  		`	for i := 0; i < len(m); i++ {`,
  9847  		`		if err := m[i].Validate(formats); err != nil {`,
  9848  		`			if ve, ok := err.(*errors.Validation); ok {`,
  9849  		`				return ve.ValidateName(strconv.Itoa(i)`,
  9850  		`		return errors.CompositeValidationError(res...`,
  9851  		`type ArrayOfTuplesTuple0 struct {`,
  9852  		"	P0 []string `json:\"-\"`",
  9853  		"	P1 []int64 `json:\"-\"`",
  9854  		"	ArrayOfTuplesTuple0Items [][]strfmt.Date `json:\"-\"`",
  9855  		`func (m *ArrayOfTuplesTuple0) UnmarshalJSON(raw []byte) error {`,
  9856  		`	var stage1 []json.RawMessage`,
  9857  		`	buf := bytes.NewBuffer(raw`,
  9858  		`	dec := json.NewDecoder(buf`,
  9859  		`	dec.UseNumber(`,
  9860  		`	if err := dec.Decode(&stage1); err != nil {`,
  9861  		`	var lastIndex int`,
  9862  		`	if len(stage1) > 0 {`,
  9863  		`		var dataP0 []string`,
  9864  		`		buf = bytes.NewBuffer(stage1[0]`,
  9865  		`		dec := json.NewDecoder(buf`,
  9866  		`		dec.UseNumber(`,
  9867  		`		if err := dec.Decode(&dataP0); err != nil {`,
  9868  		`		m.P0 = dataP0`,
  9869  		`		lastIndex = 0`,
  9870  		`	if len(stage1) > 1 {`,
  9871  		`		var dataP1 []int64`,
  9872  		`		buf = bytes.NewBuffer(stage1[1]`,
  9873  		`		dec := json.NewDecoder(buf`,
  9874  		`		dec.UseNumber(`,
  9875  		`		if err := dec.Decode(&dataP1); err != nil {`,
  9876  		`		m.P1 = dataP1`,
  9877  		`		lastIndex = 1`,
  9878  		`	if len(stage1) > lastIndex+1 {`,
  9879  		`		for _, val := range stage1[lastIndex+1:] {`,
  9880  		`			var toadd []strfmt.Date`,
  9881  		`			buf = bytes.NewBuffer(val`,
  9882  		`			dec := json.NewDecoder(buf`,
  9883  		`			dec.UseNumber(`,
  9884  		`			if err := dec.Decode(&toadd); err != nil {`,
  9885  		`			m.ArrayOfTuplesTuple0Items = append(m.ArrayOfTuplesTuple0Items, toadd`,
  9886  		`func (m ArrayOfTuplesTuple0) MarshalJSON() ([]byte, error) {`,
  9887  		`	data := []interface{}{`,
  9888  		`		m.P0,`,
  9889  		`		m.P1,`,
  9890  		`	for _, v := range m.ArrayOfTuplesTuple0Items {`,
  9891  		`		data = append(data, v`,
  9892  		`	return json.Marshal(data`,
  9893  		`func (m *ArrayOfTuplesTuple0) Validate(formats strfmt.Registry) error {`,
  9894  		`	if err := m.validateP0(formats); err != nil {`,
  9895  		`	if err := m.validateP1(formats); err != nil {`,
  9896  		`	if err := m.validateArrayOfTuplesTuple0Items(formats); err != nil {`,
  9897  		`		return errors.CompositeValidationError(res...`,
  9898  		`func (m *ArrayOfTuplesTuple0) validateP0(formats strfmt.Registry) error {`,
  9899  		`	if err := validate.Required("P0", "body", m.P0); err != nil {`,
  9900  		`	iP0Size := int64(len(m.P0)`,
  9901  		`	if err := validate.MaxItems("P0", "body", iP0Size, 10); err != nil {`,
  9902  		`	for i := 0; i < len(m.P0); i++ {`,
  9903  		`		if err := validate.MaxLength("P0"+"."+strconv.Itoa(i), "body", string(m.P0[i]), 10); err != nil {`,
  9904  		`func (m *ArrayOfTuplesTuple0) validateP1(formats strfmt.Registry) error {`,
  9905  		`	if err := validate.Required("P1", "body", m.P1); err != nil {`,
  9906  		`	iP1Size := int64(len(m.P1)`,
  9907  		`	if err := validate.MinItems("P1", "body", iP1Size, 20); err != nil {`,
  9908  		`	for i := 0; i < len(m.P1); i++ {`,
  9909  		`		if err := validate.MinimumInt("P1"+"."+strconv.Itoa(i), ` +
  9910  			`"body", int64(m.P1[i]), 10, false); err != nil {`,
  9911  		`func (m *ArrayOfTuplesTuple0) validateArrayOfTuplesTuple0Items(formats strfmt.Registry) error {`,
  9912  		`	for i := range m.ArrayOfTuplesTuple0Items {`,
  9913  		`		for ii := 0; ii < len(m.ArrayOfTuplesTuple0Items[i]); ii++ {`,
  9914  		`			if err := validate.FormatOf(strconv.Itoa(i)+"."+strconv.Itoa(ii), ` +
  9915  			`"body", "date", m.ArrayOfTuplesTuple0Items[i][ii].String(), formats); err != nil {`,
  9916  	},
  9917  		// not expected
  9918  		todo,
  9919  		// output in log
  9920  		noLines,
  9921  		noLines)
  9922  
  9923  	expandRun.AddExpectations("array_of_tuples.go",
  9924  		flattenRun.ExpectedFor("ArrayOfTuples").ExpectedLines, todo, noLines, noLines)
  9925  
  9926  	// load expectations for model: tuple_thing_with_object_element.go
  9927  	flattenRun.AddExpectations("tuple_thing_with_object_element.go", []string{
  9928  		`type TupleThingWithObjectElement struct {`,
  9929  		"	P0 *TupleThingWithObjectElementItems0 `json:\"-\"`",
  9930  		"	P1 map[string]int64 `json:\"-\"`",
  9931  		"	TupleThingWithObjectElementItems []map[string]strfmt.Date `json:\"-\"`",
  9932  		`func (m *TupleThingWithObjectElement) UnmarshalJSON(raw []byte) error {`,
  9933  		`	var stage1 []json.RawMessage`,
  9934  		`	buf := bytes.NewBuffer(raw`,
  9935  		`	dec := json.NewDecoder(buf`,
  9936  		`	dec.UseNumber(`,
  9937  		`	if err := dec.Decode(&stage1); err != nil {`,
  9938  		`	var lastIndex int`,
  9939  		`	if len(stage1) > 0 {`,
  9940  		`		var dataP0 TupleThingWithObjectElementItems0`,
  9941  		`		buf = bytes.NewBuffer(stage1[0]`,
  9942  		`		dec := json.NewDecoder(buf`,
  9943  		`		dec.UseNumber(`,
  9944  		`		if err := dec.Decode(&dataP0); err != nil {`,
  9945  		`		m.P0 = &dataP0`,
  9946  		`		lastIndex = 0`,
  9947  		`	if len(stage1) > 1 {`,
  9948  		`		var dataP1 map[string]int64`,
  9949  		`		buf = bytes.NewBuffer(stage1[1]`,
  9950  		`		dec := json.NewDecoder(buf`,
  9951  		`		dec.UseNumber(`,
  9952  		`		if err := dec.Decode(&dataP1); err != nil {`,
  9953  		`		m.P1 = dataP1`,
  9954  		`		lastIndex = 1`,
  9955  		`	if len(stage1) > lastIndex+1 {`,
  9956  		`		for _, val := range stage1[lastIndex+1:] {`,
  9957  		`			var toadd map[string]strfmt.Date`,
  9958  		`			buf = bytes.NewBuffer(val`,
  9959  		`			dec := json.NewDecoder(buf`,
  9960  		`			dec.UseNumber(`,
  9961  		`			if err := dec.Decode(&toadd); err != nil {`,
  9962  		`			m.TupleThingWithObjectElementItems = append(m.TupleThingWithObjectElementItems, toadd`,
  9963  		`func (m TupleThingWithObjectElement) MarshalJSON() ([]byte, error) {`,
  9964  		`	data := []interface{}{`,
  9965  		`		m.P0,`,
  9966  		`		m.P1,`,
  9967  		`	for _, v := range m.TupleThingWithObjectElementItems {`,
  9968  		`		data = append(data, v`,
  9969  		`	return json.Marshal(data`,
  9970  		`func (m *TupleThingWithObjectElement) Validate(formats strfmt.Registry) error {`,
  9971  		`	if err := m.validateP0(formats); err != nil {`,
  9972  		`	if err := m.validateP1(formats); err != nil {`,
  9973  		`	if err := m.validateTupleThingWithObjectElementItems(formats); err != nil {`,
  9974  		`		return errors.CompositeValidationError(res...`,
  9975  		`func (m *TupleThingWithObjectElement) validateP0(formats strfmt.Registry) error {`,
  9976  		`	if err := validate.Required("0", "body", m.P0); err != nil {`,
  9977  		`	if m.P0 != nil {`,
  9978  		`		if err := m.P0.Validate(formats); err != nil {`,
  9979  		`			if ve, ok := err.(*errors.Validation); ok {`,
  9980  		`				return ve.ValidateName("0"`,
  9981  		`func (m *TupleThingWithObjectElement) validateP1(formats strfmt.Registry) error {`,
  9982  		`	if err := validate.Required("1", "body", m.P1); err != nil {`,
  9983  		`	for k := range m.P1 {`,
  9984  		`		if err := validate.MinimumInt("1"+"."+k, "body", int64(m.P1[k]), 10, false); err != nil {`,
  9985  		`func (m *TupleThingWithObjectElement) validateTupleThingWithObjectElementItems(formats strfmt.Registry)` +
  9986  			` error {`,
  9987  		`	for i := range m.TupleThingWithObjectElementItems {`,
  9988  		`		for k := range m.TupleThingWithObjectElementItems[i] {`,
  9989  		`			if err := validate.FormatOf(strconv.Itoa(i+2)+"."+k, "body", "date", ` +
  9990  			`m.TupleThingWithObjectElementItems[i][k].String(), formats); err != nil {`,
  9991  		`type TupleThingWithObjectElementItems0 struct {`,
  9992  		"	Prop1 string `json:\"prop1,omitempty\"`",
  9993  		`func (m *TupleThingWithObjectElementItems0) Validate(formats strfmt.Registry) error {`,
  9994  		`	if err := m.validateProp1(formats); err != nil {`,
  9995  		`		return errors.CompositeValidationError(res...`,
  9996  		`func (m *TupleThingWithObjectElementItems0) validateProp1(formats strfmt.Registry) error {`,
  9997  		`	if swag.IsZero(m.Prop1) {`,
  9998  		`	if err := validate.MaxLength("prop1", "body", string(m.Prop1), 10); err != nil {`,
  9999  	},
 10000  		// not expected
 10001  		todo,
 10002  		// output in log
 10003  		noLines,
 10004  		noLines)
 10005  
 10006  	expandRun.AddExpectations("tuple_thing_with_object_element.go",
 10007  		flattenRun.ExpectedFor("TupleThingWithObjectElement").ExpectedLines, todo, noLines, noLines)
 10008  
 10009  	// load expectations for model: tuple_thing_with_no_additional_items.go
 10010  	flattenRun.AddExpectations("tuple_thing_with_no_additional_items.go", []string{
 10011  		`type TupleThingWithNoAdditionalItems struct {`,
 10012  		"	P0 *string `json:\"-\"`",
 10013  		"	P1 *int64 `json:\"-\"`",
 10014  		`func (m *TupleThingWithNoAdditionalItems) UnmarshalJSON(raw []byte) error {`,
 10015  		`	var stage1 []json.RawMessage`,
 10016  		`	buf := bytes.NewBuffer(raw`,
 10017  		`	dec := json.NewDecoder(buf`,
 10018  		`	dec.UseNumber(`,
 10019  		`	if err := dec.Decode(&stage1); err != nil {`,
 10020  		`	if len(stage1) > 0 {`,
 10021  		`		var dataP0 string`,
 10022  		`		buf = bytes.NewBuffer(stage1[0]`,
 10023  		`		dec := json.NewDecoder(buf`,
 10024  		`		dec.UseNumber(`,
 10025  		`		if err := dec.Decode(&dataP0); err != nil {`,
 10026  		`		m.P0 = &dataP0`,
 10027  		`	if len(stage1) > 1 {`,
 10028  		`		var dataP1 int64`,
 10029  		`		buf = bytes.NewBuffer(stage1[1]`,
 10030  		`		dec := json.NewDecoder(buf`,
 10031  		`		dec.UseNumber(`,
 10032  		`		if err := dec.Decode(&dataP1); err != nil {`,
 10033  		`		m.P1 = &dataP1`,
 10034  		`func (m TupleThingWithNoAdditionalItems) MarshalJSON() ([]byte, error) {`,
 10035  		`	data := []interface{}{`,
 10036  		`		m.P0,`,
 10037  		`		m.P1,`,
 10038  		`	return json.Marshal(data`,
 10039  		`func (m *TupleThingWithNoAdditionalItems) Validate(formats strfmt.Registry) error {`,
 10040  		`	if err := m.validateP0(formats); err != nil {`,
 10041  		`	if err := m.validateP1(formats); err != nil {`,
 10042  		`		return errors.CompositeValidationError(res...`,
 10043  		`func (m *TupleThingWithNoAdditionalItems) validateP0(formats strfmt.Registry) error {`,
 10044  		`	if err := validate.Required("0", "body", m.P0); err != nil {`,
 10045  		`func (m *TupleThingWithNoAdditionalItems) validateP1(formats strfmt.Registry) error {`,
 10046  		`	if err := validate.Required("1", "body", m.P1); err != nil {`,
 10047  		`	if err := validate.MaximumInt("1", "body", int64(*m.P1), 10, false); err != nil {`,
 10048  	},
 10049  		// not expected
 10050  		todo,
 10051  		// output in log
 10052  		noLines,
 10053  		noLines)
 10054  
 10055  	expandRun.AddExpectations("tuple_thing_with_no_additional_items.go",
 10056  		flattenRun.ExpectedFor("TupleThingWithNoAdditionalItems").ExpectedLines, todo, noLines, noLines)
 10057  
 10058  	// load expectations for model: tuple_thing_with_any_additional_items.go
 10059  	flattenRun.AddExpectations("tuple_thing_with_any_additional_items.go", []string{
 10060  		`type TupleThingWithAnyAdditionalItems struct {`,
 10061  		"	P0 *string `json:\"-\"`",
 10062  		"	P1 *int64 `json:\"-\"`",
 10063  		"	TupleThingWithAnyAdditionalItemsItems []interface{} `json:\"-\"`",
 10064  		`func (m *TupleThingWithAnyAdditionalItems) UnmarshalJSON(raw []byte) error {`,
 10065  		`	var stage1 []json.RawMessage`,
 10066  		`	buf := bytes.NewBuffer(raw`,
 10067  		`	dec := json.NewDecoder(buf`,
 10068  		`	dec.UseNumber(`,
 10069  		`	if err := dec.Decode(&stage1); err != nil {`,
 10070  		`	var lastIndex int`,
 10071  		`	if len(stage1) > 0 {`,
 10072  		`		var dataP0 string`,
 10073  		`		buf = bytes.NewBuffer(stage1[0]`,
 10074  		`		dec := json.NewDecoder(buf`,
 10075  		`		dec.UseNumber(`,
 10076  		`		if err := dec.Decode(&dataP0); err != nil {`,
 10077  		`		m.P0 = &dataP0`,
 10078  		`		lastIndex = 0`,
 10079  		`	if len(stage1) > 1 {`,
 10080  		`		var dataP1 int64`,
 10081  		`		buf = bytes.NewBuffer(stage1[1]`,
 10082  		`		dec := json.NewDecoder(buf`,
 10083  		`		dec.UseNumber(`,
 10084  		`		if err := dec.Decode(&dataP1); err != nil {`,
 10085  		`		m.P1 = &dataP1`,
 10086  		`		lastIndex = 1`,
 10087  		`	if len(stage1) > lastIndex+1 {`,
 10088  		`		for _, val := range stage1[lastIndex+1:] {`,
 10089  		`			var toadd interface{`,
 10090  		`			buf = bytes.NewBuffer(val`,
 10091  		`			dec := json.NewDecoder(buf`,
 10092  		`			dec.UseNumber(`,
 10093  		`			if err := dec.Decode(&toadd); err != nil {`,
 10094  		`			m.TupleThingWithAnyAdditionalItemsItems = append(m.TupleThingWithAnyAdditionalItemsItems, toadd`,
 10095  		`func (m TupleThingWithAnyAdditionalItems) MarshalJSON() ([]byte, error) {`,
 10096  		`	data := []interface{}{`,
 10097  		`		m.P0,`,
 10098  		`		m.P1,`,
 10099  		`	for _, v := range m.TupleThingWithAnyAdditionalItemsItems {`,
 10100  		`		data = append(data, v`,
 10101  		`	return json.Marshal(data`,
 10102  		`func (m *TupleThingWithAnyAdditionalItems) Validate(formats strfmt.Registry) error {`,
 10103  		`	if err := m.validateP0(formats); err != nil {`,
 10104  		`	if err := m.validateP1(formats); err != nil {`,
 10105  		`	if err := m.validateTupleThingWithAnyAdditionalItemsItems(formats); err != nil {`,
 10106  		`		return errors.CompositeValidationError(res...`,
 10107  		`func (m *TupleThingWithAnyAdditionalItems) validateP0(formats strfmt.Registry) error {`,
 10108  		`	if err := validate.Required("0", "body", m.P0); err != nil {`,
 10109  		`	if err := validate.MaxLength("0", "body", string(*m.P0), 10); err != nil {`,
 10110  		`func (m *TupleThingWithAnyAdditionalItems) validateP1(formats strfmt.Registry) error {`,
 10111  		`	if err := validate.Required("1", "body", m.P1); err != nil {`,
 10112  		`	if err := validate.MaximumInt("1", "body", int64(*m.P1), 10, false); err != nil {`,
 10113  		`func (m *TupleThingWithAnyAdditionalItems) ` +
 10114  			`validateTupleThingWithAnyAdditionalItemsItems(formats strfmt.Registry) error {`,
 10115  	},
 10116  		// not expected
 10117  		todo,
 10118  		// output in log
 10119  		noLines,
 10120  		noLines)
 10121  
 10122  	expandRun.AddExpectations("tuple_thing_with_any_additional_items.go",
 10123  		flattenRun.ExpectedFor("TupleThingWithAnyAdditionalItems").ExpectedLines, todo, noLines, noLines)
 10124  }
 10125  
 10126  func initFixtureDeepMaps() {
 10127  	// testing fixture-deepMaps.yaml with minimal flatten
 10128  
 10129  	f := newModelFixture("../fixtures/enhancements/1572/fixture-deepMaps.yaml", "issue 1572 - deep maps")
 10130  	thisRun := f.AddRun(false).WithMinimalFlatten(true)
 10131  
 10132  	// load expectations for model: model_object_vanilla.go
 10133  	thisRun.AddExpectations("model_object_vanilla.go", []string{
 10134  		`type ModelObjectVanilla struct {`,
 10135  		"	Prop0 *ModelSanity `json:\"prop0,omitempty\"`",
 10136  		"	Prop1 *ModelSanity `json:\"prop1\"`",
 10137  		"	Prop2 []*ModelSanity `json:\"prop2\"`",
 10138  		"	Prop3 *ModelSanity `json:\"prop3,omitempty\"`",
 10139  		"	Prop4 map[string]ModelSanity `json:\"prop4,omitempty\"`",
 10140  		"	Prop5 int64 `json:\"prop5,omitempty\"`",
 10141  		"	ModelObjectVanilla map[string]map[string]map[string]ModelSanity `json:\"-\"`",
 10142  		`func (m *ModelObjectVanilla) Validate(formats strfmt.Registry) error {`,
 10143  		`	if err := m.validateProp0(formats); err != nil {`,
 10144  		`	if err := m.validateProp1(formats); err != nil {`,
 10145  		`	if err := m.validateProp2(formats); err != nil {`,
 10146  		`	if err := m.validateProp3(formats); err != nil {`,
 10147  		`	if err := m.validateProp4(formats); err != nil {`,
 10148  		`	for k := range m.ModelObjectVanilla {`,
 10149  		`		for kk := range m.ModelObjectVanilla[k] {`,
 10150  		`			for kkk := range m.ModelObjectVanilla[k][kk] {`,
 10151  		`				if err := validate.Required(k+"."+kk+"."+kkk, "body",` +
 10152  			` m.ModelObjectVanilla[k][kk][kkk]); err != nil {`,
 10153  		`				if val, ok := m.ModelObjectVanilla[k][kk][kkk]; ok {`,
 10154  		`					if err := val.Validate(formats); err != nil {`,
 10155  		`		return errors.CompositeValidationError(res...`,
 10156  		`func (m *ModelObjectVanilla) validateProp0(formats strfmt.Registry) error {`,
 10157  		`	if swag.IsZero(m.Prop0) {`,
 10158  		`	if m.Prop0 != nil {`,
 10159  		`		if err := m.Prop0.Validate(formats); err != nil {`,
 10160  		`			if ve, ok := err.(*errors.Validation); ok {`,
 10161  		`				return ve.ValidateName("prop0"`,
 10162  		`func (m *ModelObjectVanilla) validateProp1(formats strfmt.Registry) error {`,
 10163  		`	if err := validate.Required("prop1", "body", m.Prop1); err != nil {`,
 10164  		`	if m.Prop1 != nil {`,
 10165  		`		if err := m.Prop1.Validate(formats); err != nil {`,
 10166  		`			if ve, ok := err.(*errors.Validation); ok {`,
 10167  		`				return ve.ValidateName("prop1"`,
 10168  		`func (m *ModelObjectVanilla) validateProp2(formats strfmt.Registry) error {`,
 10169  		`	if swag.IsZero(m.Prop2) {`,
 10170  		`	for i := 0; i < len(m.Prop2); i++ {`,
 10171  		`		if swag.IsZero(m.Prop2[i]) {`,
 10172  		`		if m.Prop2[i] != nil {`,
 10173  		`			if err := m.Prop2[i].Validate(formats); err != nil {`,
 10174  		`				if ve, ok := err.(*errors.Validation); ok {`,
 10175  		`					return ve.ValidateName("prop2" + "." + strconv.Itoa(i)`,
 10176  		`func (m *ModelObjectVanilla) validateProp3(formats strfmt.Registry) error {`,
 10177  		`	if swag.IsZero(m.Prop3) {`,
 10178  		`	if m.Prop3 != nil {`,
 10179  		`		if err := m.Prop3.Validate(formats); err != nil {`,
 10180  		`			if ve, ok := err.(*errors.Validation); ok {`,
 10181  		`				return ve.ValidateName("prop3"`,
 10182  		`func (m *ModelObjectVanilla) validateProp4(formats strfmt.Registry) error {`,
 10183  		`	if swag.IsZero(m.Prop4) {`,
 10184  		`	for k := range m.Prop4 {`,
 10185  		`		if err := validate.Required("prop4"+"."+k, "body", m.Prop4[k]); err != nil {`,
 10186  		`		if val, ok := m.Prop4[k]; ok {`,
 10187  		`			if err := val.Validate(formats); err != nil {`,
 10188  	},
 10189  		// not expected
 10190  		todo,
 10191  		// output in log
 10192  		noLines,
 10193  		noLines)
 10194  
 10195  	// load expectations for model: model_sanity.go
 10196  	thisRun.AddExpectations("model_sanity.go", []string{
 10197  		`type ModelSanity struct {`,
 10198  		"	PropA string `json:\"propA,omitempty\"`",
 10199  		"	PropB *string `json:\"propB\"`",
 10200  		`func (m *ModelSanity) Validate(formats strfmt.Registry) error {`,
 10201  		`	if err := m.validatePropB(formats); err != nil {`,
 10202  		`		return errors.CompositeValidationError(res...`,
 10203  		`func (m *ModelSanity) validatePropB(formats strfmt.Registry) error {`,
 10204  		`	if err := validate.Required("propB", "body", m.PropB); err != nil {`,
 10205  	},
 10206  		// not expected
 10207  		todo,
 10208  		// output in log
 10209  		noLines,
 10210  		noLines)
 10211  }
 10212  
 10213  func initFixture1617() {
 10214  	// testing fixture-1617.yaml with flatten and expand (--skip-flatten)
 10215  
 10216  	f := newModelFixture("../fixtures/bugs/1617/fixture-1617.yaml", "aaa")
 10217  	thisRun := f.AddRun(false).WithMinimalFlatten(true)
 10218  
 10219  	// load expectations for model: artifact_info.go
 10220  	thisRun.AddExpectations("artifact_info.go", []string{
 10221  		`type ArtifactInfo struct {`,
 10222  		`	ArtifactDescription`,
 10223  		"	Path ArtifactPath `json:\"Path,omitempty\"`",
 10224  		"	Status ArtifactStatus `json:\"Status,omitempty\"`",
 10225  		"	Timestamp strfmt.DateTime `json:\"Timestamp,omitempty\"`",
 10226  		`func (m *ArtifactInfo) UnmarshalJSON(raw []byte) error {`,
 10227  		`	var aO0 ArtifactDescription`,
 10228  		`	if err := swag.ReadJSON(raw, &aO0); err != nil {`,
 10229  		`	m.ArtifactDescription = aO0`,
 10230  		`	var propsArtifactInfo struct {`,
 10231  		"		Path ArtifactPath `json:\"Path,omitempty\"`",
 10232  		"		Status ArtifactStatus `json:\"Status,omitempty\"`",
 10233  		"		Timestamp strfmt.DateTime `json:\"Timestamp,omitempty\"`",
 10234  		`	if err := swag.ReadJSON(raw, &propsArtifactInfo); err != nil {`,
 10235  		`	m.Path = propsArtifactInfo.Path`,
 10236  		`	m.Status = propsArtifactInfo.Status`,
 10237  		`	m.Timestamp = propsArtifactInfo.Timestamp`,
 10238  		`func (m ArtifactInfo) MarshalJSON() ([]byte, error) {`,
 10239  		`	_parts := make([][]byte, 0, 1`,
 10240  		`	aO0, err := swag.WriteJSON(m.ArtifactDescription`,
 10241  		`	if err != nil {`,
 10242  		`		return nil, err`,
 10243  		`	_parts = append(_parts, aO0`,
 10244  		`	var propsArtifactInfo struct {`,
 10245  		"		Path ArtifactPath `json:\"Path,omitempty\"`",
 10246  		"		Status ArtifactStatus `json:\"Status,omitempty\"`",
 10247  		"		Timestamp strfmt.DateTime `json:\"Timestamp,omitempty\"`",
 10248  		`	propsArtifactInfo.Path = m.Path`,
 10249  		`	propsArtifactInfo.Status = m.Status`,
 10250  		`	propsArtifactInfo.Timestamp = m.Timestamp`,
 10251  		`	jsonDataPropsArtifactInfo, errArtifactInfo := swag.WriteJSON(propsArtifactInfo`,
 10252  		`	if errArtifactInfo != nil {`,
 10253  		`		return nil, errArtifactInfo`,
 10254  		`	_parts = append(_parts, jsonDataPropsArtifactInfo`,
 10255  		`	return swag.ConcatJSON(_parts...), nil`,
 10256  		`func (m *ArtifactInfo) Validate(formats strfmt.Registry) error {`,
 10257  		`	if err := m.ArtifactDescription.Validate(formats); err != nil {`,
 10258  		`	if err := m.validatePath(formats); err != nil {`,
 10259  		`	if err := m.validateStatus(formats); err != nil {`,
 10260  		`	if err := m.validateTimestamp(formats); err != nil {`,
 10261  		`		return errors.CompositeValidationError(res...`,
 10262  		`func (m *ArtifactInfo) validatePath(formats strfmt.Registry) error {`,
 10263  		`	if swag.IsZero(m.Path) {`,
 10264  		`	if err := m.Path.Validate(formats); err != nil {`,
 10265  		`		if ve, ok := err.(*errors.Validation); ok {`,
 10266  		`			return ve.ValidateName("Path"`,
 10267  		`func (m *ArtifactInfo) validateStatus(formats strfmt.Registry) error {`,
 10268  		`	if swag.IsZero(m.Status) {`,
 10269  		`	if err := m.Status.Validate(formats); err != nil {`,
 10270  		`		if ve, ok := err.(*errors.Validation); ok {`,
 10271  		`			return ve.ValidateName("Status"`,
 10272  		`func (m *ArtifactInfo) validateTimestamp(formats strfmt.Registry) error {`,
 10273  		`	if swag.IsZero(m.Timestamp) {`,
 10274  		`	if err := validate.FormatOf("Timestamp", "body", "date-time", m.Timestamp.String(), formats); err != nil {`,
 10275  		`func (m *ArtifactInfo) MarshalBinary() ([]byte, error) {`,
 10276  		`	if m == nil {`,
 10277  		`		return nil, nil`,
 10278  		`	return swag.WriteJSON(m`,
 10279  		`func (m *ArtifactInfo) UnmarshalBinary(b []byte) error {`,
 10280  		`	var res ArtifactInfo`,
 10281  		`	if err := swag.ReadJSON(b, &res); err != nil {`,
 10282  		`	*m = res`,
 10283  	},
 10284  		// not expected
 10285  		todo,
 10286  		// output in log
 10287  		noLines,
 10288  		noLines)
 10289  }
 10290  
 10291  func initFixtureRealiasedTypes() {
 10292  	/*
 10293  	   realiased types
 10294  	*/
 10295  
 10296  	f := newModelFixture("../fixtures/bugs/1260/fixture-realiased-types.yaml", "test type realiasing")
 10297  	thisRun := f.AddRun(false).WithMinimalFlatten(true)
 10298  
 10299  	// load expectations for model: g1.go
 10300  	thisRun.AddExpectations("g1.go", []string{
 10301  		`type G1 struct {`,
 10302  		"	Prop1 int64 `json:\"prop1,omitempty\"`",
 10303  		// empty validation
 10304  		"func (m *G1) Validate(formats strfmt.Registry) error {\n	return nil\n}",
 10305  	},
 10306  		// not expected
 10307  		todo,
 10308  		// output in log
 10309  		noLines,
 10310  		noLines)
 10311  
 10312  	// load expectations for model: e2v.go
 10313  	thisRun.AddExpectations("e2v.go", []string{
 10314  		`type E2v = E0v`,
 10315  	},
 10316  		// not expected
 10317  		todo,
 10318  		// output in log
 10319  		noLines,
 10320  		noLines)
 10321  
 10322  	// load expectations for model: a1v.go
 10323  	thisRun.AddExpectations("a1v.go", []string{
 10324  		`type A1v []int64`,
 10325  		`func (m A1v) Validate(formats strfmt.Registry) error {`,
 10326  		`	iA1vSize := int64(len(m)`,
 10327  		`	if err := validate.MaxItems("", "body", iA1vSize, 100); err != nil {`,
 10328  		`	for i := 0; i < len(m); i++ {`,
 10329  		`		if err := validate.MaximumInt(strconv.Itoa(i), "body", int64(m[i]), 100, false); err != nil {`,
 10330  		`		return errors.CompositeValidationError(res...`,
 10331  	},
 10332  		// not expected
 10333  		todo,
 10334  		// output in log
 10335  		noLines,
 10336  		noLines)
 10337  
 10338  	// load expectations for model: f2v.go
 10339  	thisRun.AddExpectations("f2v.go", []string{
 10340  		`type F2v = F0v`,
 10341  	},
 10342  		// not expected
 10343  		todo,
 10344  		// output in log
 10345  		noLines,
 10346  		noLines)
 10347  
 10348  	// load expectations for model: hsubtype1.go
 10349  	thisRun.AddExpectations("hsubtype1.go", []string{
 10350  		`type Hsubtype1 struct {`,
 10351  		`	h1p1Field string`,
 10352  		`	h1p2Field strfmt.Date`,
 10353  		"	Hsp1 uint32 `json:\"hsp1,omitempty\"`",
 10354  		`func (m *Hsubtype1) H1p1() string {`,
 10355  		`	return m.h1p1Field`,
 10356  		`func (m *Hsubtype1) SetH1p1(val string) {`,
 10357  		`	m.h1p1Field = val`,
 10358  		`func (m *Hsubtype1) H1p2() strfmt.Date {`,
 10359  		`	return m.h1p2Field`,
 10360  		`func (m *Hsubtype1) SetH1p2(val strfmt.Date) {`,
 10361  		`	m.h1p2Field = val`,
 10362  		`func (m *Hsubtype1) Validate(formats strfmt.Registry) error {`,
 10363  		`	if err := m.validateH1p2(formats); err != nil {`,
 10364  		`		return errors.CompositeValidationError(res...`,
 10365  		`func (m *Hsubtype1) validateH1p2(formats strfmt.Registry) error {`,
 10366  		`	if swag.IsZero(m.H1p2()) {`,
 10367  		`	if err := validate.FormatOf("h1p2", "body", "date", m.H1p2().String(), formats); err != nil {`,
 10368  	},
 10369  		// not expected
 10370  		todo,
 10371  		// output in log
 10372  		noLines,
 10373  		noLines)
 10374  
 10375  	// load expectations for model: f2.go
 10376  	thisRun.AddExpectations("f2.go", []string{
 10377  		`type F2 = F0`,
 10378  	},
 10379  		// not expected
 10380  		todo,
 10381  		// output in log
 10382  		noLines,
 10383  		noLines)
 10384  
 10385  	// load expectations for model: h0.go
 10386  	thisRun.AddExpectations("h0.go", []string{
 10387  		`type H0 = H1`,
 10388  		`func UnmarshalH0(reader io.Reader, consumer runtime.Consumer) (H0, error) {`,
 10389  		`	return UnmarshalH1(reader, consumer`,
 10390  		`func UnmarshalH0Slice(reader io.Reader, consumer runtime.Consumer) ([]H0, error) {`,
 10391  		`	return UnmarshalH1Slice(reader, consumer`,
 10392  	},
 10393  		// not expected
 10394  		todo,
 10395  		// output in log
 10396  		noLines,
 10397  		noLines)
 10398  
 10399  	// load expectations for model: c1v.go
 10400  	thisRun.AddExpectations("c1v.go", []string{
 10401  		`type C1v interface{`,
 10402  	},
 10403  		// not expected
 10404  		todo,
 10405  		// output in log
 10406  		noLines,
 10407  		noLines)
 10408  
 10409  	// load expectations for model: d0v.go
 10410  	thisRun.AddExpectations("d0v.go", []string{
 10411  		`type D0v = D1v`,
 10412  	},
 10413  		// not expected
 10414  		todo,
 10415  		// output in log
 10416  		noLines,
 10417  		noLines)
 10418  
 10419  	// load expectations for model: e2.go
 10420  	thisRun.AddExpectations("e2.go", []string{
 10421  		`type E2 = E0`,
 10422  	},
 10423  		// not expected
 10424  		todo,
 10425  		// output in log
 10426  		noLines,
 10427  		noLines)
 10428  
 10429  	// load expectations for model: d2v.go
 10430  	thisRun.AddExpectations("d2v.go", []string{
 10431  		`type D2v = D0v`,
 10432  	},
 10433  		// not expected
 10434  		todo,
 10435  		// output in log
 10436  		noLines,
 10437  		noLines)
 10438  
 10439  	// load expectations for model: b2v.go
 10440  	thisRun.AddExpectations("b2v.go", []string{
 10441  		`type B2v = B0v`,
 10442  	},
 10443  		// not expected
 10444  		todo,
 10445  		// output in log
 10446  		noLines,
 10447  		noLines)
 10448  
 10449  	// load expectations for model: a1.go
 10450  	thisRun.AddExpectations("a1.go", []string{
 10451  		`type A1 []int64`,
 10452  		// empty validation
 10453  		"func (m A1) Validate(formats strfmt.Registry) error {\n	return nil\n}",
 10454  	},
 10455  		// not expected
 10456  		todo,
 10457  		// output in log
 10458  		noLines,
 10459  		noLines)
 10460  
 10461  	// load expectations for model: hsubtype2.go
 10462  	thisRun.AddExpectations("hsubtype2.go", []string{
 10463  		`type Hsubtype2 struct {`,
 10464  		`	h1p1Field string`,
 10465  		`	h1p2Field strfmt.Date`,
 10466  		"	Hsp2 strfmt.DateTime `json:\"hsp2,omitempty\"`",
 10467  		`func (m *Hsubtype2) H1p1() string {`,
 10468  		`	return m.h1p1Field`,
 10469  		`func (m *Hsubtype2) SetH1p1(val string) {`,
 10470  		`	m.h1p1Field = val`,
 10471  		`func (m *Hsubtype2) H1p2() strfmt.Date {`,
 10472  		`	return m.h1p2Field`,
 10473  		`func (m *Hsubtype2) SetH1p2(val strfmt.Date) {`,
 10474  		`	m.h1p2Field = val`,
 10475  		`func (m *Hsubtype2) Validate(formats strfmt.Registry) error {`,
 10476  		`	if err := m.validateH1p2(formats); err != nil {`,
 10477  		`	if err := m.validateHsp2(formats); err != nil {`,
 10478  		`		return errors.CompositeValidationError(res...`,
 10479  		`func (m *Hsubtype2) validateH1p2(formats strfmt.Registry) error {`,
 10480  		`	if swag.IsZero(m.H1p2()) {`,
 10481  		`	if err := validate.FormatOf("h1p2", "body", "date", m.H1p2().String(), formats); err != nil {`,
 10482  		`func (m *Hsubtype2) validateHsp2(formats strfmt.Registry) error {`,
 10483  		`	if swag.IsZero(m.Hsp2) {`,
 10484  		`	if err := validate.FormatOf("hsp2", "body", "date-time", m.Hsp2.String(), formats); err != nil {`,
 10485  	},
 10486  		// not expected
 10487  		todo,
 10488  		// output in log
 10489  		noLines,
 10490  		noLines)
 10491  
 10492  	// load expectations for model: b2.go
 10493  	thisRun.AddExpectations("b2.go", []string{
 10494  		`type B2 = B0`,
 10495  	},
 10496  		// not expected
 10497  		todo,
 10498  		// output in log
 10499  		noLines,
 10500  		noLines)
 10501  
 10502  	// load expectations for model: b1.go
 10503  	thisRun.AddExpectations("b1.go", []string{
 10504  		`type B1 map[string]int64`,
 10505  		// empty validation
 10506  		"func (m B1) Validate(formats strfmt.Registry) error {\n	return nil\n}",
 10507  	},
 10508  		// not expected
 10509  		todo,
 10510  		// output in log
 10511  		noLines,
 10512  		noLines)
 10513  
 10514  	// load expectations for model: d0.go
 10515  	thisRun.AddExpectations("d0.go", []string{
 10516  		`type D0 = D1`,
 10517  	},
 10518  		// not expected
 10519  		todo,
 10520  		// output in log
 10521  		noLines,
 10522  		noLines)
 10523  
 10524  	// load expectations for model: g1v.go
 10525  	thisRun.AddExpectations("g1v.go", []string{
 10526  		`type G1v struct {`,
 10527  		"	Prop1v int64 `json:\"prop1v,omitempty\"`",
 10528  		"	Prop2v *int64 `json:\"prop2v\"`",
 10529  		`func (m *G1v) Validate(formats strfmt.Registry) error {`,
 10530  		`	if err := m.validateProp1v(formats); err != nil {`,
 10531  		`	if err := m.validateProp2v(formats); err != nil {`,
 10532  		`		return errors.CompositeValidationError(res...`,
 10533  		`func (m *G1v) validateProp1v(formats strfmt.Registry) error {`,
 10534  		`	if swag.IsZero(m.Prop1v) {`,
 10535  		`	if err := validate.MaximumInt("prop1v", "body", int64(m.Prop1v), 100, false); err != nil {`,
 10536  		`func (m *G1v) validateProp2v(formats strfmt.Registry) error {`,
 10537  		`	if err := validate.Required("prop2v", "body", m.Prop2v); err != nil {`,
 10538  	},
 10539  		// not expected
 10540  		todo,
 10541  		// output in log
 10542  		noLines,
 10543  		noLines)
 10544  
 10545  	// load expectations for model: e0.go
 10546  	thisRun.AddExpectations("e0.go", []string{
 10547  		`type E0 = E1`,
 10548  	},
 10549  		// not expected
 10550  		todo,
 10551  		// output in log
 10552  		noLines,
 10553  		noLines)
 10554  
 10555  	// load expectations for model: f0v.go
 10556  	thisRun.AddExpectations("f0v.go", []string{
 10557  		`type F0v = F1v`,
 10558  	},
 10559  		// not expected
 10560  		todo,
 10561  		// output in log
 10562  		noLines,
 10563  		noLines)
 10564  
 10565  	// load expectations for model: h2.go
 10566  	thisRun.AddExpectations("h2.go", []string{
 10567  		`type H2 = H0`,
 10568  		`func UnmarshalH2(reader io.Reader, consumer runtime.Consumer) (H2, error) {`,
 10569  		`	return UnmarshalH0(reader, consumer`,
 10570  		`func UnmarshalH2Slice(reader io.Reader, consumer runtime.Consumer) ([]H2, error) {`,
 10571  		`	return UnmarshalH0Slice(reader, consumer`,
 10572  	},
 10573  		// not expected
 10574  		todo,
 10575  		// output in log
 10576  		noLines,
 10577  		noLines)
 10578  
 10579  	// load expectations for model: b1v.go
 10580  	thisRun.AddExpectations("b1v.go", []string{
 10581  		`type B1v map[string]int64`,
 10582  		`func (m B1v) Validate(formats strfmt.Registry) error {`,
 10583  		`	for k := range m {`,
 10584  		`		if err := validate.MaximumInt(k, "body", int64(m[k]), 100, false); err != nil {`,
 10585  		`		return errors.CompositeValidationError(res...`,
 10586  	},
 10587  		// not expected
 10588  		todo,
 10589  		// output in log
 10590  		noLines,
 10591  		noLines)
 10592  
 10593  	// load expectations for model: f0.go
 10594  	thisRun.AddExpectations("f0.go", []string{
 10595  		`type F0 = F1`,
 10596  	},
 10597  		// not expected
 10598  		todo,
 10599  		// output in log
 10600  		noLines,
 10601  		noLines)
 10602  
 10603  	// load expectations for model: a2v.go
 10604  	thisRun.AddExpectations("a2v.go", []string{
 10605  		`type A2v = A0v`,
 10606  	},
 10607  		// not expected
 10608  		todo,
 10609  		// output in log
 10610  		noLines,
 10611  		noLines)
 10612  
 10613  	// load expectations for model: hs2.go
 10614  	thisRun.AddExpectations("hs2.go", []string{
 10615  		`type Hs2 struct {`,
 10616  		`	Hs0`,
 10617  		// empty validation
 10618  		"func (m *Hs2) Validate(formats strfmt.Registry) error {\n	return nil\n}",
 10619  	},
 10620  		// not expected
 10621  		todo,
 10622  		// output in log
 10623  		noLines,
 10624  		noLines)
 10625  
 10626  	// load expectations for model: d1v.go
 10627  	thisRun.AddExpectations("d1v.go", []string{
 10628  		`type D1v int64`,
 10629  		`func (m D1v) Validate(formats strfmt.Registry) error {`,
 10630  		`	if err := validate.MaximumInt("", "body", int64(m), 100, false); err != nil {`,
 10631  		`		return errors.CompositeValidationError(res...`,
 10632  	},
 10633  		// not expected
 10634  		todo,
 10635  		// output in log
 10636  		noLines,
 10637  		noLines)
 10638  
 10639  	// load expectations for model: c1.go
 10640  	thisRun.AddExpectations("c1.go", []string{
 10641  		`type C1 interface{`,
 10642  	},
 10643  		// not expected
 10644  		todo,
 10645  		// output in log
 10646  		noLines,
 10647  		noLines)
 10648  
 10649  	// load expectations for model: c2.go
 10650  	thisRun.AddExpectations("c2.go", []string{
 10651  		`type C2 = C0`,
 10652  	},
 10653  		// not expected
 10654  		todo,
 10655  		// output in log
 10656  		noLines,
 10657  		noLines)
 10658  
 10659  	// load expectations for model: e0v.go
 10660  	thisRun.AddExpectations("e0v.go", []string{
 10661  		`type E0v = E1v`,
 10662  	},
 10663  		// not expected
 10664  		todo,
 10665  		// output in log
 10666  		noLines,
 10667  		noLines)
 10668  
 10669  	// load expectations for model: d1.go
 10670  	thisRun.AddExpectations("d1.go", []string{
 10671  		`type D1 int64`,
 10672  		// empty validation
 10673  		"func (m D1) Validate(formats strfmt.Registry) error {\n	return nil\n}",
 10674  	},
 10675  		// not expected
 10676  		todo,
 10677  		// output in log
 10678  		noLines,
 10679  		noLines)
 10680  
 10681  	// load expectations for model: g2.go
 10682  	thisRun.AddExpectations("g2.go", []string{
 10683  		`type G2 struct {`,
 10684  		`	G0`,
 10685  		// empty validation
 10686  		"func (m *G2) Validate(formats strfmt.Registry) error {\n	return nil\n}",
 10687  	},
 10688  		// not expected
 10689  		todo,
 10690  		// output in log
 10691  		noLines,
 10692  		noLines)
 10693  
 10694  	// load expectations for model: d2.go
 10695  	thisRun.AddExpectations("d2.go", []string{
 10696  		`type D2 = D0`,
 10697  	},
 10698  		// not expected
 10699  		todo,
 10700  		// output in log
 10701  		noLines,
 10702  		noLines)
 10703  
 10704  	// load expectations for model: b0.go
 10705  	thisRun.AddExpectations("b0.go", []string{
 10706  		`type B0 = B1`,
 10707  	},
 10708  		// not expected
 10709  		todo,
 10710  		// output in log
 10711  		noLines,
 10712  		noLines)
 10713  
 10714  	// load expectations for model: c2v.go
 10715  	thisRun.AddExpectations("c2v.go", []string{
 10716  		`type C2v = C0v`,
 10717  	},
 10718  		// not expected
 10719  		todo,
 10720  		// output in log
 10721  		noLines,
 10722  		noLines)
 10723  
 10724  	// load expectations for model: g0.go
 10725  	thisRun.AddExpectations("g0.go", []string{
 10726  		`type G0 struct {`,
 10727  		`	G1`,
 10728  		// empty validation
 10729  		"func (m *G0) Validate(formats strfmt.Registry) error {\n	return nil\n}",
 10730  	},
 10731  		// not expected
 10732  		todo,
 10733  		// output in log
 10734  		noLines,
 10735  		noLines)
 10736  
 10737  	// load expectations for model: a0.go
 10738  	thisRun.AddExpectations("a0.go", []string{
 10739  		`type A0 = A1`,
 10740  	},
 10741  		// not expected
 10742  		todo,
 10743  		// output in log
 10744  		noLines,
 10745  		noLines)
 10746  
 10747  	// load expectations for model: a2.go
 10748  	thisRun.AddExpectations("a2.go", []string{
 10749  		`type A2 = A0`,
 10750  	},
 10751  		// not expected
 10752  		todo,
 10753  		// output in log
 10754  		noLines,
 10755  		noLines)
 10756  
 10757  	// load expectations for model: h1.go
 10758  	thisRun.AddExpectations("h1.go", []string{
 10759  		`type H1 interface {`,
 10760  		`	runtime.Validatable`,
 10761  		`	H1p1() string`,
 10762  		`	SetH1p1(string`,
 10763  		`	H1p2() strfmt.Date`,
 10764  		`	SetH1p2(strfmt.Date`,
 10765  		`type h1 struct {`,
 10766  		`	h1p1Field string`,
 10767  		`	h1p2Field strfmt.Date`,
 10768  		`func (m *h1) H1p1() string {`,
 10769  		`	return m.h1p1Field`,
 10770  		`func (m *h1) SetH1p1(val string) {`,
 10771  		`	m.h1p1Field = val`,
 10772  		`func (m *h1) H1p2() strfmt.Date {`,
 10773  		`	return m.h1p2Field`,
 10774  		`func (m *h1) SetH1p2(val strfmt.Date) {`,
 10775  		`	m.h1p2Field = val`,
 10776  		`func UnmarshalH1Slice(reader io.Reader, consumer runtime.Consumer) ([]H1, error) {`,
 10777  		`	var elements []json.RawMessage`,
 10778  		`	if err := consumer.Consume(reader, &elements); err != nil {`,
 10779  		`		return nil, err`,
 10780  		`	var result []H1`,
 10781  		`	for _, element := range elements {`,
 10782  		`		obj, err := unmarshalH1(element, consumer`,
 10783  		`		if err != nil {`,
 10784  		`			return nil, err`,
 10785  		`		result = append(result, obj`,
 10786  		`	return result, nil`,
 10787  		`func UnmarshalH1(reader io.Reader, consumer runtime.Consumer) (H1, error) {`,
 10788  		`	data, err := ioutil.ReadAll(reader`,
 10789  		`	if err != nil {`,
 10790  		`		return nil, err`,
 10791  		`	return unmarshalH1(data, consumer`,
 10792  		`func unmarshalH1(data []byte, consumer runtime.Consumer) (H1, error) {`,
 10793  		`	buf := bytes.NewBuffer(data`,
 10794  		`	buf2 := bytes.NewBuffer(data`,
 10795  		`	var getType struct {`,
 10796  		"		Htype string `json:\"htype\"`",
 10797  		`	if err := consumer.Consume(buf, &getType); err != nil {`,
 10798  		`		return nil, err`,
 10799  		`	if err := validate.RequiredString("htype", "body", getType.Htype); err != nil {`,
 10800  		`		return nil, err`,
 10801  		`	switch getType.Htype {`,
 10802  		`	case "h1":`,
 10803  		`		var result h1`,
 10804  		`		if err := consumer.Consume(buf2, &result); err != nil {`,
 10805  		`			return nil, err`,
 10806  		`		return &result, nil`,
 10807  		`	case "hsubtype1":`,
 10808  		`		var result Hsubtype1`,
 10809  		`		if err := consumer.Consume(buf2, &result); err != nil {`,
 10810  		`			return nil, err`,
 10811  		`		return &result, nil`,
 10812  		`	case "hsubtype2":`,
 10813  		`		var result Hsubtype2`,
 10814  		`		if err := consumer.Consume(buf2, &result); err != nil {`,
 10815  		`			return nil, err`,
 10816  		`		return &result, nil`,
 10817  		`	return nil, errors.New(422, "invalid htype value: %q", getType.Htype`,
 10818  		`func (m *h1) Validate(formats strfmt.Registry) error {`,
 10819  		`	if err := m.validateH1p2(formats); err != nil {`,
 10820  		`		return errors.CompositeValidationError(res...`,
 10821  		`func (m *h1) validateH1p2(formats strfmt.Registry) error {`,
 10822  		`	if swag.IsZero(m.H1p2()) {`,
 10823  		`	if err := validate.FormatOf("h1p2", "body", "date", m.H1p2().String(), formats); err != nil {`,
 10824  	},
 10825  		// not expected
 10826  		todo,
 10827  		// output in log
 10828  		noLines,
 10829  		noLines)
 10830  
 10831  	// load expectations for model: c0v.go
 10832  	thisRun.AddExpectations("c0v.go", []string{
 10833  		`type C0v = C1v`,
 10834  	},
 10835  		// not expected
 10836  		todo,
 10837  		// output in log
 10838  		noLines,
 10839  		noLines)
 10840  
 10841  	// load expectations for model: g2v.go
 10842  	thisRun.AddExpectations("g2v.go", []string{
 10843  		`type G2v struct {`,
 10844  		`	G0v`,
 10845  		// empty validation
 10846  		"func (m *G2v) Validate(formats strfmt.Registry) error {\n	return nil\n}",
 10847  	},
 10848  		// not expected
 10849  		todo,
 10850  		// output in log
 10851  		noLines,
 10852  		noLines)
 10853  
 10854  	// load expectations for model: f1.go
 10855  	thisRun.AddExpectations("f1.go", []string{
 10856  		`type F1 strfmt.UUID`,
 10857  		`func (m F1) Validate(formats strfmt.Registry) error {`,
 10858  		`	if err := validate.FormatOf("", "body", "uuid", strfmt.UUID(m).String(), formats); err != nil {`,
 10859  		`		return errors.CompositeValidationError(res...`,
 10860  	},
 10861  		// not expected
 10862  		todo,
 10863  		// output in log
 10864  		noLines,
 10865  		noLines)
 10866  
 10867  	// load expectations for model: e1.go
 10868  	thisRun.AddExpectations("e1.go", []string{
 10869  		`type E1 strfmt.Date`,
 10870  		`func (m E1) Validate(formats strfmt.Registry) error {`,
 10871  		`	if err := validate.FormatOf("", "body", "date", strfmt.Date(m).String(), formats); err != nil {`,
 10872  		`		return errors.CompositeValidationError(res...`,
 10873  	},
 10874  		// not expected
 10875  		todo,
 10876  		// output in log
 10877  		noLines,
 10878  		noLines)
 10879  
 10880  	// load expectations for model: a0v.go
 10881  	thisRun.AddExpectations("a0v.go", []string{
 10882  		`type A0v = A1v`,
 10883  	},
 10884  		// not expected
 10885  		todo,
 10886  		// output in log
 10887  		noLines,
 10888  		noLines)
 10889  
 10890  	// load expectations for model: c0.go
 10891  	thisRun.AddExpectations("c0.go", []string{
 10892  		`type C0 = C1`,
 10893  	},
 10894  		// not expected
 10895  		todo,
 10896  		// output in log
 10897  		noLines,
 10898  		noLines)
 10899  
 10900  	// load expectations for model: f1v.go
 10901  	thisRun.AddExpectations("f1v.go", []string{
 10902  		`type F1v strfmt.UUID`,
 10903  		`func (m F1v) Validate(formats strfmt.Registry) error {`,
 10904  		`	if err := validate.FormatOf("", "body", "uuid", strfmt.UUID(m).String(), formats); err != nil {`,
 10905  		`		return errors.CompositeValidationError(res...`,
 10906  	},
 10907  		// not expected
 10908  		todo,
 10909  		// output in log
 10910  		noLines,
 10911  		noLines)
 10912  
 10913  	// load expectations for model: e1v.go
 10914  	thisRun.AddExpectations("e1v.go", []string{
 10915  		`type E1v strfmt.Date`,
 10916  		`func (m E1v) Validate(formats strfmt.Registry) error {`,
 10917  		`	if err := validate.FormatOf("", "body", "date", strfmt.Date(m).String(), formats); err != nil {`,
 10918  		`		return errors.CompositeValidationError(res...`,
 10919  	},
 10920  		// not expected
 10921  		todo,
 10922  		// output in log
 10923  		noLines,
 10924  		noLines)
 10925  
 10926  	// load expectations for model: b0v.go
 10927  	thisRun.AddExpectations("b0v.go", []string{
 10928  		`type B0v = B1v`,
 10929  	},
 10930  		// not expected
 10931  		todo,
 10932  		// output in log
 10933  		noLines,
 10934  		noLines)
 10935  
 10936  	// load expectations for model: g0v.go
 10937  	thisRun.AddExpectations("g0v.go", []string{
 10938  		`type G0v struct {`,
 10939  		`	G1v`,
 10940  		// empty validation
 10941  		"func (m *G0v) Validate(formats strfmt.Registry) error {\n	return nil\n}",
 10942  	},
 10943  		// not expected
 10944  		todo,
 10945  		// output in log
 10946  		noLines,
 10947  		noLines)
 10948  
 10949  	// load expectations for model: hs0.go
 10950  	thisRun.AddExpectations("hs0.go", []string{
 10951  		`type Hs0 struct {`,
 10952  		`	Hsubtype1`,
 10953  		// empty validation
 10954  		"func (m *Hs0) Validate(formats strfmt.Registry) error {\n	return nil\n}",
 10955  	},
 10956  		// not expected
 10957  		todo,
 10958  		// output in log
 10959  		noLines,
 10960  		noLines)
 10961  }
 10962  
 10963  func initFixture1993() {
 10964  	/*
 10965  	   required / non required base type
 10966  	*/
 10967  
 10968  	f := newModelFixture("../fixtures/bugs/1993/fixture-1993.yaml", "test required/non required base type")
 10969  	thisRun := f.AddRun(false).WithMinimalFlatten(true)
 10970  
 10971  	// load expectations for model: house.go
 10972  	thisRun.AddExpectations("house.go", []string{
 10973  		`if err := validate.Required("pet", "body", m.Pet()); err != nil {`,
 10974  	},
 10975  		// not expected
 10976  		todo,
 10977  		// output in log
 10978  		noLines,
 10979  		noLines)
 10980  
 10981  	// load expectations for model: empty_house.go
 10982  	thisRun.AddExpectations("empty_house.go", []string{
 10983  		`if swag.IsZero(m.Pet())`,
 10984  	},
 10985  		// not expected
 10986  		todo,
 10987  		// output in log
 10988  		noLines,
 10989  		noLines)
 10990  }