github.com/6543-forks/go-swagger@v0.26.0/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 initFixture2220() {
    18  	// NOTE(fred): this test merely asserts that template refactoring (essentially dealing with hite space gobbling etc)
    19  	// properly runs against the case of base type with additionalProperties.
    20  	//
    21  	// TODO(fred): should actually fix the problem in base type model rendering
    22  	f := newModelFixture("../fixtures/bugs/2220/fixture-2220.yaml", "check base type with additional properties")
    23  	flattenRun := f.AddRun(false).WithMinimalFlatten(true)
    24  
    25  	flattenRun.AddExpectations("object.go", []string{
    26  		// This asserts our template announcement about forthcoming fix (used to  be a func commented out of luck)
    27  		`// AdditionalProperties in base type shoud be handled just like regular properties`,
    28  		`// At this moment, the base type property is pushed down to the subtype`,
    29  	}, todo, noLines, noLines)
    30  
    31  	flattenRun.AddExpectations("component.go", []string{
    32  		// This asserts the current schema layout, which works but does not honour inheritance from the base type
    33  		"ObjectAdditionalProperties map[string]interface{} `json:\"-\"`",
    34  	}, todo, noLines, noLines)
    35  }
    36  
    37  func initFixture2116() {
    38  	f := newModelFixture("../fixtures/bugs/2116/fixture-2116.yaml", "check x-omitempty and x-nullable with $ref")
    39  	flattenRun := f.AddRun(false).WithMinimalFlatten(true)
    40  
    41  	flattenRun.AddExpectations("case1_fail_omitempty_false_not_hoisted_by_ref.go", []string{
    42  		"Body *ObjectWithOmitemptyFalse `json:\"Body\"`",
    43  	}, todo, noLines, noLines)
    44  
    45  	flattenRun.AddExpectations("case2_fail_omitempty_false_not_overridden_by_ref_sibling.go", []string{
    46  		"Body *ObjectWithOmitemptyTrue `json:\"Body,omitempty\"`",
    47  	}, todo, noLines, noLines)
    48  
    49  	flattenRun.AddExpectations("case3_pass_object_nullable_false_hoisted_by_ref.go", []string{
    50  		"Body ObjectWithNullableFalse `json:\"Body,omitempty\"`",
    51  	}, todo, noLines, noLines)
    52  
    53  	flattenRun.AddExpectations("case4_pass_object_nullable_false_overriden_by_ref_sibling.go", []string{
    54  		"Body *ObjectWithNullableTrue `json:\"Body,omitempty\"`",
    55  	}, todo, noLines, noLines)
    56  
    57  	flattenRun.AddExpectations("array_with_default.go", []string{
    58  		"type ArrayWithDefault []string",
    59  	}, append(todo, "omitempty"), noLines, noLines)
    60  
    61  	flattenRun.AddExpectations("array_with_no_omit_empty.go", []string{
    62  		"type ArrayWithNoOmitEmpty []string",
    63  	}, append(todo, "omitempty"), noLines, noLines)
    64  
    65  	flattenRun.AddExpectations("array_with_nullable.go", []string{
    66  		"type ArrayWithNullable []string",
    67  	}, todo, noLines, noLines)
    68  
    69  	flattenRun.AddExpectations("array_with_nullable_items.go", []string{
    70  		"type ArrayWithNullableItems []*string",
    71  	}, todo, noLines, noLines)
    72  
    73  	flattenRun.AddExpectations("array_with_omit_empty.go", []string{
    74  		"type ArrayWithOmitEmpty []string",
    75  	}, append(todo, "omitempty"), noLines, noLines)
    76  
    77  	flattenRun.AddExpectations("object_with_arrays.go", []string{
    78  		"Array0 ArrayWithDefault `json:\"array0,omitempty\"`",
    79  		"Array1 []string `json:\"array1\"`",
    80  		"Array11 []string `json:\"array11,omitempty\"`",
    81  		"Array12 []string `json:\"array12\"`",
    82  		"Array2 ArrayWithOmitEmpty `json:\"array2,omitempty\"`",
    83  		"Array3 ArrayWithNoOmitEmpty `json:\"array3\"`",
    84  	}, todo, noLines, noLines)
    85  
    86  	flattenRun.AddExpectations("object_with_nullable_false.go", []string{
    87  		"Data interface{} `json:\"Data,omitempty\"`",
    88  	}, todo, noLines, noLines)
    89  
    90  	flattenRun.AddExpectations("object_with_nullable_true.go", []string{
    91  		"Data interface{} `json:\"Data,omitempty\"`",
    92  	}, todo, noLines, noLines)
    93  
    94  	flattenRun.AddExpectations("object_with_omitempty_false.go", []string{
    95  		"Data interface{} `json:\"Data,omitempty\"`",
    96  	}, todo, noLines, noLines)
    97  
    98  	flattenRun.AddExpectations("object_with_omitempty_true.go", []string{
    99  		"Data interface{} `json:\"Data,omitempty\"`",
   100  	}, todo, noLines, noLines)
   101  
   102  	flattenRun.AddExpectations("array_with_omit_empty_items.go", []string{
   103  		"type ArrayWithOmitEmptyItems []string",
   104  	}, append(todo, "omitempty"), noLines, noLines)
   105  }
   106  
   107  func initFixture2071() {
   108  	f := newModelFixture("../fixtures/bugs/2071/fixture-2071.yaml", "check allOf serializer when x-go-name is present")
   109  	flattenRun := f.AddRun(false).WithMinimalFlatten(true)
   110  	flattenRun.AddExpectations("cat.go", []string{
   111  		"var dataAO1 struct {\n\t\tSomeAbility *string `json:\"ability,omitempty\"`",
   112  	},
   113  		// not expected
   114  		append(todo, "SomeAbility *string `json:\"SomeAbility,omitempty\"`"),
   115  		// output in log
   116  		noLines,
   117  		noLines)
   118  }
   119  
   120  func initFixture1479Part() {
   121  	// testing ../fixtures/bugs/1479/fixture-1479-part.yaml with flatten and expand (--skip-flatten)
   122  
   123  	/*
   124  		The breakage with allOf occurs when a schema with an allOf has itself a
   125  		property which is an allOf construct
   126  	*/
   127  
   128  	f := newModelFixture("../fixtures/bugs/1479/fixture-1479-part.yaml", "check nested AllOf validations (from Pouch Engine API)")
   129  	flattenRun := f.AddRun(false)
   130  	expandRun := f.AddRun(true)
   131  
   132  	// load expectations for model: container_create_config_all_of1.go
   133  	flattenRun.AddExpectations("container_create_config_all_of1.go", []string{
   134  		`type ContainerCreateConfigAllOf1 struct {`,
   135  		"	HostConfig *HostConfig `json:\"HostConfig,omitempty\"`",
   136  		"	NetworkingConfig *NetworkingConfig `json:\"NetworkingConfig,omitempty\"`",
   137  		`func (m *ContainerCreateConfigAllOf1) Validate(formats strfmt.Registry) error {`,
   138  		`	if err := m.validateHostConfig(formats); err != nil {`,
   139  		`	if err := m.validateNetworkingConfig(formats); err != nil {`,
   140  		`		return errors.CompositeValidationError(res...`,
   141  		`func (m *ContainerCreateConfigAllOf1) validateHostConfig(formats strfmt.Registry) error {`,
   142  		`	if swag.IsZero(m.HostConfig) {`,
   143  		`	if m.HostConfig != nil {`,
   144  		`		if err := m.HostConfig.Validate(formats); err != nil {`,
   145  		`			if ve, ok := err.(*errors.Validation); ok {`,
   146  		`				return ve.ValidateName("HostConfig"`,
   147  		`func (m *ContainerCreateConfigAllOf1) validateNetworkingConfig(formats strfmt.Registry) error {`,
   148  		`	if swag.IsZero(m.NetworkingConfig) {`,
   149  		`	if m.NetworkingConfig != nil {`,
   150  		`		if err := m.NetworkingConfig.Validate(formats); err != nil {`,
   151  		`			if ve, ok := err.(*errors.Validation); ok {`,
   152  		`				return ve.ValidateName("NetworkingConfig"`,
   153  	},
   154  		// not expected
   155  		todo,
   156  		// output in log
   157  		noLines,
   158  		noLines)
   159  
   160  	// load expectations for model: container_config.go
   161  	flattenRun.AddExpectations("container_config.go", []string{
   162  		`type ContainerConfig struct {`,
   163  		"	ArgsEscaped bool `json:\"ArgsEscaped,omitempty\"`",
   164  		"	AttachStderr bool `json:\"AttachStderr,omitempty\"`",
   165  		"	AttachStdin bool `json:\"AttachStdin,omitempty\"`",
   166  		"	AttachStdout bool `json:\"AttachStdout,omitempty\"`",
   167  		"	Cmd []string `json:\"Cmd\"`",
   168  		"	DiskQuota map[string]string `json:\"DiskQuota,omitempty\"`",
   169  		"	Domainname string `json:\"Domainname,omitempty\"`",
   170  		"	Entrypoint []string `json:\"Entrypoint\"`",
   171  		"	Env []string `json:\"Env\"`",
   172  		"	ExposedPorts map[string]interface{} `json:\"ExposedPorts,omitempty\"`",
   173  		"	Hostname strfmt.Hostname `json:\"Hostname,omitempty\"`",
   174  		"	Image string `json:\"Image\"`",
   175  		"	InitScript string `json:\"InitScript,omitempty\"`",
   176  		"	Labels map[string]string `json:\"Labels,omitempty\"`",
   177  		"	MacAddress string `json:\"MacAddress,omitempty\"`",
   178  		"	NetworkDisabled bool `json:\"NetworkDisabled,omitempty\"`",
   179  		"	OnBuild []string `json:\"OnBuild\"`",
   180  		"	OpenStdin bool `json:\"OpenStdin,omitempty\"`",
   181  		"	QuotaID string `json:\"QuotaID,omitempty\"`",
   182  		"	Rich bool `json:\"Rich,omitempty\"`",
   183  		"	RichMode string `json:\"RichMode,omitempty\"`",
   184  		"	Shell []string `json:\"Shell\"`",
   185  		"	SpecAnnotation map[string]string `json:\"SpecAnnotation,omitempty\"`",
   186  		"	StdinOnce bool `json:\"StdinOnce,omitempty\"`",
   187  		"	StopSignal string `json:\"StopSignal,omitempty\"`",
   188  		"	StopTimeout *int64 `json:\"StopTimeout,omitempty\"`",
   189  		"	Tty bool `json:\"Tty,omitempty\"`",
   190  		"	User string `json:\"User,omitempty\"`",
   191  		"	Volumes map[string]interface{} `json:\"Volumes,omitempty\"`",
   192  		"	WorkingDir string `json:\"WorkingDir,omitempty\"`",
   193  		`func (m *ContainerConfig) Validate(formats strfmt.Registry) error {`,
   194  		`	if err := m.validateExposedPorts(formats); err != nil {`,
   195  		`	if err := m.validateHostname(formats); err != nil {`,
   196  		`	if err := m.validateImage(formats); err != nil {`,
   197  		`	if err := m.validateRichMode(formats); err != nil {`,
   198  		`	if err := m.validateVolumes(formats); err != nil {`,
   199  		`		return errors.CompositeValidationError(res...`,
   200  		`var containerConfigExposedPortsValueEnum []interface{`,
   201  		`	var res []interface{`,
   202  		"	if err := json.Unmarshal([]byte(`[{}]`), &res); err != nil {",
   203  		`	for _, v := range res {`,
   204  		`		containerConfigExposedPortsValueEnum = append(containerConfigExposedPortsValueEnum, v`,
   205  		`func (m *ContainerConfig) validateExposedPortsValueEnum(path, location string, value interface{}) error {`,
   206  		`	if err := validate.EnumCase(path, location, value, containerConfigExposedPortsValueEnum, true); err != nil {`,
   207  		`func (m *ContainerConfig) validateExposedPorts(formats strfmt.Registry) error {`,
   208  		`	if swag.IsZero(m.ExposedPorts) {`,
   209  		`	for k := range m.ExposedPorts {`,
   210  		//`		if swag.IsZero(m.ExposedPorts[k]) {`,
   211  		`		if err := m.validateExposedPortsValueEnum("ExposedPorts"+"."+k, "body", m.ExposedPorts[k]); err != nil {`,
   212  		`func (m *ContainerConfig) validateHostname(formats strfmt.Registry) error {`,
   213  		`	if swag.IsZero(m.Hostname) {`,
   214  		`	if err := validate.MinLength("Hostname", "body", string(m.Hostname), 1); err != nil {`,
   215  		`	if err := validate.FormatOf("Hostname", "body", "hostname", m.Hostname.String(), formats); err != nil {`,
   216  		`func (m *ContainerConfig) validateImage(formats strfmt.Registry) error {`,
   217  		`	if err := validate.RequiredString("Image", "body", string(m.Image)); err != nil {`,
   218  		`var containerConfigTypeRichModePropEnum []interface{`,
   219  		`	var res []string`,
   220  		"	if err := json.Unmarshal([]byte(`[\"dumb-init\",\"sbin-init\",\"systemd\"]`), &res); err != nil {",
   221  		`	for _, v := range res {`,
   222  		`		containerConfigTypeRichModePropEnum = append(containerConfigTypeRichModePropEnum, v`,
   223  		`	ContainerConfigRichModeDumbInit string = "dumb-init"`,
   224  		`	ContainerConfigRichModeSbinInit string = "sbin-init"`,
   225  		`	ContainerConfigRichModeSystemd string = "systemd"`,
   226  		`func (m *ContainerConfig) validateRichModeEnum(path, location string, value string) error {`,
   227  		`	if err := validate.EnumCase(path, location, value, containerConfigTypeRichModePropEnum, true); err != nil {`,
   228  		`func (m *ContainerConfig) validateRichMode(formats strfmt.Registry) error {`,
   229  		`	if swag.IsZero(m.RichMode) {`,
   230  		`	if err := m.validateRichModeEnum("RichMode", "body", m.RichMode); err != nil {`,
   231  		`var containerConfigVolumesValueEnum []interface{`,
   232  		`	var res []interface{`,
   233  		"	if err := json.Unmarshal([]byte(`[{}]`), &res); err != nil {",
   234  		`	for _, v := range res {`,
   235  		`		containerConfigVolumesValueEnum = append(containerConfigVolumesValueEnum, v`,
   236  		`func (m *ContainerConfig) validateVolumesValueEnum(path, location string, value interface{}) error {`,
   237  		`	if err := validate.EnumCase(path, location, value, containerConfigVolumesValueEnum, true); err != nil {`,
   238  		`func (m *ContainerConfig) validateVolumes(formats strfmt.Registry) error {`,
   239  		`	if swag.IsZero(m.Volumes) {`,
   240  		`	for k := range m.Volumes {`,
   241  		//`		if swag.IsZero(m.Volumes[k]) {`,
   242  		`		if err := m.validateVolumesValueEnum("Volumes"+"."+k, "body", m.Volumes[k]); err != nil {`,
   243  	},
   244  		// not expected
   245  		todo,
   246  		// output in log
   247  		noLines,
   248  		noLines)
   249  
   250  	expandRun.AddExpectations("container_config.go", flattenRun.ExpectedFor("ContainerConfig").ExpectedLines, todo, noLines, noLines)
   251  
   252  	// load expectations for model: host_config_all_of0_log_config.go
   253  	flattenRun.AddExpectations("host_config_all_of0_log_config.go", []string{
   254  		`type HostConfigAllOf0LogConfig struct {`,
   255  		"	Config map[string]string `json:\"Config,omitempty\"`",
   256  		"	Type string `json:\"Type,omitempty\"`",
   257  		`func (m *HostConfigAllOf0LogConfig) Validate(formats strfmt.Registry) error {`,
   258  		`	if err := m.validateType(formats); err != nil {`,
   259  		`		return errors.CompositeValidationError(res...`,
   260  		`var hostConfigAllOf0LogConfigTypeTypePropEnum []interface{`,
   261  		`	var res []string`,
   262  		"	if err := json.Unmarshal([]byte(`[\"json-file\",\"syslog\",\"journald\",\"gelf\",\"fluentd\",\"awslogs\",\"splunk\",\"etwlogs\",\"none\"]`), &res); err != nil {",
   263  		`	for _, v := range res {`,
   264  		`		hostConfigAllOf0LogConfigTypeTypePropEnum = append(hostConfigAllOf0LogConfigTypeTypePropEnum, v`,
   265  		`	HostConfigAllOf0LogConfigTypeJSONFile string = "json-file"`,
   266  		`	HostConfigAllOf0LogConfigTypeSyslog string = "syslog"`,
   267  		`	HostConfigAllOf0LogConfigTypeJournald string = "journald"`,
   268  		`	HostConfigAllOf0LogConfigTypeGelf string = "gelf"`,
   269  		`	HostConfigAllOf0LogConfigTypeFluentd string = "fluentd"`,
   270  		`	HostConfigAllOf0LogConfigTypeAwslogs string = "awslogs"`,
   271  		`	HostConfigAllOf0LogConfigTypeSplunk string = "splunk"`,
   272  		`	HostConfigAllOf0LogConfigTypeEtwlogs string = "etwlogs"`,
   273  		`	HostConfigAllOf0LogConfigTypeNone string = "none"`,
   274  		`func (m *HostConfigAllOf0LogConfig) validateTypeEnum(path, location string, value string) error {`,
   275  		`	if err := validate.EnumCase(path, location, value, hostConfigAllOf0LogConfigTypeTypePropEnum, true); err != nil {`,
   276  		`func (m *HostConfigAllOf0LogConfig) validateType(formats strfmt.Registry) error {`,
   277  		`	if swag.IsZero(m.Type) {`,
   278  		`	if err := m.validateTypeEnum("Type", "body", m.Type); err != nil {`,
   279  	},
   280  		// not expected
   281  		todo,
   282  		// output in log
   283  		noLines,
   284  		noLines)
   285  
   286  	// load expectations for model: restart_policy.go
   287  	flattenRun.AddExpectations("restart_policy.go", []string{
   288  		`type RestartPolicy struct {`,
   289  		"	MaximumRetryCount int64 `json:\"MaximumRetryCount,omitempty\"`",
   290  		"	Name string `json:\"Name,omitempty\"`",
   291  		// empty validation
   292  		"func (m *RestartPolicy) Validate(formats strfmt.Registry) error {\n	return nil\n}",
   293  	},
   294  		// not expected
   295  		todo,
   296  		// output in log
   297  		noLines,
   298  		noLines)
   299  
   300  	expandRun.AddExpectations("restart_policy.go", flattenRun.ExpectedFor("RestartPolicy").ExpectedLines, todo, noLines, noLines)
   301  
   302  	// load expectations for model: endpoint_ip_a_m_config.go
   303  	flattenRun.AddExpectations("endpoint_ip_a_m_config.go", []string{
   304  		`type EndpointIPAMConfig struct {`,
   305  		"	IPV4Address string `json:\"IPv4Address,omitempty\"`",
   306  		"	IPV6Address string `json:\"IPv6Address,omitempty\"`",
   307  		"	LinkLocalIPs []string `json:\"LinkLocalIPs\"`",
   308  		// empty validation
   309  		"func (m *EndpointIPAMConfig) Validate(formats strfmt.Registry) error {\n	return nil\n}",
   310  	},
   311  		// not expected
   312  		todo,
   313  		// output in log
   314  		noLines,
   315  		noLines)
   316  
   317  	expandRun.AddExpectations("endpoint_ip_a_m_config.go", flattenRun.ExpectedFor("EndpointIPAMConfig").ExpectedLines, todo, noLines, noLines)
   318  
   319  	// load expectations for model: host_config_all_of0.go
   320  	flattenRun.AddExpectations("host_config_all_of0.go", []string{
   321  		`type HostConfigAllOf0 struct {`,
   322  		"	AutoRemove bool `json:\"AutoRemove,omitempty\"`",
   323  		"	Binds []string `json:\"Binds\"`",
   324  		"	CapAdd []string `json:\"CapAdd\"`",
   325  		"	CapDrop []string `json:\"CapDrop\"`",
   326  		"	Cgroup string `json:\"Cgroup,omitempty\"`",
   327  		"	ConsoleSize []*int64 `json:\"ConsoleSize\"`",
   328  		"	ContainerIDFile string `json:\"ContainerIDFile,omitempty\"`",
   329  		"	DNS []string `json:\"Dns\"`",
   330  		"	DNSOptions []string `json:\"DnsOptions\"`",
   331  		"	DNSSearch []string `json:\"DnsSearch\"`",
   332  		"	EnableLxcfs bool `json:\"EnableLxcfs,omitempty\"`",
   333  		"	ExtraHosts []string `json:\"ExtraHosts\"`",
   334  		"	GroupAdd []string `json:\"GroupAdd\"`",
   335  		"	InitScript string `json:\"InitScript,omitempty\"`",
   336  		"	IpcMode string `json:\"IpcMode,omitempty\"`",
   337  		"	Isolation string `json:\"Isolation,omitempty\"`",
   338  		"	Links []string `json:\"Links\"`",
   339  		"	LogConfig *HostConfigAllOf0LogConfig `json:\"LogConfig,omitempty\"`",
   340  		"	NetworkMode string `json:\"NetworkMode,omitempty\"`",
   341  		"	OomScoreAdj int64 `json:\"OomScoreAdj,omitempty\"`",
   342  		"	PidMode string `json:\"PidMode,omitempty\"`",
   343  		"	Privileged bool `json:\"Privileged,omitempty\"`",
   344  		"	PublishAllPorts bool `json:\"PublishAllPorts,omitempty\"`",
   345  		"	ReadonlyRootfs bool `json:\"ReadonlyRootfs,omitempty\"`",
   346  		"	RestartPolicy *RestartPolicy `json:\"RestartPolicy,omitempty\"`",
   347  		"	Rich bool `json:\"Rich,omitempty\"`",
   348  		"	RichMode string `json:\"RichMode,omitempty\"`",
   349  		"	Runtime string `json:\"Runtime,omitempty\"`",
   350  		"	SecurityOpt []string `json:\"SecurityOpt\"`",
   351  		"	ShmSize *int64 `json:\"ShmSize,omitempty\"`",
   352  		"	StorageOpt map[string]string `json:\"StorageOpt,omitempty\"`",
   353  		"	Sysctls map[string]string `json:\"Sysctls,omitempty\"`",
   354  		"	Tmpfs map[string]string `json:\"Tmpfs,omitempty\"`",
   355  		"	UTSMode string `json:\"UTSMode,omitempty\"`",
   356  		"	UsernsMode string `json:\"UsernsMode,omitempty\"`",
   357  		"	VolumeDriver string `json:\"VolumeDriver,omitempty\"`",
   358  		"	VolumesFrom []string `json:\"VolumesFrom\"`",
   359  		`func (m *HostConfigAllOf0) Validate(formats strfmt.Registry) error {`,
   360  		`	if err := m.validateConsoleSize(formats); err != nil {`,
   361  		`	if err := m.validateIsolation(formats); err != nil {`,
   362  		`	if err := m.validateLogConfig(formats); err != nil {`,
   363  		`	if err := m.validateOomScoreAdj(formats); err != nil {`,
   364  		`	if err := m.validateRestartPolicy(formats); err != nil {`,
   365  		`	if err := m.validateRichMode(formats); err != nil {`,
   366  		`	if err := m.validateShmSize(formats); err != nil {`,
   367  		`		return errors.CompositeValidationError(res...`,
   368  		`func (m *HostConfigAllOf0) validateConsoleSize(formats strfmt.Registry) error {`,
   369  		`	if swag.IsZero(m.ConsoleSize) {`,
   370  		`	iConsoleSizeSize := int64(len(m.ConsoleSize)`,
   371  		`	if err := validate.MinItems("ConsoleSize", "body", iConsoleSizeSize, 2); err != nil {`,
   372  		`	if err := validate.MaxItems("ConsoleSize", "body", iConsoleSizeSize, 2); err != nil {`,
   373  		`	for i := 0; i < len(m.ConsoleSize); i++ {`,
   374  		// do we need...?
   375  		`		if swag.IsZero(m.ConsoleSize[i]) {`,
   376  		//`		if err := validate.Required("ConsoleSize"+"."+strconv.Itoa(i), "body", m.ConsoleSize[i]); err != nil {`,
   377  		`		if err := validate.MinimumInt("ConsoleSize"+"."+strconv.Itoa(i), "body", int64(*m.ConsoleSize[i]), 0, false); err != nil {`,
   378  		`var hostConfigAllOf0TypeIsolationPropEnum []interface{`,
   379  		`	var res []string`,
   380  		"	if err := json.Unmarshal([]byte(`[\"default\",\"process\",\"hyperv\"]`), &res); err != nil {",
   381  		`	for _, v := range res {`,
   382  		`		hostConfigAllOf0TypeIsolationPropEnum = append(hostConfigAllOf0TypeIsolationPropEnum, v`,
   383  		`	HostConfigAllOf0IsolationDefault string = "default"`,
   384  		`	HostConfigAllOf0IsolationProcess string = "process"`,
   385  		`	HostConfigAllOf0IsolationHyperv string = "hyperv"`,
   386  		`func (m *HostConfigAllOf0) validateIsolationEnum(path, location string, value string) error {`,
   387  		`	if err := validate.EnumCase(path, location, value, hostConfigAllOf0TypeIsolationPropEnum, true); err != nil {`,
   388  		`func (m *HostConfigAllOf0) validateIsolation(formats strfmt.Registry) error {`,
   389  		`	if swag.IsZero(m.Isolation) {`,
   390  		`	if err := m.validateIsolationEnum("Isolation", "body", m.Isolation); err != nil {`,
   391  		`func (m *HostConfigAllOf0) validateLogConfig(formats strfmt.Registry) error {`,
   392  		`	if swag.IsZero(m.LogConfig) {`,
   393  		`	if m.LogConfig != nil {`,
   394  		`		if err := m.LogConfig.Validate(formats); err != nil {`,
   395  		`			if ve, ok := err.(*errors.Validation); ok {`,
   396  		`				return ve.ValidateName("LogConfig"`,
   397  		`func (m *HostConfigAllOf0) validateOomScoreAdj(formats strfmt.Registry) error {`,
   398  		`	if swag.IsZero(m.OomScoreAdj) {`,
   399  		`	if err := validate.MinimumInt("OomScoreAdj", "body", int64(m.OomScoreAdj), -1000, false); err != nil {`,
   400  		`	if err := validate.MaximumInt("OomScoreAdj", "body", int64(m.OomScoreAdj), 1000, false); err != nil {`,
   401  		`func (m *HostConfigAllOf0) validateRestartPolicy(formats strfmt.Registry) error {`,
   402  		`	if swag.IsZero(m.RestartPolicy) {`,
   403  		`	if m.RestartPolicy != nil {`,
   404  		`		if err := m.RestartPolicy.Validate(formats); err != nil {`,
   405  		`			if ve, ok := err.(*errors.Validation); ok {`,
   406  		`				return ve.ValidateName("RestartPolicy"`,
   407  		`var hostConfigAllOf0TypeRichModePropEnum []interface{`,
   408  		`	var res []string`,
   409  		"	if err := json.Unmarshal([]byte(`[\"dumb-init\",\"sbin-init\",\"systemd\"]`), &res); err != nil {",
   410  		`	for _, v := range res {`,
   411  		`		hostConfigAllOf0TypeRichModePropEnum = append(hostConfigAllOf0TypeRichModePropEnum, v`,
   412  		`	HostConfigAllOf0RichModeDumbInit string = "dumb-init"`,
   413  		`	HostConfigAllOf0RichModeSbinInit string = "sbin-init"`,
   414  		`	HostConfigAllOf0RichModeSystemd string = "systemd"`,
   415  		`func (m *HostConfigAllOf0) validateRichModeEnum(path, location string, value string) error {`,
   416  		`	if err := validate.EnumCase(path, location, value, hostConfigAllOf0TypeRichModePropEnum, true); err != nil {`,
   417  		`func (m *HostConfigAllOf0) validateRichMode(formats strfmt.Registry) error {`,
   418  		`	if swag.IsZero(m.RichMode) {`,
   419  		`	if err := m.validateRichModeEnum("RichMode", "body", m.RichMode); err != nil {`,
   420  		`func (m *HostConfigAllOf0) validateShmSize(formats strfmt.Registry) error {`,
   421  		`	if swag.IsZero(m.ShmSize) {`,
   422  		`	if err := validate.MinimumInt("ShmSize", "body", int64(*m.ShmSize), 0, false); err != nil {`,
   423  	},
   424  		// not expected
   425  		todo,
   426  		// output in log
   427  		noLines,
   428  		noLines)
   429  
   430  	// load expectations for model: host_config.go
   431  	flattenRun.AddExpectations("host_config.go", []string{
   432  		`type HostConfig struct {`,
   433  		`	HostConfigAllOf0`,
   434  		`	Resources`,
   435  		`func (m *HostConfig) Validate(formats strfmt.Registry) error {`,
   436  		`	if err := m.HostConfigAllOf0.Validate(formats); err != nil {`,
   437  		`	if err := m.Resources.Validate(formats); err != nil {`,
   438  		`		return errors.CompositeValidationError(res...`,
   439  	},
   440  		// not expected
   441  		todo,
   442  		// output in log
   443  		noLines,
   444  		noLines)
   445  
   446  	expandRun.AddExpectations("host_config.go", []string{
   447  		`type HostConfig struct {`,
   448  		"	AutoRemove bool `json:\"AutoRemove,omitempty\"`",
   449  		"	Binds []string `json:\"Binds\"`",
   450  		"	CapAdd []string `json:\"CapAdd\"`",
   451  		"	CapDrop []string `json:\"CapDrop\"`",
   452  		"	Cgroup string `json:\"Cgroup,omitempty\"`",
   453  		"	ConsoleSize []*int64 `json:\"ConsoleSize\"`",
   454  		"	ContainerIDFile string `json:\"ContainerIDFile,omitempty\"`",
   455  		"	DNS []string `json:\"Dns\"`",
   456  		"	DNSOptions []string `json:\"DnsOptions\"`",
   457  		"	DNSSearch []string `json:\"DnsSearch\"`",
   458  		"	EnableLxcfs bool `json:\"EnableLxcfs,omitempty\"`",
   459  		"	ExtraHosts []string `json:\"ExtraHosts\"`",
   460  		"	GroupAdd []string `json:\"GroupAdd\"`",
   461  		"	InitScript string `json:\"InitScript,omitempty\"`",
   462  		"	IpcMode string `json:\"IpcMode,omitempty\"`",
   463  		"	Isolation string `json:\"Isolation,omitempty\"`",
   464  		"	Links []string `json:\"Links\"`",
   465  		"	LogConfig *HostConfigAO0LogConfig `json:\"LogConfig,omitempty\"`",
   466  		"	NetworkMode string `json:\"NetworkMode,omitempty\"`",
   467  		"	OomScoreAdj int64 `json:\"OomScoreAdj,omitempty\"`",
   468  		"	PidMode string `json:\"PidMode,omitempty\"`",
   469  		"	Privileged bool `json:\"Privileged,omitempty\"`",
   470  		"	PublishAllPorts bool `json:\"PublishAllPorts,omitempty\"`",
   471  		"	ReadonlyRootfs bool `json:\"ReadonlyRootfs,omitempty\"`",
   472  		"	RestartPolicy *HostConfigAO0RestartPolicy `json:\"RestartPolicy,omitempty\"`",
   473  		"	Rich bool `json:\"Rich,omitempty\"`",
   474  		"	RichMode string `json:\"RichMode,omitempty\"`",
   475  		"	Runtime string `json:\"Runtime,omitempty\"`",
   476  		"	SecurityOpt []string `json:\"SecurityOpt\"`",
   477  		"	ShmSize *int64 `json:\"ShmSize,omitempty\"`",
   478  		"	StorageOpt map[string]string `json:\"StorageOpt,omitempty\"`",
   479  		"	Sysctls map[string]string `json:\"Sysctls,omitempty\"`",
   480  		"	Tmpfs map[string]string `json:\"Tmpfs,omitempty\"`",
   481  		"	UTSMode string `json:\"UTSMode,omitempty\"`",
   482  		"	UsernsMode string `json:\"UsernsMode,omitempty\"`",
   483  		"	VolumeDriver string `json:\"VolumeDriver,omitempty\"`",
   484  		"	VolumesFrom []string `json:\"VolumesFrom\"`",
   485  		"	BlkioWeight uint16 `json:\"BlkioWeight,omitempty\"`",
   486  		"	CgroupParent string `json:\"CgroupParent,omitempty\"`",
   487  		"	CPUShares int64 `json:\"CpuShares,omitempty\"`",
   488  		"	Memory int64 `json:\"Memory,omitempty\"`",
   489  		`func (m *HostConfig) Validate(formats strfmt.Registry) error {`,
   490  		`	if err := m.validateConsoleSize(formats); err != nil {`,
   491  		`	if err := m.validateIsolation(formats); err != nil {`,
   492  		`	if err := m.validateLogConfig(formats); err != nil {`,
   493  		`	if err := m.validateOomScoreAdj(formats); err != nil {`,
   494  		`	if err := m.validateRestartPolicy(formats); err != nil {`,
   495  		`	if err := m.validateRichMode(formats); err != nil {`,
   496  		`	if err := m.validateShmSize(formats); err != nil {`,
   497  		`	if err := m.validateBlkioWeight(formats); err != nil {`,
   498  		`		return errors.CompositeValidationError(res...`,
   499  		`func (m *HostConfig) validateConsoleSize(formats strfmt.Registry) error {`,
   500  		`	if swag.IsZero(m.ConsoleSize) {`,
   501  		`	iConsoleSizeSize := int64(len(m.ConsoleSize)`,
   502  		`	if err := validate.MinItems("ConsoleSize", "body", iConsoleSizeSize, 2); err != nil {`,
   503  		`	if err := validate.MaxItems("ConsoleSize", "body", iConsoleSizeSize, 2); err != nil {`,
   504  		`	for i := 0; i < len(m.ConsoleSize); i++ {`,
   505  		// do we need...
   506  		`		if swag.IsZero(m.ConsoleSize[i]) {`,
   507  		//`		if err := validate.Required("ConsoleSize"+"."+strconv.Itoa(i), "body", m.ConsoleSize[i]); err != nil {`,
   508  		`		if err := validate.MinimumInt("ConsoleSize"+"."+strconv.Itoa(i), "body", int64(*m.ConsoleSize[i]), 0, false); err != nil {`,
   509  		`var hostConfigTypeIsolationPropEnum []interface{`,
   510  		`	var res []string`,
   511  		"	if err := json.Unmarshal([]byte(`[\"default\",\"process\",\"hyperv\"]`), &res); err != nil {",
   512  		`	for _, v := range res {`,
   513  		`		hostConfigTypeIsolationPropEnum = append(hostConfigTypeIsolationPropEnum, v`,
   514  		`func (m *HostConfig) validateIsolationEnum(path, location string, value string) error {`,
   515  		`	if err := validate.EnumCase(path, location, value, hostConfigTypeIsolationPropEnum, true); err != nil {`,
   516  		`func (m *HostConfig) validateIsolation(formats strfmt.Registry) error {`,
   517  		`	if swag.IsZero(m.Isolation) {`,
   518  		`	if err := m.validateIsolationEnum("Isolation", "body", m.Isolation); err != nil {`,
   519  		`func (m *HostConfig) validateLogConfig(formats strfmt.Registry) error {`,
   520  		`	if swag.IsZero(m.LogConfig) {`,
   521  		`	if m.LogConfig != nil {`,
   522  		`		if err := m.LogConfig.Validate(formats); err != nil {`,
   523  		`			if ve, ok := err.(*errors.Validation); ok {`,
   524  		`				return ve.ValidateName("LogConfig"`,
   525  		`func (m *HostConfig) validateOomScoreAdj(formats strfmt.Registry) error {`,
   526  		`	if swag.IsZero(m.OomScoreAdj) {`,
   527  		`	if err := validate.MinimumInt("OomScoreAdj", "body", int64(m.OomScoreAdj), -1000, false); err != nil {`,
   528  		`	if err := validate.MaximumInt("OomScoreAdj", "body", int64(m.OomScoreAdj), 1000, false); err != nil {`,
   529  		`func (m *HostConfig) validateRestartPolicy(formats strfmt.Registry) error {`,
   530  		`	if swag.IsZero(m.RestartPolicy) {`,
   531  		`	if m.RestartPolicy != nil {`,
   532  		`		if err := m.RestartPolicy.Validate(formats); err != nil {`,
   533  		`			if ve, ok := err.(*errors.Validation); ok {`,
   534  		`				return ve.ValidateName("RestartPolicy"`,
   535  		`var hostConfigTypeRichModePropEnum []interface{`,
   536  		`	var res []string`,
   537  		"	if err := json.Unmarshal([]byte(`[\"dumb-init\",\"sbin-init\",\"systemd\"]`), &res); err != nil {",
   538  		`	for _, v := range res {`,
   539  		`		hostConfigTypeRichModePropEnum = append(hostConfigTypeRichModePropEnum, v`,
   540  		`func (m *HostConfig) validateRichModeEnum(path, location string, value string) error {`,
   541  		`	if err := validate.EnumCase(path, location, value, hostConfigTypeRichModePropEnum, true); err != nil {`,
   542  		`func (m *HostConfig) validateRichMode(formats strfmt.Registry) error {`,
   543  		`	if swag.IsZero(m.RichMode) {`,
   544  		`	if err := m.validateRichModeEnum("RichMode", "body", m.RichMode); err != nil {`,
   545  		`func (m *HostConfig) validateShmSize(formats strfmt.Registry) error {`,
   546  		`	if swag.IsZero(m.ShmSize) {`,
   547  		`	if err := validate.MinimumInt("ShmSize", "body", int64(*m.ShmSize), 0, false); err != nil {`,
   548  		`func (m *HostConfig) validateBlkioWeight(formats strfmt.Registry) error {`,
   549  		`	if swag.IsZero(m.BlkioWeight) {`,
   550  		`	if err := validate.MinimumInt("BlkioWeight", "body", int64(m.BlkioWeight), 0, false); err != nil {`,
   551  		`	if err := validate.MaximumInt("BlkioWeight", "body", int64(m.BlkioWeight), 1000, false); err != nil {`,
   552  		`type HostConfigAO0LogConfig struct {`,
   553  		"	Config map[string]string `json:\"Config,omitempty\"`",
   554  		"	Type string `json:\"Type,omitempty\"`",
   555  		`func (m *HostConfigAO0LogConfig) Validate(formats strfmt.Registry) error {`,
   556  		`	if err := m.validateType(formats); err != nil {`,
   557  		`		return errors.CompositeValidationError(res...`,
   558  		`var hostConfigAO0LogConfigTypeTypePropEnum []interface{`,
   559  		`	var res []string`,
   560  		"	if err := json.Unmarshal([]byte(`[\"json-file\",\"syslog\",\"journald\",\"gelf\",\"fluentd\",\"awslogs\",\"splunk\",\"etwlogs\",\"none\"]`), &res); err != nil {",
   561  		`	for _, v := range res {`,
   562  		`		hostConfigAO0LogConfigTypeTypePropEnum = append(hostConfigAO0LogConfigTypeTypePropEnum, v`,
   563  		`	HostConfigAO0LogConfigTypeJSONFile string = "json-file"`,
   564  		`	HostConfigAO0LogConfigTypeSyslog string = "syslog"`,
   565  		`	HostConfigAO0LogConfigTypeJournald string = "journald"`,
   566  		`	HostConfigAO0LogConfigTypeGelf string = "gelf"`,
   567  		`	HostConfigAO0LogConfigTypeFluentd string = "fluentd"`,
   568  		`	HostConfigAO0LogConfigTypeAwslogs string = "awslogs"`,
   569  		`	HostConfigAO0LogConfigTypeSplunk string = "splunk"`,
   570  		`	HostConfigAO0LogConfigTypeEtwlogs string = "etwlogs"`,
   571  		`	HostConfigAO0LogConfigTypeNone string = "none"`,
   572  		`func (m *HostConfigAO0LogConfig) validateTypeEnum(path, location string, value string) error {`,
   573  		`	if err := validate.EnumCase(path, location, value, hostConfigAO0LogConfigTypeTypePropEnum, true); err != nil {`,
   574  		`func (m *HostConfigAO0LogConfig) validateType(formats strfmt.Registry) error {`,
   575  		`	if swag.IsZero(m.Type) {`,
   576  		`	if err := m.validateTypeEnum("LogConfig"+"."+"Type", "body", m.Type); err != nil {`,
   577  		`type HostConfigAO0RestartPolicy struct {`,
   578  		"	MaximumRetryCount int64 `json:\"MaximumRetryCount,omitempty\"`",
   579  		"	Name string `json:\"Name,omitempty\"`",
   580  		`func (m *HostConfigAO0RestartPolicy) Validate(formats strfmt.Registry) error {`,
   581  		`		return errors.CompositeValidationError(res...`,
   582  	},
   583  		// not expected
   584  		todo,
   585  		// output in log
   586  		noLines,
   587  		noLines)
   588  
   589  	// load expectations for model: container_create_config.go
   590  	flattenRun.AddExpectations("container_create_config.go", []string{
   591  		`type ContainerCreateConfig struct {`,
   592  		`	ContainerConfig`,
   593  		`	ContainerCreateConfigAllOf1`,
   594  		`func (m *ContainerCreateConfig) Validate(formats strfmt.Registry) error {`,
   595  		`	if err := m.ContainerConfig.Validate(formats); err != nil {`,
   596  		`	if err := m.ContainerCreateConfigAllOf1.Validate(formats); err != nil {`,
   597  		`		return errors.CompositeValidationError(res...`,
   598  	},
   599  		// not expected
   600  		todo,
   601  		// output in log
   602  		noLines,
   603  		noLines)
   604  
   605  	expandRun.AddExpectations("container_create_config.go", []string{
   606  		`type ContainerCreateConfig struct {`,
   607  		"	ArgsEscaped bool `json:\"ArgsEscaped,omitempty\"`",
   608  		"	AttachStderr bool `json:\"AttachStderr,omitempty\"`",
   609  		"	AttachStdin bool `json:\"AttachStdin,omitempty\"`",
   610  		"	AttachStdout bool `json:\"AttachStdout,omitempty\"`",
   611  		"	Cmd []string `json:\"Cmd\"`",
   612  		"	DiskQuota map[string]string `json:\"DiskQuota,omitempty\"`",
   613  		"	Domainname string `json:\"Domainname,omitempty\"`",
   614  		"	Entrypoint []string `json:\"Entrypoint\"`",
   615  		"	Env []string `json:\"Env\"`",
   616  		"	ExposedPorts map[string]interface{} `json:\"ExposedPorts,omitempty\"`",
   617  		"	Hostname strfmt.Hostname `json:\"Hostname,omitempty\"`",
   618  		"	Image string `json:\"Image\"`",
   619  		"	InitScript string `json:\"InitScript,omitempty\"`",
   620  		"	Labels map[string]string `json:\"Labels,omitempty\"`",
   621  		"	MacAddress string `json:\"MacAddress,omitempty\"`",
   622  		"	NetworkDisabled bool `json:\"NetworkDisabled,omitempty\"`",
   623  		"	OnBuild []string `json:\"OnBuild\"`",
   624  		"	OpenStdin bool `json:\"OpenStdin,omitempty\"`",
   625  		"	QuotaID string `json:\"QuotaID,omitempty\"`",
   626  		"	Rich bool `json:\"Rich,omitempty\"`",
   627  		"	RichMode string `json:\"RichMode,omitempty\"`",
   628  		"	Shell []string `json:\"Shell\"`",
   629  		"	SpecAnnotation map[string]string `json:\"SpecAnnotation,omitempty\"`",
   630  		"	StdinOnce bool `json:\"StdinOnce,omitempty\"`",
   631  		"	StopSignal string `json:\"StopSignal,omitempty\"`",
   632  		"	StopTimeout *int64 `json:\"StopTimeout,omitempty\"`",
   633  		"	Tty bool `json:\"Tty,omitempty\"`",
   634  		"	User string `json:\"User,omitempty\"`",
   635  		"	Volumes map[string]interface{} `json:\"Volumes,omitempty\"`",
   636  		"	WorkingDir string `json:\"WorkingDir,omitempty\"`",
   637  		`	HostConfig struct {`,
   638  		"		AutoRemove bool `json:\"AutoRemove,omitempty\"`",
   639  		"		Binds []string `json:\"Binds\"`",
   640  		"		CapAdd []string `json:\"CapAdd\"`",
   641  		"		CapDrop []string `json:\"CapDrop\"`",
   642  		"		Cgroup string `json:\"Cgroup,omitempty\"`",
   643  		"		ConsoleSize []*int64 `json:\"ConsoleSize\"`",
   644  		"		ContainerIDFile string `json:\"ContainerIDFile,omitempty\"`",
   645  		"		DNS []string `json:\"Dns\"`",
   646  		"		DNSOptions []string `json:\"DnsOptions\"`",
   647  		"		DNSSearch []string `json:\"DnsSearch\"`",
   648  		"		EnableLxcfs bool `json:\"EnableLxcfs,omitempty\"`",
   649  		"		ExtraHosts []string `json:\"ExtraHosts\"`",
   650  		"		GroupAdd []string `json:\"GroupAdd\"`",
   651  		"		InitScript string `json:\"InitScript,omitempty\"`",
   652  		"		IpcMode string `json:\"IpcMode,omitempty\"`",
   653  		"		Isolation string `json:\"Isolation,omitempty\"`",
   654  		"		Links []string `json:\"Links\"`",
   655  		"		LogConfig *ContainerCreateConfigHostConfigAO0LogConfig `json:\"LogConfig,omitempty\"`",
   656  		"		NetworkMode string `json:\"NetworkMode,omitempty\"`",
   657  		"		OomScoreAdj int64 `json:\"OomScoreAdj,omitempty\"`",
   658  		"		PidMode string `json:\"PidMode,omitempty\"`",
   659  		"		Privileged bool `json:\"Privileged,omitempty\"`",
   660  		"		PublishAllPorts bool `json:\"PublishAllPorts,omitempty\"`",
   661  		"		ReadonlyRootfs bool `json:\"ReadonlyRootfs,omitempty\"`",
   662  		"		RestartPolicy *ContainerCreateConfigHostConfigAO0RestartPolicy `json:\"RestartPolicy,omitempty\"`",
   663  		"		Rich bool `json:\"Rich,omitempty\"`",
   664  		"		RichMode string `json:\"RichMode,omitempty\"`",
   665  		"		Runtime string `json:\"Runtime,omitempty\"`",
   666  		"		SecurityOpt []string `json:\"SecurityOpt\"`",
   667  		"		ShmSize *int64 `json:\"ShmSize,omitempty\"`",
   668  		"		StorageOpt map[string]string `json:\"StorageOpt,omitempty\"`",
   669  		"		Sysctls map[string]string `json:\"Sysctls,omitempty\"`",
   670  		"		Tmpfs map[string]string `json:\"Tmpfs,omitempty\"`",
   671  		"		UTSMode string `json:\"UTSMode,omitempty\"`",
   672  		"		UsernsMode string `json:\"UsernsMode,omitempty\"`",
   673  		"		VolumeDriver string `json:\"VolumeDriver,omitempty\"`",
   674  		"		VolumesFrom []string `json:\"VolumesFrom\"`",
   675  		"		BlkioWeight uint16 `json:\"BlkioWeight,omitempty\"`",
   676  		"		CgroupParent string `json:\"CgroupParent,omitempty\"`",
   677  		"		CPUShares int64 `json:\"CpuShares,omitempty\"`",
   678  		"		Memory int64 `json:\"Memory,omitempty\"`",
   679  		"	} `json:\"HostConfig,omitempty\"`",
   680  		"	NetworkingConfig *ContainerCreateConfigAO1NetworkingConfig `json:\"NetworkingConfig,omitempty\"`",
   681  		`func (m *ContainerCreateConfig) Validate(formats strfmt.Registry) error {`,
   682  		`	if err := m.validateExposedPorts(formats); err != nil {`,
   683  		`	if err := m.validateHostname(formats); err != nil {`,
   684  		`	if err := m.validateImage(formats); err != nil {`,
   685  		`	if err := m.validateRichMode(formats); err != nil {`,
   686  		`	if err := m.validateVolumes(formats); err != nil {`,
   687  		`	if err := m.validateHostConfig(formats); err != nil {`,
   688  		`	if err := m.validateNetworkingConfig(formats); err != nil {`,
   689  		`		return errors.CompositeValidationError(res...`,
   690  		`var containerCreateConfigExposedPortsValueEnum []interface{`,
   691  		`	var res []interface{`,
   692  		"	if err := json.Unmarshal([]byte(`[{}]`), &res); err != nil {",
   693  		`	for _, v := range res {`,
   694  		`		containerCreateConfigExposedPortsValueEnum = append(containerCreateConfigExposedPortsValueEnum, v`,
   695  		`func (m *ContainerCreateConfig) validateExposedPortsValueEnum(path, location string, value interface{}) error {`,
   696  		`	if err := validate.EnumCase(path, location, value, containerCreateConfigExposedPortsValueEnum, true); err != nil {`,
   697  		`func (m *ContainerCreateConfig) validateExposedPorts(formats strfmt.Registry) error {`,
   698  		`	if swag.IsZero(m.ExposedPorts) {`,
   699  		`	for k := range m.ExposedPorts {`,
   700  		//`		if swag.IsZero(m.ExposedPorts[k]) {`,
   701  		`		if err := m.validateExposedPortsValueEnum("ExposedPorts"+"."+k, "body", m.ExposedPorts[k]); err != nil {`,
   702  		`func (m *ContainerCreateConfig) validateHostname(formats strfmt.Registry) error {`,
   703  		`	if swag.IsZero(m.Hostname) {`,
   704  		`	if err := validate.MinLength("Hostname", "body", string(m.Hostname), 1); err != nil {`,
   705  		`	if err := validate.FormatOf("Hostname", "body", "hostname", m.Hostname.String(), formats); err != nil {`,
   706  		`func (m *ContainerCreateConfig) validateImage(formats strfmt.Registry) error {`,
   707  		`	if err := validate.RequiredString("Image", "body", string(m.Image)); err != nil {`,
   708  		`var containerCreateConfigTypeRichModePropEnum []interface{`,
   709  		`	var res []string`,
   710  		"	if err := json.Unmarshal([]byte(`[\"dumb-init\",\"sbin-init\",\"systemd\"]`), &res); err != nil {",
   711  		`	for _, v := range res {`,
   712  		`		containerCreateConfigTypeRichModePropEnum = append(containerCreateConfigTypeRichModePropEnum, v`,
   713  		`func (m *ContainerCreateConfig) validateRichModeEnum(path, location string, value string) error {`,
   714  		`	if err := validate.EnumCase(path, location, value, containerCreateConfigTypeRichModePropEnum, true); err != nil {`,
   715  		`func (m *ContainerCreateConfig) validateRichMode(formats strfmt.Registry) error {`,
   716  		`	if swag.IsZero(m.RichMode) {`,
   717  		`	if err := m.validateRichModeEnum("RichMode", "body", m.RichMode); err != nil {`,
   718  		`var containerCreateConfigVolumesValueEnum []interface{`,
   719  		`	var res []interface{`,
   720  		"	if err := json.Unmarshal([]byte(`[{}]`), &res); err != nil {",
   721  		`	for _, v := range res {`,
   722  		`		containerCreateConfigVolumesValueEnum = append(containerCreateConfigVolumesValueEnum, v`,
   723  		`func (m *ContainerCreateConfig) validateVolumesValueEnum(path, location string, value interface{}) error {`,
   724  		`	if err := validate.EnumCase(path, location, value, containerCreateConfigVolumesValueEnum, true); err != nil {`,
   725  		`func (m *ContainerCreateConfig) validateVolumes(formats strfmt.Registry) error {`,
   726  		`	if swag.IsZero(m.Volumes) {`,
   727  		`	for k := range m.Volumes {`,
   728  		//`		if swag.IsZero(m.Volumes[k]) {`,
   729  		`		if err := m.validateVolumesValueEnum("Volumes"+"."+k, "body", m.Volumes[k]); err != nil {`,
   730  		`func (m *ContainerCreateConfig) validateHostConfig(formats strfmt.Registry) error {`,
   731  		`	if swag.IsZero(m.HostConfig) {`,
   732  		`	iConsoleSizeSize := int64(len(m.HostConfig.ConsoleSize)`,
   733  		`	if err := validate.MinItems("HostConfig"+"."+"ConsoleSize", "body", iConsoleSizeSize, 2); err != nil {`,
   734  		`	if err := validate.MaxItems("HostConfig"+"."+"ConsoleSize", "body", iConsoleSizeSize, 2); err != nil {`,
   735  		`	for i := 0; i < len(m.HostConfig.ConsoleSize); i++ {`,
   736  		// do we need... ?
   737  		`		if swag.IsZero(m.HostConfig.ConsoleSize[i]) {`,
   738  		//`if err := validate.Required("HostConfig"+"."+"ConsoleSize"+"."+strconv.Itoa(i), "body", m.HostConfig.ConsoleSize[i]); err != nil {`,
   739  		`		if err := validate.MinimumInt("HostConfig"+"."+"ConsoleSize"+"."+strconv.Itoa(i), "body", int64(*m.HostConfig.ConsoleSize[i]), 0, false); err != nil {`,
   740  		// TODO: enum if anonymous allOf is not honored (missing func)
   741  		// => will do that with Enum refactoring
   742  		`	if err := m.validateIsolationEnum("HostConfig"+"."+"Isolation", "body", m.HostConfig.Isolation); err != nil {`,
   743  		`	if m.HostConfig.LogConfig != nil {`,
   744  		`		if err := m.HostConfig.LogConfig.Validate(formats); err != nil {`,
   745  		`			if ve, ok := err.(*errors.Validation); ok {`,
   746  		`				return ve.ValidateName("HostConfig" + "." + "LogConfig"`,
   747  		`	if err := validate.MinimumInt("HostConfig"+"."+"OomScoreAdj", "body", int64(m.HostConfig.OomScoreAdj), -1000, false); err != nil {`,
   748  		`	if err := validate.MaximumInt("HostConfig"+"."+"OomScoreAdj", "body", int64(m.HostConfig.OomScoreAdj), 1000, false); err != nil {`,
   749  		`	if m.HostConfig.RestartPolicy != nil {`,
   750  		`		if err := m.HostConfig.RestartPolicy.Validate(formats); err != nil {`,
   751  		`			if ve, ok := err.(*errors.Validation); ok {`,
   752  		`				return ve.ValidateName("HostConfig" + "." + "RestartPolicy"`,
   753  		`	if err := m.validateRichModeEnum("HostConfig"+"."+"RichMode", "body", m.HostConfig.RichMode); err != nil {`,
   754  		`	if err := validate.MinimumInt("HostConfig"+"."+"ShmSize", "body", int64(*m.HostConfig.ShmSize), 0, false); err != nil {`,
   755  		`	if err := validate.MinimumInt("HostConfig"+"."+"BlkioWeight", "body", int64(m.HostConfig.BlkioWeight), 0, false); err != nil {`,
   756  		`	if err := validate.MaximumInt("HostConfig"+"."+"BlkioWeight", "body", int64(m.HostConfig.BlkioWeight), 1000, false); err != nil {`,
   757  		`func (m *ContainerCreateConfig) validateNetworkingConfig(formats strfmt.Registry) error {`,
   758  		`	if swag.IsZero(m.NetworkingConfig) {`,
   759  		`	if m.NetworkingConfig != nil {`,
   760  		`		if err := m.NetworkingConfig.Validate(formats); err != nil {`,
   761  		`			if ve, ok := err.(*errors.Validation); ok {`,
   762  		`				return ve.ValidateName("NetworkingConfig"`,
   763  		`type ContainerCreateConfigAO1NetworkingConfig struct {`,
   764  		"	EndpointsConfig map[string]ContainerCreateConfigAO1NetworkingConfigEndpointsConfigAnon `json:\"EndpointsConfig,omitempty\"`",
   765  		`func (m *ContainerCreateConfigAO1NetworkingConfig) Validate(formats strfmt.Registry) error {`,
   766  		`	if err := m.validateEndpointsConfig(formats); err != nil {`,
   767  		`		return errors.CompositeValidationError(res...`,
   768  		`func (m *ContainerCreateConfigAO1NetworkingConfig) validateEndpointsConfig(formats strfmt.Registry) error {`,
   769  		`	if swag.IsZero(m.EndpointsConfig) {`,
   770  		`	for k := range m.EndpointsConfig {`,
   771  		`		if swag.IsZero(m.EndpointsConfig[k]) {`,
   772  		`		if val, ok := m.EndpointsConfig[k]; ok {`,
   773  		// NOTE: fixed incorrect IsNullable status in map element
   774  		//`			if val != nil {`,
   775  		`				if err := val.Validate(formats); err != nil {`,
   776  		`type ContainerCreateConfigAO1NetworkingConfigEndpointsConfigAnon struct {`,
   777  		"	Aliases []string `json:\"Aliases\"`",
   778  		"	DriverOpts map[string]string `json:\"DriverOpts,omitempty\"`",
   779  		"	EndpointID string `json:\"EndpointID,omitempty\"`",
   780  		"	Gateway string `json:\"Gateway,omitempty\"`",
   781  		"	GlobalIPV6Address string `json:\"GlobalIPv6Address,omitempty\"`",
   782  		"	GlobalIPV6PrefixLen int64 `json:\"GlobalIPv6PrefixLen,omitempty\"`",
   783  		"	IPAMConfig *ContainerCreateConfigAO1NetworkingConfigEndpointsConfigAnonIPAMConfig `json:\"IPAMConfig,omitempty\"`",
   784  		"	IPAddress string `json:\"IPAddress,omitempty\"`",
   785  		"	IPPrefixLen int64 `json:\"IPPrefixLen,omitempty\"`",
   786  		"	IPV6Gateway string `json:\"IPv6Gateway,omitempty\"`",
   787  		"	Links []string `json:\"Links\"`",
   788  		"	MacAddress string `json:\"MacAddress,omitempty\"`",
   789  		"	NetworkID string `json:\"NetworkID,omitempty\"`",
   790  		`func (m *ContainerCreateConfigAO1NetworkingConfigEndpointsConfigAnon) Validate(formats strfmt.Registry) error {`,
   791  		`	if err := m.validateIPAMConfig(formats); err != nil {`,
   792  		`		return errors.CompositeValidationError(res...`,
   793  		`func (m *ContainerCreateConfigAO1NetworkingConfigEndpointsConfigAnon) validateIPAMConfig(formats strfmt.Registry) error {`,
   794  		`	if swag.IsZero(m.IPAMConfig) {`,
   795  		`	if m.IPAMConfig != nil {`,
   796  		`		if err := m.IPAMConfig.Validate(formats); err != nil {`,
   797  		`			if ve, ok := err.(*errors.Validation); ok {`,
   798  		`				return ve.ValidateName("IPAMConfig"`,
   799  		`type ContainerCreateConfigAO1NetworkingConfigEndpointsConfigAnonIPAMConfig struct {`,
   800  		"	IPV4Address string `json:\"IPv4Address,omitempty\"`",
   801  		"	IPV6Address string `json:\"IPv6Address,omitempty\"`",
   802  		"	LinkLocalIPs []string `json:\"LinkLocalIPs\"`",
   803  		`func (m *ContainerCreateConfigAO1NetworkingConfigEndpointsConfigAnonIPAMConfig) Validate(formats strfmt.Registry) error {`,
   804  		`		return errors.CompositeValidationError(res...`,
   805  		`type ContainerCreateConfigHostConfigAO0LogConfig struct {`,
   806  		"	Config map[string]string `json:\"Config,omitempty\"`",
   807  		"	Type string `json:\"Type,omitempty\"`",
   808  		`func (m *ContainerCreateConfigHostConfigAO0LogConfig) Validate(formats strfmt.Registry) error {`,
   809  		`	if err := m.validateType(formats); err != nil {`,
   810  		`		return errors.CompositeValidationError(res...`,
   811  		`var containerCreateConfigHostConfigAO0LogConfigTypeTypePropEnum []interface{`,
   812  		`	var res []string`,
   813  		"	if err := json.Unmarshal([]byte(`[\"json-file\",\"syslog\",\"journald\",\"gelf\",\"fluentd\",\"awslogs\",\"splunk\",\"etwlogs\",\"none\"]`), &res); err != nil {",
   814  		`	for _, v := range res {`,
   815  		`		containerCreateConfigHostConfigAO0LogConfigTypeTypePropEnum = append(containerCreateConfigHostConfigAO0LogConfigTypeTypePropEnum, v`,
   816  		`	ContainerCreateConfigHostConfigAO0LogConfigTypeJSONFile string = "json-file"`,
   817  		`	ContainerCreateConfigHostConfigAO0LogConfigTypeSyslog string = "syslog"`,
   818  		`	ContainerCreateConfigHostConfigAO0LogConfigTypeJournald string = "journald"`,
   819  		`	ContainerCreateConfigHostConfigAO0LogConfigTypeGelf string = "gelf"`,
   820  		`	ContainerCreateConfigHostConfigAO0LogConfigTypeFluentd string = "fluentd"`,
   821  		`	ContainerCreateConfigHostConfigAO0LogConfigTypeAwslogs string = "awslogs"`,
   822  		`	ContainerCreateConfigHostConfigAO0LogConfigTypeSplunk string = "splunk"`,
   823  		`	ContainerCreateConfigHostConfigAO0LogConfigTypeEtwlogs string = "etwlogs"`,
   824  		`	ContainerCreateConfigHostConfigAO0LogConfigTypeNone string = "none"`,
   825  		`func (m *ContainerCreateConfigHostConfigAO0LogConfig) validateTypeEnum(path, location string, value string) error {`,
   826  		`	if err := validate.EnumCase(path, location, value, containerCreateConfigHostConfigAO0LogConfigTypeTypePropEnum, true); err != nil {`,
   827  		`func (m *ContainerCreateConfigHostConfigAO0LogConfig) validateType(formats strfmt.Registry) error {`,
   828  		`	if swag.IsZero(m.Type) {`,
   829  		`	if err := m.validateTypeEnum("HostConfig"+"."+"LogConfig"+"."+"Type", "body", m.Type); err != nil {`,
   830  		`type ContainerCreateConfigHostConfigAO0RestartPolicy struct {`,
   831  		"	MaximumRetryCount int64 `json:\"MaximumRetryCount,omitempty\"`",
   832  		"	Name string `json:\"Name,omitempty\"`",
   833  		`func (m *ContainerCreateConfigHostConfigAO0RestartPolicy) Validate(formats strfmt.Registry) error {`,
   834  		`		return errors.CompositeValidationError(res...`,
   835  	}, []string{
   836  		// not expected
   837  		`			if val != nil {`,
   838  	},
   839  		// output in log
   840  		noLines,
   841  		noLines)
   842  
   843  	// load expectations for model: resources.go
   844  	flattenRun.AddExpectations("resources.go", []string{
   845  		`type Resources struct {`,
   846  		"	BlkioWeight uint16 `json:\"BlkioWeight,omitempty\"`",
   847  		"	CgroupParent string `json:\"CgroupParent,omitempty\"`",
   848  		"	CPUShares int64 `json:\"CpuShares,omitempty\"`",
   849  		"	Memory int64 `json:\"Memory,omitempty\"`",
   850  		`func (m *Resources) Validate(formats strfmt.Registry) error {`,
   851  		`	if err := m.validateBlkioWeight(formats); err != nil {`,
   852  		`		return errors.CompositeValidationError(res...`,
   853  		`func (m *Resources) validateBlkioWeight(formats strfmt.Registry) error {`,
   854  		`	if swag.IsZero(m.BlkioWeight) {`,
   855  		`	if err := validate.MinimumInt("BlkioWeight", "body", int64(m.BlkioWeight), 0, false); err != nil {`,
   856  		`	if err := validate.MaximumInt("BlkioWeight", "body", int64(m.BlkioWeight), 1000, false); err != nil {`,
   857  	},
   858  		// not expected
   859  		todo,
   860  		// output in log
   861  		noLines,
   862  		noLines)
   863  
   864  	expandRun.AddExpectations("resources.go", flattenRun.ExpectedFor("Resources").ExpectedLines, todo, noLines, noLines)
   865  
   866  	// load expectations for model: networking_config.go
   867  	flattenRun.AddExpectations("networking_config.go", []string{
   868  		`type NetworkingConfig struct {`,
   869  		// maps are now simple types
   870  		//"	EndpointsConfig NetworkingConfigEndpointsConfig `json:\"EndpointsConfig,omitempty\"`",
   871  		"	EndpointsConfig map[string]*EndpointSettings `json:\"EndpointsConfig,omitempty\"`",
   872  		`func (m *NetworkingConfig) Validate(formats strfmt.Registry) error {`,
   873  		`	if err := m.validateEndpointsConfig(formats); err != nil {`,
   874  		`		return errors.CompositeValidationError(res...`,
   875  		`func (m *NetworkingConfig) validateEndpointsConfig(formats strfmt.Registry) error {`,
   876  		`	if swag.IsZero(m.EndpointsConfig) {`,
   877  		//`	if err := m.EndpointsConfig.Validate(formats); err != nil {`,
   878  		`       for k := range m.EndpointsConfig {`,
   879  		`	if err := validate.Required("EndpointsConfig"+"."+k, "body", m.EndpointsConfig[k]); err != nil {`,
   880  		`       	if val, ok := m.EndpointsConfig[k]; ok {`,
   881  		`          		if err := val.Validate(formats); err != nil {`,
   882  	},
   883  		// not expected
   884  		todo,
   885  		// output in log
   886  		noLines,
   887  		noLines)
   888  
   889  	// NOTE(fredbi): maps are now simple types: this definition disappears
   890  
   891  	// load expectations for model: endpoint_settings.go
   892  	flattenRun.AddExpectations("endpoint_settings.go", []string{
   893  		`type EndpointSettings struct {`,
   894  		"	Aliases []string `json:\"Aliases\"`",
   895  		"	DriverOpts map[string]string `json:\"DriverOpts,omitempty\"`",
   896  		"	EndpointID string `json:\"EndpointID,omitempty\"`",
   897  		"	Gateway string `json:\"Gateway,omitempty\"`",
   898  		"	GlobalIPV6Address string `json:\"GlobalIPv6Address,omitempty\"`",
   899  		"	GlobalIPV6PrefixLen int64 `json:\"GlobalIPv6PrefixLen,omitempty\"`",
   900  		"	IPAMConfig *EndpointIPAMConfig `json:\"IPAMConfig,omitempty\"`",
   901  		"	IPAddress string `json:\"IPAddress,omitempty\"`",
   902  		"	IPPrefixLen int64 `json:\"IPPrefixLen,omitempty\"`",
   903  		"	IPV6Gateway string `json:\"IPv6Gateway,omitempty\"`",
   904  		"	Links []string `json:\"Links\"`",
   905  		"	MacAddress string `json:\"MacAddress,omitempty\"`",
   906  		"	NetworkID string `json:\"NetworkID,omitempty\"`",
   907  		`func (m *EndpointSettings) Validate(formats strfmt.Registry) error {`,
   908  		`	if err := m.validateIPAMConfig(formats); err != nil {`,
   909  		`		return errors.CompositeValidationError(res...`,
   910  		`func (m *EndpointSettings) validateIPAMConfig(formats strfmt.Registry) error {`,
   911  		`	if swag.IsZero(m.IPAMConfig) {`,
   912  		`	if m.IPAMConfig != nil {`,
   913  		`		if err := m.IPAMConfig.Validate(formats); err != nil {`,
   914  		`			if ve, ok := err.(*errors.Validation); ok {`,
   915  		`				return ve.ValidateName("IPAMConfig"`,
   916  	},
   917  		// not expected
   918  		todo,
   919  		// output in log
   920  		noLines,
   921  		noLines)
   922  
   923  	expandRun.AddExpectations("endpoint_settings.go", []string{
   924  		`type EndpointSettings struct {`,
   925  		"	Aliases []string `json:\"Aliases\"`",
   926  		"	DriverOpts map[string]string `json:\"DriverOpts,omitempty\"`",
   927  		"	EndpointID string `json:\"EndpointID,omitempty\"`",
   928  		"	Gateway string `json:\"Gateway,omitempty\"`",
   929  		"	GlobalIPV6Address string `json:\"GlobalIPv6Address,omitempty\"`",
   930  		"	GlobalIPV6PrefixLen int64 `json:\"GlobalIPv6PrefixLen,omitempty\"`",
   931  		"	IPAMConfig *EndpointSettingsIPAMConfig `json:\"IPAMConfig,omitempty\"`",
   932  		"	IPAddress string `json:\"IPAddress,omitempty\"`",
   933  		"	IPPrefixLen int64 `json:\"IPPrefixLen,omitempty\"`",
   934  		"	IPV6Gateway string `json:\"IPv6Gateway,omitempty\"`",
   935  		"	Links []string `json:\"Links\"`",
   936  		"	MacAddress string `json:\"MacAddress,omitempty\"`",
   937  		"	NetworkID string `json:\"NetworkID,omitempty\"`",
   938  		`func (m *EndpointSettings) Validate(formats strfmt.Registry) error {`,
   939  		`	if err := m.validateIPAMConfig(formats); err != nil {`,
   940  		`		return errors.CompositeValidationError(res...`,
   941  		`func (m *EndpointSettings) validateIPAMConfig(formats strfmt.Registry) error {`,
   942  		`	if swag.IsZero(m.IPAMConfig) {`,
   943  		`	if m.IPAMConfig != nil {`,
   944  		`		if err := m.IPAMConfig.Validate(formats); err != nil {`,
   945  		`			if ve, ok := err.(*errors.Validation); ok {`,
   946  		`				return ve.ValidateName("IPAMConfig"`,
   947  		`type EndpointSettingsIPAMConfig struct {`,
   948  		"	IPV4Address string `json:\"IPv4Address,omitempty\"`",
   949  		"	IPV6Address string `json:\"IPv6Address,omitempty\"`",
   950  		"	LinkLocalIPs []string `json:\"LinkLocalIPs\"`",
   951  		`func (m *EndpointSettingsIPAMConfig) Validate(formats strfmt.Registry) error {`,
   952  		`		return errors.CompositeValidationError(res...`,
   953  	},
   954  		// not expected
   955  		noLines,
   956  		// output in log
   957  		noLines,
   958  		noLines)
   959  
   960  	// load expectations for model: networking_config_endpoints_config.go
   961  	// NOTE(fredbi): maps are now simple types - this definition disappears
   962  }
   963  func initFixtureSimpleAllOf() {
   964  	// testing ../fixtures/bugs/1487/fixture-simple-allOf.yaml with flatten and expand (--skip-flatten)
   965  
   966  	/* we test various composition combinations, including nested, and nested isolated with a properties (e.g. issue #1479) */
   967  
   968  	f := newModelFixture("../fixtures/bugs/1487/fixture-simple-allOf.yaml", "fixture for nested allOf with ref")
   969  	flattenRun := f.AddRun(false)
   970  	expandRun := f.AddRun(true)
   971  
   972  	// load expectations for model: not_really_composed_thing_all_of0.go
   973  	flattenRun.AddExpectations("not_really_composed_thing_all_of0.go", []string{
   974  		`type NotReallyComposedThingAllOf0 struct {`,
   975  		"	Prop0 strfmt.UUID `json:\"prop0,omitempty\"`",
   976  		`func (m *NotReallyComposedThingAllOf0) Validate(formats strfmt.Registry) error {`,
   977  		`	if err := m.validateProp0(formats); err != nil {`,
   978  		`		return errors.CompositeValidationError(res...`,
   979  		`func (m *NotReallyComposedThingAllOf0) validateProp0(formats strfmt.Registry) error {`,
   980  		`	if swag.IsZero(m.Prop0) {`,
   981  		`	if err := validate.FormatOf("prop0", "body", "uuid", m.Prop0.String(), formats); err != nil {`,
   982  	},
   983  		// not expected
   984  		todo,
   985  		// output in log
   986  		noLines,
   987  		noLines)
   988  
   989  	// load expectations for model: not_really_composed_thing.go
   990  	expandRun.AddExpectations("not_really_composed_thing.go", []string{
   991  		`type NotReallyComposedThing struct {`,
   992  		"	Prop0 strfmt.UUID `json:\"prop0,omitempty\"`",
   993  		`func (m *NotReallyComposedThing) UnmarshalJSON(raw []byte) error {`,
   994  		`	var dataAO0 struct {`,
   995  		"		Prop0 strfmt.UUID `json:\"prop0,omitempty\"`",
   996  		`	if err := swag.ReadJSON(raw, &dataAO0); err != nil {`,
   997  		`	m.Prop0 = dataAO0.Prop0`,
   998  		`func (m NotReallyComposedThing) MarshalJSON() ([]byte, error) {`,
   999  		`	_parts := make([][]byte, 0, 1`,
  1000  		`	var dataAO0 struct {`,
  1001  		"		Prop0 strfmt.UUID `json:\"prop0,omitempty\"`",
  1002  		`	dataAO0.Prop0 = m.Prop0`,
  1003  		`	jsonDataAO0, errAO0 := swag.WriteJSON(dataAO0`,
  1004  		`	if errAO0 != nil {`,
  1005  		`		return nil, errAO0`,
  1006  		`	_parts = append(_parts, jsonDataAO0`,
  1007  		`	return swag.ConcatJSON(_parts...), nil`,
  1008  		`func (m *NotReallyComposedThing) Validate(formats strfmt.Registry) error {`,
  1009  		`	if err := m.validateProp0(formats); err != nil {`,
  1010  		`		return errors.CompositeValidationError(res...`,
  1011  		`func (m *NotReallyComposedThing) validateProp0(formats strfmt.Registry) error {`,
  1012  		`	if swag.IsZero(m.Prop0) {`,
  1013  		`	if err := validate.FormatOf("prop0", "body", "uuid", m.Prop0.String(), formats); err != nil {`,
  1014  		`func (m *NotReallyComposedThing) MarshalBinary() ([]byte, error) {`,
  1015  		`	if m == nil {`,
  1016  		`		return nil, nil`,
  1017  		`	return swag.WriteJSON(m`,
  1018  		`func (m *NotReallyComposedThing) UnmarshalBinary(b []byte) error {`,
  1019  		`	var res NotReallyComposedThing`,
  1020  		`	if err := swag.ReadJSON(b, &res); err != nil {`,
  1021  		`	*m = res`,
  1022  	},
  1023  		// not expected
  1024  		noLines,
  1025  		// output in log
  1026  		noLines,
  1027  		noLines)
  1028  
  1029  	// load expectations for model: simple_nested_object_all_of1.go
  1030  	flattenRun.AddExpectations("simple_nested_object_all_of1.go", []string{
  1031  		`type SimpleNestedObjectAllOf1 struct {`,
  1032  		"	Prop3 strfmt.UUID `json:\"prop3,omitempty\"`",
  1033  		`func (m *SimpleNestedObjectAllOf1) Validate(formats strfmt.Registry) error {`,
  1034  		`	if err := m.validateProp3(formats); err != nil {`,
  1035  		`		return errors.CompositeValidationError(res...`,
  1036  		`func (m *SimpleNestedObjectAllOf1) validateProp3(formats strfmt.Registry) error {`,
  1037  		`	if swag.IsZero(m.Prop3) {`,
  1038  		`	if err := validate.FormatOf("prop3", "body", "uuid", m.Prop3.String(), formats); err != nil {`,
  1039  	},
  1040  		// not expected
  1041  		todo,
  1042  		// output in log
  1043  		noLines,
  1044  		noLines)
  1045  
  1046  	// load expectations for model: break_nested_object_all_of1_prop7.go
  1047  	flattenRun.AddExpectations("break_nested_object_all_of1_prop7.go", []string{
  1048  		`type BreakNestedObjectAllOf1Prop7 struct {`,
  1049  		`	BreakNestedObjectAllOf1Prop7AllOf0`,
  1050  		`	BreakNestedObjectAllOf1Prop7AllOf1`,
  1051  		`func (m *BreakNestedObjectAllOf1Prop7) Validate(formats strfmt.Registry) error {`,
  1052  		`	if err := m.BreakNestedObjectAllOf1Prop7AllOf0.Validate(formats); err != nil {`,
  1053  		`	if err := m.BreakNestedObjectAllOf1Prop7AllOf1.Validate(formats); err != nil {`,
  1054  		`		return errors.CompositeValidationError(res...`,
  1055  	},
  1056  		// not expected
  1057  		todo,
  1058  		// output in log
  1059  		noLines,
  1060  		noLines)
  1061  
  1062  	// load expectations for model: composed_thing.go
  1063  	flattenRun.AddExpectations("composed_thing.go", []string{
  1064  		`type ComposedThing struct {`,
  1065  		`	ComposedThingAllOf0`,
  1066  		`	ComposedThingAllOf1`,
  1067  		`func (m *ComposedThing) Validate(formats strfmt.Registry) error {`,
  1068  		`	if err := m.ComposedThingAllOf0.Validate(formats); err != nil {`,
  1069  		`	if err := m.ComposedThingAllOf1.Validate(formats); err != nil {`,
  1070  		`		return errors.CompositeValidationError(res...`,
  1071  	},
  1072  		// not expected
  1073  		todo,
  1074  		// output in log
  1075  		noLines,
  1076  		noLines)
  1077  
  1078  	// load expectations for model: composed_thing.go
  1079  	expandRun.AddExpectations("composed_thing.go", []string{
  1080  		`type ComposedThing struct {`,
  1081  		"	Prop1 strfmt.UUID `json:\"prop1,omitempty\"`",
  1082  		"	Prop2 strfmt.UUID `json:\"prop2,omitempty\"`",
  1083  		`func (m *ComposedThing) UnmarshalJSON(raw []byte) error {`,
  1084  		`	var dataAO0 struct {`,
  1085  		"		Prop1 strfmt.UUID `json:\"prop1,omitempty\"`",
  1086  		`	if err := swag.ReadJSON(raw, &dataAO0); err != nil {`,
  1087  		`	m.Prop1 = dataAO0.Prop1`,
  1088  		`	var dataAO1 struct {`,
  1089  		"		Prop2 strfmt.UUID `json:\"prop2,omitempty\"`",
  1090  		`	if err := swag.ReadJSON(raw, &dataAO1); err != nil {`,
  1091  		`	m.Prop2 = dataAO1.Prop2`,
  1092  		`func (m ComposedThing) MarshalJSON() ([]byte, error) {`,
  1093  		`	_parts := make([][]byte, 0, 2`,
  1094  		`	var dataAO0 struct {`,
  1095  		"		Prop1 strfmt.UUID `json:\"prop1,omitempty\"`",
  1096  		`	dataAO0.Prop1 = m.Prop1`,
  1097  		`	jsonDataAO0, errAO0 := swag.WriteJSON(dataAO0`,
  1098  		`	if errAO0 != nil {`,
  1099  		`		return nil, errAO0`,
  1100  		`	_parts = append(_parts, jsonDataAO0`,
  1101  		`	var dataAO1 struct {`,
  1102  		"		Prop2 strfmt.UUID `json:\"prop2,omitempty\"`",
  1103  		`	dataAO1.Prop2 = m.Prop2`,
  1104  		`	jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1`,
  1105  		`	if errAO1 != nil {`,
  1106  		`		return nil, errAO1`,
  1107  		`	_parts = append(_parts, jsonDataAO1`,
  1108  		`	return swag.ConcatJSON(_parts...), nil`,
  1109  		`func (m *ComposedThing) Validate(formats strfmt.Registry) error {`,
  1110  		`	if err := m.validateProp1(formats); err != nil {`,
  1111  		`	if err := m.validateProp2(formats); err != nil {`,
  1112  		`		return errors.CompositeValidationError(res...`,
  1113  		`func (m *ComposedThing) validateProp1(formats strfmt.Registry) error {`,
  1114  		`	if swag.IsZero(m.Prop1) {`,
  1115  		`	if err := validate.FormatOf("prop1", "body", "uuid", m.Prop1.String(), formats); err != nil {`,
  1116  		`func (m *ComposedThing) validateProp2(formats strfmt.Registry) error {`,
  1117  		`	if swag.IsZero(m.Prop2) {`,
  1118  		`	if err := validate.FormatOf("prop2", "body", "uuid", m.Prop2.String(), formats); err != nil {`,
  1119  		`func (m *ComposedThing) MarshalBinary() ([]byte, error) {`,
  1120  		`	if m == nil {`,
  1121  		`		return nil, nil`,
  1122  		`	return swag.WriteJSON(m`,
  1123  		`func (m *ComposedThing) UnmarshalBinary(b []byte) error {`,
  1124  		`	var res ComposedThing`,
  1125  		`	if err := swag.ReadJSON(b, &res); err != nil {`,
  1126  		`	*m = res`,
  1127  	},
  1128  		// not expected
  1129  		noLines,
  1130  		// output in log
  1131  		noLines,
  1132  		noLines)
  1133  
  1134  	// load expectations for model: break_nested_object.go
  1135  	flattenRun.AddExpectations("break_nested_object.go", []string{
  1136  		`type BreakNestedObject struct {`,
  1137  		`	SimpleNestedObject`,
  1138  		`	BreakNestedObjectAllOf1`,
  1139  		`func (m *BreakNestedObject) Validate(formats strfmt.Registry) error {`,
  1140  		`	if err := m.SimpleNestedObject.Validate(formats); err != nil {`,
  1141  		`	if err := m.BreakNestedObjectAllOf1.Validate(formats); err != nil {`,
  1142  		`		return errors.CompositeValidationError(res...`,
  1143  	},
  1144  		// not expected
  1145  		todo,
  1146  		// output in log
  1147  		noLines,
  1148  		noLines)
  1149  
  1150  	// load expectations for model: break_nested_object.go
  1151  	expandRun.AddExpectations("break_nested_object.go", []string{
  1152  		`type BreakNestedObject struct {`,
  1153  		`	BreakNestedObjectAllOf0`,
  1154  		"	Prop6 strfmt.UUID `json:\"prop6,omitempty\"`",
  1155  		`	Prop7 struct {`,
  1156  		"		Prop8 int64 `json:\"prop8,omitempty\"`",
  1157  		"		Prop9 int64 `json:\"prop9,omitempty\"`",
  1158  		"	} `json:\"prop7,omitempty\"`",
  1159  		`func (m *BreakNestedObject) UnmarshalJSON(raw []byte) error {`,
  1160  		`	var aO0 BreakNestedObjectAllOf0`,
  1161  		`	if err := swag.ReadJSON(raw, &aO0); err != nil {`,
  1162  		`	m.BreakNestedObjectAllOf0 = aO0`,
  1163  		`	var dataAO1 struct {`,
  1164  		"		Prop6 strfmt.UUID `json:\"prop6,omitempty\"`",
  1165  		`		Prop7 struct {`,
  1166  		"			Prop8 int64 `json:\"prop8,omitempty\"`",
  1167  		"			Prop9 int64 `json:\"prop9,omitempty\"`",
  1168  		"		} `json:\"prop7,omitempty\"`",
  1169  		`	if err := swag.ReadJSON(raw, &dataAO1); err != nil {`,
  1170  		`	m.Prop6 = dataAO1.Prop6`,
  1171  		`	m.Prop7 = dataAO1.Prop7`,
  1172  		`func (m BreakNestedObject) MarshalJSON() ([]byte, error) {`,
  1173  		`	_parts := make([][]byte, 0, 2`,
  1174  		`	aO0, err := swag.WriteJSON(m.BreakNestedObjectAllOf0`,
  1175  		`	if err != nil {`,
  1176  		`		return nil, err`,
  1177  		`	_parts = append(_parts, aO0`,
  1178  		`	var dataAO1 struct {`,
  1179  		"		Prop6 strfmt.UUID `json:\"prop6,omitempty\"`",
  1180  		`		Prop7 struct {`,
  1181  		"			Prop8 int64 `json:\"prop8,omitempty\"`",
  1182  		"			Prop9 int64 `json:\"prop9,omitempty\"`",
  1183  		"		} `json:\"prop7,omitempty\"`",
  1184  		`	dataAO1.Prop6 = m.Prop6`,
  1185  		`	dataAO1.Prop7 = m.Prop7`,
  1186  		`	jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1`,
  1187  		`	if errAO1 != nil {`,
  1188  		`		return nil, errAO1`,
  1189  		`	_parts = append(_parts, jsonDataAO1`,
  1190  		`	return swag.ConcatJSON(_parts...), nil`,
  1191  		`func (m *BreakNestedObject) Validate(formats strfmt.Registry) error {`,
  1192  		`	if err := m.BreakNestedObjectAllOf0.Validate(formats); err != nil {`,
  1193  		`	if err := m.validateProp6(formats); err != nil {`,
  1194  		`	if err := m.validateProp7(formats); err != nil {`,
  1195  		`		return errors.CompositeValidationError(res...`,
  1196  		`func (m *BreakNestedObject) validateProp6(formats strfmt.Registry) error {`,
  1197  		`	if swag.IsZero(m.Prop6) {`,
  1198  		`	if err := validate.FormatOf("prop6", "body", "uuid", m.Prop6.String(), formats); err != nil {`,
  1199  		`func (m *BreakNestedObject) validateProp7(formats strfmt.Registry) error {`,
  1200  		`	if swag.IsZero(m.Prop7) {`,
  1201  		`	if err := validate.MinimumInt("prop7"+"."+"prop8", "body", int64(m.Prop7.Prop8), 12, false); err != nil {`,
  1202  		`	if err := validate.MaximumInt("prop7"+"."+"prop9", "body", int64(m.Prop7.Prop9), 12, false); err != nil {`,
  1203  		`func (m *BreakNestedObject) MarshalBinary() ([]byte, error) {`,
  1204  		`	if m == nil {`,
  1205  		`		return nil, nil`,
  1206  		`	return swag.WriteJSON(m`,
  1207  		`func (m *BreakNestedObject) UnmarshalBinary(b []byte) error {`,
  1208  		`	var res BreakNestedObject`,
  1209  		`	if err := swag.ReadJSON(b, &res); err != nil {`,
  1210  		`	*m = res`,
  1211  		`type BreakNestedObjectAllOf0 struct {`,
  1212  		`	BreakNestedObjectAllOf0AllOf0`,
  1213  		"	Prop3 strfmt.UUID `json:\"prop3,omitempty\"`",
  1214  		`func (m *BreakNestedObjectAllOf0) UnmarshalJSON(raw []byte) error {`,
  1215  		`	var aO0 BreakNestedObjectAllOf0AllOf0`,
  1216  		`	if err := swag.ReadJSON(raw, &aO0); err != nil {`,
  1217  		`	m.BreakNestedObjectAllOf0AllOf0 = aO0`,
  1218  		`	var dataAO1 struct {`,
  1219  		"		Prop3 strfmt.UUID `json:\"prop3,omitempty\"`",
  1220  		`	if err := swag.ReadJSON(raw, &dataAO1); err != nil {`,
  1221  		`	m.Prop3 = dataAO1.Prop3`,
  1222  		`func (m BreakNestedObjectAllOf0) MarshalJSON() ([]byte, error) {`,
  1223  		`	_parts := make([][]byte, 0, 2`,
  1224  		`	aO0, err := swag.WriteJSON(m.BreakNestedObjectAllOf0AllOf0`,
  1225  		`	if err != nil {`,
  1226  		`		return nil, err`,
  1227  		`	_parts = append(_parts, aO0`,
  1228  		`	var dataAO1 struct {`,
  1229  		"		Prop3 strfmt.UUID `json:\"prop3,omitempty\"`",
  1230  		`	dataAO1.Prop3 = m.Prop3`,
  1231  		`	jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1`,
  1232  		`	if errAO1 != nil {`,
  1233  		`		return nil, errAO1`,
  1234  		`	_parts = append(_parts, jsonDataAO1`,
  1235  		`	return swag.ConcatJSON(_parts...), nil`,
  1236  		`func (m *BreakNestedObjectAllOf0) Validate(formats strfmt.Registry) error {`,
  1237  		`	if err := m.BreakNestedObjectAllOf0AllOf0.Validate(formats); err != nil {`,
  1238  		`	if err := m.validateProp3(formats); err != nil {`,
  1239  		`		return errors.CompositeValidationError(res...`,
  1240  		`func (m *BreakNestedObjectAllOf0) validateProp3(formats strfmt.Registry) error {`,
  1241  		`	if swag.IsZero(m.Prop3) {`,
  1242  		`	if err := validate.FormatOf("prop3", "body", "uuid", m.Prop3.String(), formats); err != nil {`,
  1243  		`func (m *BreakNestedObjectAllOf0) MarshalBinary() ([]byte, error) {`,
  1244  		`	if m == nil {`,
  1245  		`		return nil, nil`,
  1246  		`	return swag.WriteJSON(m`,
  1247  		`func (m *BreakNestedObjectAllOf0) UnmarshalBinary(b []byte) error {`,
  1248  		`	var res BreakNestedObjectAllOf0`,
  1249  		`	if err := swag.ReadJSON(b, &res); err != nil {`,
  1250  		`	*m = res`,
  1251  		`type BreakNestedObjectAllOf0AllOf0 struct {`,
  1252  		"	Prop1 strfmt.UUID `json:\"prop1,omitempty\"`",
  1253  		"	Prop2 strfmt.UUID `json:\"prop2,omitempty\"`",
  1254  		`func (m *BreakNestedObjectAllOf0AllOf0) UnmarshalJSON(raw []byte) error {`,
  1255  		`	var dataAO0 struct {`,
  1256  		"		Prop1 strfmt.UUID `json:\"prop1,omitempty\"`",
  1257  		`	if err := swag.ReadJSON(raw, &dataAO0); err != nil {`,
  1258  		`	m.Prop1 = dataAO0.Prop1`,
  1259  		`	var dataAO1 struct {`,
  1260  		"		Prop2 strfmt.UUID `json:\"prop2,omitempty\"`",
  1261  		`	if err := swag.ReadJSON(raw, &dataAO1); err != nil {`,
  1262  		`	m.Prop2 = dataAO1.Prop2`,
  1263  		`func (m BreakNestedObjectAllOf0AllOf0) MarshalJSON() ([]byte, error) {`,
  1264  		`	_parts := make([][]byte, 0, 2`,
  1265  		`	var dataAO0 struct {`,
  1266  		"		Prop1 strfmt.UUID `json:\"prop1,omitempty\"`",
  1267  		`	dataAO0.Prop1 = m.Prop1`,
  1268  		`	jsonDataAO0, errAO0 := swag.WriteJSON(dataAO0`,
  1269  		`	if errAO0 != nil {`,
  1270  		`		return nil, errAO0`,
  1271  		`	_parts = append(_parts, jsonDataAO0`,
  1272  		`	var dataAO1 struct {`,
  1273  		"		Prop2 strfmt.UUID `json:\"prop2,omitempty\"`",
  1274  		`	dataAO1.Prop2 = m.Prop2`,
  1275  		`	jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1`,
  1276  		`	if errAO1 != nil {`,
  1277  		`		return nil, errAO1`,
  1278  		`	_parts = append(_parts, jsonDataAO1`,
  1279  		`	return swag.ConcatJSON(_parts...), nil`,
  1280  		`func (m *BreakNestedObjectAllOf0AllOf0) Validate(formats strfmt.Registry) error {`,
  1281  		`	if err := m.validateProp1(formats); err != nil {`,
  1282  		`	if err := m.validateProp2(formats); err != nil {`,
  1283  		`		return errors.CompositeValidationError(res...`,
  1284  		`func (m *BreakNestedObjectAllOf0AllOf0) validateProp1(formats strfmt.Registry) error {`,
  1285  		`	if swag.IsZero(m.Prop1) {`,
  1286  		`	if err := validate.FormatOf("prop1", "body", "uuid", m.Prop1.String(), formats); err != nil {`,
  1287  		`func (m *BreakNestedObjectAllOf0AllOf0) validateProp2(formats strfmt.Registry) error {`,
  1288  		`	if swag.IsZero(m.Prop2) {`,
  1289  		`	if err := validate.FormatOf("prop2", "body", "uuid", m.Prop2.String(), formats); err != nil {`,
  1290  		`func (m *BreakNestedObjectAllOf0AllOf0) MarshalBinary() ([]byte, error) {`,
  1291  		`	if m == nil {`,
  1292  		`		return nil, nil`,
  1293  		`	return swag.WriteJSON(m`,
  1294  		`func (m *BreakNestedObjectAllOf0AllOf0) UnmarshalBinary(b []byte) error {`,
  1295  		`	var res BreakNestedObjectAllOf0AllOf0`,
  1296  		`	if err := swag.ReadJSON(b, &res); err != nil {`,
  1297  		`	*m = res`,
  1298  	},
  1299  		// not expected
  1300  		noLines,
  1301  		// output in log
  1302  		noLines,
  1303  		noLines)
  1304  
  1305  	// load expectations for model: deep_nested_object_all_of1_all_of1.go
  1306  	flattenRun.AddExpectations("deep_nested_object_all_of1_all_of1.go", []string{
  1307  		`type DeepNestedObjectAllOf1AllOf1 struct {`,
  1308  		"	Prop5 strfmt.Date `json:\"prop5,omitempty\"`",
  1309  		`func (m *DeepNestedObjectAllOf1AllOf1) Validate(formats strfmt.Registry) error {`,
  1310  		`	if err := m.validateProp5(formats); err != nil {`,
  1311  		`		return errors.CompositeValidationError(res...`,
  1312  		`func (m *DeepNestedObjectAllOf1AllOf1) validateProp5(formats strfmt.Registry) error {`,
  1313  		`	if swag.IsZero(m.Prop5) {`,
  1314  		`	if err := validate.FormatOf("prop5", "body", "date", m.Prop5.String(), formats); err != nil {`,
  1315  	},
  1316  		// not expected
  1317  		todo,
  1318  		// output in log
  1319  		noLines,
  1320  		noLines)
  1321  
  1322  	// load expectations for model: deep_nested_object.go
  1323  	flattenRun.AddExpectations("deep_nested_object.go", []string{
  1324  		`type DeepNestedObject struct {`,
  1325  		`	SimpleNestedObject`,
  1326  		`	DeepNestedObjectAllOf1`,
  1327  		`func (m *DeepNestedObject) Validate(formats strfmt.Registry) error {`,
  1328  		`	if err := m.SimpleNestedObject.Validate(formats); err != nil {`,
  1329  		`	if err := m.DeepNestedObjectAllOf1.Validate(formats); err != nil {`,
  1330  		`		return errors.CompositeValidationError(res...`,
  1331  	},
  1332  		// not expected
  1333  		todo,
  1334  		// output in log
  1335  		noLines,
  1336  		noLines)
  1337  
  1338  	// load expectations for model: deep_nested_object.go
  1339  	expandRun.AddExpectations("deep_nested_object.go", []string{
  1340  		`type DeepNestedObject struct {`,
  1341  		`	DeepNestedObjectAllOf0`,
  1342  		`	DeepNestedObjectAllOf1`,
  1343  		`func (m *DeepNestedObject) UnmarshalJSON(raw []byte) error {`,
  1344  		`	var aO0 DeepNestedObjectAllOf0`,
  1345  		`	if err := swag.ReadJSON(raw, &aO0); err != nil {`,
  1346  		`	m.DeepNestedObjectAllOf0 = aO0`,
  1347  		`	var aO1 DeepNestedObjectAllOf1`,
  1348  		`	if err := swag.ReadJSON(raw, &aO1); err != nil {`,
  1349  		`	m.DeepNestedObjectAllOf1 = aO1`,
  1350  		`func (m DeepNestedObject) MarshalJSON() ([]byte, error) {`,
  1351  		`	_parts := make([][]byte, 0, 2`,
  1352  		`	aO0, err := swag.WriteJSON(m.DeepNestedObjectAllOf0`,
  1353  		`	if err != nil {`,
  1354  		`		return nil, err`,
  1355  		`	_parts = append(_parts, aO0`,
  1356  		`	aO1, err := swag.WriteJSON(m.DeepNestedObjectAllOf1`,
  1357  		`	if err != nil {`,
  1358  		`		return nil, err`,
  1359  		`	_parts = append(_parts, aO1`,
  1360  		`	return swag.ConcatJSON(_parts...), nil`,
  1361  		`func (m *DeepNestedObject) Validate(formats strfmt.Registry) error {`,
  1362  		`	if err := m.DeepNestedObjectAllOf0.Validate(formats); err != nil {`,
  1363  		`	if err := m.DeepNestedObjectAllOf1.Validate(formats); err != nil {`,
  1364  		`		return errors.CompositeValidationError(res...`,
  1365  		`func (m *DeepNestedObject) MarshalBinary() ([]byte, error) {`,
  1366  		`	if m == nil {`,
  1367  		`		return nil, nil`,
  1368  		`	return swag.WriteJSON(m`,
  1369  		`func (m *DeepNestedObject) UnmarshalBinary(b []byte) error {`,
  1370  		`	var res DeepNestedObject`,
  1371  		`	if err := swag.ReadJSON(b, &res); err != nil {`,
  1372  		`	*m = res`,
  1373  		`type DeepNestedObjectAllOf0 struct {`,
  1374  		`	DeepNestedObjectAllOf0AllOf0`,
  1375  		"	Prop3 strfmt.UUID `json:\"prop3,omitempty\"`",
  1376  		`func (m *DeepNestedObjectAllOf0) UnmarshalJSON(raw []byte) error {`,
  1377  		`	var aO0 DeepNestedObjectAllOf0AllOf0`,
  1378  		`	if err := swag.ReadJSON(raw, &aO0); err != nil {`,
  1379  		`	m.DeepNestedObjectAllOf0AllOf0 = aO0`,
  1380  		`	var dataAO1 struct {`,
  1381  		"		Prop3 strfmt.UUID `json:\"prop3,omitempty\"`",
  1382  		`	if err := swag.ReadJSON(raw, &dataAO1); err != nil {`,
  1383  		`	m.Prop3 = dataAO1.Prop3`,
  1384  		`func (m DeepNestedObjectAllOf0) MarshalJSON() ([]byte, error) {`,
  1385  		`	_parts := make([][]byte, 0, 2`,
  1386  		`	aO0, err := swag.WriteJSON(m.DeepNestedObjectAllOf0AllOf0`,
  1387  		`	if err != nil {`,
  1388  		`		return nil, err`,
  1389  		`	_parts = append(_parts, aO0`,
  1390  		`	var dataAO1 struct {`,
  1391  		"		Prop3 strfmt.UUID `json:\"prop3,omitempty\"`",
  1392  		`	dataAO1.Prop3 = m.Prop3`,
  1393  		`	jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1`,
  1394  		`	if errAO1 != nil {`,
  1395  		`		return nil, errAO1`,
  1396  		`	_parts = append(_parts, jsonDataAO1`,
  1397  		`	return swag.ConcatJSON(_parts...), nil`,
  1398  		`func (m *DeepNestedObjectAllOf0) Validate(formats strfmt.Registry) error {`,
  1399  		`	if err := m.DeepNestedObjectAllOf0AllOf0.Validate(formats); err != nil {`,
  1400  		`	if err := m.validateProp3(formats); err != nil {`,
  1401  		`		return errors.CompositeValidationError(res...`,
  1402  		`func (m *DeepNestedObjectAllOf0) validateProp3(formats strfmt.Registry) error {`,
  1403  		`	if swag.IsZero(m.Prop3) {`,
  1404  		`	if err := validate.FormatOf("prop3", "body", "uuid", m.Prop3.String(), formats); err != nil {`,
  1405  		`func (m *DeepNestedObjectAllOf0) MarshalBinary() ([]byte, error) {`,
  1406  		`	if m == nil {`,
  1407  		`		return nil, nil`,
  1408  		`	return swag.WriteJSON(m`,
  1409  		`func (m *DeepNestedObjectAllOf0) UnmarshalBinary(b []byte) error {`,
  1410  		`	var res DeepNestedObjectAllOf0`,
  1411  		`	if err := swag.ReadJSON(b, &res); err != nil {`,
  1412  		`	*m = res`,
  1413  		`type DeepNestedObjectAllOf0AllOf0 struct {`,
  1414  		"	Prop1 strfmt.UUID `json:\"prop1,omitempty\"`",
  1415  		"	Prop2 strfmt.UUID `json:\"prop2,omitempty\"`",
  1416  		`func (m *DeepNestedObjectAllOf0AllOf0) UnmarshalJSON(raw []byte) error {`,
  1417  		`	var dataAO0 struct {`,
  1418  		"		Prop1 strfmt.UUID `json:\"prop1,omitempty\"`",
  1419  		`	if err := swag.ReadJSON(raw, &dataAO0); err != nil {`,
  1420  		`	m.Prop1 = dataAO0.Prop1`,
  1421  		`	var dataAO1 struct {`,
  1422  		"		Prop2 strfmt.UUID `json:\"prop2,omitempty\"`",
  1423  		`	if err := swag.ReadJSON(raw, &dataAO1); err != nil {`,
  1424  		`	m.Prop2 = dataAO1.Prop2`,
  1425  		`func (m DeepNestedObjectAllOf0AllOf0) MarshalJSON() ([]byte, error) {`,
  1426  		`	_parts := make([][]byte, 0, 2`,
  1427  		`	var dataAO0 struct {`,
  1428  		"		Prop1 strfmt.UUID `json:\"prop1,omitempty\"`",
  1429  		`	dataAO0.Prop1 = m.Prop1`,
  1430  		`	jsonDataAO0, errAO0 := swag.WriteJSON(dataAO0`,
  1431  		`	if errAO0 != nil {`,
  1432  		`		return nil, errAO0`,
  1433  		`	_parts = append(_parts, jsonDataAO0`,
  1434  		`	var dataAO1 struct {`,
  1435  		"		Prop2 strfmt.UUID `json:\"prop2,omitempty\"`",
  1436  		`	dataAO1.Prop2 = m.Prop2`,
  1437  		`	jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1`,
  1438  		`	if errAO1 != nil {`,
  1439  		`		return nil, errAO1`,
  1440  		`	_parts = append(_parts, jsonDataAO1`,
  1441  		`	return swag.ConcatJSON(_parts...), nil`,
  1442  		`func (m *DeepNestedObjectAllOf0AllOf0) Validate(formats strfmt.Registry) error {`,
  1443  		`	if err := m.validateProp1(formats); err != nil {`,
  1444  		`	if err := m.validateProp2(formats); err != nil {`,
  1445  		`		return errors.CompositeValidationError(res...`,
  1446  		`func (m *DeepNestedObjectAllOf0AllOf0) validateProp1(formats strfmt.Registry) error {`,
  1447  		`	if swag.IsZero(m.Prop1) {`,
  1448  		`	if err := validate.FormatOf("prop1", "body", "uuid", m.Prop1.String(), formats); err != nil {`,
  1449  		`func (m *DeepNestedObjectAllOf0AllOf0) validateProp2(formats strfmt.Registry) error {`,
  1450  		`	if swag.IsZero(m.Prop2) {`,
  1451  		`	if err := validate.FormatOf("prop2", "body", "uuid", m.Prop2.String(), formats); err != nil {`,
  1452  		`func (m *DeepNestedObjectAllOf0AllOf0) MarshalBinary() ([]byte, error) {`,
  1453  		`	if m == nil {`,
  1454  		`		return nil, nil`,
  1455  		`	return swag.WriteJSON(m`,
  1456  		`func (m *DeepNestedObjectAllOf0AllOf0) UnmarshalBinary(b []byte) error {`,
  1457  		`	var res DeepNestedObjectAllOf0AllOf0`,
  1458  		`	if err := swag.ReadJSON(b, &res); err != nil {`,
  1459  		`	*m = res`,
  1460  		`type DeepNestedObjectAllOf1 struct {`,
  1461  		"	Prop4 strfmt.UUID `json:\"prop4,omitempty\"`",
  1462  		"	Prop5 strfmt.Date `json:\"prop5,omitempty\"`",
  1463  		`func (m *DeepNestedObjectAllOf1) UnmarshalJSON(raw []byte) error {`,
  1464  		`	var dataAO0 struct {`,
  1465  		"		Prop4 strfmt.UUID `json:\"prop4,omitempty\"`",
  1466  		`	if err := swag.ReadJSON(raw, &dataAO0); err != nil {`,
  1467  		`	m.Prop4 = dataAO0.Prop4`,
  1468  		`	var dataAO1 struct {`,
  1469  		"		Prop5 strfmt.Date `json:\"prop5,omitempty\"`",
  1470  		`	if err := swag.ReadJSON(raw, &dataAO1); err != nil {`,
  1471  		`	m.Prop5 = dataAO1.Prop5`,
  1472  		`func (m DeepNestedObjectAllOf1) MarshalJSON() ([]byte, error) {`,
  1473  		`	_parts := make([][]byte, 0, 2`,
  1474  		`	var dataAO0 struct {`,
  1475  		"		Prop4 strfmt.UUID `json:\"prop4,omitempty\"`",
  1476  		`	dataAO0.Prop4 = m.Prop4`,
  1477  		`	jsonDataAO0, errAO0 := swag.WriteJSON(dataAO0`,
  1478  		`	if errAO0 != nil {`,
  1479  		`		return nil, errAO0`,
  1480  		`	_parts = append(_parts, jsonDataAO0`,
  1481  		`	var dataAO1 struct {`,
  1482  		"		Prop5 strfmt.Date `json:\"prop5,omitempty\"`",
  1483  		`	dataAO1.Prop5 = m.Prop5`,
  1484  		`	jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1`,
  1485  		`	if errAO1 != nil {`,
  1486  		`		return nil, errAO1`,
  1487  		`	_parts = append(_parts, jsonDataAO1`,
  1488  		`	return swag.ConcatJSON(_parts...), nil`,
  1489  		`func (m *DeepNestedObjectAllOf1) Validate(formats strfmt.Registry) error {`,
  1490  		`	if err := m.validateProp4(formats); err != nil {`,
  1491  		`	if err := m.validateProp5(formats); err != nil {`,
  1492  		`		return errors.CompositeValidationError(res...`,
  1493  		`func (m *DeepNestedObjectAllOf1) validateProp4(formats strfmt.Registry) error {`,
  1494  		`	if swag.IsZero(m.Prop4) {`,
  1495  		`	if err := validate.FormatOf("prop4", "body", "uuid", m.Prop4.String(), formats); err != nil {`,
  1496  		`func (m *DeepNestedObjectAllOf1) validateProp5(formats strfmt.Registry) error {`,
  1497  		`	if swag.IsZero(m.Prop5) {`,
  1498  		`	if err := validate.FormatOf("prop5", "body", "date", m.Prop5.String(), formats); err != nil {`,
  1499  		`func (m *DeepNestedObjectAllOf1) MarshalBinary() ([]byte, error) {`,
  1500  		`	if m == nil {`,
  1501  		`		return nil, nil`,
  1502  		`	return swag.WriteJSON(m`,
  1503  		`func (m *DeepNestedObjectAllOf1) UnmarshalBinary(b []byte) error {`,
  1504  		`	var res DeepNestedObjectAllOf1`,
  1505  		`	if err := swag.ReadJSON(b, &res); err != nil {`,
  1506  		`	*m = res`,
  1507  	},
  1508  		// not expected
  1509  		noLines,
  1510  		// output in log
  1511  		noLines,
  1512  		noLines)
  1513  
  1514  	// load expectations for model: break_nested_object_all_of1.go
  1515  	flattenRun.AddExpectations("break_nested_object_all_of1.go", []string{
  1516  		`type BreakNestedObjectAllOf1 struct {`,
  1517  		"	Prop6 strfmt.UUID `json:\"prop6,omitempty\"`",
  1518  		"	Prop7 *BreakNestedObjectAllOf1Prop7 `json:\"prop7,omitempty\"`",
  1519  		`func (m *BreakNestedObjectAllOf1) Validate(formats strfmt.Registry) error {`,
  1520  		`	if err := m.validateProp6(formats); err != nil {`,
  1521  		`	if err := m.validateProp7(formats); err != nil {`,
  1522  		`		return errors.CompositeValidationError(res...`,
  1523  		`func (m *BreakNestedObjectAllOf1) validateProp6(formats strfmt.Registry) error {`,
  1524  		`	if swag.IsZero(m.Prop6) {`,
  1525  		`	if err := validate.FormatOf("prop6", "body", "uuid", m.Prop6.String(), formats); err != nil {`,
  1526  		`func (m *BreakNestedObjectAllOf1) validateProp7(formats strfmt.Registry) error {`,
  1527  		`	if swag.IsZero(m.Prop7) {`,
  1528  		`	if m.Prop7 != nil {`,
  1529  		`		if err := m.Prop7.Validate(formats); err != nil {`,
  1530  		`			if ve, ok := err.(*errors.Validation); ok {`,
  1531  		`				return ve.ValidateName("prop7"`,
  1532  	},
  1533  		// not expected
  1534  		todo,
  1535  		// output in log
  1536  		noLines,
  1537  		noLines)
  1538  
  1539  	// load expectations for model: not_really_composed_thing.go
  1540  	flattenRun.AddExpectations("not_really_composed_thing.go", []string{
  1541  		`type NotReallyComposedThing struct {`,
  1542  		`	NotReallyComposedThingAllOf0`,
  1543  		`func (m *NotReallyComposedThing) Validate(formats strfmt.Registry) error {`,
  1544  		`	if err := m.NotReallyComposedThingAllOf0.Validate(formats); err != nil {`,
  1545  		`		return errors.CompositeValidationError(res...`,
  1546  	},
  1547  		// not expected
  1548  		todo,
  1549  		// output in log
  1550  		noLines,
  1551  		noLines)
  1552  
  1553  	expandRun.AddExpectations("not_really_composed_thing.go", []string{
  1554  		`type NotReallyComposedThing struct {`,
  1555  		"	Prop0 strfmt.UUID `json:\"prop0,omitempty\"`",
  1556  		`func (m *NotReallyComposedThing) Validate(formats strfmt.Registry) error {`,
  1557  		`	if err := m.validateProp0(formats); err != nil {`,
  1558  		`		return errors.CompositeValidationError(res...`,
  1559  		`func (m *NotReallyComposedThing) validateProp0(formats strfmt.Registry) error {`,
  1560  		`	if swag.IsZero(m.Prop0) {`,
  1561  		`	if err := validate.FormatOf("prop0", "body", "uuid", m.Prop0.String(), formats); err != nil {`,
  1562  	},
  1563  		// not expected
  1564  		noLines,
  1565  		// output in log
  1566  		noLines,
  1567  		noLines)
  1568  
  1569  	// load expectations for model: simple_nested_object.go
  1570  	flattenRun.AddExpectations("simple_nested_object.go", []string{
  1571  		`type SimpleNestedObject struct {`,
  1572  		`	ComposedThing`,
  1573  		`	SimpleNestedObjectAllOf1`,
  1574  		`func (m *SimpleNestedObject) Validate(formats strfmt.Registry) error {`,
  1575  		`	if err := m.ComposedThing.Validate(formats); err != nil {`,
  1576  		`	if err := m.SimpleNestedObjectAllOf1.Validate(formats); err != nil {`,
  1577  		`		return errors.CompositeValidationError(res...`,
  1578  	},
  1579  		// not expected
  1580  		todo,
  1581  		// output in log
  1582  		noLines,
  1583  		noLines)
  1584  
  1585  	// load expectations for model: simple_nested_object.go
  1586  	expandRun.AddExpectations("simple_nested_object.go", []string{
  1587  		`type SimpleNestedObject struct {`,
  1588  		`	SimpleNestedObjectAllOf0`,
  1589  		"	Prop3 strfmt.UUID `json:\"prop3,omitempty\"`",
  1590  		`func (m *SimpleNestedObject) UnmarshalJSON(raw []byte) error {`,
  1591  		`	var aO0 SimpleNestedObjectAllOf0`,
  1592  		`	if err := swag.ReadJSON(raw, &aO0); err != nil {`,
  1593  		`	m.SimpleNestedObjectAllOf0 = aO0`,
  1594  		`	var dataAO1 struct {`,
  1595  		"		Prop3 strfmt.UUID `json:\"prop3,omitempty\"`",
  1596  		`	if err := swag.ReadJSON(raw, &dataAO1); err != nil {`,
  1597  		`	m.Prop3 = dataAO1.Prop3`,
  1598  		`func (m SimpleNestedObject) MarshalJSON() ([]byte, error) {`,
  1599  		`	_parts := make([][]byte, 0, 2`,
  1600  		`	aO0, err := swag.WriteJSON(m.SimpleNestedObjectAllOf0`,
  1601  		`	if err != nil {`,
  1602  		`		return nil, err`,
  1603  		`	_parts = append(_parts, aO0`,
  1604  		`	var dataAO1 struct {`,
  1605  		"		Prop3 strfmt.UUID `json:\"prop3,omitempty\"`",
  1606  		`	dataAO1.Prop3 = m.Prop3`,
  1607  		`	jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1`,
  1608  		`	if errAO1 != nil {`,
  1609  		`		return nil, errAO1`,
  1610  		`	_parts = append(_parts, jsonDataAO1`,
  1611  		`	return swag.ConcatJSON(_parts...), nil`,
  1612  		`func (m *SimpleNestedObject) Validate(formats strfmt.Registry) error {`,
  1613  		`	if err := m.SimpleNestedObjectAllOf0.Validate(formats); err != nil {`,
  1614  		`	if err := m.validateProp3(formats); err != nil {`,
  1615  		`		return errors.CompositeValidationError(res...`,
  1616  		`func (m *SimpleNestedObject) validateProp3(formats strfmt.Registry) error {`,
  1617  		`	if swag.IsZero(m.Prop3) {`,
  1618  		`	if err := validate.FormatOf("prop3", "body", "uuid", m.Prop3.String(), formats); err != nil {`,
  1619  		`func (m *SimpleNestedObject) MarshalBinary() ([]byte, error) {`,
  1620  		`	if m == nil {`,
  1621  		`		return nil, nil`,
  1622  		`	return swag.WriteJSON(m`,
  1623  		`func (m *SimpleNestedObject) UnmarshalBinary(b []byte) error {`,
  1624  		`	var res SimpleNestedObject`,
  1625  		`	if err := swag.ReadJSON(b, &res); err != nil {`,
  1626  		`	*m = res`,
  1627  		`type SimpleNestedObjectAllOf0 struct {`,
  1628  		"	Prop1 strfmt.UUID `json:\"prop1,omitempty\"`",
  1629  		"	Prop2 strfmt.UUID `json:\"prop2,omitempty\"`",
  1630  		`func (m *SimpleNestedObjectAllOf0) UnmarshalJSON(raw []byte) error {`,
  1631  		`	var dataAO0 struct {`,
  1632  		"		Prop1 strfmt.UUID `json:\"prop1,omitempty\"`",
  1633  		`	if err := swag.ReadJSON(raw, &dataAO0); err != nil {`,
  1634  		`	m.Prop1 = dataAO0.Prop1`,
  1635  		`	var dataAO1 struct {`,
  1636  		"		Prop2 strfmt.UUID `json:\"prop2,omitempty\"`",
  1637  		`	if err := swag.ReadJSON(raw, &dataAO1); err != nil {`,
  1638  		`	m.Prop2 = dataAO1.Prop2`,
  1639  		`func (m SimpleNestedObjectAllOf0) MarshalJSON() ([]byte, error) {`,
  1640  		`	_parts := make([][]byte, 0, 2`,
  1641  		`	var dataAO0 struct {`,
  1642  		"		Prop1 strfmt.UUID `json:\"prop1,omitempty\"`",
  1643  		`	dataAO0.Prop1 = m.Prop1`,
  1644  		`	jsonDataAO0, errAO0 := swag.WriteJSON(dataAO0`,
  1645  		`	if errAO0 != nil {`,
  1646  		`		return nil, errAO0`,
  1647  		`	_parts = append(_parts, jsonDataAO0`,
  1648  		`	var dataAO1 struct {`,
  1649  		"		Prop2 strfmt.UUID `json:\"prop2,omitempty\"`",
  1650  		`	dataAO1.Prop2 = m.Prop2`,
  1651  		`	jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1`,
  1652  		`	if errAO1 != nil {`,
  1653  		`		return nil, errAO1`,
  1654  		`	_parts = append(_parts, jsonDataAO1`,
  1655  		`	return swag.ConcatJSON(_parts...), nil`,
  1656  		`func (m *SimpleNestedObjectAllOf0) Validate(formats strfmt.Registry) error {`,
  1657  		`	if err := m.validateProp1(formats); err != nil {`,
  1658  		`	if err := m.validateProp2(formats); err != nil {`,
  1659  		`		return errors.CompositeValidationError(res...`,
  1660  		`func (m *SimpleNestedObjectAllOf0) validateProp1(formats strfmt.Registry) error {`,
  1661  		`	if swag.IsZero(m.Prop1) {`,
  1662  		`	if err := validate.FormatOf("prop1", "body", "uuid", m.Prop1.String(), formats); err != nil {`,
  1663  		`func (m *SimpleNestedObjectAllOf0) validateProp2(formats strfmt.Registry) error {`,
  1664  		`	if swag.IsZero(m.Prop2) {`,
  1665  		`	if err := validate.FormatOf("prop2", "body", "uuid", m.Prop2.String(), formats); err != nil {`,
  1666  		`func (m *SimpleNestedObjectAllOf0) MarshalBinary() ([]byte, error) {`,
  1667  		`	if m == nil {`,
  1668  		`		return nil, nil`,
  1669  		`	return swag.WriteJSON(m`,
  1670  		`func (m *SimpleNestedObjectAllOf0) UnmarshalBinary(b []byte) error {`,
  1671  		`	var res SimpleNestedObjectAllOf0`,
  1672  		`	if err := swag.ReadJSON(b, &res); err != nil {`,
  1673  		`	*m = res`,
  1674  	},
  1675  		// not expected
  1676  		noLines,
  1677  		// output in log
  1678  		noLines,
  1679  		noLines)
  1680  
  1681  	// load expectations for model: break_nested_object_all_of1_prop7_all_of0.go
  1682  	flattenRun.AddExpectations("break_nested_object_all_of1_prop7_all_of0.go", []string{
  1683  		`type BreakNestedObjectAllOf1Prop7AllOf0 struct {`,
  1684  		"	Prop8 int64 `json:\"prop8,omitempty\"`",
  1685  		`func (m *BreakNestedObjectAllOf1Prop7AllOf0) Validate(formats strfmt.Registry) error {`,
  1686  		`	if err := m.validateProp8(formats); err != nil {`,
  1687  		`		return errors.CompositeValidationError(res...`,
  1688  		`func (m *BreakNestedObjectAllOf1Prop7AllOf0) validateProp8(formats strfmt.Registry) error {`,
  1689  		`	if swag.IsZero(m.Prop8) {`,
  1690  		`	if err := validate.MinimumInt("prop8", "body", int64(m.Prop8), 12, false); err != nil {`,
  1691  	},
  1692  		// not expected
  1693  		todo,
  1694  		// output in log
  1695  		noLines,
  1696  		noLines)
  1697  
  1698  	// load expectations for model: deep_nested_object_all_of1_all_of0.go
  1699  	flattenRun.AddExpectations("deep_nested_object_all_of1_all_of0.go", []string{
  1700  		`type DeepNestedObjectAllOf1AllOf0 struct {`,
  1701  		"	Prop4 strfmt.UUID `json:\"prop4,omitempty\"`",
  1702  		`func (m *DeepNestedObjectAllOf1AllOf0) Validate(formats strfmt.Registry) error {`,
  1703  		`	if err := m.validateProp4(formats); err != nil {`,
  1704  		`		return errors.CompositeValidationError(res...`,
  1705  		`func (m *DeepNestedObjectAllOf1AllOf0) validateProp4(formats strfmt.Registry) error {`,
  1706  		`	if swag.IsZero(m.Prop4) {`,
  1707  		`	if err := validate.FormatOf("prop4", "body", "uuid", m.Prop4.String(), formats); err != nil {`,
  1708  	},
  1709  		// not expected
  1710  		todo,
  1711  		// output in log
  1712  		noLines,
  1713  		noLines)
  1714  
  1715  	// load expectations for model: break_nested_object_all_of1_prop7_all_of1.go
  1716  	flattenRun.AddExpectations("break_nested_object_all_of1_prop7_all_of1.go", []string{
  1717  		`type BreakNestedObjectAllOf1Prop7AllOf1 struct {`,
  1718  		"	Prop9 int64 `json:\"prop9,omitempty\"`",
  1719  		`func (m *BreakNestedObjectAllOf1Prop7AllOf1) Validate(formats strfmt.Registry) error {`,
  1720  		`	if err := m.validateProp9(formats); err != nil {`,
  1721  		`		return errors.CompositeValidationError(res...`,
  1722  		`func (m *BreakNestedObjectAllOf1Prop7AllOf1) validateProp9(formats strfmt.Registry) error {`,
  1723  		`	if swag.IsZero(m.Prop9) {`,
  1724  		`	if err := validate.MaximumInt("prop9", "body", int64(m.Prop9), 12, false); err != nil {`,
  1725  	},
  1726  		// not expected
  1727  		todo,
  1728  		// output in log
  1729  		noLines,
  1730  		noLines)
  1731  
  1732  	// load expectations for model: composed_thing_all_of0.go
  1733  	flattenRun.AddExpectations("composed_thing_all_of0.go", []string{
  1734  		`type ComposedThingAllOf0 struct {`,
  1735  		"	Prop1 strfmt.UUID `json:\"prop1,omitempty\"`",
  1736  		`func (m *ComposedThingAllOf0) Validate(formats strfmt.Registry) error {`,
  1737  		`	if err := m.validateProp1(formats); err != nil {`,
  1738  		`		return errors.CompositeValidationError(res...`,
  1739  		`func (m *ComposedThingAllOf0) validateProp1(formats strfmt.Registry) error {`,
  1740  		`	if swag.IsZero(m.Prop1) {`,
  1741  		`	if err := validate.FormatOf("prop1", "body", "uuid", m.Prop1.String(), formats); err != nil {`,
  1742  	},
  1743  		// not expected
  1744  		todo,
  1745  		// output in log
  1746  		noLines,
  1747  		noLines)
  1748  
  1749  	// load expectations for model: composed_thing_all_of1.go
  1750  	flattenRun.AddExpectations("composed_thing_all_of1.go", []string{
  1751  		`type ComposedThingAllOf1 struct {`,
  1752  		"	Prop2 strfmt.UUID `json:\"prop2,omitempty\"`",
  1753  		`func (m *ComposedThingAllOf1) Validate(formats strfmt.Registry) error {`,
  1754  		`	if err := m.validateProp2(formats); err != nil {`,
  1755  		`		return errors.CompositeValidationError(res...`,
  1756  		`func (m *ComposedThingAllOf1) validateProp2(formats strfmt.Registry) error {`,
  1757  		`	if swag.IsZero(m.Prop2) {`,
  1758  		`	if err := validate.FormatOf("prop2", "body", "uuid", m.Prop2.String(), formats); err != nil {`,
  1759  	},
  1760  		// not expected
  1761  		todo,
  1762  		// output in log
  1763  		noLines,
  1764  		noLines)
  1765  
  1766  	// load expectations for model: deep_nested_object_all_of1.go
  1767  	flattenRun.AddExpectations("deep_nested_object_all_of1.go", []string{
  1768  		`type DeepNestedObjectAllOf1 struct {`,
  1769  		`	DeepNestedObjectAllOf1AllOf0`,
  1770  		`	DeepNestedObjectAllOf1AllOf1`,
  1771  		`func (m *DeepNestedObjectAllOf1) Validate(formats strfmt.Registry) error {`,
  1772  		`	if err := m.DeepNestedObjectAllOf1AllOf0.Validate(formats); err != nil {`,
  1773  		`	if err := m.DeepNestedObjectAllOf1AllOf1.Validate(formats); err != nil {`,
  1774  		`		return errors.CompositeValidationError(res...`,
  1775  	},
  1776  		// not expected
  1777  		todo,
  1778  		// output in log
  1779  		noLines,
  1780  		noLines)
  1781  
  1782  }
  1783  
  1784  func initFixtureComplexAllOf() {
  1785  	// testing ../fixtures/bugs/1487/fixture-complex-allOf.yaml with flatten and expand (--skip-flatten)
  1786  
  1787  	/*
  1788  	 */
  1789  	f := newModelFixture("../fixtures/bugs/1487/fixture-complex-allOf.yaml", "fixture for nested allOf with ref")
  1790  	flattenRun := f.AddRun(false)
  1791  	expandRun := f.AddRun(true)
  1792  
  1793  	// load expectations for model: aliased_date.go
  1794  	flattenRun.AddExpectations("aliased_date.go", []string{
  1795  		`type AliasedDate strfmt.Date`,
  1796  		`func (m AliasedDate) Validate(formats strfmt.Registry) error {`,
  1797  		`	if err := validate.FormatOf("", "body", "date", strfmt.Date(m).String(), formats); err != nil {`,
  1798  		`		return errors.CompositeValidationError(res...`,
  1799  	},
  1800  		// not expected
  1801  		todo,
  1802  		// output in log
  1803  		noLines,
  1804  		noLines)
  1805  
  1806  	expandRun.AddExpectations("aliased_date.go", flattenRun.ExpectedFor("AliasedDate").ExpectedLines, todo, noLines, noLines)
  1807  
  1808  	// load expectations for model: object_mix_all_of2.go
  1809  	flattenRun.AddExpectations("object_mix_all_of2.go", []string{
  1810  		`type ObjectMixAllOf2 struct {`,
  1811  		"	Prop2 *ObjectMixAllOf2Prop2 `json:\"prop2,omitempty\"`",
  1812  		`func (m *ObjectMixAllOf2) Validate(formats strfmt.Registry) error {`,
  1813  		`	if err := m.validateProp2(formats); err != nil {`,
  1814  		`		return errors.CompositeValidationError(res...`,
  1815  		`func (m *ObjectMixAllOf2) validateProp2(formats strfmt.Registry) error {`,
  1816  		`	if swag.IsZero(m.Prop2) {`,
  1817  		`	if m.Prop2 != nil {`,
  1818  		`		if err := m.Prop2.Validate(formats); err != nil {`,
  1819  		`			if ve, ok := err.(*errors.Validation); ok {`,
  1820  		`				return ve.ValidateName("prop2"`,
  1821  	},
  1822  		// not expected
  1823  		todo,
  1824  		// output in log
  1825  		noLines,
  1826  		noLines)
  1827  
  1828  	// load expectations for model: object_mix.go
  1829  	flattenRun.AddExpectations("object_mix.go", []string{
  1830  		`type ObjectMix struct {`,
  1831  		`	ObjectMixAllOf1`,
  1832  		`	ObjectMixAllOf2`,
  1833  		`func (m *ObjectMix) Validate(formats strfmt.Registry) error {`,
  1834  		`	if err := m.ObjectMixAllOf1.Validate(formats); err != nil {`,
  1835  		`	if err := m.ObjectMixAllOf2.Validate(formats); err != nil {`,
  1836  		`		return errors.CompositeValidationError(res...`,
  1837  	},
  1838  		// not expected
  1839  		todo,
  1840  		// output in log
  1841  		noLines,
  1842  		noLines)
  1843  
  1844  	expandRun.AddExpectations("object_mix.go", []string{
  1845  		`type ObjectMix struct {`,
  1846  		`	Prop1 struct {`,
  1847  		`		ObjectMixProp1AllOf0`,
  1848  		`		ObjectMixProp1AllOf1`,
  1849  		"	} `json:\"prop1,omitempty\"`",
  1850  		`	Prop2 struct {`,
  1851  		`		ObjectMixProp2AllOf0`,
  1852  		`		ObjectMixProp2AllOf1`,
  1853  		"	} `json:\"prop2,omitempty\"`",
  1854  		`func (m *ObjectMix) Validate(formats strfmt.Registry) error {`,
  1855  		`	if err := m.validateProp1(formats); err != nil {`,
  1856  		`	if err := m.validateProp2(formats); err != nil {`,
  1857  		`		return errors.CompositeValidationError(res...`,
  1858  		`func (m *ObjectMix) validateProp1(formats strfmt.Registry) error {`,
  1859  		`	if swag.IsZero(m.Prop1) {`,
  1860  		`func (m *ObjectMix) validateProp2(formats strfmt.Registry) error {`,
  1861  		`	if swag.IsZero(m.Prop2) {`,
  1862  		`type ObjectMixProp1AllOf0 strfmt.Date`,
  1863  		`func (m ObjectMixProp1AllOf0) Validate(formats strfmt.Registry) error {`,
  1864  		`	if err := validate.FormatOf("", "body", "date", strfmt.Date(m).String(), formats); err != nil {`,
  1865  		`		return errors.CompositeValidationError(res...`,
  1866  		`type ObjectMixProp1AllOf1 strfmt.Date`,
  1867  		`func (m ObjectMixProp1AllOf1) Validate(formats strfmt.Registry) error {`,
  1868  		`	if err := validate.FormatOf("", "body", "date", strfmt.Date(m).String(), formats); err != nil {`,
  1869  		`		return errors.CompositeValidationError(res...`,
  1870  		`type ObjectMixProp2AllOf0 strfmt.Date`,
  1871  		`func (m ObjectMixProp2AllOf0) Validate(formats strfmt.Registry) error {`,
  1872  		`	if err := validate.FormatOf("", "body", "date", strfmt.Date(m).String(), formats); err != nil {`,
  1873  		`		return errors.CompositeValidationError(res...`,
  1874  		`type ObjectMixProp2AllOf1 strfmt.Date`,
  1875  		`func (m ObjectMixProp2AllOf1) Validate(formats strfmt.Registry) error {`,
  1876  		`	if err := validate.FormatOf("", "body", "date", strfmt.Date(m).String(), formats); err != nil {`,
  1877  		`		return errors.CompositeValidationError(res...`,
  1878  	},
  1879  		// not expected
  1880  		noLines,
  1881  		// output in log
  1882  		noLines,
  1883  		noLines)
  1884  
  1885  	// load expectations for model: all_of_slices_of_aliases.go
  1886  	flattenRun.AddExpectations("all_of_slices_of_aliases.go", []string{
  1887  		`type AllOfSlicesOfAliases struct {`,
  1888  		`	AllOfSlicesOfAliasesAllOf0`,
  1889  		`	AllOfSlicesOfAliasesAllOf1`,
  1890  		`func (m *AllOfSlicesOfAliases) Validate(formats strfmt.Registry) error {`,
  1891  		`	if err := m.AllOfSlicesOfAliasesAllOf0.Validate(formats); err != nil {`,
  1892  		`	if err := m.AllOfSlicesOfAliasesAllOf1.Validate(formats); err != nil {`,
  1893  		`		return errors.CompositeValidationError(res...`,
  1894  	},
  1895  		// not expected
  1896  		todo,
  1897  		// output in log
  1898  		noLines,
  1899  		noLines)
  1900  
  1901  	expandRun.AddExpectations("all_of_slices_of_aliases.go", []string{
  1902  		`type AllOfSlicesOfAliases struct {`,
  1903  		"	Prop1 []strfmt.Date `json:\"prop1\"`",
  1904  		"	Prop2 []*strfmt.Date `json:\"prop2\"`",
  1905  		`func (m *AllOfSlicesOfAliases) Validate(formats strfmt.Registry) error {`,
  1906  		`	if err := m.validateProp1(formats); err != nil {`,
  1907  		`	if err := m.validateProp2(formats); err != nil {`,
  1908  		`		return errors.CompositeValidationError(res...`,
  1909  		`func (m *AllOfSlicesOfAliases) validateProp1(formats strfmt.Registry) error {`,
  1910  		`	if swag.IsZero(m.Prop1) {`,
  1911  		`	iProp1Size := int64(len(m.Prop1)`,
  1912  		`	if err := validate.MaxItems("prop1", "body", iProp1Size, 10); err != nil {`,
  1913  		`	for i := 0; i < len(m.Prop1); i++ {`,
  1914  		`		if err := validate.FormatOf("prop1"+"."+strconv.Itoa(i), "body", "date", m.Prop1[i].String(), formats); err != nil {`,
  1915  		`func (m *AllOfSlicesOfAliases) validateProp2(formats strfmt.Registry) error {`,
  1916  		`	if swag.IsZero(m.Prop2) {`,
  1917  		`	iProp2Size := int64(len(m.Prop2)`,
  1918  		`	if err := validate.MaxItems("prop2", "body", iProp2Size, 20); err != nil {`,
  1919  		`	for i := 0; i < len(m.Prop2); i++ {`,
  1920  		// do we need Required when item is nullable?
  1921  		// nullable not required:
  1922  		`		if swag.IsZero(m.Prop2[i]) {`,
  1923  		// nullable required:
  1924  		//`	if err := validate.Required("prop2"+"."+strconv.Itoa(i), "body", m.Prop2[i]); err != nil`,
  1925  		`		if err := validate.FormatOf("prop2"+"."+strconv.Itoa(i), "body", "date", m.Prop2[i].String(), formats); err != nil {`,
  1926  	},
  1927  		// not expected
  1928  		noLines,
  1929  		// output in log
  1930  		noLines,
  1931  		noLines)
  1932  
  1933  	// load expectations for model: all_of_aliases.go
  1934  	flattenRun.AddExpectations("all_of_aliases.go", []string{
  1935  		`type AllOfAliases struct {`,
  1936  		`	AliasedDate`,
  1937  		`	AliasedNullableDate`,
  1938  		`func (m *AllOfAliases) Validate(formats strfmt.Registry) error {`,
  1939  		`	if err := m.AliasedDate.Validate(formats); err != nil {`,
  1940  		`	if err := m.AliasedNullableDate.Validate(formats); err != nil {`,
  1941  		`		return errors.CompositeValidationError(res...`,
  1942  	},
  1943  		// not expected
  1944  		todo,
  1945  		// output in log
  1946  		noLines,
  1947  		noLines)
  1948  
  1949  	expandRun.AddExpectations("all_of_aliases.go", []string{
  1950  		`type AllOfAliases struct {`,
  1951  		`	AllOfAliasesAllOf0`,
  1952  		`	AllOfAliasesAllOf1`,
  1953  		`func (m *AllOfAliases) Validate(formats strfmt.Registry) error {`,
  1954  		`	if err := m.AllOfAliasesAllOf0.Validate(formats); err != nil {`,
  1955  		`	if err := m.AllOfAliasesAllOf1.Validate(formats); err != nil {`,
  1956  		`		return errors.CompositeValidationError(res...`,
  1957  		`type AllOfAliasesAllOf0 strfmt.Date`,
  1958  		`func (m AllOfAliasesAllOf0) Validate(formats strfmt.Registry) error {`,
  1959  		`	if err := validate.FormatOf("", "body", "date", strfmt.Date(m).String(), formats); err != nil {`,
  1960  		`		return errors.CompositeValidationError(res...`,
  1961  		// NOTE: the x-nullable has not been honored here
  1962  		// so we don't have: `type AllOfAliasesAllOf1 *strfmt.Date`,
  1963  		// this is by design, since nullability is honored by the container of the alias, not the
  1964  		// alias itself. An allOf branch container is composing types, not pointers.
  1965  		`type AllOfAliasesAllOf1 strfmt.Date`,
  1966  		`func (m AllOfAliasesAllOf1) Validate(formats strfmt.Registry) error {`,
  1967  		`	if err := validate.FormatOf("", "body", "date", strfmt.Date(m).String(), formats); err != nil {`,
  1968  		`		return errors.CompositeValidationError(res...`,
  1969  	},
  1970  		// not expected
  1971  		noLines,
  1972  		// output in log
  1973  		noLines,
  1974  		noLines)
  1975  
  1976  	// load expectations for model: object_mix_all_of1.go
  1977  	flattenRun.AddExpectations("object_mix_all_of1.go", []string{
  1978  		`type ObjectMixAllOf1 struct {`,
  1979  		"	Prop1 *ObjectMixAllOf1Prop1 `json:\"prop1,omitempty\"`",
  1980  		`func (m *ObjectMixAllOf1) Validate(formats strfmt.Registry) error {`,
  1981  		`	if err := m.validateProp1(formats); err != nil {`,
  1982  		`		return errors.CompositeValidationError(res...`,
  1983  		`func (m *ObjectMixAllOf1) validateProp1(formats strfmt.Registry) error {`,
  1984  		`	if swag.IsZero(m.Prop1) {`,
  1985  		`	if m.Prop1 != nil {`,
  1986  		`		if err := m.Prop1.Validate(formats); err != nil {`,
  1987  		`			if ve, ok := err.(*errors.Validation); ok {`,
  1988  		`				return ve.ValidateName("prop1"`,
  1989  	},
  1990  		// not expected
  1991  		todo,
  1992  		// output in log
  1993  		noLines,
  1994  		noLines)
  1995  
  1996  	// load expectations for model: all_of_slices_of_aliases_all_of0.go
  1997  	flattenRun.AddExpectations("all_of_slices_of_aliases_all_of0.go", []string{
  1998  		`type AllOfSlicesOfAliasesAllOf0 struct {`,
  1999  		"	Prop1 []AliasedDate `json:\"prop1\"`",
  2000  		`func (m *AllOfSlicesOfAliasesAllOf0) Validate(formats strfmt.Registry) error {`,
  2001  		`	if err := m.validateProp1(formats); err != nil {`,
  2002  		`		return errors.CompositeValidationError(res...`,
  2003  		`func (m *AllOfSlicesOfAliasesAllOf0) validateProp1(formats strfmt.Registry) error {`,
  2004  		`	if swag.IsZero(m.Prop1) {`,
  2005  		`	iProp1Size := int64(len(m.Prop1)`,
  2006  		`	if err := validate.MaxItems("prop1", "body", iProp1Size, 10); err != nil {`,
  2007  		`	for i := 0; i < len(m.Prop1); i++ {`,
  2008  		`		if err := m.Prop1[i].Validate(formats); err != nil {`,
  2009  		`			if ve, ok := err.(*errors.Validation); ok {`,
  2010  		`				return ve.ValidateName("prop1" + "." + strconv.Itoa(i)`,
  2011  	},
  2012  		// not expected
  2013  		todo,
  2014  		// output in log
  2015  		noLines,
  2016  		noLines)
  2017  
  2018  	// load expectations for model: slice_of_all_of.go
  2019  	flattenRun.AddExpectations("slice_of_all_of.go", []string{
  2020  		`type SliceOfAllOf []*SliceOfAllOfItems`,
  2021  		`func (m SliceOfAllOf) Validate(formats strfmt.Registry) error {`,
  2022  		`	if err := validate.UniqueItems("", "body", m); err != nil {`,
  2023  		`	for i := 0; i < len(m); i++ {`,
  2024  		// do we need Required when item is nullable?
  2025  		// nullable not required:
  2026  		`		if swag.IsZero(m[i]) {`,
  2027  		// nullable required:
  2028  		//`if err := validate.Required(strconv.Itoa(i), "body", m[i]); err != nil {`,
  2029  		`		if m[i] != nil {`,
  2030  		`			if err := m[i].Validate(formats); err != nil {`,
  2031  		`				if ve, ok := err.(*errors.Validation); ok {`,
  2032  		`					return ve.ValidateName(strconv.Itoa(i)`,
  2033  		`		return errors.CompositeValidationError(res...`,
  2034  	},
  2035  		// not expected
  2036  		todo,
  2037  		// output in log
  2038  		noLines,
  2039  		noLines)
  2040  
  2041  	expandRun.AddExpectations("slice_of_all_of.go", []string{
  2042  		`type SliceOfAllOf []*SliceOfAllOfItems0`,
  2043  		`func (m SliceOfAllOf) Validate(formats strfmt.Registry) error {`,
  2044  		`	if err := validate.UniqueItems("", "body", m); err != nil {`,
  2045  		`	for i := 0; i < len(m); i++ {`,
  2046  		// do we need Required when item is nullable?
  2047  		// nullable not required:
  2048  		`		if swag.IsZero(m[i]) {`,
  2049  		// nullable required:
  2050  		//`if err := validate.Required(strconv.Itoa(i), "body", m[i]); err != nil {`,
  2051  		`		if m[i] != nil {`,
  2052  		`			if err := m[i].Validate(formats); err != nil {`,
  2053  		`				if ve, ok := err.(*errors.Validation); ok {`,
  2054  		`					return ve.ValidateName(strconv.Itoa(i)`,
  2055  		`		return errors.CompositeValidationError(res...`,
  2056  		`type SliceOfAllOfItems0 struct {`,
  2057  		"	Prop0 strfmt.UUID `json:\"prop0,omitempty\"`",
  2058  		`	SliceOfAllOfItems0AllOf1`,
  2059  		`func (m *SliceOfAllOfItems0) Validate(formats strfmt.Registry) error {`,
  2060  		`	if err := m.validateProp0(formats); err != nil {`,
  2061  		`		return errors.CompositeValidationError(res...`,
  2062  		`func (m *SliceOfAllOfItems0) validateProp0(formats strfmt.Registry) error {`,
  2063  		`	if swag.IsZero(m.Prop0) {`,
  2064  		`	if err := validate.FormatOf("prop0", "body", "uuid", m.Prop0.String(), formats); err != nil {`,
  2065  		`type SliceOfAllOfItems0AllOf1 []interface{`,
  2066  		// empty validation
  2067  		"func (m SliceOfAllOfItems0AllOf1) Validate(formats strfmt.Registry) error {\n	return nil\n}",
  2068  	},
  2069  		// not expected
  2070  		noLines,
  2071  		// output in log
  2072  		noLines,
  2073  		noLines)
  2074  
  2075  	// load expectations for model: object_mix_all_of2_prop2.go
  2076  	flattenRun.AddExpectations("object_mix_all_of2_prop2.go", []string{
  2077  		`type ObjectMixAllOf2Prop2 struct {`,
  2078  		`	AliasedDate`,
  2079  		`	AliasedNullableDate`,
  2080  		`func (m *ObjectMixAllOf2Prop2) Validate(formats strfmt.Registry) error {`,
  2081  		`	if err := m.AliasedDate.Validate(formats); err != nil {`,
  2082  		`	if err := m.AliasedNullableDate.Validate(formats); err != nil {`,
  2083  		`		return errors.CompositeValidationError(res...`,
  2084  	},
  2085  		// not expected
  2086  		todo,
  2087  		// output in log
  2088  		noLines,
  2089  		noLines)
  2090  
  2091  	// load expectations for model: slice_of_all_of_items_all_of0.go
  2092  	flattenRun.AddExpectations("slice_of_all_of_items_all_of0.go", []string{
  2093  		`type SliceOfAllOfItemsAllOf0 struct {`,
  2094  		"	Prop0 strfmt.UUID `json:\"prop0,omitempty\"`",
  2095  		`func (m *SliceOfAllOfItemsAllOf0) Validate(formats strfmt.Registry) error {`,
  2096  		`	if err := m.validateProp0(formats); err != nil {`,
  2097  		`		return errors.CompositeValidationError(res...`,
  2098  		`func (m *SliceOfAllOfItemsAllOf0) validateProp0(formats strfmt.Registry) error {`,
  2099  		`	if swag.IsZero(m.Prop0) {`,
  2100  		`	if err := validate.FormatOf("prop0", "body", "uuid", m.Prop0.String(), formats); err != nil {`,
  2101  	},
  2102  		// not expected
  2103  		todo,
  2104  		// output in log
  2105  		noLines,
  2106  		noLines)
  2107  
  2108  	// load expectations for model: slice_of_interfaces.go
  2109  	flattenRun.AddExpectations("slice_of_interfaces.go", []string{
  2110  		`type SliceOfInterfaces []interface{`,
  2111  		// empty validation
  2112  		"func (m SliceOfInterfaces) Validate(formats strfmt.Registry) error {\n	return nil\n}",
  2113  	},
  2114  		// not expected
  2115  		todo,
  2116  		// output in log
  2117  		noLines,
  2118  		noLines)
  2119  
  2120  	expandRun.AddExpectations("slice_of_interfaces.go", flattenRun.ExpectedFor("SliceOfInterfaces").ExpectedLines, todo, noLines, noLines)
  2121  
  2122  	// load expectations for model: slice_of_interfaces_with_validation.go
  2123  	flattenRun.AddExpectations("slice_of_interfaces_with_validation.go", []string{
  2124  		`type SliceOfInterfacesWithValidation []interface{`,
  2125  		`func (m SliceOfInterfacesWithValidation) Validate(formats strfmt.Registry) error {`,
  2126  		`	iSliceOfInterfacesWithValidationSize := int64(len(m)`,
  2127  		`	if err := validate.MaxItems("", "body", iSliceOfInterfacesWithValidationSize, 10); err != nil {`,
  2128  		`		return errors.CompositeValidationError(res...`,
  2129  	},
  2130  		// not expected
  2131  		todo,
  2132  		// output in log
  2133  		noLines,
  2134  		noLines)
  2135  
  2136  	expandRun.AddExpectations("slice_of_interfaces_with_validation.go", flattenRun.ExpectedFor("SliceOfInterfacesWithValidation").ExpectedLines, todo, noLines, noLines)
  2137  
  2138  	// load expectations for model: aliased_nullable_date.go
  2139  	flattenRun.AddExpectations("aliased_nullable_date.go", []string{
  2140  		`type AliasedNullableDate strfmt.Date`,
  2141  		`func (m AliasedNullableDate) Validate(formats strfmt.Registry) error {`,
  2142  		`	if err := validate.FormatOf("", "body", "date", strfmt.Date(m).String(), formats); err != nil {`,
  2143  		`		return errors.CompositeValidationError(res...`,
  2144  	},
  2145  		// not expected
  2146  		todo,
  2147  		// output in log
  2148  		noLines,
  2149  		noLines)
  2150  
  2151  	expandRun.AddExpectations("aliased_nullable_date.go", flattenRun.ExpectedFor("AliasedNullableDate").ExpectedLines, todo, noLines, noLines)
  2152  
  2153  	// load expectations for model: slice_mix.go
  2154  	flattenRun.AddExpectations("slice_mix.go", []string{
  2155  		`type SliceMix struct {`,
  2156  		`	SliceOfAllOf`,
  2157  		`	SliceOfInterfaces`,
  2158  		`func (m *SliceMix) Validate(formats strfmt.Registry) error {`,
  2159  		`	if err := m.SliceOfAllOf.Validate(formats); err != nil {`,
  2160  		`	if err := m.SliceOfInterfaces.Validate(formats); err != nil {`,
  2161  		`		return errors.CompositeValidationError(res...`,
  2162  	},
  2163  		// not expected
  2164  		todo,
  2165  		// output in log
  2166  		warning,
  2167  		noLines)
  2168  
  2169  	expandRun.AddExpectations("slice_mix.go", []string{
  2170  		`type SliceMix struct {`,
  2171  		`	SliceMixAllOf0`,
  2172  		`	SliceMixAllOf1`,
  2173  		`func (m *SliceMix) Validate(formats strfmt.Registry) error {`,
  2174  		`	if err := m.SliceMixAllOf0.Validate(formats); err != nil {`,
  2175  		`		return errors.CompositeValidationError(res...`,
  2176  		`type SliceMixAllOf0 []*SliceMixAllOf0Items0`,
  2177  		`func (m SliceMixAllOf0) Validate(formats strfmt.Registry) error {`,
  2178  		`	if err := validate.UniqueItems("", "body", m); err != nil {`,
  2179  		`	for i := 0; i < len(m); i++ {`,
  2180  		// do we need Required when item is nullable?
  2181  		// nullable not required:
  2182  		`		if swag.IsZero(m[i]) {`,
  2183  		// nullable required:
  2184  		//`if err := validate.Required(strconv.Itoa(i), "body", m[i]); err != nil {`,
  2185  		`		if m[i] != nil {`,
  2186  		`			if err := m[i].Validate(formats); err != nil {`,
  2187  		`				if ve, ok := err.(*errors.Validation); ok {`,
  2188  		`					return ve.ValidateName(strconv.Itoa(i)`,
  2189  		`		return errors.CompositeValidationError(res...`,
  2190  		`type SliceMixAllOf0Items0 struct {`,
  2191  		"	Prop0 strfmt.UUID `json:\"prop0,omitempty\"`",
  2192  		`	SliceMixAllOf0Items0AllOf1`,
  2193  		`func (m *SliceMixAllOf0Items0) Validate(formats strfmt.Registry) error {`,
  2194  		`	if err := m.validateProp0(formats); err != nil {`,
  2195  		`		return errors.CompositeValidationError(res...`,
  2196  		`func (m *SliceMixAllOf0Items0) validateProp0(formats strfmt.Registry) error {`,
  2197  		`	if swag.IsZero(m.Prop0) {`,
  2198  		`	if err := validate.FormatOf("prop0", "body", "uuid", m.Prop0.String(), formats); err != nil {`,
  2199  		`type SliceMixAllOf0Items0AllOf1 []interface{`,
  2200  		`type SliceMixAllOf1 []interface{`,
  2201  		// empty validation
  2202  		"func (m SliceMixAllOf0Items0AllOf1) Validate(formats strfmt.Registry) error {\n	return nil\n}",
  2203  	},
  2204  		// not expected
  2205  		noLines,
  2206  		// output in log
  2207  		noLines,
  2208  		noLines)
  2209  
  2210  	// load expectations for model: object_mix_all_of1_prop1.go
  2211  	flattenRun.AddExpectations("object_mix_all_of1_prop1.go", []string{
  2212  		`type ObjectMixAllOf1Prop1 struct {`,
  2213  		`	AliasedDate`,
  2214  		`	AliasedNullableDate`,
  2215  		`func (m *ObjectMixAllOf1Prop1) Validate(formats strfmt.Registry) error {`,
  2216  		`	if err := m.AliasedDate.Validate(formats); err != nil {`,
  2217  		`	if err := m.AliasedNullableDate.Validate(formats); err != nil {`,
  2218  		`		return errors.CompositeValidationError(res...`,
  2219  	},
  2220  		// not expected
  2221  		todo,
  2222  		// output in log
  2223  		noLines,
  2224  		noLines)
  2225  
  2226  	// load expectations for model: slice_of_all_of_items.go
  2227  	flattenRun.AddExpectations("slice_of_all_of_items.go", []string{
  2228  		`type SliceOfAllOfItems struct {`,
  2229  		`	SliceOfAllOfItemsAllOf0`,
  2230  		`	SliceOfInterfaces`,
  2231  		`func (m *SliceOfAllOfItems) Validate(formats strfmt.Registry) error {`,
  2232  		`	if err := m.SliceOfAllOfItemsAllOf0.Validate(formats); err != nil {`,
  2233  		`	if err := m.SliceOfInterfaces.Validate(formats); err != nil {`,
  2234  		`		return errors.CompositeValidationError(res...`,
  2235  	},
  2236  		// not expected
  2237  		todo,
  2238  		// output in log
  2239  		noLines,
  2240  		noLines)
  2241  
  2242  	// load expectations for model: all_of_slices_of_aliases_all_of1.go
  2243  	flattenRun.AddExpectations("all_of_slices_of_aliases_all_of1.go", []string{
  2244  		`type AllOfSlicesOfAliasesAllOf1 struct {`,
  2245  		"	Prop2 []*AliasedNullableDate `json:\"prop2\"`",
  2246  		`func (m *AllOfSlicesOfAliasesAllOf1) Validate(formats strfmt.Registry) error {`,
  2247  		`	if err := m.validateProp2(formats); err != nil {`,
  2248  		`		return errors.CompositeValidationError(res...`,
  2249  		`func (m *AllOfSlicesOfAliasesAllOf1) validateProp2(formats strfmt.Registry) error {`,
  2250  		`	if swag.IsZero(m.Prop2) {`,
  2251  		`	iProp2Size := int64(len(m.Prop2)`,
  2252  		`	if err := validate.MaxItems("prop2", "body", iProp2Size, 20); err != nil {`,
  2253  		`	for i := 0; i < len(m.Prop2); i++ {`,
  2254  		// do we need Required when item is nullable?
  2255  		// nullable not required:
  2256  		`		if swag.IsZero(m.Prop2[i]) {`,
  2257  		// nullable required:
  2258  		//`if err := validate.Required("prop2"+"."+strconv.Itoa(i), "body", m.Prop2[i]); err != nil {`,
  2259  		`		if m.Prop2[i] != nil {`,
  2260  		`			if err := m.Prop2[i].Validate(formats); err != nil {`,
  2261  		`				if ve, ok := err.(*errors.Validation); ok {`,
  2262  		`					return ve.ValidateName("prop2" + "." + strconv.Itoa(i)`,
  2263  	},
  2264  		// not expected
  2265  		todo,
  2266  		// output in log
  2267  		noLines,
  2268  		noLines)
  2269  
  2270  }
  2271  
  2272  func initFixtureIsNullable() {
  2273  	// testing ../fixtures/bugs/1487/fixture-is-nullable.yaml with flatten and expand (--skip-flatten)
  2274  
  2275  	/* just an elementary check with the x-nullable tag
  2276  	 */
  2277  	f := newModelFixture("../fixtures/bugs/1487/fixture-is-nullable.yaml", "fixture for x-nullable flag")
  2278  	flattenRun := f.AddRun(false)
  2279  	expandRun := f.AddRun(true)
  2280  
  2281  	// load expectations for model: thing_with_nullable_dates.go
  2282  	flattenRun.AddExpectations("thing_with_nullable_dates.go", []string{
  2283  		`type ThingWithNullableDates struct {`,
  2284  		"	Prop1 strfmt.Date `json:\"prop1,omitempty\"`",
  2285  		"	Prop2 *strfmt.Date `json:\"prop2,omitempty\"`",
  2286  		`func (m *ThingWithNullableDates) Validate(formats strfmt.Registry) error {`,
  2287  		`	if err := m.validateProp1(formats); err != nil {`,
  2288  		`	if err := m.validateProp2(formats); err != nil {`,
  2289  		`		return errors.CompositeValidationError(res...`,
  2290  		`func (m *ThingWithNullableDates) validateProp1(formats strfmt.Registry) error {`,
  2291  		`	if swag.IsZero(m.Prop1) {`,
  2292  		`	if err := validate.FormatOf("prop1", "body", "date", m.Prop1.String(), formats); err != nil {`,
  2293  		`func (m *ThingWithNullableDates) validateProp2(formats strfmt.Registry) error {`,
  2294  		`	if swag.IsZero(m.Prop2) {`,
  2295  		`	if err := validate.FormatOf("prop2", "body", "date", m.Prop2.String(), formats); err != nil {`,
  2296  	},
  2297  		// not expected
  2298  		todo,
  2299  		// output in log
  2300  		noLines,
  2301  		noLines)
  2302  
  2303  	expandRun.AddExpectations("thing_with_nullable_dates.go", flattenRun.ExpectedFor("ThingWithNullableDates").ExpectedLines, todo, noLines, noLines)
  2304  
  2305  }
  2306  
  2307  func initFixtureItching() {
  2308  	// testing ../fixtures/bugs/1487/fixture-itching.yaml with flatten and expand (--skip-flatten)
  2309  
  2310  	/*
  2311  		This one regroups a number of itching cases, essentially around additionalProperties.
  2312  		In particular, we test some things with empty objects (no properties) which have additionalProperties of diverse sorts.
  2313  		We also added here some funny models using the special types Files, string format: binary and interface{}
  2314  		These special cases do not correspond to actual API specs: we use them to verify the internal behavior of the general.
  2315  	*/
  2316  	f := newModelFixture("../fixtures/bugs/1487/fixture-itching.yaml", "fixture for additionalProperties")
  2317  	flattenRun := f.AddRun(false)
  2318  	expandRun := f.AddRun(true)
  2319  
  2320  	// load expectations for model: top_level_format_issue_my_alternate_file.go
  2321  	flattenRun.AddExpectations("top_level_format_issue_my_alternate_file.go", []string{
  2322  		`import "io"`,
  2323  		`type TopLevelFormatIssueMyAlternateFile io.ReadCloser`,
  2324  	},
  2325  		// not expected
  2326  		todo,
  2327  		// output in log
  2328  		noLines,
  2329  		noLines)
  2330  
  2331  	// load expectations for model: not_validated_additional_props.go
  2332  	flattenRun.AddExpectations("not_validated_additional_props.go", []string{
  2333  		`type NotValidatedAdditionalProps struct {`,
  2334  		"	Prop2 strfmt.UUID `json:\"prop2,omitempty\"`",
  2335  		"	NotValidatedAdditionalProps map[string]map[string]map[string]string `json:\"-\"`",
  2336  		`func (m *NotValidatedAdditionalProps) Validate(formats strfmt.Registry) error {`,
  2337  		`	if err := m.validateProp2(formats); err != nil {`,
  2338  		`		return errors.CompositeValidationError(res...`,
  2339  		`func (m *NotValidatedAdditionalProps) validateProp2(formats strfmt.Registry) error {`,
  2340  		`	if swag.IsZero(m.Prop2) {`,
  2341  		`	if err := validate.FormatOf("prop2", "body", "uuid", m.Prop2.String(), formats); err != nil {`,
  2342  	},
  2343  		// not expected
  2344  		todo,
  2345  		// output in log
  2346  		noLines,
  2347  		noLines)
  2348  
  2349  	expandRun.AddExpectations("not_validated_additional_props.go", flattenRun.ExpectedFor("NotValidatedAdditionalProps").ExpectedLines, todo, noLines, noLines)
  2350  
  2351  	// load expectations for model: aliased_nullable_file.go
  2352  	flattenRun.AddExpectations("aliased_nullable_file.go", []string{
  2353  		`import "io"`,
  2354  		`type AliasedNullableFile io.ReadCloser`,
  2355  	},
  2356  		// not expected
  2357  		todo,
  2358  		// output in log
  2359  		noLines,
  2360  		noLines)
  2361  
  2362  	expandRun.AddExpectations("aliased_nullable_file.go", flattenRun.ExpectedFor("AliasedNullableFile").ExpectedLines, todo, noLines, noLines)
  2363  
  2364  	// load expectations for model: empty_object_with_additional_nullable_primitive.go
  2365  	flattenRun.AddExpectations("empty_object_with_additional_nullable_primitive.go", []string{
  2366  		`type EmptyObjectWithAdditionalNullablePrimitive map[string]*strfmt.Date`,
  2367  		`func (m EmptyObjectWithAdditionalNullablePrimitive) Validate(formats strfmt.Registry) error {`,
  2368  		`	for k := range m {`,
  2369  		`		if swag.IsZero(m[k]) {`,
  2370  		`		if err := validate.FormatOf(k, "body", "date", m[k].String(), formats); err != nil {`,
  2371  		`		return errors.CompositeValidationError(res...`,
  2372  	},
  2373  		// not expected
  2374  		todo,
  2375  		// output in log
  2376  		noLines,
  2377  		noLines)
  2378  
  2379  	expandRun.AddExpectations("empty_object_with_additional_nullable_primitive.go", flattenRun.ExpectedFor("EmptyObjectWithAdditionalNullablePrimitive").ExpectedLines, todo, noLines, noLines)
  2380  
  2381  	// load expectations for model: empty_object_with_additional_alias.go
  2382  	flattenRun.AddExpectations("empty_object_with_additional_alias.go", []string{
  2383  		`type EmptyObjectWithAdditionalAlias map[string]AliasedThing`,
  2384  		`func (m EmptyObjectWithAdditionalAlias) Validate(formats strfmt.Registry) error {`,
  2385  		`	for k := range m {`,
  2386  		`		if err := validate.Required(k, "body", m[k]); err != nil {`,
  2387  		`		if val, ok := m[k]; ok {`,
  2388  		`			if err := val.Validate(formats); err != nil {`,
  2389  		`		return errors.CompositeValidationError(res...`,
  2390  	},
  2391  		// not expected
  2392  		todo,
  2393  		// output in log
  2394  		noLines,
  2395  		noLines)
  2396  
  2397  	expandRun.AddExpectations("empty_object_with_additional_alias.go", []string{
  2398  		`type EmptyObjectWithAdditionalAlias map[string]EmptyObjectWithAdditionalAliasAnon`,
  2399  		`func (m EmptyObjectWithAdditionalAlias) Validate(formats strfmt.Registry) error {`,
  2400  		`	for k := range m {`,
  2401  		`		if swag.IsZero(m[k]) {`,
  2402  		`		if val, ok := m[k]; ok {`,
  2403  		`			if err := val.Validate(formats); err != nil {`,
  2404  		`		return errors.CompositeValidationError(res...`,
  2405  		`type EmptyObjectWithAdditionalAliasAnon struct {`,
  2406  		"	Prop1 strfmt.Date `json:\"prop1,omitempty\"`",
  2407  		`func (m *EmptyObjectWithAdditionalAliasAnon) Validate(formats strfmt.Registry) error {`,
  2408  		`	if err := m.validateProp1(formats); err != nil {`,
  2409  		`		return errors.CompositeValidationError(res...`,
  2410  		`func (m *EmptyObjectWithAdditionalAliasAnon) validateProp1(formats strfmt.Registry) error {`,
  2411  		`	if swag.IsZero(m.Prop1) {`,
  2412  		`	if err := validate.FormatOf("prop1", "body", "date", m.Prop1.String(), formats); err != nil {`,
  2413  	},
  2414  		// not expected
  2415  		noLines,
  2416  		// output in log
  2417  		noLines,
  2418  		noLines)
  2419  
  2420  	// load expectations for model: nullable_thing.go
  2421  	flattenRun.AddExpectations("nullable_thing.go", []string{
  2422  		`type NullableThing strfmt.Date`,
  2423  		`func (m NullableThing) Validate(formats strfmt.Registry) error {`,
  2424  		`	if err := validate.FormatOf("", "body", "date", strfmt.Date(m).String(), formats); err != nil {`,
  2425  		`		return errors.CompositeValidationError(res...`,
  2426  	},
  2427  		// not expected
  2428  		todo,
  2429  		// output in log
  2430  		noLines,
  2431  		noLines)
  2432  
  2433  	expandRun.AddExpectations("nullable_thing.go", flattenRun.ExpectedFor("NullableThing").ExpectedLines, todo, noLines, noLines)
  2434  
  2435  	// load expectations for model: slice_of_aliased_files.go
  2436  	flattenRun.AddExpectations("slice_of_aliased_files.go", []string{
  2437  		`type SliceOfAliasedFiles []AliasedFile`,
  2438  		`func (m SliceOfAliasedFiles) Validate(formats strfmt.Registry) error {`,
  2439  		`	iSliceOfAliasedFilesSize := int64(len(m)`,
  2440  		`	if err := validate.MinItems("", "body", iSliceOfAliasedFilesSize, 4); err != nil {`,
  2441  		`		return errors.CompositeValidationError(res...`,
  2442  	},
  2443  		// not expected
  2444  		todo,
  2445  		// output in log
  2446  		noLines,
  2447  		noLines)
  2448  
  2449  	expandRun.AddExpectations("slice_of_aliased_files.go", []string{
  2450  		`type SliceOfAliasedFiles []io.ReadCloser`,
  2451  		`func (m SliceOfAliasedFiles) Validate(formats strfmt.Registry) error {`,
  2452  		`	iSliceOfAliasedFilesSize := int64(len(m)`,
  2453  		`	if err := validate.MinItems("", "body", iSliceOfAliasedFilesSize, 4); err != nil {`,
  2454  		`		return errors.CompositeValidationError(res...`,
  2455  	},
  2456  		// not expected
  2457  		noLines,
  2458  		// output in log
  2459  		noLines,
  2460  		noLines)
  2461  
  2462  	// load expectations for model: empty_object_with_additional_non_nullable_primitive.go
  2463  	flattenRun.AddExpectations("empty_object_with_additional_non_nullable_primitive.go", []string{
  2464  		`type EmptyObjectWithAdditionalNonNullablePrimitive map[string]strfmt.Date`,
  2465  		`func (m EmptyObjectWithAdditionalNonNullablePrimitive) Validate(formats strfmt.Registry) error {`,
  2466  		`	for k := range m {`,
  2467  		// fix undue IsZero call
  2468  		//`		if swag.IsZero(m[k]) {`,
  2469  		`		if err := validate.FormatOf(k, "body", "date", m[k].String(), formats); err != nil {`,
  2470  		`		return errors.CompositeValidationError(res...`,
  2471  	},
  2472  		// not expected
  2473  		todo,
  2474  		// output in log
  2475  		noLines,
  2476  		noLines)
  2477  
  2478  	expandRun.AddExpectations("empty_object_with_additional_non_nullable_primitive.go", flattenRun.ExpectedFor("EmptyObjectWithAdditionalNonNullablePrimitive").ExpectedLines, todo, noLines, noLines)
  2479  
  2480  	// load expectations for model: good_old_format_issue.go
  2481  	flattenRun.AddExpectations("good_old_format_issue.go", []string{
  2482  		`type GoodOldFormatIssue struct {`,
  2483  		"	AlternateFile GoodOldFormatIssueAlternateFile `json:\"alternateFile,omitempty\"`",
  2484  		"	AnotherFile io.ReadCloser `json:\"anotherFile,omitempty\"`",
  2485  		"	MyBytes strfmt.Base64 `json:\"myBytes,omitempty\"`",
  2486  		"	MyFile io.ReadCloser `json:\"myFile\"`",
  2487  		"	ThisAliasedFile AliasedFile `json:\"thisAliasedFile,omitempty\"`",
  2488  		"	ThisAlternateAliasedFile AliasedTypeFile `json:\"thisAlternateAliasedFile,omitempty\"`",
  2489  		"	ThisNullableAliasedFile *AliasedNullableFile `json:\"thisNullableAliasedFile,omitempty\"`",
  2490  		"	ThisNullableAlternateAliasedFile *AliasedTypeNullableFile `json:\"thisNullableAlternateAliasedFile,omitempty\"`",
  2491  		`func (m *GoodOldFormatIssue) Validate(formats strfmt.Registry) error {`,
  2492  		`	if err := m.validateMyFile(formats); err != nil {`,
  2493  		`		return errors.CompositeValidationError(res...`,
  2494  		`func (m *GoodOldFormatIssue) validateMyFile(formats strfmt.Registry) error {`,
  2495  		`	if err := validate.Required("myFile", "body", io.ReadCloser(m.MyFile)); err != nil {`,
  2496  	},
  2497  		// not expected
  2498  		[]string{
  2499  			`	if err := m.validateMyBytes(formats); err != nil {`,
  2500  			`func (m *GoodOldFormatIssue) validateMyBytes(formats strfmt.Registry) error {`,
  2501  			`	if err := validate.FormatOf("myBytes", "body", "byte", m.MyBytes.String(), formats); err != nil {`,
  2502  		},
  2503  		// output in log
  2504  		noLines,
  2505  		noLines)
  2506  
  2507  	expandRun.AddExpectations("good_old_format_issue.go", []string{
  2508  		`type GoodOldFormatIssue struct {`,
  2509  		"	AlternateFile io.ReadCloser `json:\"alternateFile,omitempty\"`",
  2510  		"	AnotherFile io.ReadCloser `json:\"anotherFile,omitempty\"`",
  2511  		"	MyBytes strfmt.Base64 `json:\"myBytes,omitempty\"`",
  2512  		"	MyFile io.ReadCloser `json:\"myFile\"`",
  2513  		"	ThisAliasedFile io.ReadCloser `json:\"thisAliasedFile,omitempty\"`",
  2514  		"	ThisAlternateAliasedFile io.ReadCloser `json:\"thisAlternateAliasedFile,omitempty\"`",
  2515  		"	ThisNullableAliasedFile io.ReadCloser `json:\"thisNullableAliasedFile,omitempty\"`",
  2516  		"	ThisNullableAlternateAliasedFile io.ReadCloser `json:\"thisNullableAlternateAliasedFile,omitempty\"`",
  2517  		`func (m *GoodOldFormatIssue) Validate(formats strfmt.Registry) error {`,
  2518  		`	if err := m.validateMyFile(formats); err != nil {`,
  2519  		`		return errors.CompositeValidationError(res...`,
  2520  		`func (m *GoodOldFormatIssue) validateMyFile(formats strfmt.Registry) error {`,
  2521  		`	if err := validate.Required("myFile", "body", io.ReadCloser(m.MyFile)); err != nil {`,
  2522  	},
  2523  		// not expected
  2524  		[]string{
  2525  			`	if err := m.validateMyBytes(formats); err != nil {`,
  2526  			`func (m *GoodOldFormatIssue) validateMyBytes(formats strfmt.Registry) error {`,
  2527  			`	if err := validate.FormatOf("myBytes", "body", "byte", m.MyBytes.String(), formats); err != nil {`,
  2528  		},
  2529  		// output in log
  2530  		noLines,
  2531  		noLines)
  2532  
  2533  	// load expectations for model: empty_object_with_additional_slice_additional_properties_items.go
  2534  	flattenRun.AddExpectations("empty_object_with_additional_slice_additional_properties_items.go", []string{
  2535  		`type EmptyObjectWithAdditionalSliceAdditionalPropertiesItems struct {`,
  2536  		"	DummyProp1 strfmt.Date `json:\"dummyProp1,omitempty\"`",
  2537  		`func (m *EmptyObjectWithAdditionalSliceAdditionalPropertiesItems) Validate(formats strfmt.Registry) error {`,
  2538  		`	if err := m.validateDummyProp1(formats); err != nil {`,
  2539  		`		return errors.CompositeValidationError(res...`,
  2540  		`func (m *EmptyObjectWithAdditionalSliceAdditionalPropertiesItems) validateDummyProp1(formats strfmt.Registry) error {`,
  2541  		`	if swag.IsZero(m.DummyProp1) {`,
  2542  		`	if err := validate.FormatOf("dummyProp1", "body", "date", m.DummyProp1.String(), formats); err != nil {`,
  2543  	},
  2544  		// not expected
  2545  		todo,
  2546  		// output in log
  2547  		noLines,
  2548  		noLines)
  2549  
  2550  	// load expectations for model: not_validated_additional_props_slice.go
  2551  	flattenRun.AddExpectations("not_validated_additional_props_slice.go", []string{
  2552  		`type NotValidatedAdditionalPropsSlice struct {`,
  2553  		"	Prop2 strfmt.UUID `json:\"prop2,omitempty\"`",
  2554  		"	NotValidatedAdditionalPropsSlice map[string][]map[string]map[string]string `json:\"-\"`",
  2555  		`func (m *NotValidatedAdditionalPropsSlice) Validate(formats strfmt.Registry) error {`,
  2556  		`	if err := m.validateProp2(formats); err != nil {`,
  2557  		`		return errors.CompositeValidationError(res...`,
  2558  		`func (m *NotValidatedAdditionalPropsSlice) validateProp2(formats strfmt.Registry) error {`,
  2559  		`	if swag.IsZero(m.Prop2) {`,
  2560  		`	if err := validate.FormatOf("prop2", "body", "uuid", m.Prop2.String(), formats); err != nil {`,
  2561  	},
  2562  		// not expected
  2563  		todo,
  2564  		// output in log
  2565  		noLines,
  2566  		noLines)
  2567  
  2568  	// load expectations for model: aliased_type_file.go
  2569  	flattenRun.AddExpectations("aliased_type_file.go", []string{
  2570  		`import "io"`,
  2571  		`type AliasedTypeFile io.ReadCloser`,
  2572  	},
  2573  		// not expected
  2574  		todo,
  2575  		// output in log
  2576  		noLines,
  2577  		noLines)
  2578  
  2579  	expandRun.AddExpectations("aliased_type_file.go", flattenRun.ExpectedFor("AliasedTypeFile").ExpectedLines, todo, noLines, noLines)
  2580  
  2581  	// load expectations for model: object_with_empty_object.go
  2582  	flattenRun.AddExpectations("object_with_empty_object.go", []string{
  2583  		`type ObjectWithEmptyObject struct {`,
  2584  		"	EmptyObj EmptyObjectWithAdditionalAlias `json:\"emptyObj,omitempty\"`",
  2585  		"	NonEmptyObj *NullableThing `json:\"nonEmptyObj,omitempty\"`",
  2586  		`func (m *ObjectWithEmptyObject) Validate(formats strfmt.Registry) error {`,
  2587  		`	if err := m.validateEmptyObj(formats); err != nil {`,
  2588  		`	if err := m.validateNonEmptyObj(formats); err != nil {`,
  2589  		`		return errors.CompositeValidationError(res...`,
  2590  		`func (m *ObjectWithEmptyObject) validateEmptyObj(formats strfmt.Registry) error {`,
  2591  		`	if swag.IsZero(m.EmptyObj) {`,
  2592  		`	if err := m.EmptyObj.Validate(formats); err != nil {`,
  2593  		`		if ve, ok := err.(*errors.Validation); ok {`,
  2594  		`			return ve.ValidateName("emptyObj"`,
  2595  		`func (m *ObjectWithEmptyObject) validateNonEmptyObj(formats strfmt.Registry) error {`,
  2596  		`	if swag.IsZero(m.NonEmptyObj) {`,
  2597  		`	if m.NonEmptyObj != nil {`,
  2598  		`		if err := m.NonEmptyObj.Validate(formats); err != nil {`,
  2599  		`			if ve, ok := err.(*errors.Validation); ok {`,
  2600  		`				return ve.ValidateName("nonEmptyObj"`,
  2601  	},
  2602  		// not expected
  2603  		todo,
  2604  		// output in log
  2605  		noLines,
  2606  		noLines)
  2607  
  2608  	expandRun.AddExpectations("object_with_empty_object.go", []string{
  2609  		`type ObjectWithEmptyObject struct {`,
  2610  		"	EmptyObj map[string]ObjectWithEmptyObjectEmptyObjAnon `json:\"emptyObj,omitempty\"`",
  2611  		"	NonEmptyObj *strfmt.Date `json:\"nonEmptyObj,omitempty\"`",
  2612  		`func (m *ObjectWithEmptyObject) Validate(formats strfmt.Registry) error {`,
  2613  		`	if err := m.validateEmptyObj(formats); err != nil {`,
  2614  		`	if err := m.validateNonEmptyObj(formats); err != nil {`,
  2615  		`		return errors.CompositeValidationError(res...`,
  2616  		`func (m *ObjectWithEmptyObject) validateEmptyObj(formats strfmt.Registry) error {`,
  2617  		`	if swag.IsZero(m.EmptyObj) {`,
  2618  		`	for k := range m.EmptyObj {`,
  2619  		`		if swag.IsZero(m.EmptyObj[k]) {`,
  2620  		`		if val, ok := m.EmptyObj[k]; ok {`,
  2621  		`			if err := val.Validate(formats); err != nil {`,
  2622  		`func (m *ObjectWithEmptyObject) validateNonEmptyObj(formats strfmt.Registry) error {`,
  2623  		`	if swag.IsZero(m.NonEmptyObj) {`,
  2624  		`	if err := validate.FormatOf("nonEmptyObj", "body", "date", m.NonEmptyObj.String(), formats); err != nil {`,
  2625  		`type ObjectWithEmptyObjectEmptyObjAnon struct {`,
  2626  		"	Prop1 strfmt.Date `json:\"prop1,omitempty\"`",
  2627  		`func (m *ObjectWithEmptyObjectEmptyObjAnon) Validate(formats strfmt.Registry) error {`,
  2628  		`	if err := m.validateProp1(formats); err != nil {`,
  2629  		`		return errors.CompositeValidationError(res...`,
  2630  		`func (m *ObjectWithEmptyObjectEmptyObjAnon) validateProp1(formats strfmt.Registry) error {`,
  2631  		`	if swag.IsZero(m.Prop1) {`,
  2632  		`	if err := validate.FormatOf("prop1", "body", "date", m.Prop1.String(), formats); err != nil {`,
  2633  	},
  2634  		// not expected
  2635  		noLines,
  2636  		// output in log
  2637  		noLines,
  2638  		noLines)
  2639  
  2640  	// load expectations for model: aliased_file.go
  2641  	flattenRun.AddExpectations("aliased_file.go", []string{
  2642  		`import "io"`,
  2643  		`type AliasedFile io.ReadCloser`,
  2644  	},
  2645  		// not expected
  2646  		todo,
  2647  		// output in log
  2648  		noLines,
  2649  		noLines)
  2650  
  2651  	expandRun.AddExpectations("aliased_file.go", flattenRun.ExpectedFor("AliasedFile").ExpectedLines, todo, noLines, noLines)
  2652  
  2653  	// load expectations for model: empty_object_with_additional_slice.go
  2654  	flattenRun.AddExpectations("empty_object_with_additional_slice.go", []string{
  2655  		`type EmptyObjectWithAdditionalSlice map[string][]EmptyObjectWithAdditionalSliceAdditionalPropertiesItems`,
  2656  		`func (m EmptyObjectWithAdditionalSlice) Validate(formats strfmt.Registry) error {`,
  2657  		// fixed undue Required on this aliased type
  2658  		//`	if err := validate.Required("", "body", EmptyObjectWithAdditionalSlice(m)); err != nil {`,
  2659  		`	for k := range m {`,
  2660  		`		if err := validate.Required(k, "body", m[k]); err != nil {`,
  2661  		`		for i := 0; i < len(m[k]); i++ {`,
  2662  		`			if err := m[k][i].Validate(formats); err != nil {`,
  2663  		`				if ve, ok := err.(*errors.Validation); ok {`,
  2664  		`					return ve.ValidateName(k + "." + strconv.Itoa(i)`,
  2665  		`		return errors.CompositeValidationError(res...`,
  2666  	},
  2667  		// not expected
  2668  		todo,
  2669  		// output in log
  2670  		noLines,
  2671  		noLines)
  2672  
  2673  	expandRun.AddExpectations("empty_object_with_additional_slice.go", []string{
  2674  		`type EmptyObjectWithAdditionalSlice map[string][]EmptyObjectWithAdditionalSliceItems0`,
  2675  		`func (m EmptyObjectWithAdditionalSlice) Validate(formats strfmt.Registry) error {`,
  2676  		// fixed undue Required on this aliased type
  2677  		//`	if err := validate.Required("", "body", EmptyObjectWithAdditionalSlice(m)); err != nil {`,
  2678  		`	for k := range m {`,
  2679  		`		if err := validate.Required(k, "body", m[k]); err != nil {`,
  2680  		`		for i := 0; i < len(m[k]); i++ {`,
  2681  		`			if err := m[k][i].Validate(formats); err != nil {`,
  2682  		`				if ve, ok := err.(*errors.Validation); ok {`,
  2683  		`					return ve.ValidateName(k + "." + strconv.Itoa(i)`,
  2684  		`		return errors.CompositeValidationError(res...`,
  2685  		`type EmptyObjectWithAdditionalSliceItems0 struct {`,
  2686  		"	DummyProp1 strfmt.Date `json:\"dummyProp1,omitempty\"`",
  2687  		`func (m *EmptyObjectWithAdditionalSliceItems0) Validate(formats strfmt.Registry) error {`,
  2688  		`	if err := m.validateDummyProp1(formats); err != nil {`,
  2689  		`		return errors.CompositeValidationError(res...`,
  2690  		`func (m *EmptyObjectWithAdditionalSliceItems0) validateDummyProp1(formats strfmt.Registry) error {`,
  2691  		`	if swag.IsZero(m.DummyProp1) {`,
  2692  		`	if err := validate.FormatOf("dummyProp1", "body", "date", m.DummyProp1.String(), formats); err != nil {`,
  2693  	},
  2694  		// not expected
  2695  		noLines,
  2696  		// output in log
  2697  		noLines,
  2698  		noLines)
  2699  
  2700  	// load expectations for model: additional_aliased_file.go
  2701  	flattenRun.AddExpectations("additional_aliased_file.go", []string{
  2702  		`type AdditionalAliasedFile interface{`,
  2703  	},
  2704  		// not expected
  2705  		todo,
  2706  		// output in log
  2707  		noLines,
  2708  		noLines)
  2709  
  2710  	expandRun.AddExpectations("additional_aliased_file.go", flattenRun.ExpectedFor("AdditionalAliasedFile").ExpectedLines, todo, noLines, noLines)
  2711  
  2712  	// load expectations for model: good_old_format_issue_alternate_file.go
  2713  	flattenRun.AddExpectations("good_old_format_issue_alternate_file.go", []string{
  2714  		`import "io"`,
  2715  		`type GoodOldFormatIssueAlternateFile io.ReadCloser`,
  2716  	},
  2717  		// not expected
  2718  		todo,
  2719  		// output in log
  2720  		noLines,
  2721  		noLines)
  2722  
  2723  	// load expectations for model: empty_object_with_additional_nested_slice_additional_properties_items_items_items.go
  2724  	flattenRun.AddExpectations("empty_object_with_additional_nested_slice_additional_properties_items_items_items.go", []string{
  2725  		`type EmptyObjectWithAdditionalNestedSliceAdditionalPropertiesItemsItemsItems struct {`,
  2726  		"	DummyProp1 strfmt.Date `json:\"dummyProp1,omitempty\"`",
  2727  		`func (m *EmptyObjectWithAdditionalNestedSliceAdditionalPropertiesItemsItemsItems) Validate(formats strfmt.Registry) error {`,
  2728  		`	if err := m.validateDummyProp1(formats); err != nil {`,
  2729  		`		return errors.CompositeValidationError(res...`,
  2730  		`func (m *EmptyObjectWithAdditionalNestedSliceAdditionalPropertiesItemsItemsItems) validateDummyProp1(formats strfmt.Registry) error {`,
  2731  		`	if swag.IsZero(m.DummyProp1) {`,
  2732  		`	if err := validate.FormatOf("dummyProp1", "body", "date", m.DummyProp1.String(), formats); err != nil {`,
  2733  	},
  2734  		// not expected
  2735  		todo,
  2736  		// output in log
  2737  		noLines,
  2738  		noLines)
  2739  
  2740  	// load expectations for model: aliased_thing.go
  2741  	flattenRun.AddExpectations("aliased_thing.go", []string{
  2742  		`type AliasedThing struct {`,
  2743  		"	Prop1 strfmt.Date `json:\"prop1,omitempty\"`",
  2744  		`func (m *AliasedThing) Validate(formats strfmt.Registry) error {`,
  2745  		`	if err := m.validateProp1(formats); err != nil {`,
  2746  		`		return errors.CompositeValidationError(res...`,
  2747  		`func (m *AliasedThing) validateProp1(formats strfmt.Registry) error {`,
  2748  		`	if swag.IsZero(m.Prop1) {`,
  2749  		`	if err := validate.FormatOf("prop1", "body", "date", m.Prop1.String(), formats); err != nil {`,
  2750  	},
  2751  		// not expected
  2752  		todo,
  2753  		// output in log
  2754  		noLines,
  2755  		noLines)
  2756  
  2757  	expandRun.AddExpectations("aliased_thing.go", flattenRun.ExpectedFor("AliasedThing").ExpectedLines, todo, noLines, noLines)
  2758  
  2759  	// load expectations for model: additional_file.go
  2760  	flattenRun.AddExpectations("additional_file.go", []string{
  2761  		`type AdditionalFile struct {`,
  2762  		"	DirName string `json:\"dirName,omitempty\"`",
  2763  		"	AdditionalFile map[string]io.ReadCloser `json:\"-\"`",
  2764  		// empty validation
  2765  		"func (m *AdditionalFile) Validate(formats strfmt.Registry) error {\n	return nil\n}",
  2766  	},
  2767  		// not expected
  2768  		todo,
  2769  		// output in log
  2770  		noLines,
  2771  		noLines)
  2772  
  2773  	expandRun.AddExpectations("additional_file.go", flattenRun.ExpectedFor("AdditionalFile").ExpectedLines, todo, noLines, noLines)
  2774  
  2775  	// load expectations for model: aliased_type_nullable_file.go
  2776  	flattenRun.AddExpectations("aliased_type_nullable_file.go", []string{
  2777  		`import "io"`,
  2778  		`type AliasedTypeNullableFile io.ReadCloser`,
  2779  	},
  2780  		// not expected
  2781  		validatable,
  2782  		// output in log
  2783  		noLines,
  2784  		noLines)
  2785  
  2786  	expandRun.AddExpectations("aliased_type_nullable_file.go", flattenRun.ExpectedFor("AliasedTypeNullableFile").ExpectedLines, validatable, noLines, noLines)
  2787  
  2788  	// load expectations for model: top_level_format_issue.go
  2789  	flattenRun.AddExpectations("top_level_format_issue.go", []string{
  2790  		`type TopLevelFormatIssue struct {`,
  2791  		"	MyAlternateFile TopLevelFormatIssueMyAlternateFile `json:\"myAlternateFile,omitempty\"`",
  2792  		"	MyFile io.ReadCloser `json:\"myFile,omitempty\"`",
  2793  		// empty validation
  2794  		"func (m *TopLevelFormatIssue) Validate(formats strfmt.Registry) error {\n	return nil\n}",
  2795  	},
  2796  		// not expected
  2797  		todo,
  2798  		// output in log
  2799  		noLines,
  2800  		noLines)
  2801  
  2802  	expandRun.AddExpectations("top_level_format_issue.go", []string{
  2803  		`type TopLevelFormatIssue struct {`,
  2804  		"	MyAlternateFile io.ReadCloser `json:\"myAlternateFile,omitempty\"`",
  2805  		"	MyFile io.ReadCloser `json:\"myFile,omitempty\"`",
  2806  		// empty validation
  2807  		"func (m *TopLevelFormatIssue) Validate(formats strfmt.Registry) error {\n	return nil\n}",
  2808  	},
  2809  		// not expected
  2810  		noLines,
  2811  		// output in log
  2812  		noLines,
  2813  		noLines)
  2814  
  2815  	// load expectations for model: enums_with_additional_props.go
  2816  	flattenRun.AddExpectations("enums_with_additional_props.go", []string{
  2817  		`type EnumsWithAdditionalProps map[string]interface{`,
  2818  		`var enumsWithAdditionalPropsEnum []interface{`,
  2819  		`	var res []EnumsWithAdditionalProps`,
  2820  		"	if err := json.Unmarshal([]byte(`[\"{ \\\"a\\\": 1, \\\"b\\\": 2 }\",\"{ \\\"a\\\": 3, \\\"b\\\": 4 }\"]`), &res); err != nil {",
  2821  		`	for _, v := range res {`,
  2822  		`		enumsWithAdditionalPropsEnum = append(enumsWithAdditionalPropsEnum, v`,
  2823  		`func (m *EnumsWithAdditionalProps) validateEnumsWithAdditionalPropsEnum(path, location string, value EnumsWithAdditionalProps) error {`,
  2824  		`	if err := validate.EnumCase(path, location, value, enumsWithAdditionalPropsEnum, true); err != nil {`,
  2825  		`var enumsWithAdditionalPropsValueEnum []interface{`,
  2826  		`	var res []interface{`,
  2827  		"	if err := json.Unmarshal([]byte(`[\"{ \\\"b\\\": 2 }\",\"{ \\\"b\\\": 4 }\"]`), &res); err != nil {",
  2828  		`	for _, v := range res {`,
  2829  		`		enumsWithAdditionalPropsValueEnum = append(enumsWithAdditionalPropsValueEnum, v`,
  2830  		`func (m *EnumsWithAdditionalProps) validateEnumsWithAdditionalPropsValueEnum(path, location string, value interface{}) error {`,
  2831  		`	if err := validate.EnumCase(path, location, value, enumsWithAdditionalPropsValueEnum, true); err != nil {`,
  2832  		`func (m EnumsWithAdditionalProps) Validate(formats strfmt.Registry) error {`,
  2833  		`	for k := range m {`,
  2834  		`		if err := m.validateEnumsWithAdditionalPropsValueEnum(k, "body", m[k]); err != nil {`,
  2835  		`	if err := m.validateEnumsWithAdditionalPropsEnum("", "body", m); err != nil {`,
  2836  		`		return errors.CompositeValidationError(res...`,
  2837  	},
  2838  		// not expected
  2839  		todo,
  2840  		// output in log
  2841  		noLines,
  2842  		noLines)
  2843  
  2844  	expandRun.AddExpectations("enums_with_additional_props.go", flattenRun.ExpectedFor("EnumsWithAdditionalProps").ExpectedLines, todo, noLines, noLines)
  2845  
  2846  	// load expectations for model: empty_object_with_additional_nested_slice.go
  2847  	flattenRun.AddExpectations("empty_object_with_additional_nested_slice.go", []string{
  2848  		`type EmptyObjectWithAdditionalNestedSlice map[string][][][]EmptyObjectWithAdditionalNestedSliceAdditionalPropertiesItemsItemsItems`,
  2849  		`func (m EmptyObjectWithAdditionalNestedSlice) Validate(formats strfmt.Registry) error {`,
  2850  		`	for k := range m {`,
  2851  		`		if err := validate.Required(k, "body", m[k]); err != nil {`,
  2852  		`		for i := 0; i < len(m[k]); i++ {`,
  2853  		`			for ii := 0; ii < len(m[k][i]); ii++ {`,
  2854  		`				for iii := 0; iii < len(m[k][i][ii]); iii++ {`,
  2855  		`					if err := m[k][i][ii][iii].Validate(formats); err != nil {`,
  2856  		`						if ve, ok := err.(*errors.Validation); ok {`,
  2857  		`							return ve.ValidateName(k + "." + strconv.Itoa(i) + "." + strconv.Itoa(ii) + "." + strconv.Itoa(iii)`,
  2858  		`		return errors.CompositeValidationError(res...`,
  2859  	},
  2860  		// not expected
  2861  		todo,
  2862  		// output in log
  2863  		noLines,
  2864  		noLines)
  2865  
  2866  	expandRun.AddExpectations("empty_object_with_additional_nested_slice.go", []string{
  2867  		`type EmptyObjectWithAdditionalNestedSlice map[string][][][]EmptyObjectWithAdditionalNestedSliceItems0`,
  2868  		`func (m EmptyObjectWithAdditionalNestedSlice) Validate(formats strfmt.Registry) error {`,
  2869  		`	for k := range m {`,
  2870  		`		if err := validate.Required(k, "body", m[k]); err != nil {`,
  2871  		`		for i := 0; i < len(m[k]); i++ {`,
  2872  		`			for ii := 0; ii < len(m[k][i]); ii++ {`,
  2873  		`				for iii := 0; iii < len(m[k][i][ii]); iii++ {`,
  2874  		`					if err := m[k][i][ii][iii].Validate(formats); err != nil {`,
  2875  		`						if ve, ok := err.(*errors.Validation); ok {`,
  2876  		`							return ve.ValidateName(k + "." + strconv.Itoa(i) + "." + strconv.Itoa(ii) + "." + strconv.Itoa(iii)`,
  2877  		`		return errors.CompositeValidationError(res...`,
  2878  		`type EmptyObjectWithAdditionalNestedSliceItems0 struct {`,
  2879  		"	DummyProp1 strfmt.Date `json:\"dummyProp1,omitempty\"`",
  2880  		`func (m *EmptyObjectWithAdditionalNestedSliceItems0) Validate(formats strfmt.Registry) error {`,
  2881  		`	if err := m.validateDummyProp1(formats); err != nil {`,
  2882  		`		return errors.CompositeValidationError(res...`,
  2883  		`func (m *EmptyObjectWithAdditionalNestedSliceItems0) validateDummyProp1(formats strfmt.Registry) error {`,
  2884  		`	if swag.IsZero(m.DummyProp1) {`,
  2885  		`	if err := validate.FormatOf("dummyProp1", "body", "date", m.DummyProp1.String(), formats); err != nil {`,
  2886  	},
  2887  		// not expected
  2888  		noLines,
  2889  		// output in log
  2890  		noLines,
  2891  		noLines)
  2892  
  2893  	// load expectations for model: empty_object_with_additional_nullable.go
  2894  	// fixed nullability of aliased type
  2895  	flattenRun.AddExpectations("empty_object_with_additional_nullable.go", []string{
  2896  		`type EmptyObjectWithAdditionalNullable map[string]*NullableThing`,
  2897  		`func (m EmptyObjectWithAdditionalNullable) Validate(formats strfmt.Registry) error {`,
  2898  		`	for k := range m {`,
  2899  		`		if swag.IsZero(m[k]) {`,
  2900  		`		if val, ok := m[k]; ok {`,
  2901  		`			if err := val.Validate(formats); err != nil {`,
  2902  		`		return errors.CompositeValidationError(res...`,
  2903  	},
  2904  		// not expected
  2905  		todo,
  2906  		// output in log
  2907  		noLines,
  2908  		noLines)
  2909  
  2910  	expandRun.AddExpectations("empty_object_with_additional_nullable.go", []string{
  2911  		`type EmptyObjectWithAdditionalNullable map[string]*strfmt.Date`,
  2912  		`func (m EmptyObjectWithAdditionalNullable) Validate(formats strfmt.Registry) error {`,
  2913  		`	for k := range m {`,
  2914  		`		if swag.IsZero(m[k]) {`,
  2915  		`		if err := validate.FormatOf(k, "body", "date", m[k].String(), formats); err != nil {`,
  2916  		`		return errors.CompositeValidationError(res...`,
  2917  	},
  2918  		// not expected
  2919  		noLines,
  2920  		// output in log
  2921  		noLines,
  2922  		noLines)
  2923  
  2924  	// load expectations for model: not_validated_at_all.go
  2925  	flattenRun.AddExpectations("not_validated_at_all.go", []string{
  2926  		`type NotValidatedAtAll struct {`,
  2927  		"	Prop2 string `json:\"prop2,omitempty\"`",
  2928  		"	NotValidatedAtAll map[string][]map[string]map[string]string `json:\"-\"`",
  2929  		// empty validation
  2930  		"func (m *NotValidatedAtAll) Validate(formats strfmt.Registry) error {\n	return nil\n}",
  2931  	},
  2932  		// not expected
  2933  		todo,
  2934  		// output in log
  2935  		noLines,
  2936  		noLines)
  2937  
  2938  	expandRun.AddExpectations("not_validated_at_all.go", flattenRun.ExpectedFor("NotValidatedAtAll").ExpectedLines, todo, noLines, noLines)
  2939  }
  2940  
  2941  func initFixtureAdditionalProps() {
  2942  	// testing ../fixtures/bugs/1487/fixture-additionalProps.yaml with flatten and expand (--skip-flatten)
  2943  
  2944  	/*
  2945  		various patterns of additionalProperties
  2946  	*/
  2947  	f := newModelFixture("../fixtures/bugs/1487/fixture-additionalProps.yaml", "fixture for additionalProperties")
  2948  	flattenRun := f.AddRun(false)
  2949  	expandRun := f.AddRun(true)
  2950  
  2951  	// load expectations for model: additional_object_with_formated_thing.go
  2952  	flattenRun.AddExpectations("additional_object_with_formated_thing.go", []string{
  2953  		`type AdditionalObjectWithFormatedThing struct {`,
  2954  		"	Blob *int64 `json:\"blob\"`",
  2955  		"	AdditionalObjectWithFormatedThing map[string]strfmt.Date `json:\"-\"`",
  2956  		`func (m *AdditionalObjectWithFormatedThing) Validate(formats strfmt.Registry) error {`,
  2957  		`	if err := m.validateBlob(formats); err != nil {`,
  2958  		`	for k := range m.AdditionalObjectWithFormatedThing {`,
  2959  		// removed undue IZero call
  2960  		//`		if swag.IsZero(m.AdditionalObjectWithFormatedThing[k]) {`,
  2961  		`		if err := validate.FormatOf(k, "body", "date", m.AdditionalObjectWithFormatedThing[k].String(), formats); err != nil {`,
  2962  		`		return errors.CompositeValidationError(res...`,
  2963  		`func (m *AdditionalObjectWithFormatedThing) validateBlob(formats strfmt.Registry) error {`,
  2964  		`	if err := validate.Required("blob", "body", m.Blob); err != nil {`,
  2965  		`	if err := validate.MinimumInt("blob", "body", int64(*m.Blob), 1, false); err != nil {`,
  2966  	},
  2967  		// not expected
  2968  		todo,
  2969  		// output in log
  2970  		noLines,
  2971  		noLines)
  2972  
  2973  	expandRun.AddExpectations("additional_object_with_formated_thing.go", flattenRun.ExpectedFor("AdditionalObjectWithFormatedThing").ExpectedLines, todo, noLines, noLines)
  2974  
  2975  	// load expectations for model: aliased_date.go
  2976  	flattenRun.AddExpectations("aliased_date.go", []string{
  2977  		`type AliasedDate strfmt.Date`,
  2978  		`func (m AliasedDate) Validate(formats strfmt.Registry) error {`,
  2979  		`	if err := validate.FormatOf("", "body", "date", strfmt.Date(m).String(), formats); err != nil {`,
  2980  		`		return errors.CompositeValidationError(res...`,
  2981  	},
  2982  		// not expected
  2983  		todo,
  2984  		// output in log
  2985  		noLines,
  2986  		noLines)
  2987  
  2988  	expandRun.AddExpectations("aliased_date.go", flattenRun.ExpectedFor("AliasedDate").ExpectedLines, todo, noLines, noLines)
  2989  
  2990  	// load expectations for model: additional_array_of_refed_thing.go
  2991  	flattenRun.AddExpectations("additional_array_of_refed_thing.go", []string{
  2992  		`type AdditionalArrayOfRefedThing struct {`,
  2993  		"	ThisOneNotRequired int64 `json:\"thisOneNotRequired,omitempty\"`",
  2994  		"	AdditionalArrayOfRefedThing map[string][]AliasedDate `json:\"-\"`",
  2995  		`func (m *AdditionalArrayOfRefedThing) Validate(formats strfmt.Registry) error {`,
  2996  		`	if err := m.validateThisOneNotRequired(formats); err != nil {`,
  2997  		`	for k := range m.AdditionalArrayOfRefedThing {`,
  2998  		// removed undue IsZero call
  2999  		//`		if swag.IsZero(m.AdditionalArrayOfRefedThing[k]) {`,
  3000  		`		if err := validate.UniqueItems(k, "body", m.AdditionalArrayOfRefedThing[k]); err != nil {`,
  3001  		`		for i := 0; i < len(m.AdditionalArrayOfRefedThing[k]); i++ {`,
  3002  		`			if err := m.AdditionalArrayOfRefedThing[k][i].Validate(formats); err != nil {`,
  3003  		`				if ve, ok := err.(*errors.Validation); ok {`,
  3004  		`					return ve.ValidateName(k + "." + strconv.Itoa(i)`,
  3005  		`		return errors.CompositeValidationError(res...`,
  3006  		`func (m *AdditionalArrayOfRefedThing) validateThisOneNotRequired(formats strfmt.Registry) error {`,
  3007  		`	if swag.IsZero(m.ThisOneNotRequired) {`,
  3008  		`	if err := validate.MaximumInt("thisOneNotRequired", "body", int64(m.ThisOneNotRequired), 10, false); err != nil {`,
  3009  	},
  3010  		// not expected
  3011  		todo,
  3012  		// output in log
  3013  		noLines,
  3014  		noLines)
  3015  
  3016  	expandRun.AddExpectations("additional_array_of_refed_thing.go", []string{
  3017  		`type AdditionalArrayOfRefedThing struct {`,
  3018  		"	ThisOneNotRequired int64 `json:\"thisOneNotRequired,omitempty\"`",
  3019  		"	AdditionalArrayOfRefedThing map[string][]strfmt.Date `json:\"-\"`",
  3020  		`func (m *AdditionalArrayOfRefedThing) Validate(formats strfmt.Registry) error {`,
  3021  		`	if err := m.validateThisOneNotRequired(formats); err != nil {`,
  3022  		`	for k := range m.AdditionalArrayOfRefedThing {`,
  3023  		// removed undue IsZero() call
  3024  		//`		if swag.IsZero(m.AdditionalArrayOfRefedThing[k]) {`,
  3025  		`		if err := validate.UniqueItems(k, "body", m.AdditionalArrayOfRefedThing[k]); err != nil {`,
  3026  		`		for i := 0; i < len(m.AdditionalArrayOfRefedThing[k]); i++ {`,
  3027  		`			if err := validate.FormatOf(k+"."+strconv.Itoa(i), "body", "date", m.AdditionalArrayOfRefedThing[k][i].String(), formats); err != nil {`,
  3028  		`		return errors.CompositeValidationError(res...`,
  3029  		`func (m *AdditionalArrayOfRefedThing) validateThisOneNotRequired(formats strfmt.Registry) error {`,
  3030  		`	if swag.IsZero(m.ThisOneNotRequired) {`,
  3031  		`	if err := validate.MaximumInt("thisOneNotRequired", "body", int64(m.ThisOneNotRequired), 10, false); err != nil {`,
  3032  	},
  3033  		// not expected
  3034  		todo,
  3035  		// output in log
  3036  		noLines,
  3037  		noLines)
  3038  
  3039  	// load expectations for model: additional_object_with_nullable_thing.go
  3040  	flattenRun.AddExpectations("additional_object_with_nullable_thing.go", []string{
  3041  		`type AdditionalObjectWithNullableThing struct {`,
  3042  		"	Blob int64 `json:\"blob,omitempty\"`",
  3043  		"	AdditionalObjectWithNullableThing map[string]*AliasedNullableDate `json:\"-\"`",
  3044  		`func (m *AdditionalObjectWithNullableThing) Validate(formats strfmt.Registry) error {`,
  3045  		`	if err := m.validateBlob(formats); err != nil {`,
  3046  		`	for k := range m.AdditionalObjectWithNullableThing {`,
  3047  		`		if swag.IsZero(m.AdditionalObjectWithNullableThing[k]) {`,
  3048  		`		if val, ok := m.AdditionalObjectWithNullableThing[k]; ok {`,
  3049  		`			if val != nil {`,
  3050  		`				if err := val.Validate(formats); err != nil {`,
  3051  		`		return errors.CompositeValidationError(res...`,
  3052  		`func (m *AdditionalObjectWithNullableThing) validateBlob(formats strfmt.Registry) error {`,
  3053  		`	if swag.IsZero(m.Blob) {`,
  3054  		`	if err := validate.MinimumInt("blob", "body", int64(m.Blob), 1, false); err != nil {`,
  3055  	},
  3056  		// not expected
  3057  		todo,
  3058  		// output in log
  3059  		noLines,
  3060  		noLines)
  3061  
  3062  	expandRun.AddExpectations("additional_object_with_nullable_thing.go", []string{
  3063  		`type AdditionalObjectWithNullableThing struct {`,
  3064  		"	Blob int64 `json:\"blob,omitempty\"`",
  3065  		"	AdditionalObjectWithNullableThing map[string]*strfmt.Date `json:\"-\"`",
  3066  		`func (m *AdditionalObjectWithNullableThing) Validate(formats strfmt.Registry) error {`,
  3067  		`	if err := m.validateBlob(formats); err != nil {`,
  3068  		`	for k := range m.AdditionalObjectWithNullableThing {`,
  3069  		`		if swag.IsZero(m.AdditionalObjectWithNullableThing[k]) {`,
  3070  		`		if err := validate.FormatOf(k, "body", "date", m.AdditionalObjectWithNullableThing[k].String(), formats); err != nil {`,
  3071  		`		return errors.CompositeValidationError(res...`,
  3072  		`func (m *AdditionalObjectWithNullableThing) validateBlob(formats strfmt.Registry) error {`,
  3073  		`	if swag.IsZero(m.Blob) {`,
  3074  		`	if err := validate.MinimumInt("blob", "body", int64(m.Blob), 1, false); err != nil {`,
  3075  	},
  3076  		// not expected
  3077  		todo,
  3078  		// output in log
  3079  		noLines,
  3080  		noLines)
  3081  
  3082  	// load expectations for model: additional_things.go
  3083  	flattenRun.AddExpectations("additional_things.go", []string{
  3084  		`type AdditionalThings struct {`,
  3085  		"	Origin *string `json:\"origin\"`",
  3086  		"	Status string `json:\"status,omitempty\"`",
  3087  		"	AdditionalThings map[string]string `json:\"-\"`",
  3088  		`var additionalThingsValueEnum []interface{`,
  3089  		`	var res []string`,
  3090  		"	if err := json.Unmarshal([]byte(`[\"bookshop\",\"amazon\",\"library\"]`), &res); err != nil {",
  3091  		`	for _, v := range res {`,
  3092  		`		additionalThingsValueEnum = append(additionalThingsValueEnum, v`,
  3093  		`func (m *AdditionalThings) validateAdditionalThingsValueEnum(path, location string, value string) error {`,
  3094  		`	if err := validate.EnumCase(path, location, value, additionalThingsValueEnum, true); err != nil {`,
  3095  		`func (m *AdditionalThings) Validate(formats strfmt.Registry) error {`,
  3096  		`	if err := m.validateOrigin(formats); err != nil {`,
  3097  		`	if err := m.validateStatus(formats); err != nil {`,
  3098  		`	for k := range m.AdditionalThings {`,
  3099  		// removed undue IsZero call
  3100  		//`		if swag.IsZero(m.AdditionalThings[k]) {`,
  3101  		`		if err := m.validateAdditionalThingsValueEnum(k, "body", m.AdditionalThings[k]); err != nil {`,
  3102  		`		return errors.CompositeValidationError(res...`,
  3103  		`var additionalThingsTypeOriginPropEnum []interface{`,
  3104  		`	var res []string`,
  3105  		"	if err := json.Unmarshal([]byte(`[\"print\",\"e-book\",\"collection\",\"museum\"]`), &res); err != nil {",
  3106  		`	for _, v := range res {`,
  3107  		`		additionalThingsTypeOriginPropEnum = append(additionalThingsTypeOriginPropEnum, v`,
  3108  		`	AdditionalThingsOriginPrint string = "print"`,
  3109  		`	AdditionalThingsOriginEBook string = "e-book"`,
  3110  		`	AdditionalThingsOriginCollection string = "collection"`,
  3111  		`	AdditionalThingsOriginMuseum string = "museum"`,
  3112  		`func (m *AdditionalThings) validateOriginEnum(path, location string, value string) error {`,
  3113  		`	if err := validate.EnumCase(path, location, value, additionalThingsTypeOriginPropEnum, true); err != nil {`,
  3114  		`func (m *AdditionalThings) validateOrigin(formats strfmt.Registry) error {`,
  3115  		`	if err := validate.Required("origin", "body", m.Origin); err != nil {`,
  3116  		`	if err := m.validateOriginEnum("origin", "body", *m.Origin); err != nil {`,
  3117  		`var additionalThingsTypeStatusPropEnum []interface{`,
  3118  		`	var res []string`,
  3119  		"	if err := json.Unmarshal([]byte(`[\"OK\",\"KO\"]`), &res); err != nil {",
  3120  		`	for _, v := range res {`,
  3121  		`		additionalThingsTypeStatusPropEnum = append(additionalThingsTypeStatusPropEnum, v`,
  3122  		`	AdditionalThingsStatusOK string = "OK"`,
  3123  		`	AdditionalThingsStatusKO string = "KO"`,
  3124  		`func (m *AdditionalThings) validateStatusEnum(path, location string, value string) error {`,
  3125  		`	if err := validate.EnumCase(path, location, value, additionalThingsTypeStatusPropEnum, true); err != nil {`,
  3126  		`func (m *AdditionalThings) validateStatus(formats strfmt.Registry) error {`,
  3127  		`	if swag.IsZero(m.Status) {`,
  3128  		`	if err := m.validateStatusEnum("status", "body", m.Status); err != nil {`,
  3129  	},
  3130  		// not expected
  3131  		todo,
  3132  		// output in log
  3133  		noLines,
  3134  		noLines)
  3135  
  3136  	expandRun.AddExpectations("additional_things.go", flattenRun.ExpectedFor("AdditionalThings").ExpectedLines, todo, noLines, noLines)
  3137  
  3138  	// load expectations for model: transitive_refed_thing_additional_properties.go
  3139  	flattenRun.AddExpectations("transitive_refed_thing_additional_properties.go", []string{
  3140  		`type TransitiveRefedThingAdditionalProperties struct {`,
  3141  		"	A1 strfmt.DateTime `json:\"a1,omitempty\"`",
  3142  		"	TransitiveRefedThingAdditionalProperties map[string]*NoValidationThing `json:\"-\"`",
  3143  		`func (m *TransitiveRefedThingAdditionalProperties) Validate(formats strfmt.Registry) error {`,
  3144  		`	if err := m.validateA1(formats); err != nil {`,
  3145  		`	for k := range m.TransitiveRefedThingAdditionalProperties {`,
  3146  		`		if val, ok := m.TransitiveRefedThingAdditionalProperties[k]; ok {`,
  3147  		`			if val != nil {`,
  3148  		`				if err := val.Validate(formats); err != nil {`,
  3149  		`		return errors.CompositeValidationError(res...`,
  3150  		`func (m *TransitiveRefedThingAdditionalProperties) validateA1(formats strfmt.Registry) error {`,
  3151  		`	if swag.IsZero(m.A1) {`,
  3152  		`	if err := validate.FormatOf("a1", "body", "date-time", m.A1.String(), formats); err != nil {`,
  3153  	},
  3154  		// not expected
  3155  		todo,
  3156  		// output in log
  3157  		noLines,
  3158  		noLines)
  3159  
  3160  	// load expectations for model: additional_object.go
  3161  	flattenRun.AddExpectations("additional_object.go", []string{
  3162  		`type AdditionalObject struct {`,
  3163  		"	MockID float64 `json:\"mockId,omitempty\"`",
  3164  		"	AdditionalObject map[string]*AdditionalObjectAdditionalProperties `json:\"-\"`",
  3165  		`func (m *AdditionalObject) Validate(formats strfmt.Registry) error {`,
  3166  		`	for k := range m.AdditionalObject {`,
  3167  		`		if val, ok := m.AdditionalObject[k]; ok {`,
  3168  		`			if val != nil {`,
  3169  		`				if err := val.Validate(formats); err != nil {`,
  3170  		`		return errors.CompositeValidationError(res...`,
  3171  	},
  3172  		// not expected
  3173  		todo,
  3174  		// output in log
  3175  		noLines,
  3176  		noLines)
  3177  
  3178  	expandRun.AddExpectations("additional_object.go", []string{
  3179  		`type AdditionalObject struct {`,
  3180  		"	MockID float64 `json:\"mockId,omitempty\"`",
  3181  		"	AdditionalObject map[string]*AdditionalObjectAnon `json:\"-\"`",
  3182  		`func (m *AdditionalObject) Validate(formats strfmt.Registry) error {`,
  3183  		`	for k := range m.AdditionalObject {`,
  3184  		`		if val, ok := m.AdditionalObject[k]; ok {`,
  3185  		`			if val != nil {`,
  3186  		`				if err := val.Validate(formats); err != nil {`,
  3187  		`		return errors.CompositeValidationError(res...`,
  3188  		`type AdditionalObjectAnon struct {`,
  3189  		"	MockA string `json:\"mockA,omitempty\"`",
  3190  		"	MockB *string `json:\"mockB\"`",
  3191  		"	MockC float64 `json:\"mockC,omitempty\"`",
  3192  		`func (m *AdditionalObjectAnon) Validate(formats strfmt.Registry) error {`,
  3193  		`	if err := m.validateMockA(formats); err != nil {`,
  3194  		`	if err := m.validateMockB(formats); err != nil {`,
  3195  		`		return errors.CompositeValidationError(res...`,
  3196  		`func (m *AdditionalObjectAnon) validateMockA(formats strfmt.Registry) error {`,
  3197  		`	if swag.IsZero(m.MockA) {`,
  3198  		"	if err := validate.Pattern(\"mockA\", \"body\", string(m.MockA), `^[A-Z]$`); err != nil {",
  3199  		`func (m *AdditionalObjectAnon) validateMockB(formats strfmt.Registry) error {`,
  3200  		`	if err := validate.Required("mockB", "body", m.MockB); err != nil {`,
  3201  		`	if err := validate.MinLength("mockB", "body", string(*m.MockB), 1); err != nil {`,
  3202  	},
  3203  		// not expected
  3204  		todo,
  3205  		// output in log
  3206  		noLines,
  3207  		noLines)
  3208  
  3209  	// load expectations for model: additional_slice_of_objects_additional_properties_items.go
  3210  	flattenRun.AddExpectations("additional_slice_of_objects_additional_properties_items.go", []string{
  3211  		`type AdditionalSliceOfObjectsAdditionalPropertiesItems struct {`,
  3212  		"	Prop2 int64 `json:\"prop2,omitempty\"`",
  3213  		// empty validation
  3214  		"func (m *AdditionalSliceOfObjectsAdditionalPropertiesItems) Validate(formats strfmt.Registry) error {\n	return nil\n}",
  3215  	},
  3216  		// not expected
  3217  		todo,
  3218  		// output in log
  3219  		noLines,
  3220  		noLines)
  3221  
  3222  	// load expectations for model: additional_slice_of_aliased_nullable_primitives.go
  3223  	flattenRun.AddExpectations("additional_slice_of_aliased_nullable_primitives.go", []string{
  3224  		`type AdditionalSliceOfAliasedNullablePrimitives struct {`,
  3225  		"	Prop3 strfmt.UUID `json:\"prop3,omitempty\"`",
  3226  		"	AdditionalSliceOfAliasedNullablePrimitives map[string][]*AliasedNullableDate `json:\"-\"`",
  3227  		`func (m *AdditionalSliceOfAliasedNullablePrimitives) Validate(formats strfmt.Registry) error {`,
  3228  		`	if err := m.validateProp3(formats); err != nil {`,
  3229  		`	for k := range m.AdditionalSliceOfAliasedNullablePrimitives {`,
  3230  		// removed undue IsSzero call
  3231  		//`		if swag.IsZero(m.AdditionalSliceOfAliasedNullablePrimitives[k]) {`,
  3232  		`		iAdditionalSliceOfAliasedNullablePrimitivesSize := int64(len(m.AdditionalSliceOfAliasedNullablePrimitives[k])`,
  3233  		`		if err := validate.MinItems(k, "body", iAdditionalSliceOfAliasedNullablePrimitivesSize, 10); err != nil {`,
  3234  		`		for i := 0; i < len(m.AdditionalSliceOfAliasedNullablePrimitives[k]); i++ {`,
  3235  		// do we need Required when item is nullable?
  3236  		// nullable not required:
  3237  		`			if swag.IsZero(m.AdditionalSliceOfAliasedNullablePrimitives[k][i]) {`,
  3238  		// nullable required:
  3239  		//`			if err := validate.Required(k+"."+strconv.Itoa(i), "body", m.AdditionalSliceOfAliasedNullablePrimitives[k][i]); err != nil {`,
  3240  		`			if m.AdditionalSliceOfAliasedNullablePrimitives[k][i] != nil {`,
  3241  		`				if err := m.AdditionalSliceOfAliasedNullablePrimitives[k][i].Validate(formats); err != nil {`,
  3242  		`					if ve, ok := err.(*errors.Validation); ok {`,
  3243  		`						return ve.ValidateName(k + "." + strconv.Itoa(i)`,
  3244  		`		return errors.CompositeValidationError(res...`,
  3245  		`func (m *AdditionalSliceOfAliasedNullablePrimitives) validateProp3(formats strfmt.Registry) error {`,
  3246  		`	if swag.IsZero(m.Prop3) {`,
  3247  		`	if err := validate.FormatOf("prop3", "body", "uuid", m.Prop3.String(), formats); err != nil {`,
  3248  	},
  3249  		// not expected
  3250  		todo,
  3251  		// output in log
  3252  		noLines,
  3253  		noLines)
  3254  
  3255  	expandRun.AddExpectations("additional_slice_of_aliased_nullable_primitives.go", []string{
  3256  		`type AdditionalSliceOfAliasedNullablePrimitives struct {`,
  3257  		"	Prop3 strfmt.UUID `json:\"prop3,omitempty\"`",
  3258  		"	AdditionalSliceOfAliasedNullablePrimitives map[string][]*strfmt.Date `json:\"-\"`",
  3259  		`func (m *AdditionalSliceOfAliasedNullablePrimitives) Validate(formats strfmt.Registry) error {`,
  3260  		`	if err := m.validateProp3(formats); err != nil {`,
  3261  		`	for k := range m.AdditionalSliceOfAliasedNullablePrimitives {`,
  3262  		//`		if swag.IsZero(m.AdditionalSliceOfAliasedNullablePrimitives[k]) {`,
  3263  		`		iAdditionalSliceOfAliasedNullablePrimitivesSize := int64(len(m.AdditionalSliceOfAliasedNullablePrimitives[k])`,
  3264  		`		if err := validate.MinItems(k, "body", iAdditionalSliceOfAliasedNullablePrimitivesSize, 10); err != nil {`,
  3265  		`		for i := 0; i < len(m.AdditionalSliceOfAliasedNullablePrimitives[k]); i++ {`,
  3266  		// do we need Required when item is nullable?
  3267  		// nullable not required:
  3268  		`			if swag.IsZero(m.AdditionalSliceOfAliasedNullablePrimitives[k][i]) {`,
  3269  		// nullable required:
  3270  		//`			if err := validate.Required(k+"."+strconv.Itoa(i), "body", m.AdditionalSliceOfAliasedNullablePrimitives[k][i]); err != nil {`,
  3271  		`			if err := validate.FormatOf(k+"."+strconv.Itoa(i), "body", "date", m.AdditionalSliceOfAliasedNullablePrimitives[k][i].String(), formats); err != nil {`,
  3272  		`		return errors.CompositeValidationError(res...`,
  3273  		`func (m *AdditionalSliceOfAliasedNullablePrimitives) validateProp3(formats strfmt.Registry) error {`,
  3274  		`	if swag.IsZero(m.Prop3) {`,
  3275  		`	if err := validate.FormatOf("prop3", "body", "uuid", m.Prop3.String(), formats); err != nil {`,
  3276  	},
  3277  		// not expected
  3278  		todo,
  3279  		// output in log
  3280  		noLines,
  3281  		noLines)
  3282  
  3283  	// load expectations for model: additional_slice_of_slice.go
  3284  	flattenRun.AddExpectations("additional_slice_of_slice.go", []string{
  3285  		`type AdditionalSliceOfSlice struct {`,
  3286  		"	Prop4 strfmt.UUID `json:\"prop4,omitempty\"`",
  3287  		"	AdditionalSliceOfSlice map[string][][]*AdditionalSliceOfSliceAdditionalPropertiesItemsItems `json:\"-\"`",
  3288  		`func (m *AdditionalSliceOfSlice) Validate(formats strfmt.Registry) error {`,
  3289  		`	if err := m.validateProp4(formats); err != nil {`,
  3290  		`	for k := range m.AdditionalSliceOfSlice {`,
  3291  		`		if err := validate.Required(k, "body", m.AdditionalSliceOfSlice[k]); err != nil {`,
  3292  		`		for i := 0; i < len(m.AdditionalSliceOfSlice[k]); i++ {`,
  3293  		`			iiAdditionalSliceOfSliceSize := int64(len(m.AdditionalSliceOfSlice[k][i])`,
  3294  		`			if err := validate.MaxItems(k+"."+strconv.Itoa(i), "body", iiAdditionalSliceOfSliceSize, 10); err != nil {`,
  3295  		`			for ii := 0; ii < len(m.AdditionalSliceOfSlice[k][i]); ii++ {`,
  3296  		// do we need Required when item is nullable?
  3297  		// nullable not required:
  3298  		`				if swag.IsZero(m.AdditionalSliceOfSlice[k][i][ii]) {`,
  3299  		// nullable not required:
  3300  		//`				if err := validate.Required(k+"."+strconv.Itoa(i)+"."+strconv.Itoa(ii), "body", m.AdditionalSliceOfSlice[k][i][ii]); err != nil {`,
  3301  		`				if m.AdditionalSliceOfSlice[k][i][ii] != nil {`,
  3302  		`					if err := m.AdditionalSliceOfSlice[k][i][ii].Validate(formats); err != nil {`,
  3303  		`						if ve, ok := err.(*errors.Validation); ok {`,
  3304  		`							return ve.ValidateName(k + "." + strconv.Itoa(i) + "." + strconv.Itoa(ii)`,
  3305  		`		return errors.CompositeValidationError(res...`,
  3306  		`func (m *AdditionalSliceOfSlice) validateProp4(formats strfmt.Registry) error {`,
  3307  		`	if swag.IsZero(m.Prop4) {`,
  3308  		`	if err := validate.FormatOf("prop4", "body", "uuid", m.Prop4.String(), formats); err != nil {`,
  3309  	},
  3310  		// not expected
  3311  		todo,
  3312  		// output in log
  3313  		noLines,
  3314  		noLines)
  3315  
  3316  	expandRun.AddExpectations("additional_slice_of_slice.go", []string{
  3317  		`type AdditionalSliceOfSlice struct {`,
  3318  		"	Prop4 strfmt.UUID `json:\"prop4,omitempty\"`",
  3319  		"	AdditionalSliceOfSlice map[string][][]*AdditionalSliceOfSliceItems0 `json:\"-\"`",
  3320  		`func (m *AdditionalSliceOfSlice) Validate(formats strfmt.Registry) error {`,
  3321  		`	if err := m.validateProp4(formats); err != nil {`,
  3322  		`	for k := range m.AdditionalSliceOfSlice {`,
  3323  		`		if err := validate.Required(k, "body", m.AdditionalSliceOfSlice[k]); err != nil {`,
  3324  		`		for i := 0; i < len(m.AdditionalSliceOfSlice[k]); i++ {`,
  3325  		`			iiAdditionalSliceOfSliceSize := int64(len(m.AdditionalSliceOfSlice[k][i])`,
  3326  		`			if err := validate.MaxItems(k+"."+strconv.Itoa(i), "body", iiAdditionalSliceOfSliceSize, 10); err != nil {`,
  3327  		`			for ii := 0; ii < len(m.AdditionalSliceOfSlice[k][i]); ii++ {`,
  3328  		// do we need Required when item is nullable?
  3329  		// nullable not required:
  3330  		`				if swag.IsZero(m.AdditionalSliceOfSlice[k][i][ii]) {`,
  3331  		// nullable required:
  3332  		//`				if err := validate.Required(k+"."+strconv.Itoa(i)+"."+strconv.Itoa(ii), "body", m.AdditionalSliceOfSlice[k][i][ii]); err != nil {`,
  3333  		`				if m.AdditionalSliceOfSlice[k][i][ii] != nil {`,
  3334  		`					if err := m.AdditionalSliceOfSlice[k][i][ii].Validate(formats); err != nil {`,
  3335  		`						if ve, ok := err.(*errors.Validation); ok {`,
  3336  		`							return ve.ValidateName(k + "." + strconv.Itoa(i) + "." + strconv.Itoa(ii)`,
  3337  		`		return errors.CompositeValidationError(res...`,
  3338  		`func (m *AdditionalSliceOfSlice) validateProp4(formats strfmt.Registry) error {`,
  3339  		`	if swag.IsZero(m.Prop4) {`,
  3340  		`	if err := validate.FormatOf("prop4", "body", "uuid", m.Prop4.String(), formats); err != nil {`,
  3341  		`type AdditionalSliceOfSliceItems0 struct {`,
  3342  		"	Prop5 int64 `json:\"prop5,omitempty\"`",
  3343  		`func (m *AdditionalSliceOfSliceItems0) Validate(formats strfmt.Registry) error {`,
  3344  		`	if err := m.validateProp5(formats); err != nil {`,
  3345  		`		return errors.CompositeValidationError(res...`,
  3346  		`func (m *AdditionalSliceOfSliceItems0) validateProp5(formats strfmt.Registry) error {`,
  3347  		`	if swag.IsZero(m.Prop5) {`,
  3348  		`	if err := validate.MaximumInt("prop5", "body", int64(m.Prop5), 10, false); err != nil {`,
  3349  	},
  3350  		// not expected
  3351  		todo,
  3352  		// output in log
  3353  		noLines,
  3354  		noLines)
  3355  
  3356  	// load expectations for model: additional_object_with_aliased_thing.go
  3357  	flattenRun.AddExpectations("additional_object_with_aliased_thing.go", []string{
  3358  		`type AdditionalObjectWithAliasedThing struct {`,
  3359  		"	Blob int64 `json:\"blob,omitempty\"`",
  3360  		"	AdditionalObjectWithAliasedThing map[string]AliasedDate `json:\"-\"`",
  3361  		`func (m *AdditionalObjectWithAliasedThing) Validate(formats strfmt.Registry) error {`,
  3362  		`	if err := m.validateBlob(formats); err != nil {`,
  3363  		`	for k := range m.AdditionalObjectWithAliasedThing {`,
  3364  		// removed undue IsZero call
  3365  		//`		if swag.IsZero(m.AdditionalObjectWithAliasedThing[k]) {`,
  3366  		`		if val, ok := m.AdditionalObjectWithAliasedThing[k]; ok {`,
  3367  		`			if err := val.Validate(formats); err != nil {`,
  3368  		`		return errors.CompositeValidationError(res...`,
  3369  		`func (m *AdditionalObjectWithAliasedThing) validateBlob(formats strfmt.Registry) error {`,
  3370  		`	if swag.IsZero(m.Blob) {`,
  3371  		`	if err := validate.MinimumInt("blob", "body", int64(m.Blob), 1, false); err != nil {`,
  3372  	},
  3373  		// not expected
  3374  		todo,
  3375  		// output in log
  3376  		noLines,
  3377  		noLines)
  3378  
  3379  	expandRun.AddExpectations("additional_object_with_aliased_thing.go", []string{
  3380  		`type AdditionalObjectWithAliasedThing struct {`,
  3381  		"	Blob int64 `json:\"blob,omitempty\"`",
  3382  		"	AdditionalObjectWithAliasedThing map[string]strfmt.Date `json:\"-\"`",
  3383  		`func (m *AdditionalObjectWithAliasedThing) Validate(formats strfmt.Registry) error {`,
  3384  		`	if err := m.validateBlob(formats); err != nil {`,
  3385  		`	for k := range m.AdditionalObjectWithAliasedThing {`,
  3386  		//`		if swag.IsZero(m.AdditionalObjectWithAliasedThing[k]) {`,
  3387  		`		if err := validate.FormatOf(k, "body", "date", m.AdditionalObjectWithAliasedThing[k].String(), formats); err != nil {`,
  3388  		`		return errors.CompositeValidationError(res...`,
  3389  		`func (m *AdditionalObjectWithAliasedThing) validateBlob(formats strfmt.Registry) error {`,
  3390  		`	if swag.IsZero(m.Blob) {`,
  3391  		`	if err := validate.MinimumInt("blob", "body", int64(m.Blob), 1, false); err != nil {`,
  3392  	},
  3393  		// not expected
  3394  		todo,
  3395  		// output in log
  3396  		noLines,
  3397  		noLines)
  3398  
  3399  	// load expectations for model: additional_things_nested_additional_properties.go
  3400  	flattenRun.AddExpectations("additional_things_nested_additional_properties.go", []string{
  3401  		`type AdditionalThingsNestedAdditionalProperties struct {`,
  3402  		"	PrinterAddress string `json:\"printerAddress,omitempty\"`",
  3403  		"	PrinterCountry string `json:\"printerCountry,omitempty\"`",
  3404  		"	PrinterDate strfmt.Date `json:\"printerDate,omitempty\"`",
  3405  		"	AdditionalThingsNestedAdditionalProperties map[string]*AdditionalThingsNestedAdditionalPropertiesAdditionalProperties `json:\"-\"`",
  3406  		`func (m *AdditionalThingsNestedAdditionalProperties) Validate(formats strfmt.Registry) error {`,
  3407  		`	if err := m.validatePrinterCountry(formats); err != nil {`,
  3408  		`	if err := m.validatePrinterDate(formats); err != nil {`,
  3409  		`	for k := range m.AdditionalThingsNestedAdditionalProperties {`,
  3410  		`		if val, ok := m.AdditionalThingsNestedAdditionalProperties[k]; ok {`,
  3411  		`			if val != nil {`,
  3412  		`				if err := val.Validate(formats); err != nil {`,
  3413  		`		return errors.CompositeValidationError(res...`,
  3414  		`var additionalThingsNestedAdditionalPropertiesTypePrinterCountryPropEnum []interface{`,
  3415  		`	var res []string`,
  3416  		"	if err := json.Unmarshal([]byte(`[\"US\",\"FR\",\"UK\",\"BE\",\"CA\",\"DE\"]`), &res); err != nil {",
  3417  		`	for _, v := range res {`,
  3418  		`		additionalThingsNestedAdditionalPropertiesTypePrinterCountryPropEnum = append(additionalThingsNestedAdditionalPropertiesTypePrinterCountryPropEnum, v`,
  3419  		`	AdditionalThingsNestedAdditionalPropertiesPrinterCountryUS string = "US"`,
  3420  		`	AdditionalThingsNestedAdditionalPropertiesPrinterCountryFR string = "FR"`,
  3421  		`	AdditionalThingsNestedAdditionalPropertiesPrinterCountryUK string = "UK"`,
  3422  		`	AdditionalThingsNestedAdditionalPropertiesPrinterCountryBE string = "BE"`,
  3423  		`	AdditionalThingsNestedAdditionalPropertiesPrinterCountryCA string = "CA"`,
  3424  		`	AdditionalThingsNestedAdditionalPropertiesPrinterCountryDE string = "DE"`,
  3425  		`func (m *AdditionalThingsNestedAdditionalProperties) validatePrinterCountryEnum(path, location string, value string) error {`,
  3426  		`	if err := validate.EnumCase(path, location, value, additionalThingsNestedAdditionalPropertiesTypePrinterCountryPropEnum, true); err != nil {`,
  3427  		`func (m *AdditionalThingsNestedAdditionalProperties) validatePrinterCountry(formats strfmt.Registry) error {`,
  3428  		`	if swag.IsZero(m.PrinterCountry) {`,
  3429  		`	if err := m.validatePrinterCountryEnum("printerCountry", "body", m.PrinterCountry); err != nil {`,
  3430  		`func (m *AdditionalThingsNestedAdditionalProperties) validatePrinterDate(formats strfmt.Registry) error {`,
  3431  		`	if swag.IsZero(m.PrinterDate) {`,
  3432  		`	if err := validate.FormatOf("printerDate", "body", "date", m.PrinterDate.String(), formats); err != nil {`,
  3433  	},
  3434  		// not expected
  3435  		todo,
  3436  		// output in log
  3437  		noLines,
  3438  		noLines)
  3439  
  3440  	// load expectations for model: empty_object_with_additional_slice_additional_properties_items.go
  3441  	flattenRun.AddExpectations("empty_object_with_additional_slice_additional_properties_items.go", []string{
  3442  		`type EmptyObjectWithAdditionalSliceAdditionalPropertiesItems struct {`,
  3443  		"	DummyProp1 strfmt.Date `json:\"dummyProp1,omitempty\"`",
  3444  		`func (m *EmptyObjectWithAdditionalSliceAdditionalPropertiesItems) Validate(formats strfmt.Registry) error {`,
  3445  		`	if err := m.validateDummyProp1(formats); err != nil {`,
  3446  		`		return errors.CompositeValidationError(res...`,
  3447  		`func (m *EmptyObjectWithAdditionalSliceAdditionalPropertiesItems) validateDummyProp1(formats strfmt.Registry) error {`,
  3448  		`	if swag.IsZero(m.DummyProp1) {`,
  3449  		`	if err := validate.FormatOf("dummyProp1", "body", "date", m.DummyProp1.String(), formats); err != nil {`,
  3450  	},
  3451  		// not expected
  3452  		todo,
  3453  		// output in log
  3454  		noLines,
  3455  		noLines)
  3456  
  3457  	// load expectations for model: additional_things_nested_additional_properties_additional_properties.go
  3458  	flattenRun.AddExpectations("additional_things_nested_additional_properties_additional_properties.go", []string{
  3459  		`type AdditionalThingsNestedAdditionalPropertiesAdditionalProperties struct {`,
  3460  		"	AverageDelay strfmt.Duration `json:\"averageDelay,omitempty\"`",
  3461  		`func (m *AdditionalThingsNestedAdditionalPropertiesAdditionalProperties) Validate(formats strfmt.Registry) error {`,
  3462  		`	if err := m.validateAverageDelay(formats); err != nil {`,
  3463  		`		return errors.CompositeValidationError(res...`,
  3464  		`func (m *AdditionalThingsNestedAdditionalPropertiesAdditionalProperties) validateAverageDelay(formats strfmt.Registry) error {`,
  3465  		`	if swag.IsZero(m.AverageDelay) {`,
  3466  		`	if err := validate.FormatOf("averageDelay", "body", "duration", m.AverageDelay.String(), formats); err != nil {`,
  3467  	},
  3468  		// not expected
  3469  		todo,
  3470  		// output in log
  3471  		noLines,
  3472  		noLines)
  3473  
  3474  	// load expectations for model: additional_slice_of_slice_additional_properties_items_items.go
  3475  	flattenRun.AddExpectations("additional_slice_of_slice_additional_properties_items_items.go", []string{
  3476  		`type AdditionalSliceOfSliceAdditionalPropertiesItemsItems struct {`,
  3477  		"	Prop5 int64 `json:\"prop5,omitempty\"`",
  3478  		`func (m *AdditionalSliceOfSliceAdditionalPropertiesItemsItems) Validate(formats strfmt.Registry) error {`,
  3479  		`	if err := m.validateProp5(formats); err != nil {`,
  3480  		`		return errors.CompositeValidationError(res...`,
  3481  		`func (m *AdditionalSliceOfSliceAdditionalPropertiesItemsItems) validateProp5(formats strfmt.Registry) error {`,
  3482  		`	if swag.IsZero(m.Prop5) {`,
  3483  		`	if err := validate.MaximumInt("prop5", "body", int64(m.Prop5), 10, false); err != nil {`,
  3484  	},
  3485  		// not expected
  3486  		todo,
  3487  		// output in log
  3488  		noLines,
  3489  		noLines)
  3490  
  3491  	// load expectations for model: additional_object_additional_properties.go
  3492  	flattenRun.AddExpectations("additional_object_additional_properties.go", []string{
  3493  		`type AdditionalObjectAdditionalProperties struct {`,
  3494  		"	MockA string `json:\"mockA,omitempty\"`",
  3495  		"	MockB *string `json:\"mockB\"`",
  3496  		"	MockC float64 `json:\"mockC,omitempty\"`",
  3497  		`func (m *AdditionalObjectAdditionalProperties) Validate(formats strfmt.Registry) error {`,
  3498  		`	if err := m.validateMockA(formats); err != nil {`,
  3499  		`	if err := m.validateMockB(formats); err != nil {`,
  3500  		`		return errors.CompositeValidationError(res...`,
  3501  		`func (m *AdditionalObjectAdditionalProperties) validateMockA(formats strfmt.Registry) error {`,
  3502  		`	if swag.IsZero(m.MockA) {`,
  3503  		"	if err := validate.Pattern(\"mockA\", \"body\", string(m.MockA), `^[A-Z]$`); err != nil {",
  3504  		`func (m *AdditionalObjectAdditionalProperties) validateMockB(formats strfmt.Registry) error {`,
  3505  		`	if err := validate.Required("mockB", "body", m.MockB); err != nil {`,
  3506  		`	if err := validate.MinLength("mockB", "body", string(*m.MockB), 1); err != nil {`,
  3507  	},
  3508  		// not expected
  3509  		todo,
  3510  		// output in log
  3511  		noLines,
  3512  		noLines)
  3513  
  3514  	// load expectations for model: additional_transitive_refed_thing.go
  3515  	flattenRun.AddExpectations("additional_transitive_refed_thing.go", []string{
  3516  		`type AdditionalTransitiveRefedThing struct {`,
  3517  		"	ThisOneNotRequired int64 `json:\"thisOneNotRequired,omitempty\"`",
  3518  		"	AdditionalTransitiveRefedThing map[string][]*TransitiveRefedThing `json:\"-\"`",
  3519  		`func (m *AdditionalTransitiveRefedThing) Validate(formats strfmt.Registry) error {`,
  3520  		`	if err := m.validateThisOneNotRequired(formats); err != nil {`,
  3521  		`	for k := range m.AdditionalTransitiveRefedThing {`,
  3522  		`		if err := validate.Required(k, "body", m.AdditionalTransitiveRefedThing[k]); err != nil {`,
  3523  		`		if err := validate.UniqueItems(k, "body", m.AdditionalTransitiveRefedThing[k]); err != nil {`,
  3524  		`		for i := 0; i < len(m.AdditionalTransitiveRefedThing[k]); i++ {`,
  3525  		// do we need Required when item is nullable?
  3526  		// nullable not required:
  3527  		`			if swag.IsZero(m.AdditionalTransitiveRefedThing[k][i]) {`,
  3528  		// nullable required:
  3529  		//`			if err := validate.Required(k+"."+strconv.Itoa(i), "body", m.AdditionalTransitiveRefedThing[k][i]); err != nil {`,
  3530  		`			if m.AdditionalTransitiveRefedThing[k][i] != nil {`,
  3531  		`				if err := m.AdditionalTransitiveRefedThing[k][i].Validate(formats); err != nil {`,
  3532  		`					if ve, ok := err.(*errors.Validation); ok {`,
  3533  		`						return ve.ValidateName(k + "." + strconv.Itoa(i)`,
  3534  		`		return errors.CompositeValidationError(res...`,
  3535  		`func (m *AdditionalTransitiveRefedThing) validateThisOneNotRequired(formats strfmt.Registry) error {`,
  3536  		`	if swag.IsZero(m.ThisOneNotRequired) {`,
  3537  		`	if err := validate.MaximumInt("thisOneNotRequired", "body", int64(m.ThisOneNotRequired), 10, false); err != nil {`,
  3538  	},
  3539  		// not expected
  3540  		todo,
  3541  		// output in log
  3542  		noLines,
  3543  		noLines)
  3544  
  3545  	expandRun.AddExpectations("additional_transitive_refed_thing.go", []string{
  3546  		`type AdditionalTransitiveRefedThing struct {`,
  3547  		"	ThisOneNotRequired int64 `json:\"thisOneNotRequired,omitempty\"`",
  3548  		"	AdditionalTransitiveRefedThing map[string][]*AdditionalTransitiveRefedThingItems0 `json:\"-\"`",
  3549  		`func (m *AdditionalTransitiveRefedThing) Validate(formats strfmt.Registry) error {`,
  3550  		`	if err := m.validateThisOneNotRequired(formats); err != nil {`,
  3551  		`	for k := range m.AdditionalTransitiveRefedThing {`,
  3552  		`		if err := validate.Required(k, "body", m.AdditionalTransitiveRefedThing[k]); err != nil {`,
  3553  		`		if err := validate.UniqueItems(k, "body", m.AdditionalTransitiveRefedThing[k]); err != nil {`,
  3554  		`		for i := 0; i < len(m.AdditionalTransitiveRefedThing[k]); i++ {`,
  3555  		// do we need Required when item is nullable?
  3556  		// nullable not required:
  3557  		`			if swag.IsZero(m.AdditionalTransitiveRefedThing[k][i]) {`,
  3558  		// nullable required:
  3559  		//`			if err := validate.Required(k+"."+strconv.Itoa(i), "body", m.AdditionalTransitiveRefedThing[k][i]); err != nil {`,
  3560  		`			if m.AdditionalTransitiveRefedThing[k][i] != nil {`,
  3561  		`				if err := m.AdditionalTransitiveRefedThing[k][i].Validate(formats); err != nil {`,
  3562  		`					if ve, ok := err.(*errors.Validation); ok {`,
  3563  		`						return ve.ValidateName(k + "." + strconv.Itoa(i)`,
  3564  		`		return errors.CompositeValidationError(res...`,
  3565  		`func (m *AdditionalTransitiveRefedThing) validateThisOneNotRequired(formats strfmt.Registry) error {`,
  3566  		`	if swag.IsZero(m.ThisOneNotRequired) {`,
  3567  		`	if err := validate.MaximumInt("thisOneNotRequired", "body", int64(m.ThisOneNotRequired), 10, false); err != nil {`,
  3568  		`type AdditionalTransitiveRefedThingItems0 struct {`,
  3569  		"	ThisOneNotRequiredEither int64 `json:\"thisOneNotRequiredEither,omitempty\"`",
  3570  		"	AdditionalTransitiveRefedThingItems0 map[string]*AdditionalTransitiveRefedThingItems0Anon `json:\"-\"`",
  3571  		`func (m *AdditionalTransitiveRefedThingItems0) Validate(formats strfmt.Registry) error {`,
  3572  		`	if err := m.validateThisOneNotRequiredEither(formats); err != nil {`,
  3573  		`	for k := range m.AdditionalTransitiveRefedThingItems0 {`,
  3574  		`		if val, ok := m.AdditionalTransitiveRefedThingItems0[k]; ok {`,
  3575  		`			if val != nil {`,
  3576  		`				if err := val.Validate(formats); err != nil {`,
  3577  		`		return errors.CompositeValidationError(res...`,
  3578  		`func (m *AdditionalTransitiveRefedThingItems0) validateThisOneNotRequiredEither(formats strfmt.Registry) error {`,
  3579  		`	if swag.IsZero(m.ThisOneNotRequiredEither) {`,
  3580  		`	if err := validate.MaximumInt("thisOneNotRequiredEither", "body", int64(m.ThisOneNotRequiredEither), 20, false); err != nil {`,
  3581  		`type AdditionalTransitiveRefedThingItems0Anon struct {`,
  3582  		"	A1 strfmt.DateTime `json:\"a1,omitempty\"`",
  3583  		"	AdditionalTransitiveRefedThingItems0Anon map[string]*AdditionalTransitiveRefedThingItems0AnonAnon `json:\"-\"`",
  3584  		`func (m *AdditionalTransitiveRefedThingItems0Anon) Validate(formats strfmt.Registry) error {`,
  3585  		`	if err := m.validateA1(formats); err != nil {`,
  3586  		`	for k := range m.AdditionalTransitiveRefedThingItems0Anon {`,
  3587  		`		if val, ok := m.AdditionalTransitiveRefedThingItems0Anon[k]; ok {`,
  3588  		`			if val != nil {`,
  3589  		`				if err := val.Validate(formats); err != nil {`,
  3590  		`		return errors.CompositeValidationError(res...`,
  3591  		`func (m *AdditionalTransitiveRefedThingItems0Anon) validateA1(formats strfmt.Registry) error {`,
  3592  		`	if swag.IsZero(m.A1) {`,
  3593  		`	if err := validate.FormatOf("a1", "body", "date-time", m.A1.String(), formats); err != nil {`,
  3594  		`type AdditionalTransitiveRefedThingItems0AnonAnon struct {`,
  3595  		"	Discourse string `json:\"discourse,omitempty\"`",
  3596  		"	HoursSpent float64 `json:\"hoursSpent,omitempty\"`",
  3597  		"	AdditionalTransitiveRefedThingItems0AnonAnonAdditionalProperties map[string]interface{} `json:\"-\"`",
  3598  		// empty validation
  3599  		"func (m *AdditionalTransitiveRefedThingItems0AnonAnon) Validate(formats strfmt.Registry) error {\n	return nil\n}",
  3600  	},
  3601  		// not expected
  3602  		todo,
  3603  		// output in log
  3604  		noLines,
  3605  		noLines)
  3606  
  3607  	// load expectations for model: additional_nullable_array_thing.go
  3608  	flattenRun.AddExpectations("additional_nullable_array_thing.go", []string{
  3609  		`type AdditionalNullableArrayThing struct {`,
  3610  		"	ThisOneNotRequired int64 `json:\"thisOneNotRequired,omitempty\"`",
  3611  		"	AdditionalNullableArrayThing map[string][]strfmt.ISBN `json:\"-\"`",
  3612  		`func (m *AdditionalNullableArrayThing) Validate(formats strfmt.Registry) error {`,
  3613  		`	if err := m.validateThisOneNotRequired(formats); err != nil {`,
  3614  		`	for k := range m.AdditionalNullableArrayThing {`,
  3615  		//`		if swag.IsZero(m.AdditionalNullableArrayThing[k]) {`,
  3616  		`		if err := validate.UniqueItems(k, "body", m.AdditionalNullableArrayThing[k]); err != nil {`,
  3617  		`		for i := 0; i < len(m.AdditionalNullableArrayThing[k]); i++ {`,
  3618  		`			if err := validate.FormatOf(k+"."+strconv.Itoa(i), "body", "isbn", m.AdditionalNullableArrayThing[k][i].String(), formats); err != nil {`,
  3619  		`		return errors.CompositeValidationError(res...`,
  3620  		`func (m *AdditionalNullableArrayThing) validateThisOneNotRequired(formats strfmt.Registry) error {`,
  3621  		`	if swag.IsZero(m.ThisOneNotRequired) {`,
  3622  		`	if err := validate.MaximumInt("thisOneNotRequired", "body", int64(m.ThisOneNotRequired), 10, false); err != nil {`,
  3623  	},
  3624  		// not expected
  3625  		todo,
  3626  		// output in log
  3627  		noLines,
  3628  		noLines)
  3629  
  3630  	expandRun.AddExpectations("additional_nullable_array_thing.go", flattenRun.ExpectedFor("AdditionalNullableArrayThing").ExpectedLines, todo, noLines, noLines)
  3631  
  3632  	// load expectations for model: additional_slice_of_primitives.go
  3633  	flattenRun.AddExpectations("additional_slice_of_primitives.go", []string{
  3634  		`type AdditionalSliceOfPrimitives struct {`,
  3635  		"	Prop1 string `json:\"prop1,omitempty\"`",
  3636  		"	AdditionalSliceOfPrimitives map[string][]strfmt.Date `json:\"-\"`",
  3637  		`func (m *AdditionalSliceOfPrimitives) Validate(formats strfmt.Registry) error {`,
  3638  		`	for k := range m.AdditionalSliceOfPrimitives {`,
  3639  		//`		if swag.IsZero(m.AdditionalSliceOfPrimitives[k]) {`,
  3640  		`		if err := validate.UniqueItems(k, "body", m.AdditionalSliceOfPrimitives[k]); err != nil {`,
  3641  		`		for i := 0; i < len(m.AdditionalSliceOfPrimitives[k]); i++ {`,
  3642  		`			if err := validate.FormatOf(k+"."+strconv.Itoa(i), "body", "date", m.AdditionalSliceOfPrimitives[k][i].String(), formats); err != nil {`,
  3643  		`		return errors.CompositeValidationError(res...`,
  3644  	},
  3645  		// not expected
  3646  		todo,
  3647  		// output in log
  3648  		noLines,
  3649  		noLines)
  3650  
  3651  	expandRun.AddExpectations("additional_slice_of_primitives.go", flattenRun.ExpectedFor("AdditionalSliceOfPrimitives").ExpectedLines, todo, noLines, noLines)
  3652  
  3653  	// load expectations for model: additional_array_thing.go
  3654  	flattenRun.AddExpectations("additional_array_thing.go", []string{
  3655  		`type AdditionalArrayThing struct {`,
  3656  		"	ThisOneNotRequired int64 `json:\"thisOneNotRequired,omitempty\"`",
  3657  		"	AdditionalArrayThing map[string][]strfmt.UUID `json:\"-\"`",
  3658  		`func (m *AdditionalArrayThing) Validate(formats strfmt.Registry) error {`,
  3659  		`	if err := m.validateThisOneNotRequired(formats); err != nil {`,
  3660  		`	for k := range m.AdditionalArrayThing {`,
  3661  		//`		if swag.IsZero(m.AdditionalArrayThing[k]) {`,
  3662  		`		if err := validate.UniqueItems(k, "body", m.AdditionalArrayThing[k]); err != nil {`,
  3663  		`		for i := 0; i < len(m.AdditionalArrayThing[k]); i++ {`,
  3664  		`			if err := validate.FormatOf(k+"."+strconv.Itoa(i), "body", "uuid", m.AdditionalArrayThing[k][i].String(), formats); err != nil {`,
  3665  		`		return errors.CompositeValidationError(res...`,
  3666  		`func (m *AdditionalArrayThing) validateThisOneNotRequired(formats strfmt.Registry) error {`,
  3667  		`	if swag.IsZero(m.ThisOneNotRequired) {`,
  3668  		`	if err := validate.MaximumInt("thisOneNotRequired", "body", int64(m.ThisOneNotRequired), 10, false); err != nil {`,
  3669  	},
  3670  		// not expected
  3671  		todo,
  3672  		// output in log
  3673  		noLines,
  3674  		noLines)
  3675  
  3676  	expandRun.AddExpectations("additional_array_thing.go", flattenRun.ExpectedFor("AdditionalArrayThing").ExpectedLines, todo, noLines, noLines)
  3677  
  3678  	// load expectations for model: interface_thing.go
  3679  	flattenRun.AddExpectations("interface_thing.go", []string{
  3680  		`type InterfaceThing interface{}`,
  3681  	},
  3682  		// not expected
  3683  		todo,
  3684  		// output in log
  3685  		noLines,
  3686  		noLines)
  3687  
  3688  	expandRun.AddExpectations("interface_thing.go", flattenRun.ExpectedFor("InterfaceThing").ExpectedLines, todo, noLines, noLines)
  3689  
  3690  	// load expectations for model: empty_object_with_additional_slice.go
  3691  	flattenRun.AddExpectations("empty_object_with_additional_slice.go", []string{
  3692  		`type EmptyObjectWithAdditionalSlice map[string][]EmptyObjectWithAdditionalSliceAdditionalPropertiesItems`,
  3693  		`func (m EmptyObjectWithAdditionalSlice) Validate(formats strfmt.Registry) error {`,
  3694  		//`	if err := validate.Required("", "body", EmptyObjectWithAdditionalSlice(m)); err != nil {`,
  3695  		`	for k := range m {`,
  3696  		`		if err := validate.Required(k, "body", m[k]); err != nil {`,
  3697  		`		for i := 0; i < len(m[k]); i++ {`,
  3698  		`			if err := m[k][i].Validate(formats); err != nil {`,
  3699  		`				if ve, ok := err.(*errors.Validation); ok {`,
  3700  		`					return ve.ValidateName(k + "." + strconv.Itoa(i)`,
  3701  		`		return errors.CompositeValidationError(res...`,
  3702  	},
  3703  		// not expected
  3704  		todo,
  3705  		// output in log
  3706  		noLines,
  3707  		noLines)
  3708  
  3709  	expandRun.AddExpectations("empty_object_with_additional_slice.go", []string{
  3710  		`type EmptyObjectWithAdditionalSlice map[string][]EmptyObjectWithAdditionalSliceItems0`,
  3711  		`func (m EmptyObjectWithAdditionalSlice) Validate(formats strfmt.Registry) error {`,
  3712  		//`	if err := validate.Required("", "body", EmptyObjectWithAdditionalSlice(m)); err != nil {`,
  3713  		`	for k := range m {`,
  3714  		`		if err := validate.Required(k, "body", m[k]); err != nil {`,
  3715  		`		for i := 0; i < len(m[k]); i++ {`,
  3716  		`			if err := m[k][i].Validate(formats); err != nil {`,
  3717  		`				if ve, ok := err.(*errors.Validation); ok {`,
  3718  		`					return ve.ValidateName(k + "." + strconv.Itoa(i)`,
  3719  		`		return errors.CompositeValidationError(res...`,
  3720  		`type EmptyObjectWithAdditionalSliceItems0 struct {`,
  3721  		"	DummyProp1 strfmt.Date `json:\"dummyProp1,omitempty\"`",
  3722  		`func (m *EmptyObjectWithAdditionalSliceItems0) Validate(formats strfmt.Registry) error {`,
  3723  		`	if err := m.validateDummyProp1(formats); err != nil {`,
  3724  		`		return errors.CompositeValidationError(res...`,
  3725  		`func (m *EmptyObjectWithAdditionalSliceItems0) validateDummyProp1(formats strfmt.Registry) error {`,
  3726  		`	if swag.IsZero(m.DummyProp1) {`,
  3727  		`	if err := validate.FormatOf("dummyProp1", "body", "date", m.DummyProp1.String(), formats); err != nil {`,
  3728  	},
  3729  		// not expected
  3730  		todo,
  3731  		// output in log
  3732  		noLines,
  3733  		noLines)
  3734  
  3735  	// load expectations for model: additional_slice_of_objects.go
  3736  	flattenRun.AddExpectations("additional_slice_of_objects.go", []string{
  3737  		`type AdditionalSliceOfObjects struct {`,
  3738  		"	Prop1 string `json:\"prop1,omitempty\"`",
  3739  		"	AdditionalSliceOfObjects map[string][]*AdditionalSliceOfObjectsAdditionalPropertiesItems `json:\"-\"`",
  3740  		`func (m *AdditionalSliceOfObjects) Validate(formats strfmt.Registry) error {`,
  3741  		`	for k := range m.AdditionalSliceOfObjects {`,
  3742  		`		if err := validate.Required(k, "body", m.AdditionalSliceOfObjects[k]); err != nil {`,
  3743  		`		if err := validate.UniqueItems(k, "body", m.AdditionalSliceOfObjects[k]); err != nil {`,
  3744  		`		for i := 0; i < len(m.AdditionalSliceOfObjects[k]); i++ {`,
  3745  		// do we need Required when item is nullable?
  3746  		// nullable not required:
  3747  		`			if swag.IsZero(m.AdditionalSliceOfObjects[k][i]) {`,
  3748  		// nullable required:
  3749  		//`if err := validate.Required(k, "body", m.AdditionalSliceOfObjects[k]); err != nil {`,
  3750  		`			if m.AdditionalSliceOfObjects[k][i] != nil {`,
  3751  		`				if err := m.AdditionalSliceOfObjects[k][i].Validate(formats); err != nil {`,
  3752  		`					if ve, ok := err.(*errors.Validation); ok {`,
  3753  		`						return ve.ValidateName(k + "." + strconv.Itoa(i)`,
  3754  		`		return errors.CompositeValidationError(res...`,
  3755  	},
  3756  		// not expected
  3757  		todo,
  3758  		// output in log
  3759  		noLines,
  3760  		noLines)
  3761  
  3762  	expandRun.AddExpectations("additional_slice_of_objects.go", []string{
  3763  		`type AdditionalSliceOfObjects struct {`,
  3764  		"	Prop1 string `json:\"prop1,omitempty\"`",
  3765  		"	AdditionalSliceOfObjects map[string][]*AdditionalSliceOfObjectsItems0 `json:\"-\"`",
  3766  		`func (m *AdditionalSliceOfObjects) Validate(formats strfmt.Registry) error {`,
  3767  		`	for k := range m.AdditionalSliceOfObjects {`,
  3768  		`		if err := validate.Required(k, "body", m.AdditionalSliceOfObjects[k]); err != nil {`,
  3769  		`		if err := validate.UniqueItems(k, "body", m.AdditionalSliceOfObjects[k]); err != nil {`,
  3770  		`		for i := 0; i < len(m.AdditionalSliceOfObjects[k]); i++ {`,
  3771  		// do we need Required when item is nullable?
  3772  		// nullable not required:
  3773  		`			if swag.IsZero(m.AdditionalSliceOfObjects[k][i]) {`,
  3774  		// nullable required:
  3775  		//`if err := validate.Required(k, "body", m.AdditionalSliceOfObjects[k]); err != nil {`,
  3776  		`			if m.AdditionalSliceOfObjects[k][i] != nil {`,
  3777  		`				if err := m.AdditionalSliceOfObjects[k][i].Validate(formats); err != nil {`,
  3778  		`					if ve, ok := err.(*errors.Validation); ok {`,
  3779  		`						return ve.ValidateName(k + "." + strconv.Itoa(i)`,
  3780  		`		return errors.CompositeValidationError(res...`,
  3781  		`type AdditionalSliceOfObjectsItems0 struct {`,
  3782  		"	Prop2 int64 `json:\"prop2,omitempty\"`",
  3783  		// empty validation
  3784  		"func (m *AdditionalSliceOfObjectsItems0) Validate(formats strfmt.Registry) error {\n	return nil\n}",
  3785  	},
  3786  		// not expected
  3787  		todo,
  3788  		// output in log
  3789  		noLines,
  3790  		noLines)
  3791  
  3792  	// load expectations for model: additional_things_nested.go
  3793  	flattenRun.AddExpectations("additional_things_nested.go", []string{
  3794  		`type AdditionalThingsNested struct {`,
  3795  		"	Origin string `json:\"origin,omitempty\"`",
  3796  		"	AdditionalThingsNested map[string]*AdditionalThingsNestedAdditionalProperties `json:\"-\"`",
  3797  		`func (m *AdditionalThingsNested) Validate(formats strfmt.Registry) error {`,
  3798  		`	if err := m.validateOrigin(formats); err != nil {`,
  3799  		`	for k := range m.AdditionalThingsNested {`,
  3800  		`		if val, ok := m.AdditionalThingsNested[k]; ok {`,
  3801  		`			if val != nil {`,
  3802  		`				if err := val.Validate(formats); err != nil {`,
  3803  		`		return errors.CompositeValidationError(res...`,
  3804  		`var additionalThingsNestedTypeOriginPropEnum []interface{`,
  3805  		`	var res []string`,
  3806  		"	if err := json.Unmarshal([]byte(`[\"goPrint\",\"goE-book\",\"goCollection\",\"goMuseum\"]`), &res); err != nil {",
  3807  		`	for _, v := range res {`,
  3808  		`		additionalThingsNestedTypeOriginPropEnum = append(additionalThingsNestedTypeOriginPropEnum, v`,
  3809  		`	AdditionalThingsNestedOriginGoPrint string = "goPrint"`,
  3810  		`	AdditionalThingsNestedOriginGoEBook string = "goE-book"`,
  3811  		`	AdditionalThingsNestedOriginGoCollection string = "goCollection"`,
  3812  		`	AdditionalThingsNestedOriginGoMuseum string = "goMuseum"`,
  3813  		`func (m *AdditionalThingsNested) validateOriginEnum(path, location string, value string) error {`,
  3814  		`	if err := validate.EnumCase(path, location, value, additionalThingsNestedTypeOriginPropEnum, true); err != nil {`,
  3815  		`func (m *AdditionalThingsNested) validateOrigin(formats strfmt.Registry) error {`,
  3816  		`	if swag.IsZero(m.Origin) {`,
  3817  		`	if err := m.validateOriginEnum("origin", "body", m.Origin); err != nil {`,
  3818  	},
  3819  		// not expected
  3820  		todo,
  3821  		// output in log
  3822  		noLines,
  3823  		noLines)
  3824  
  3825  	expandRun.AddExpectations("additional_things_nested.go", []string{
  3826  		`type AdditionalThingsNested struct {`,
  3827  		"	Origin string `json:\"origin,omitempty\"`",
  3828  		"	AdditionalThingsNested map[string]*AdditionalThingsNestedAnon `json:\"-\"`",
  3829  		`func (m *AdditionalThingsNested) Validate(formats strfmt.Registry) error {`,
  3830  		`	if err := m.validateOrigin(formats); err != nil {`,
  3831  		`	for k := range m.AdditionalThingsNested {`,
  3832  		`		if val, ok := m.AdditionalThingsNested[k]; ok {`,
  3833  		`			if val != nil {`,
  3834  		`				if err := val.Validate(formats); err != nil {`,
  3835  		`		return errors.CompositeValidationError(res...`,
  3836  		`var additionalThingsNestedTypeOriginPropEnum []interface{`,
  3837  		`	var res []string`,
  3838  		"	if err := json.Unmarshal([]byte(`[\"goPrint\",\"goE-book\",\"goCollection\",\"goMuseum\"]`), &res); err != nil {",
  3839  		`	for _, v := range res {`,
  3840  		`		additionalThingsNestedTypeOriginPropEnum = append(additionalThingsNestedTypeOriginPropEnum, v`,
  3841  		`	AdditionalThingsNestedOriginGoPrint string = "goPrint"`,
  3842  		`	AdditionalThingsNestedOriginGoEBook string = "goE-book"`,
  3843  		`	AdditionalThingsNestedOriginGoCollection string = "goCollection"`,
  3844  		`	AdditionalThingsNestedOriginGoMuseum string = "goMuseum"`,
  3845  		`func (m *AdditionalThingsNested) validateOriginEnum(path, location string, value string) error {`,
  3846  		`	if err := validate.EnumCase(path, location, value, additionalThingsNestedTypeOriginPropEnum, true); err != nil {`,
  3847  		`func (m *AdditionalThingsNested) validateOrigin(formats strfmt.Registry) error {`,
  3848  		`	if swag.IsZero(m.Origin) {`,
  3849  		`	if err := m.validateOriginEnum("origin", "body", m.Origin); err != nil {`,
  3850  		`type AdditionalThingsNestedAnon struct {`,
  3851  		"	PrinterAddress string `json:\"printerAddress,omitempty\"`",
  3852  		"	PrinterCountry string `json:\"printerCountry,omitempty\"`",
  3853  		"	PrinterDate strfmt.Date `json:\"printerDate,omitempty\"`",
  3854  		"	AdditionalThingsNestedAnon map[string]*AdditionalThingsNestedAnonAnon `json:\"-\"`",
  3855  		`func (m *AdditionalThingsNestedAnon) Validate(formats strfmt.Registry) error {`,
  3856  		`	if err := m.validatePrinterCountry(formats); err != nil {`,
  3857  		`	if err := m.validatePrinterDate(formats); err != nil {`,
  3858  		`	for k := range m.AdditionalThingsNestedAnon {`,
  3859  		`		if val, ok := m.AdditionalThingsNestedAnon[k]; ok {`,
  3860  		`			if val != nil {`,
  3861  		`				if err := val.Validate(formats); err != nil {`,
  3862  		`		return errors.CompositeValidationError(res...`,
  3863  		`var additionalThingsNestedAnonTypePrinterCountryPropEnum []interface{`,
  3864  		`	var res []string`,
  3865  		"	if err := json.Unmarshal([]byte(`[\"US\",\"FR\",\"UK\",\"BE\",\"CA\",\"DE\"]`), &res); err != nil {",
  3866  		`	for _, v := range res {`,
  3867  		`		additionalThingsNestedAnonTypePrinterCountryPropEnum = append(additionalThingsNestedAnonTypePrinterCountryPropEnum, v`,
  3868  		`	AdditionalThingsNestedAnonPrinterCountryUS string = "US"`,
  3869  		`	AdditionalThingsNestedAnonPrinterCountryFR string = "FR"`,
  3870  		`	AdditionalThingsNestedAnonPrinterCountryUK string = "UK"`,
  3871  		`	AdditionalThingsNestedAnonPrinterCountryBE string = "BE"`,
  3872  		`	AdditionalThingsNestedAnonPrinterCountryCA string = "CA"`,
  3873  		`	AdditionalThingsNestedAnonPrinterCountryDE string = "DE"`,
  3874  		`func (m *AdditionalThingsNestedAnon) validatePrinterCountryEnum(path, location string, value string) error {`,
  3875  		`	if err := validate.EnumCase(path, location, value, additionalThingsNestedAnonTypePrinterCountryPropEnum, true); err != nil {`,
  3876  		`func (m *AdditionalThingsNestedAnon) validatePrinterCountry(formats strfmt.Registry) error {`,
  3877  		`	if swag.IsZero(m.PrinterCountry) {`,
  3878  		`	if err := m.validatePrinterCountryEnum("printerCountry", "body", m.PrinterCountry); err != nil {`,
  3879  		`func (m *AdditionalThingsNestedAnon) validatePrinterDate(formats strfmt.Registry) error {`,
  3880  		`	if swag.IsZero(m.PrinterDate) {`,
  3881  		`	if err := validate.FormatOf("printerDate", "body", "date", m.PrinterDate.String(), formats); err != nil {`,
  3882  		`type AdditionalThingsNestedAnonAnon struct {`,
  3883  		"	AverageDelay strfmt.Duration `json:\"averageDelay,omitempty\"`",
  3884  		`func (m *AdditionalThingsNestedAnonAnon) Validate(formats strfmt.Registry) error {`,
  3885  		`	if err := m.validateAverageDelay(formats); err != nil {`,
  3886  		`		return errors.CompositeValidationError(res...`,
  3887  		`func (m *AdditionalThingsNestedAnonAnon) validateAverageDelay(formats strfmt.Registry) error {`,
  3888  		`	if swag.IsZero(m.AverageDelay) {`,
  3889  		`	if err := validate.FormatOf("averageDelay", "body", "duration", m.AverageDelay.String(), formats); err != nil {`,
  3890  	},
  3891  		// not expected
  3892  		todo,
  3893  		// output in log
  3894  		noLines,
  3895  		noLines)
  3896  
  3897  	// load expectations for model: no_validation_thing.go
  3898  	flattenRun.AddExpectations("no_validation_thing.go", []string{
  3899  		`type NoValidationThing struct {`,
  3900  		"	Discourse string `json:\"discourse,omitempty\"`",
  3901  		"	HoursSpent float64 `json:\"hoursSpent,omitempty\"`",
  3902  		"	NoValidationThingAdditionalProperties map[string]interface{} `json:\"-\"`",
  3903  		// empty validation
  3904  		"func (m *NoValidationThing) Validate(formats strfmt.Registry) error {\n	return nil\n}",
  3905  	},
  3906  		// not expected
  3907  		todo,
  3908  		// output in log
  3909  		noLines,
  3910  		noLines)
  3911  
  3912  	expandRun.AddExpectations("no_validation_thing.go", flattenRun.ExpectedFor("NoValidationThing").ExpectedLines, todo, noLines, noLines)
  3913  
  3914  	// load expectations for model: additional_array_of_interface.go
  3915  	flattenRun.AddExpectations("additional_array_of_interface.go", []string{
  3916  		`type AdditionalArrayOfInterface struct {`,
  3917  		"	ThisOneNotRequired int64 `json:\"thisOneNotRequired,omitempty\"`",
  3918  		"	AdditionalArrayOfInterface map[string][]interface{} `json:\"-\"`",
  3919  		`func (m *AdditionalArrayOfInterface) Validate(formats strfmt.Registry) error {`,
  3920  		`	if err := m.validateThisOneNotRequired(formats); err != nil {`,
  3921  		`	for k := range m.AdditionalArrayOfInterface {`,
  3922  		// remove undue IsZero call
  3923  		//`		if swag.IsZero(m.AdditionalArrayOfInterface[k]) {`,
  3924  		`		if err := validate.UniqueItems(k, "body", m.AdditionalArrayOfInterface[k]); err != nil {`,
  3925  		`		return errors.CompositeValidationError(res...`,
  3926  		`func (m *AdditionalArrayOfInterface) validateThisOneNotRequired(formats strfmt.Registry) error {`,
  3927  		`	if swag.IsZero(m.ThisOneNotRequired) {`,
  3928  		`	if err := validate.MaximumInt("thisOneNotRequired", "body", int64(m.ThisOneNotRequired), 10, false); err != nil {`,
  3929  	},
  3930  		// not expected
  3931  		todo,
  3932  		// output in log
  3933  		noLines,
  3934  		noLines)
  3935  
  3936  	expandRun.AddExpectations("additional_array_of_interface.go", flattenRun.ExpectedFor("AdditionalArrayOfInterface").ExpectedLines, todo, noLines, noLines)
  3937  
  3938  	// load expectations for model: additional_formated_thing.go
  3939  	flattenRun.AddExpectations("additional_formated_thing.go", []string{
  3940  		`type AdditionalFormatedThing map[string]strfmt.Date`,
  3941  		`func (m AdditionalFormatedThing) Validate(formats strfmt.Registry) error {`,
  3942  		`	for k := range m {`,
  3943  		//`		if swag.IsZero(m[k]) {`,
  3944  		`		if err := validate.FormatOf(k, "body", "date", m[k].String(), formats); err != nil {`,
  3945  		`		return errors.CompositeValidationError(res...`,
  3946  	},
  3947  		// not expected
  3948  		todo,
  3949  		// output in log
  3950  		noLines,
  3951  		noLines)
  3952  
  3953  	expandRun.AddExpectations("additional_formated_thing.go", flattenRun.ExpectedFor("AdditionalFormatedThing").ExpectedLines, todo, noLines, noLines)
  3954  
  3955  	// load expectations for model: aliased_nullable_date.go
  3956  	flattenRun.AddExpectations("aliased_nullable_date.go", []string{
  3957  		`type AliasedNullableDate strfmt.Date`,
  3958  		`func (m AliasedNullableDate) Validate(formats strfmt.Registry) error {`,
  3959  		`	if err := validate.FormatOf("", "body", "date", strfmt.Date(m).String(), formats); err != nil {`,
  3960  		`		return errors.CompositeValidationError(res...`,
  3961  	},
  3962  		// not expected
  3963  		todo,
  3964  		// output in log
  3965  		noLines,
  3966  		noLines)
  3967  
  3968  	expandRun.AddExpectations("aliased_nullable_date.go", flattenRun.ExpectedFor("AliasedNullableDate").ExpectedLines, todo, noLines, noLines)
  3969  
  3970  	// load expectations for model: additional_array_of_refed_object.go
  3971  	flattenRun.AddExpectations("additional_array_of_refed_object.go", []string{
  3972  		`type AdditionalArrayOfRefedObject struct {`,
  3973  		"	ThisOneNotRequired int64 `json:\"thisOneNotRequired,omitempty\"`",
  3974  		"	AdditionalArrayOfRefedObject map[string][]*NoValidationThing `json:\"-\"`",
  3975  		`func (m *AdditionalArrayOfRefedObject) Validate(formats strfmt.Registry) error {`,
  3976  		`	if err := m.validateThisOneNotRequired(formats); err != nil {`,
  3977  		`	for k := range m.AdditionalArrayOfRefedObject {`,
  3978  		`		if err := validate.Required(k, "body", m.AdditionalArrayOfRefedObject[k]); err != nil {`,
  3979  		`		if err := validate.UniqueItems(k, "body", m.AdditionalArrayOfRefedObject[k]); err != nil {`,
  3980  		`		for i := 0; i < len(m.AdditionalArrayOfRefedObject[k]); i++ {`,
  3981  		// do we need Required when item is nullable?
  3982  		// nullable not required:
  3983  		`			if swag.IsZero(m.AdditionalArrayOfRefedObject[k][i]) {`,
  3984  		// nullable required:
  3985  		//`			if err := validate.Required(k+"."+strconv.Itoa(i), "body", m.AdditionalArrayOfRefedObject[k][i]); err != nil {`,
  3986  		`			if m.AdditionalArrayOfRefedObject[k][i] != nil {`,
  3987  		`				if err := m.AdditionalArrayOfRefedObject[k][i].Validate(formats); err != nil {`,
  3988  		`					if ve, ok := err.(*errors.Validation); ok {`,
  3989  		`						return ve.ValidateName(k + "." + strconv.Itoa(i)`,
  3990  		`		return errors.CompositeValidationError(res...`,
  3991  		`func (m *AdditionalArrayOfRefedObject) validateThisOneNotRequired(formats strfmt.Registry) error {`,
  3992  		`	if swag.IsZero(m.ThisOneNotRequired) {`,
  3993  		`	if err := validate.MaximumInt("thisOneNotRequired", "body", int64(m.ThisOneNotRequired), 10, false); err != nil {`,
  3994  	},
  3995  		// not expected
  3996  		todo,
  3997  		// output in log
  3998  		noLines,
  3999  		noLines)
  4000  
  4001  	expandRun.AddExpectations("additional_array_of_refed_object.go", []string{
  4002  		`type AdditionalArrayOfRefedObject struct {`,
  4003  		"	ThisOneNotRequired int64 `json:\"thisOneNotRequired,omitempty\"`",
  4004  		"	AdditionalArrayOfRefedObject map[string][]*AdditionalArrayOfRefedObjectItems0 `json:\"-\"`",
  4005  		`func (m *AdditionalArrayOfRefedObject) Validate(formats strfmt.Registry) error {`,
  4006  		`	if err := m.validateThisOneNotRequired(formats); err != nil {`,
  4007  		`	for k := range m.AdditionalArrayOfRefedObject {`,
  4008  		`		if err := validate.Required(k, "body", m.AdditionalArrayOfRefedObject[k]); err != nil {`,
  4009  		`		if err := validate.UniqueItems(k, "body", m.AdditionalArrayOfRefedObject[k]); err != nil {`,
  4010  		`		for i := 0; i < len(m.AdditionalArrayOfRefedObject[k]); i++ {`,
  4011  		// do we need Required when item is nullable?
  4012  		// nullable not required:
  4013  		`			if swag.IsZero(m.AdditionalArrayOfRefedObject[k][i]) {`,
  4014  		// nullable required:
  4015  		//`			if err := validate.Required(k+"."+strconv.Itoa(i), "body", m.AdditionalArrayOfRefedObject[k][i]); err != nil {`,
  4016  		`			if m.AdditionalArrayOfRefedObject[k][i] != nil {`,
  4017  		`				if err := m.AdditionalArrayOfRefedObject[k][i].Validate(formats); err != nil {`,
  4018  		`					if ve, ok := err.(*errors.Validation); ok {`,
  4019  		`						return ve.ValidateName(k + "." + strconv.Itoa(i)`,
  4020  		`		return errors.CompositeValidationError(res...`,
  4021  		`func (m *AdditionalArrayOfRefedObject) validateThisOneNotRequired(formats strfmt.Registry) error {`,
  4022  		`	if swag.IsZero(m.ThisOneNotRequired) {`,
  4023  		`	if err := validate.MaximumInt("thisOneNotRequired", "body", int64(m.ThisOneNotRequired), 10, false); err != nil {`,
  4024  		`type AdditionalArrayOfRefedObjectItems0 struct {`,
  4025  		"	Discourse string `json:\"discourse,omitempty\"`",
  4026  		"	HoursSpent float64 `json:\"hoursSpent,omitempty\"`",
  4027  		"	AdditionalArrayOfRefedObjectItems0AdditionalProperties map[string]interface{} `json:\"-\"`",
  4028  		// empty validation
  4029  		"func (m *AdditionalArrayOfRefedObjectItems0) Validate(formats strfmt.Registry) error {\n	return nil\n}",
  4030  	},
  4031  		// not expected
  4032  		todo,
  4033  		// output in log
  4034  		noLines,
  4035  		noLines)
  4036  
  4037  	// load expectations for model: additional_slice_of_aliased_primitives.go
  4038  	flattenRun.AddExpectations("additional_slice_of_aliased_primitives.go", []string{
  4039  		`type AdditionalSliceOfAliasedPrimitives struct {`,
  4040  		"	Prop2 strfmt.UUID `json:\"prop2,omitempty\"`",
  4041  		"	AdditionalSliceOfAliasedPrimitives map[string][]AliasedDate `json:\"-\"`",
  4042  		`func (m *AdditionalSliceOfAliasedPrimitives) Validate(formats strfmt.Registry) error {`,
  4043  		`	if err := m.validateProp2(formats); err != nil {`,
  4044  		`	for k := range m.AdditionalSliceOfAliasedPrimitives {`,
  4045  		// removed undue IsZero call
  4046  		//`		if swag.IsZero(m.AdditionalSliceOfAliasedPrimitives[k]) {`,
  4047  		`		iAdditionalSliceOfAliasedPrimitivesSize := int64(len(m.AdditionalSliceOfAliasedPrimitives[k])`,
  4048  		`		if err := validate.MaxItems(k, "body", iAdditionalSliceOfAliasedPrimitivesSize, 10); err != nil {`,
  4049  		`		for i := 0; i < len(m.AdditionalSliceOfAliasedPrimitives[k]); i++ {`,
  4050  		`			if err := m.AdditionalSliceOfAliasedPrimitives[k][i].Validate(formats); err != nil {`,
  4051  		`				if ve, ok := err.(*errors.Validation); ok {`,
  4052  		`					return ve.ValidateName(k + "." + strconv.Itoa(i)`,
  4053  		`		return errors.CompositeValidationError(res...`,
  4054  		`func (m *AdditionalSliceOfAliasedPrimitives) validateProp2(formats strfmt.Registry) error {`,
  4055  		`	if swag.IsZero(m.Prop2) {`,
  4056  		`	if err := validate.FormatOf("prop2", "body", "uuid", m.Prop2.String(), formats); err != nil {`,
  4057  	},
  4058  		// not expected
  4059  		todo,
  4060  		// output in log
  4061  		noLines,
  4062  		noLines)
  4063  
  4064  	expandRun.AddExpectations("additional_slice_of_aliased_primitives.go", []string{
  4065  		`type AdditionalSliceOfAliasedPrimitives struct {`,
  4066  		"	Prop2 strfmt.UUID `json:\"prop2,omitempty\"`",
  4067  		"	AdditionalSliceOfAliasedPrimitives map[string][]strfmt.Date `json:\"-\"`",
  4068  		`func (m *AdditionalSliceOfAliasedPrimitives) Validate(formats strfmt.Registry) error {`,
  4069  		`	if err := m.validateProp2(formats); err != nil {`,
  4070  		`	for k := range m.AdditionalSliceOfAliasedPrimitives {`,
  4071  		//`		if swag.IsZero(m.AdditionalSliceOfAliasedPrimitives[k]) {`,
  4072  		`		iAdditionalSliceOfAliasedPrimitivesSize := int64(len(m.AdditionalSliceOfAliasedPrimitives[k])`,
  4073  		`		if err := validate.MaxItems(k, "body", iAdditionalSliceOfAliasedPrimitivesSize, 10); err != nil {`,
  4074  		`		for i := 0; i < len(m.AdditionalSliceOfAliasedPrimitives[k]); i++ {`,
  4075  		`			if err := validate.FormatOf(k+"."+strconv.Itoa(i), "body", "date", m.AdditionalSliceOfAliasedPrimitives[k][i].String(), formats); err != nil {`,
  4076  		`		return errors.CompositeValidationError(res...`,
  4077  		`func (m *AdditionalSliceOfAliasedPrimitives) validateProp2(formats strfmt.Registry) error {`,
  4078  		`	if swag.IsZero(m.Prop2) {`,
  4079  		`	if err := validate.FormatOf("prop2", "body", "uuid", m.Prop2.String(), formats); err != nil {`,
  4080  	},
  4081  		// not expected
  4082  		todo,
  4083  		// output in log
  4084  		noLines,
  4085  		noLines)
  4086  
  4087  	// load expectations for model: transitive_refed_thing.go
  4088  	flattenRun.AddExpectations("transitive_refed_thing.go", []string{
  4089  		`type TransitiveRefedThing struct {`,
  4090  		"	ThisOneNotRequiredEither int64 `json:\"thisOneNotRequiredEither,omitempty\"`",
  4091  		"	TransitiveRefedThing map[string]*TransitiveRefedThingAdditionalProperties `json:\"-\"`",
  4092  		`func (m *TransitiveRefedThing) Validate(formats strfmt.Registry) error {`,
  4093  		`	if err := m.validateThisOneNotRequiredEither(formats); err != nil {`,
  4094  		`	for k := range m.TransitiveRefedThing {`,
  4095  		`		if val, ok := m.TransitiveRefedThing[k]; ok {`,
  4096  		`			if val != nil {`,
  4097  		`				if err := val.Validate(formats); err != nil {`,
  4098  		`		return errors.CompositeValidationError(res...`,
  4099  		`func (m *TransitiveRefedThing) validateThisOneNotRequiredEither(formats strfmt.Registry) error {`,
  4100  		`	if swag.IsZero(m.ThisOneNotRequiredEither) {`,
  4101  		`	if err := validate.MaximumInt("thisOneNotRequiredEither", "body", int64(m.ThisOneNotRequiredEither), 20, false); err != nil {`,
  4102  	},
  4103  		// not expected
  4104  		todo,
  4105  		// output in log
  4106  		noLines,
  4107  		noLines)
  4108  
  4109  	expandRun.AddExpectations("transitive_refed_thing.go", []string{
  4110  		`type TransitiveRefedThing struct {`,
  4111  		"	ThisOneNotRequiredEither int64 `json:\"thisOneNotRequiredEither,omitempty\"`",
  4112  		"	TransitiveRefedThing map[string]*TransitiveRefedThingAnon `json:\"-\"`",
  4113  		`func (m *TransitiveRefedThing) Validate(formats strfmt.Registry) error {`,
  4114  		`	if err := m.validateThisOneNotRequiredEither(formats); err != nil {`,
  4115  		`	for k := range m.TransitiveRefedThing {`,
  4116  		`		if val, ok := m.TransitiveRefedThing[k]; ok {`,
  4117  		`			if val != nil {`,
  4118  		`				if err := val.Validate(formats); err != nil {`,
  4119  		`		return errors.CompositeValidationError(res...`,
  4120  		`func (m *TransitiveRefedThing) validateThisOneNotRequiredEither(formats strfmt.Registry) error {`,
  4121  		`	if swag.IsZero(m.ThisOneNotRequiredEither) {`,
  4122  		`	if err := validate.MaximumInt("thisOneNotRequiredEither", "body", int64(m.ThisOneNotRequiredEither), 20, false); err != nil {`,
  4123  		`type TransitiveRefedThingAnon struct {`,
  4124  		"	A1 strfmt.DateTime `json:\"a1,omitempty\"`",
  4125  		"	TransitiveRefedThingAnon map[string]*TransitiveRefedThingAnonAnon `json:\"-\"`",
  4126  		`func (m *TransitiveRefedThingAnon) Validate(formats strfmt.Registry) error {`,
  4127  		`	if err := m.validateA1(formats); err != nil {`,
  4128  		`	for k := range m.TransitiveRefedThingAnon {`,
  4129  		`		if val, ok := m.TransitiveRefedThingAnon[k]; ok {`,
  4130  		`			if val != nil {`,
  4131  		`				if err := val.Validate(formats); err != nil {`,
  4132  		`		return errors.CompositeValidationError(res...`,
  4133  		`func (m *TransitiveRefedThingAnon) validateA1(formats strfmt.Registry) error {`,
  4134  		`	if swag.IsZero(m.A1) {`,
  4135  		`	if err := validate.FormatOf("a1", "body", "date-time", m.A1.String(), formats); err != nil {`,
  4136  		`type TransitiveRefedThingAnonAnon struct {`,
  4137  		"	Discourse string `json:\"discourse,omitempty\"`",
  4138  		"	HoursSpent float64 `json:\"hoursSpent,omitempty\"`",
  4139  		"	TransitiveRefedThingAnonAnonAdditionalProperties map[string]interface{} `json:\"-\"`",
  4140  		// empty validation
  4141  		"func (m *TransitiveRefedThingAnonAnon) Validate(formats strfmt.Registry) error {\n	return nil\n}",
  4142  	},
  4143  		// not expected
  4144  		todo,
  4145  		// output in log
  4146  		noLines,
  4147  		noLines)
  4148  
  4149  	// load expectations for model: additional_empty_object.go
  4150  	flattenRun.AddExpectations("additional_empty_object.go", []string{
  4151  		`type AdditionalEmptyObject struct {`,
  4152  		"	PropA interface{} `json:\"propA,omitempty\"`",
  4153  		"	AdditionalEmptyObject map[string]interface{} `json:\"-\"`",
  4154  		// empty validation
  4155  		"func (m *AdditionalEmptyObject) Validate(formats strfmt.Registry) error {\n	return nil\n}",
  4156  	},
  4157  		// not expected
  4158  		todo,
  4159  		// output in log
  4160  		noLines,
  4161  		noLines)
  4162  
  4163  	expandRun.AddExpectations("additional_empty_object.go", flattenRun.ExpectedFor("AdditionalEmptyObject").ExpectedLines, todo, noLines, noLines)
  4164  
  4165  	// load expectations for model: additional_date_with_nullable_thing.go
  4166  	flattenRun.AddExpectations("additional_date_with_nullable_thing.go", []string{
  4167  		`type AdditionalDateWithNullableThing struct {`,
  4168  		"	Blob int64 `json:\"blob,omitempty\"`",
  4169  		"	NullableDate *AliasedNullableDate `json:\"nullableDate,omitempty\"`",
  4170  		"	AdditionalDateWithNullableThing map[string]*AliasedNullableDate `json:\"-\"`",
  4171  		`func (m *AdditionalDateWithNullableThing) Validate(formats strfmt.Registry) error {`,
  4172  		`	if err := m.validateBlob(formats); err != nil {`,
  4173  		`	if err := m.validateNullableDate(formats); err != nil {`,
  4174  		`	for k := range m.AdditionalDateWithNullableThing {`,
  4175  		`		if swag.IsZero(m.AdditionalDateWithNullableThing[k]) {`,
  4176  		`		if val, ok := m.AdditionalDateWithNullableThing[k]; ok {`,
  4177  		`			if val != nil {`,
  4178  		`				if err := val.Validate(formats); err != nil {`,
  4179  		`		return errors.CompositeValidationError(res...`,
  4180  		`func (m *AdditionalDateWithNullableThing) validateBlob(formats strfmt.Registry) error {`,
  4181  		`	if swag.IsZero(m.Blob) {`,
  4182  		`	if err := validate.MinimumInt("blob", "body", int64(m.Blob), 1, false); err != nil {`,
  4183  		`func (m *AdditionalDateWithNullableThing) validateNullableDate(formats strfmt.Registry) error {`,
  4184  		`	if swag.IsZero(m.NullableDate) {`,
  4185  		`	if m.NullableDate != nil {`,
  4186  		`		if err := m.NullableDate.Validate(formats); err != nil {`,
  4187  		`			if ve, ok := err.(*errors.Validation); ok {`,
  4188  		`				return ve.ValidateName("nullableDate"`,
  4189  	},
  4190  		// not expected
  4191  		todo,
  4192  		// output in log
  4193  		noLines,
  4194  		noLines)
  4195  
  4196  	expandRun.AddExpectations("additional_date_with_nullable_thing.go", []string{
  4197  		`type AdditionalDateWithNullableThing struct {`,
  4198  		"	Blob int64 `json:\"blob,omitempty\"`",
  4199  		"	NullableDate *strfmt.Date `json:\"nullableDate,omitempty\"`",
  4200  		"	AdditionalDateWithNullableThing map[string]*strfmt.Date `json:\"-\"`",
  4201  		`func (m *AdditionalDateWithNullableThing) Validate(formats strfmt.Registry) error {`,
  4202  		`	if err := m.validateBlob(formats); err != nil {`,
  4203  		`	if err := m.validateNullableDate(formats); err != nil {`,
  4204  		`	for k := range m.AdditionalDateWithNullableThing {`,
  4205  		`		if swag.IsZero(m.AdditionalDateWithNullableThing[k]) {`,
  4206  		`		if err := validate.FormatOf(k, "body", "date", m.AdditionalDateWithNullableThing[k].String(), formats); err != nil {`,
  4207  		`		return errors.CompositeValidationError(res...`,
  4208  		`func (m *AdditionalDateWithNullableThing) validateBlob(formats strfmt.Registry) error {`,
  4209  		`	if swag.IsZero(m.Blob) {`,
  4210  		`	if err := validate.MinimumInt("blob", "body", int64(m.Blob), 1, false); err != nil {`,
  4211  		`func (m *AdditionalDateWithNullableThing) validateNullableDate(formats strfmt.Registry) error {`,
  4212  		`	if swag.IsZero(m.NullableDate) {`,
  4213  		`	if err := validate.FormatOf("nullableDate", "body", "date", m.NullableDate.String(), formats); err != nil {`,
  4214  	},
  4215  		// not expected
  4216  		todo,
  4217  		// output in log
  4218  		noLines,
  4219  		noLines)
  4220  
  4221  }
  4222  
  4223  func initFixtureTuple() {
  4224  	// testing ../fixtures/bugs/1487/fixture-tuple.yaml with expand (--skip-flatten)
  4225  
  4226  	/* check different patterns of additionalItems validations or absence thereof
  4227  	 */
  4228  	f := newModelFixture("../fixtures/bugs/1487/fixture-tuple.yaml", "fixture for tuples and additionalItems")
  4229  	flattenRun := f.AddRun(false)
  4230  	expandRun := f.AddRun(true)
  4231  
  4232  	// load expectations for model: classics.go
  4233  	flattenRun.AddExpectations("classics.go", []string{
  4234  		`type Classics struct {`,
  4235  		"	P0 *int64 `json:\"-\"`",
  4236  		"	P1 *strfmt.ISBN `json:\"-\"`",
  4237  		"	P2 Comics `json:\"-\"`",
  4238  		"	ClassicsItems []ClassicsTupleAdditionalItems `json:\"-\"`",
  4239  		`func (m *Classics) Validate(formats strfmt.Registry) error {`,
  4240  		`	if err := m.validateP0(formats); err != nil {`,
  4241  		`	if err := m.validateP1(formats); err != nil {`,
  4242  		`	if err := m.validateP2(formats); err != nil {`,
  4243  		`	if err := m.validateClassicsItems(formats); err != nil {`,
  4244  		`		return errors.CompositeValidationError(res...`,
  4245  		`func (m *Classics) validateP0(formats strfmt.Registry) error {`,
  4246  		`	if err := validate.Required("0", "body", m.P0); err != nil {`,
  4247  		`func (m *Classics) validateP1(formats strfmt.Registry) error {`,
  4248  		`	if err := validate.Required("1", "body", m.P1); err != nil {`,
  4249  		`	if err := validate.FormatOf("1", "body", "isbn", m.P1.String(), formats); err != nil {`,
  4250  		`func (m *Classics) validateP2(formats strfmt.Registry) error {`,
  4251  		`	if err := m.P2.Validate(formats); err != nil {`,
  4252  		`		if ve, ok := err.(*errors.Validation); ok {`,
  4253  		`			return ve.ValidateName("2"`,
  4254  		`func (m *Classics) validateClassicsItems(formats strfmt.Registry) error {`,
  4255  		`	for i := range m.ClassicsItems {`,
  4256  		`		if err := m.ClassicsItems[i].Validate(formats); err != nil {`,
  4257  		`			if ve, ok := err.(*errors.Validation); ok {`,
  4258  		`				return ve.ValidateName(strconv.Itoa(i + 3)`,
  4259  	},
  4260  		// not expected
  4261  		todo,
  4262  		// output in log
  4263  		noLines,
  4264  		noLines)
  4265  
  4266  	expandRun.AddExpectations("classics.go", []string{
  4267  		`type Classics struct {`,
  4268  		"	P0 *int64 `json:\"-\"`",
  4269  		"	P1 *strfmt.ISBN `json:\"-\"`",
  4270  		"	P2 *ClassicsTuple0 `json:\"-\"`",
  4271  		// TODO: items should not be pointer
  4272  		"	ClassicsItems []*ClassicsClassicsItemsTuple0 `json:\"-\"`",
  4273  		`func (m *Classics) Validate(formats strfmt.Registry) error {`,
  4274  		`	if err := m.validateP0(formats); err != nil {`,
  4275  		`	if err := m.validateP1(formats); err != nil {`,
  4276  		`	if err := m.validateP2(formats); err != nil {`,
  4277  		`	if err := m.validateClassicsItems(formats); err != nil {`,
  4278  		`		return errors.CompositeValidationError(res...`,
  4279  		`func (m *Classics) validateP0(formats strfmt.Registry) error {`,
  4280  		`	if err := validate.Required("0", "body", m.P0); err != nil {`,
  4281  		`func (m *Classics) validateP1(formats strfmt.Registry) error {`,
  4282  		`	if err := validate.Required("1", "body", m.P1); err != nil {`,
  4283  		`	if err := validate.FormatOf("1", "body", "isbn", m.P1.String(), formats); err != nil {`,
  4284  		`func (m *Classics) validateP2(formats strfmt.Registry) error {`,
  4285  		`	if err := validate.Required("2", "body", m.P2); err != nil {`,
  4286  		`	if m.P2 != nil {`,
  4287  		`		if err := m.P2.Validate(formats); err != nil {`,
  4288  		`			if ve, ok := err.(*errors.Validation); ok {`,
  4289  		`				return ve.ValidateName("2"`,
  4290  		`func (m *Classics) validateClassicsItems(formats strfmt.Registry) error {`,
  4291  		`	for i := range m.ClassicsItems {`,
  4292  		`		if m.ClassicsItems[i] != nil {`,
  4293  		`			if err := m.ClassicsItems[i].Validate(formats); err != nil {`,
  4294  		`				if ve, ok := err.(*errors.Validation); ok {`,
  4295  		`					return ve.ValidateName(strconv.Itoa(i + 3)`,
  4296  		`type ClassicsClassicsItemsTuple0 struct {`,
  4297  		"	P0 *ClassicsClassicsItemsTuple0P0 `json:\"-\"`",
  4298  		"	P1 []strfmt.Date `json:\"-\"`",
  4299  		"	P2 *ClassicsClassicsItemsTuple0P2 `json:\"-\"`",
  4300  		"	P3 *ClassicsClassicsItemsTuple0P3Tuple0 `json:\"-\"`",
  4301  		`func (m *ClassicsClassicsItemsTuple0) Validate(formats strfmt.Registry) error {`,
  4302  		`	if err := m.validateP0(formats); err != nil {`,
  4303  		`	if err := m.validateP1(formats); err != nil {`,
  4304  		`	if err := m.validateP2(formats); err != nil {`,
  4305  		`	if err := m.validateP3(formats); err != nil {`,
  4306  		`		return errors.CompositeValidationError(res...`,
  4307  		`func (m *ClassicsClassicsItemsTuple0) validateP0(formats strfmt.Registry) error {`,
  4308  		`	if err := validate.Required("P0", "body", m.P0); err != nil {`,
  4309  		`	if m.P0 != nil {`,
  4310  		`		if err := m.P0.Validate(formats); err != nil {`,
  4311  		`			if ve, ok := err.(*errors.Validation); ok {`,
  4312  		`				return ve.ValidateName("P0"`,
  4313  		`func (m *ClassicsClassicsItemsTuple0) validateP1(formats strfmt.Registry) error {`,
  4314  		`	if err := validate.Required("P1", "body", m.P1); err != nil {`,
  4315  		`	for i := 0; i < len(m.P1); i++ {`,
  4316  		`		if err := validate.FormatOf("P1"+"."+strconv.Itoa(i), "body", "date", m.P1[i].String(), formats); err != nil {`,
  4317  		`func (m *ClassicsClassicsItemsTuple0) validateP2(formats strfmt.Registry) error {`,
  4318  		`	if err := validate.Required("P2", "body", m.P2); err != nil {`,
  4319  		`	if m.P2 != nil {`,
  4320  		`		if err := m.P2.Validate(formats); err != nil {`,
  4321  		`			if ve, ok := err.(*errors.Validation); ok {`,
  4322  		`				return ve.ValidateName("P2"`,
  4323  		`func (m *ClassicsClassicsItemsTuple0) validateP3(formats strfmt.Registry) error {`,
  4324  		`	if err := validate.Required("P3", "body", m.P3); err != nil {`,
  4325  		`	if m.P3 != nil {`,
  4326  		`		if err := m.P3.Validate(formats); err != nil {`,
  4327  		`			if ve, ok := err.(*errors.Validation); ok {`,
  4328  		`				return ve.ValidateName("P3"`,
  4329  		`type ClassicsClassicsItemsTuple0P0 struct {`,
  4330  		"	Period *string `json:\"period,omitempty\"`",
  4331  		"	Title *string `json:\"title,omitempty\"`",
  4332  		`func (m *ClassicsClassicsItemsTuple0P0) Validate(formats strfmt.Registry) error {`,
  4333  		`	if err := m.validateTitle(formats); err != nil {`,
  4334  		`		return errors.CompositeValidationError(res...`,
  4335  		`var classicsClassicsItemsTuple0P0TypeTitlePropEnum []interface{`,
  4336  		`	var res []string`,
  4337  		"	if err := json.Unmarshal([]byte(`[\"Les Misérables\",\"Bleak House\",\"Sherlock Holmes\",\"Siddhartha\"]`), &res); err != nil {",
  4338  		`	for _, v := range res {`,
  4339  		`		classicsClassicsItemsTuple0P0TypeTitlePropEnum = append(classicsClassicsItemsTuple0P0TypeTitlePropEnum, v`,
  4340  		`	ClassicsClassicsItemsTuple0P0TitleLesMisérables string = "Les Misérables"`,
  4341  		`	ClassicsClassicsItemsTuple0P0TitleBleakHouse string = "Bleak House"`,
  4342  		`	ClassicsClassicsItemsTuple0P0TitleSherlockHolmes string = "Sherlock Holmes"`,
  4343  		`	ClassicsClassicsItemsTuple0P0TitleSiddhartha string = "Siddhartha"`,
  4344  		`func (m *ClassicsClassicsItemsTuple0P0) validateTitleEnum(path, location string, value string) error {`,
  4345  		`	if err := validate.EnumCase(path, location, value, classicsClassicsItemsTuple0P0TypeTitlePropEnum, true); err != nil {`,
  4346  		`func (m *ClassicsClassicsItemsTuple0P0) validateTitle(formats strfmt.Registry) error {`,
  4347  		`	if swag.IsZero(m.Title) {`,
  4348  		`	if err := m.validateTitleEnum("P0"+"."+"title", "body", *m.Title); err != nil {`,
  4349  		`type ClassicsClassicsItemsTuple0P2 struct {`,
  4350  		"	Origin *string `json:\"origin,omitempty\"`",
  4351  		"	ClassicsClassicsItemsTuple0P2 map[string]string `json:\"-\"`",
  4352  		`var classicsClassicsItemsTuple0P2ValueEnum []interface{`,
  4353  		`	var res []string`,
  4354  		"	if err := json.Unmarshal([]byte(`[\"bookshop\",\"amazon\",\"library\"]`), &res); err != nil {",
  4355  		`	for _, v := range res {`,
  4356  		`		classicsClassicsItemsTuple0P2ValueEnum = append(classicsClassicsItemsTuple0P2ValueEnum, v`,
  4357  		`func (m *ClassicsClassicsItemsTuple0P2) validateClassicsClassicsItemsTuple0P2ValueEnum(path, location string, value string) error {`,
  4358  		`	if err := validate.EnumCase(path, location, value, classicsClassicsItemsTuple0P2ValueEnum, true); err != nil {`,
  4359  		`func (m *ClassicsClassicsItemsTuple0P2) Validate(formats strfmt.Registry) error {`,
  4360  		`	if err := m.validateOrigin(formats); err != nil {`,
  4361  		`	for k := range m.ClassicsClassicsItemsTuple0P2 {`,
  4362  		// removed undue IsZero() call
  4363  		//`		if swag.IsZero(m.ClassicsClassicsItemsTuple0P2[k]) {`,
  4364  		`		if err := m.validateClassicsClassicsItemsTuple0P2ValueEnum("P2"+"."+k, "body", m.ClassicsClassicsItemsTuple0P2[k]); err != nil {`,
  4365  		`		return errors.CompositeValidationError(res...`,
  4366  		`var classicsClassicsItemsTuple0P2TypeOriginPropEnum []interface{`,
  4367  		`	var res []string`,
  4368  		"	if err := json.Unmarshal([]byte(`[\"print\",\"e-book\",\"collection\",\"museum\"]`), &res); err != nil {",
  4369  		`	for _, v := range res {`,
  4370  		`		classicsClassicsItemsTuple0P2TypeOriginPropEnum = append(classicsClassicsItemsTuple0P2TypeOriginPropEnum, v`,
  4371  		`	ClassicsClassicsItemsTuple0P2OriginPrint string = "print"`,
  4372  		`	ClassicsClassicsItemsTuple0P2OriginEBook string = "e-book"`,
  4373  		`	ClassicsClassicsItemsTuple0P2OriginCollection string = "collection"`,
  4374  		`	ClassicsClassicsItemsTuple0P2OriginMuseum string = "museum"`,
  4375  		`func (m *ClassicsClassicsItemsTuple0P2) validateOriginEnum(path, location string, value string) error {`,
  4376  		`	if err := validate.EnumCase(path, location, value, classicsClassicsItemsTuple0P2TypeOriginPropEnum, true); err != nil {`,
  4377  		`func (m *ClassicsClassicsItemsTuple0P2) validateOrigin(formats strfmt.Registry) error {`,
  4378  		`	if swag.IsZero(m.Origin) {`,
  4379  		`	if err := m.validateOriginEnum("P2"+"."+"origin", "body", *m.Origin); err != nil {`,
  4380  		`type ClassicsClassicsItemsTuple0P3Tuple0 struct {`,
  4381  		"	P0 *string `json:\"-\"`",
  4382  		"	P1 *ClassicsClassicsItemsTuple0P3Tuple0P1 `json:\"-\"`",
  4383  		"	P2 *ClassicsClassicsItemsTuple0P3Tuple0P2 `json:\"-\"`",
  4384  		"	P3 *ClassicsClassicsItemsTuple0P3Tuple0P3 `json:\"-\"`",
  4385  		"	P4 []strfmt.ISBN `json:\"-\"`",
  4386  		"	P5 *int64 `json:\"-\"`",
  4387  		`func (m *ClassicsClassicsItemsTuple0P3Tuple0) Validate(formats strfmt.Registry) error {`,
  4388  		`	if err := m.validateP0(formats); err != nil {`,
  4389  		`	if err := m.validateP1(formats); err != nil {`,
  4390  		`	if err := m.validateP2(formats); err != nil {`,
  4391  		`	if err := m.validateP3(formats); err != nil {`,
  4392  		`	if err := m.validateP4(formats); err != nil {`,
  4393  		`	if err := m.validateP5(formats); err != nil {`,
  4394  		`		return errors.CompositeValidationError(res...`,
  4395  		`func (m *ClassicsClassicsItemsTuple0P3Tuple0) validateP0(formats strfmt.Registry) error {`,
  4396  		`	if err := validate.Required("P0", "body", m.P0); err != nil {`,
  4397  		`func (m *ClassicsClassicsItemsTuple0P3Tuple0) validateP1(formats strfmt.Registry) error {`,
  4398  		`	if err := validate.Required("P1", "body", m.P1); err != nil {`,
  4399  		`	if m.P1 != nil {`,
  4400  		`		if err := m.P1.Validate(formats); err != nil {`,
  4401  		`			if ve, ok := err.(*errors.Validation); ok {`,
  4402  		`				return ve.ValidateName("P1"`,
  4403  		`func (m *ClassicsClassicsItemsTuple0P3Tuple0) validateP2(formats strfmt.Registry) error {`,
  4404  		`	if err := validate.Required("P2", "body", m.P2); err != nil {`,
  4405  		`	if m.P2 != nil {`,
  4406  		`		if err := m.P2.Validate(formats); err != nil {`,
  4407  		`			if ve, ok := err.(*errors.Validation); ok {`,
  4408  		`				return ve.ValidateName("P2"`,
  4409  		`func (m *ClassicsClassicsItemsTuple0P3Tuple0) validateP3(formats strfmt.Registry) error {`,
  4410  		`	if err := validate.Required("P3", "body", m.P3); err != nil {`,
  4411  		`	if m.P3 != nil {`,
  4412  		`		if err := m.P3.Validate(formats); err != nil {`,
  4413  		`			if ve, ok := err.(*errors.Validation); ok {`,
  4414  		`				return ve.ValidateName("P3"`,
  4415  		`func (m *ClassicsClassicsItemsTuple0P3Tuple0) validateP4(formats strfmt.Registry) error {`,
  4416  		`	if err := validate.Required("P4", "body", m.P4); err != nil {`,
  4417  		`	for i := 0; i < len(m.P4); i++ {`,
  4418  		`		if err := validate.FormatOf("P4"+"."+strconv.Itoa(i), "body", "isbn", m.P4[i].String(), formats); err != nil {`,
  4419  		`func (m *ClassicsClassicsItemsTuple0P3Tuple0) validateP5(formats strfmt.Registry) error {`,
  4420  		`	if err := validate.Required("P5", "body", m.P5); err != nil {`,
  4421  		`type ClassicsClassicsItemsTuple0P3Tuple0P1 struct {`,
  4422  		"	Narrative *string `json:\"narrative\"`",
  4423  		`func (m *ClassicsClassicsItemsTuple0P3Tuple0P1) Validate(formats strfmt.Registry) error {`,
  4424  		`	if err := m.validateNarrative(formats); err != nil {`,
  4425  		`		return errors.CompositeValidationError(res...`,
  4426  		`func (m *ClassicsClassicsItemsTuple0P3Tuple0P1) validateNarrative(formats strfmt.Registry) error {`,
  4427  		`	if err := validate.Required("P1"+"."+"narrative", "body", m.Narrative); err != nil {`,
  4428  		`type ClassicsClassicsItemsTuple0P3Tuple0P2 struct {`,
  4429  		"	MarketingBS *string `json:\"marketingBS,omitempty\"`",
  4430  		`func (m *ClassicsClassicsItemsTuple0P3Tuple0P2) Validate(formats strfmt.Registry) error {`,
  4431  		`		return errors.CompositeValidationError(res...`,
  4432  		`type ClassicsClassicsItemsTuple0P3Tuple0P3 struct {`,
  4433  		"	Author *string `json:\"author,omitempty\"`",
  4434  		"	Character *string `json:\"character,omitempty\"`",
  4435  		`func (m *ClassicsClassicsItemsTuple0P3Tuple0P3) Validate(formats strfmt.Registry) error {`,
  4436  		`	if err := m.validateAuthor(formats); err != nil {`,
  4437  		`	if err := m.validateCharacter(formats); err != nil {`,
  4438  		`		return errors.CompositeValidationError(res...`,
  4439  		`func (m *ClassicsClassicsItemsTuple0P3Tuple0P3) validateAuthor(formats strfmt.Registry) error {`,
  4440  		`	if swag.IsZero(m.Author) {`,
  4441  		`	if err := validate.MinLength("P3"+"."+"author", "body", string(*m.Author), 1); err != nil {`,
  4442  		`func (m *ClassicsClassicsItemsTuple0P3Tuple0P3) validateCharacter(formats strfmt.Registry) error {`,
  4443  		`	if swag.IsZero(m.Character) {`,
  4444  		"	if err := validate.Pattern(\"P3\"+\".\"+\"character\", \"body\", string(*m.Character), `^[A-Z]+$`); err != nil {",
  4445  		`type ClassicsTuple0 struct {`,
  4446  		"	P0 *string `json:\"-\"`",
  4447  		"	P1 *ClassicsTuple0P1 `json:\"-\"`",
  4448  		"	P2 *ClassicsTuple0P2 `json:\"-\"`",
  4449  		"	P3 *ClassicsTuple0P3 `json:\"-\"`",
  4450  		"	P4 []strfmt.ISBN `json:\"-\"`",
  4451  		"	P5 *int64 `json:\"-\"`",
  4452  		`func (m *ClassicsTuple0) Validate(formats strfmt.Registry) error {`,
  4453  		`	if err := m.validateP0(formats); err != nil {`,
  4454  		`	if err := m.validateP1(formats); err != nil {`,
  4455  		`	if err := m.validateP2(formats); err != nil {`,
  4456  		`	if err := m.validateP3(formats); err != nil {`,
  4457  		`	if err := m.validateP4(formats); err != nil {`,
  4458  		`	if err := m.validateP5(formats); err != nil {`,
  4459  		`		return errors.CompositeValidationError(res...`,
  4460  		`func (m *ClassicsTuple0) validateP0(formats strfmt.Registry) error {`,
  4461  		`	if err := validate.Required("P0", "body", m.P0); err != nil {`,
  4462  		`func (m *ClassicsTuple0) validateP1(formats strfmt.Registry) error {`,
  4463  		`	if err := validate.Required("P1", "body", m.P1); err != nil {`,
  4464  		`	if m.P1 != nil {`,
  4465  		`		if err := m.P1.Validate(formats); err != nil {`,
  4466  		`			if ve, ok := err.(*errors.Validation); ok {`,
  4467  		`				return ve.ValidateName("P1"`,
  4468  		`func (m *ClassicsTuple0) validateP2(formats strfmt.Registry) error {`,
  4469  		`	if err := validate.Required("P2", "body", m.P2); err != nil {`,
  4470  		`	if m.P2 != nil {`,
  4471  		`		if err := m.P2.Validate(formats); err != nil {`,
  4472  		`			if ve, ok := err.(*errors.Validation); ok {`,
  4473  		`				return ve.ValidateName("P2"`,
  4474  		`func (m *ClassicsTuple0) validateP3(formats strfmt.Registry) error {`,
  4475  		`	if err := validate.Required("P3", "body", m.P3); err != nil {`,
  4476  		`	if m.P3 != nil {`,
  4477  		`		if err := m.P3.Validate(formats); err != nil {`,
  4478  		`			if ve, ok := err.(*errors.Validation); ok {`,
  4479  		`				return ve.ValidateName("P3"`,
  4480  		`func (m *ClassicsTuple0) validateP4(formats strfmt.Registry) error {`,
  4481  		`	if err := validate.Required("P4", "body", m.P4); err != nil {`,
  4482  		`	for i := 0; i < len(m.P4); i++ {`,
  4483  		`		if err := validate.FormatOf("P4"+"."+strconv.Itoa(i), "body", "isbn", m.P4[i].String(), formats); err != nil {`,
  4484  		`func (m *ClassicsTuple0) validateP5(formats strfmt.Registry) error {`,
  4485  		`	if err := validate.Required("P5", "body", m.P5); err != nil {`,
  4486  		`type ClassicsTuple0P1 struct {`,
  4487  		"	Narrative *string `json:\"narrative\"`",
  4488  		`func (m *ClassicsTuple0P1) Validate(formats strfmt.Registry) error {`,
  4489  		`	if err := m.validateNarrative(formats); err != nil {`,
  4490  		`		return errors.CompositeValidationError(res...`,
  4491  		`func (m *ClassicsTuple0P1) validateNarrative(formats strfmt.Registry) error {`,
  4492  		`	if err := validate.Required("P1"+"."+"narrative", "body", m.Narrative); err != nil {`,
  4493  		`type ClassicsTuple0P2 struct {`,
  4494  		"	MarketingBS *string `json:\"marketingBS,omitempty\"`",
  4495  		`func (m *ClassicsTuple0P2) Validate(formats strfmt.Registry) error {`,
  4496  		`		return errors.CompositeValidationError(res...`,
  4497  		`type ClassicsTuple0P3 struct {`,
  4498  		"	Author *string `json:\"author,omitempty\"`",
  4499  		"	Character *string `json:\"character,omitempty\"`",
  4500  		`func (m *ClassicsTuple0P3) Validate(formats strfmt.Registry) error {`,
  4501  		`	if err := m.validateAuthor(formats); err != nil {`,
  4502  		`	if err := m.validateCharacter(formats); err != nil {`,
  4503  		`		return errors.CompositeValidationError(res...`,
  4504  		`func (m *ClassicsTuple0P3) validateAuthor(formats strfmt.Registry) error {`,
  4505  		`	if swag.IsZero(m.Author) {`,
  4506  		`	if err := validate.MinLength("P3"+"."+"author", "body", string(*m.Author), 1); err != nil {`,
  4507  		`func (m *ClassicsTuple0P3) validateCharacter(formats strfmt.Registry) error {`,
  4508  		`	if swag.IsZero(m.Character) {`,
  4509  		"	if err := validate.Pattern(\"P3\"+\".\"+\"character\", \"body\", string(*m.Character), `^[A-Z]+$`); err != nil {",
  4510  	},
  4511  		// not expected
  4512  		todo,
  4513  		// output in log
  4514  		noLines,
  4515  		noLines)
  4516  
  4517  	// load expectations for model: comics_items2.go
  4518  	flattenRun.AddExpectations("comics_items2.go", []string{
  4519  		`type ComicsItems2 struct {`,
  4520  		"	MarketingBS string `json:\"marketingBS,omitempty\"`",
  4521  		// empty validation
  4522  		"func (m *ComicsItems2) Validate(formats strfmt.Registry) error {\n	return nil\n}",
  4523  	},
  4524  		// not expected
  4525  		todo,
  4526  		// output in log
  4527  		noLines,
  4528  		noLines)
  4529  
  4530  	// load expectations for model: classics_items_additional_items_items2.go
  4531  	flattenRun.AddExpectations("classics_items_additional_items_items2.go", []string{
  4532  		`type ClassicsItemsAdditionalItemsItems2 struct {`,
  4533  		"	Origin string `json:\"origin,omitempty\"`",
  4534  		"	ClassicsItemsAdditionalItemsItems2 map[string]string `json:\"-\"`",
  4535  		`var classicsItemsAdditionalItemsItems2ValueEnum []interface{`,
  4536  		`	var res []string`,
  4537  		"	if err := json.Unmarshal([]byte(`[\"bookshop\",\"amazon\",\"library\"]`), &res); err != nil {",
  4538  		`	for _, v := range res {`,
  4539  		`		classicsItemsAdditionalItemsItems2ValueEnum = append(classicsItemsAdditionalItemsItems2ValueEnum, v`,
  4540  		`func (m *ClassicsItemsAdditionalItemsItems2) validateClassicsItemsAdditionalItemsItems2ValueEnum(path, location string, value string) error {`,
  4541  		`	if err := validate.EnumCase(path, location, value, classicsItemsAdditionalItemsItems2ValueEnum, true); err != nil {`,
  4542  		`func (m *ClassicsItemsAdditionalItemsItems2) Validate(formats strfmt.Registry) error {`,
  4543  		`	if err := m.validateOrigin(formats); err != nil {`,
  4544  		`	for k := range m.ClassicsItemsAdditionalItemsItems2 {`,
  4545  		// removed undue IsZero()
  4546  		//`		if swag.IsZero(m.ClassicsItemsAdditionalItemsItems2[k]) {`,
  4547  		`		if err := m.validateClassicsItemsAdditionalItemsItems2ValueEnum(k, "body", m.ClassicsItemsAdditionalItemsItems2[k]); err != nil {`,
  4548  		`		return errors.CompositeValidationError(res...`,
  4549  		`var classicsItemsAdditionalItemsItems2TypeOriginPropEnum []interface{`,
  4550  		`	var res []string`,
  4551  		"	if err := json.Unmarshal([]byte(`[\"print\",\"e-book\",\"collection\",\"museum\"]`), &res); err != nil {",
  4552  		`	for _, v := range res {`,
  4553  		`		classicsItemsAdditionalItemsItems2TypeOriginPropEnum = append(classicsItemsAdditionalItemsItems2TypeOriginPropEnum, v`,
  4554  		`	ClassicsItemsAdditionalItemsItems2OriginPrint string = "print"`,
  4555  		`	ClassicsItemsAdditionalItemsItems2OriginEBook string = "e-book"`,
  4556  		`	ClassicsItemsAdditionalItemsItems2OriginCollection string = "collection"`,
  4557  		`	ClassicsItemsAdditionalItemsItems2OriginMuseum string = "museum"`,
  4558  		`func (m *ClassicsItemsAdditionalItemsItems2) validateOriginEnum(path, location string, value string) error {`,
  4559  		`	if err := validate.EnumCase(path, location, value, classicsItemsAdditionalItemsItems2TypeOriginPropEnum, true); err != nil {`,
  4560  		`func (m *ClassicsItemsAdditionalItemsItems2) validateOrigin(formats strfmt.Registry) error {`,
  4561  		`	if swag.IsZero(m.Origin) {`,
  4562  		`	if err := m.validateOriginEnum("origin", "body", m.Origin); err != nil {`,
  4563  	},
  4564  		// not expected
  4565  		todo,
  4566  		// output in log
  4567  		noLines,
  4568  		noLines)
  4569  
  4570  	// load expectations for model: comics.go
  4571  	flattenRun.AddExpectations("comics.go", []string{
  4572  		`type Comics struct {`,
  4573  		"	P0 *string `json:\"-\"`",
  4574  		"	P1 *ComicsItems1 `json:\"-\"`",
  4575  		"	P2 *ComicsItems2 `json:\"-\"`",
  4576  		"	P3 *ComicsItems3 `json:\"-\"`",
  4577  		"	P4 []strfmt.ISBN `json:\"-\"`",
  4578  		"	P5 *int64 `json:\"-\"`",
  4579  		`func (m *Comics) Validate(formats strfmt.Registry) error {`,
  4580  		`	if err := m.validateP0(formats); err != nil {`,
  4581  		`	if err := m.validateP1(formats); err != nil {`,
  4582  		`	if err := m.validateP2(formats); err != nil {`,
  4583  		`	if err := m.validateP3(formats); err != nil {`,
  4584  		`	if err := m.validateP4(formats); err != nil {`,
  4585  		`	if err := m.validateP5(formats); err != nil {`,
  4586  		`		return errors.CompositeValidationError(res...`,
  4587  		`func (m *Comics) validateP0(formats strfmt.Registry) error {`,
  4588  		`	if err := validate.Required("0", "body", m.P0); err != nil {`,
  4589  		`func (m *Comics) validateP1(formats strfmt.Registry) error {`,
  4590  		`	if err := validate.Required("1", "body", m.P1); err != nil {`,
  4591  		`	if m.P1 != nil {`,
  4592  		`		if err := m.P1.Validate(formats); err != nil {`,
  4593  		`			if ve, ok := err.(*errors.Validation); ok {`,
  4594  		`				return ve.ValidateName("1"`,
  4595  		`func (m *Comics) validateP2(formats strfmt.Registry) error {`,
  4596  		`	if err := validate.Required("2", "body", m.P2); err != nil {`,
  4597  		`	if m.P2 != nil {`,
  4598  		`		if err := m.P2.Validate(formats); err != nil {`,
  4599  		`			if ve, ok := err.(*errors.Validation); ok {`,
  4600  		`				return ve.ValidateName("2"`,
  4601  		`func (m *Comics) validateP3(formats strfmt.Registry) error {`,
  4602  		`	if err := validate.Required("3", "body", m.P3); err != nil {`,
  4603  		`	if m.P3 != nil {`,
  4604  		`		if err := m.P3.Validate(formats); err != nil {`,
  4605  		`			if ve, ok := err.(*errors.Validation); ok {`,
  4606  		`				return ve.ValidateName("3"`,
  4607  		`func (m *Comics) validateP4(formats strfmt.Registry) error {`,
  4608  		`	if err := validate.Required("4", "body", m.P4); err != nil {`,
  4609  		`	for i := 0; i < len(m.P4); i++ {`,
  4610  		`		if err := validate.FormatOf("4"+"."+strconv.Itoa(i), "body", "isbn", m.P4[i].String(), formats); err != nil {`,
  4611  		`func (m *Comics) validateP5(formats strfmt.Registry) error {`,
  4612  		`	if err := validate.Required("5", "body", m.P5); err != nil {`,
  4613  	},
  4614  		// not expected
  4615  		todo,
  4616  		// output in log
  4617  		noLines,
  4618  		noLines)
  4619  
  4620  	expandRun.AddExpectations("comics.go", []string{
  4621  		`type Comics struct {`,
  4622  		"	P0 *string `json:\"-\"`",
  4623  		"   P1 *ComicsItems1 `json:\"-\"`",
  4624  		"   P2 *ComicsItems2 `json:\"-\"`",
  4625  		"   P3 *ComicsItems3 `json:\"-\"`",
  4626  		"	P4 []strfmt.ISBN `json:\"-\"`",
  4627  		"	P5 *int64 `json:\"-\"`",
  4628  		`func (m *Comics) Validate(formats strfmt.Registry) error {`,
  4629  		`	if err := m.validateP0(formats); err != nil {`,
  4630  		`	if err := m.validateP1(formats); err != nil {`,
  4631  		`	if err := m.validateP2(formats); err != nil {`,
  4632  		`	if err := m.validateP3(formats); err != nil {`,
  4633  		`	if err := m.validateP4(formats); err != nil {`,
  4634  		`	if err := m.validateP5(formats); err != nil {`,
  4635  		`		return errors.CompositeValidationError(res...`,
  4636  		`func (m *Comics) validateP0(formats strfmt.Registry) error {`,
  4637  		`	if err := validate.Required("0", "body", m.P0); err != nil {`,
  4638  		`func (m *Comics) validateP1(formats strfmt.Registry) error {`,
  4639  		`	if err := validate.Required("1", "body", m.P1); err != nil {`,
  4640  		`func (m *Comics) validateP2(formats strfmt.Registry) error {`,
  4641  		`	if err := validate.Required("2", "body", m.P2); err != nil {`,
  4642  		`func (m *Comics) validateP3(formats strfmt.Registry) error {`,
  4643  		`	if err := validate.Required("3", "body", m.P3); err != nil {`,
  4644  		`func (m *Comics) validateP4(formats strfmt.Registry) error {`,
  4645  		`	if err := validate.Required("4", "body", m.P4); err != nil {`,
  4646  		`	for i := 0; i < len(m.P4); i++ {`,
  4647  		`		if err := validate.FormatOf("4"+"."+strconv.Itoa(i), "body", "isbn", m.P4[i].String(), formats); err != nil {`,
  4648  		`func (m *Comics) validateP5(formats strfmt.Registry) error {`,
  4649  		`	if err := validate.Required("5", "body", m.P5); err != nil {`,
  4650  		`type ComicsItems1 struct {`,
  4651  		`type ComicsItems2 struct {`,
  4652  		`type ComicsItems3 struct {`,
  4653  	},
  4654  		// not expected
  4655  		todo,
  4656  		// output in log
  4657  		noLines,
  4658  		noLines)
  4659  
  4660  	// load expectations for model: classics_items_additional_items_items0.go
  4661  	flattenRun.AddExpectations("classics_items_additional_items_items0.go", []string{
  4662  		`type ClassicsItemsAdditionalItemsItems0 struct {`,
  4663  		"	Period string `json:\"period,omitempty\"`",
  4664  		"	Title string `json:\"title,omitempty\"`",
  4665  		`func (m *ClassicsItemsAdditionalItemsItems0) Validate(formats strfmt.Registry) error {`,
  4666  		`	if err := m.validateTitle(formats); err != nil {`,
  4667  		`		return errors.CompositeValidationError(res...`,
  4668  		`var classicsItemsAdditionalItemsItems0TypeTitlePropEnum []interface{`,
  4669  		`	var res []string`,
  4670  		"	if err := json.Unmarshal([]byte(`[\"Les Misérables\",\"Bleak House\",\"Sherlock Holmes\",\"Siddhartha\"]`), &res); err != nil {",
  4671  		`	for _, v := range res {`,
  4672  		`		classicsItemsAdditionalItemsItems0TypeTitlePropEnum = append(classicsItemsAdditionalItemsItems0TypeTitlePropEnum, v`,
  4673  		`	ClassicsItemsAdditionalItemsItems0TitleLesMisérables string = "Les Misérables"`,
  4674  		`	ClassicsItemsAdditionalItemsItems0TitleBleakHouse string = "Bleak House"`,
  4675  		`	ClassicsItemsAdditionalItemsItems0TitleSherlockHolmes string = "Sherlock Holmes"`,
  4676  		`	ClassicsItemsAdditionalItemsItems0TitleSiddhartha string = "Siddhartha"`,
  4677  		`func (m *ClassicsItemsAdditionalItemsItems0) validateTitleEnum(path, location string, value string) error {`,
  4678  		`	if err := validate.EnumCase(path, location, value, classicsItemsAdditionalItemsItems0TypeTitlePropEnum, true); err != nil {`,
  4679  		`func (m *ClassicsItemsAdditionalItemsItems0) validateTitle(formats strfmt.Registry) error {`,
  4680  		`	if swag.IsZero(m.Title) {`,
  4681  		`	if err := m.validateTitleEnum("title", "body", m.Title); err != nil {`,
  4682  	},
  4683  		// not expected
  4684  		todo,
  4685  		// output in log
  4686  		noLines,
  4687  		noLines)
  4688  
  4689  	// load expectations for model: comics_items1.go
  4690  	flattenRun.AddExpectations("comics_items1.go", []string{
  4691  		`type ComicsItems1 struct {`,
  4692  		"	Narrative *string `json:\"narrative\"`",
  4693  		`func (m *ComicsItems1) Validate(formats strfmt.Registry) error {`,
  4694  		`	if err := m.validateNarrative(formats); err != nil {`,
  4695  		`		return errors.CompositeValidationError(res...`,
  4696  		`func (m *ComicsItems1) validateNarrative(formats strfmt.Registry) error {`,
  4697  		`	if err := validate.Required("narrative", "body", m.Narrative); err != nil {`,
  4698  	},
  4699  		// not expected
  4700  		todo,
  4701  		// output in log
  4702  		noLines,
  4703  		noLines)
  4704  
  4705  	// load expectations for model: comics_items3.go
  4706  	flattenRun.AddExpectations("comics_items3.go", []string{
  4707  		`type ComicsItems3 struct {`,
  4708  		"	Author string `json:\"author,omitempty\"`",
  4709  		"	Character string `json:\"character,omitempty\"`",
  4710  		`func (m *ComicsItems3) Validate(formats strfmt.Registry) error {`,
  4711  		`	if err := m.validateAuthor(formats); err != nil {`,
  4712  		`	if err := m.validateCharacter(formats); err != nil {`,
  4713  		`		return errors.CompositeValidationError(res...`,
  4714  		`func (m *ComicsItems3) validateAuthor(formats strfmt.Registry) error {`,
  4715  		`	if swag.IsZero(m.Author) {`,
  4716  		`	if err := validate.MinLength("author", "body", string(m.Author), 1); err != nil {`,
  4717  		`func (m *ComicsItems3) validateCharacter(formats strfmt.Registry) error {`,
  4718  		`	if swag.IsZero(m.Character) {`,
  4719  		"	if err := validate.Pattern(\"character\", \"body\", string(m.Character), `^[A-Z]+$`); err != nil {",
  4720  	},
  4721  		// not expected
  4722  		todo,
  4723  		// output in log
  4724  		noLines,
  4725  		noLines)
  4726  
  4727  	// load expectations for model: classics_tuple_additional_items.go
  4728  	flattenRun.AddExpectations("classics_tuple_additional_items.go", []string{
  4729  		`type ClassicsTupleAdditionalItems struct {`,
  4730  		"	P0 *ClassicsItemsAdditionalItemsItems0 `json:\"-\"`",
  4731  		"	P1 []strfmt.Date `json:\"-\"`",
  4732  		"	P2 *ClassicsItemsAdditionalItemsItems2 `json:\"-\"`",
  4733  		"	P3 Comics `json:\"-\"`",
  4734  		`func (m *ClassicsTupleAdditionalItems) Validate(formats strfmt.Registry) error {`,
  4735  		`	if err := m.validateP0(formats); err != nil {`,
  4736  		`	if err := m.validateP1(formats); err != nil {`,
  4737  		`	if err := m.validateP2(formats); err != nil {`,
  4738  		`	if err := m.validateP3(formats); err != nil {`,
  4739  		`		return errors.CompositeValidationError(res...`,
  4740  		`func (m *ClassicsTupleAdditionalItems) validateP0(formats strfmt.Registry) error {`,
  4741  		`	if err := validate.Required("0", "body", m.P0); err != nil {`,
  4742  		`	if m.P0 != nil {`,
  4743  		`		if err := m.P0.Validate(formats); err != nil {`,
  4744  		`			if ve, ok := err.(*errors.Validation); ok {`,
  4745  		`				return ve.ValidateName("0"`,
  4746  		`func (m *ClassicsTupleAdditionalItems) validateP1(formats strfmt.Registry) error {`,
  4747  		`	if err := validate.Required("1", "body", m.P1); err != nil {`,
  4748  		`	for i := 0; i < len(m.P1); i++ {`,
  4749  		`		if err := validate.FormatOf("1"+"."+strconv.Itoa(i), "body", "date", m.P1[i].String(), formats); err != nil {`,
  4750  		`func (m *ClassicsTupleAdditionalItems) validateP2(formats strfmt.Registry) error {`,
  4751  		`	if err := validate.Required("2", "body", m.P2); err != nil {`,
  4752  		`	if m.P2 != nil {`,
  4753  		`		if err := m.P2.Validate(formats); err != nil {`,
  4754  		`			if ve, ok := err.(*errors.Validation); ok {`,
  4755  		`				return ve.ValidateName("2"`,
  4756  		`func (m *ClassicsTupleAdditionalItems) validateP3(formats strfmt.Registry) error {`,
  4757  		`	if err := m.P3.Validate(formats); err != nil {`,
  4758  		`		if ve, ok := err.(*errors.Validation); ok {`,
  4759  		`			return ve.ValidateName("3"`,
  4760  	},
  4761  		// not expected
  4762  		todo,
  4763  		// output in log
  4764  		noLines,
  4765  		noLines)
  4766  
  4767  }
  4768  
  4769  func initFixture1198() {
  4770  	// testing ../fixtures/bugs/1487/fixture-1198.yaml with expand (--skip-flatten)
  4771  
  4772  	f := newModelFixture("../fixtures/bugs/1198/fixture-1198.yaml", "string-body-api")
  4773  	flattenRun := f.AddRun(false)
  4774  
  4775  	// load expectations for model: pet.go
  4776  	flattenRun.AddExpectations("pet.go", []string{
  4777  		`type Pet struct {`,
  4778  		"	Date interface{} `json:\"date\"`",
  4779  		`func (m *Pet) Validate(formats strfmt.Registry) error {`,
  4780  		`	if err := m.validateDate(formats); err != nil {`,
  4781  		`		return errors.CompositeValidationError(res...`,
  4782  		`func (m *Pet) validateDate(formats strfmt.Registry) error {`,
  4783  	},
  4784  		// not expected
  4785  		todo,
  4786  		// output in log
  4787  		noLines,
  4788  		noLines)
  4789  
  4790  }
  4791  
  4792  func initFixture1042() {
  4793  	// testing ../fixtures/bugs/1487/fixture-1042.yaml with expand (--skip-flatten)
  4794  
  4795  	/* when the specification incorrectly defines the allOf,
  4796  	generated unmarshalling is wrong.
  4797  	This fixture asserts that with correct spec, the generated models are correct.
  4798  
  4799  	*/
  4800  
  4801  	f := newModelFixture("../fixtures/bugs/1042/fixture-1042.yaml", "allOf marshalling")
  4802  	flattenRun := f.AddRun(false)
  4803  
  4804  	// load expectations for model: b.go
  4805  	flattenRun.AddExpectations("b.go", []string{
  4806  		`type B struct {`,
  4807  		`	A`,
  4808  		`	BAllOf1`,
  4809  		`func (m *B) UnmarshalJSON(raw []byte) error {`,
  4810  		`	var aO0 A`,
  4811  		`	if err := swag.ReadJSON(raw, &aO0); err != nil {`,
  4812  		`	m.A = aO0`,
  4813  		`	var aO1 BAllOf1`,
  4814  		`	if err := swag.ReadJSON(raw, &aO1); err != nil {`,
  4815  		`	m.BAllOf1 = aO1`,
  4816  		`func (m B) MarshalJSON() ([]byte, error) {`,
  4817  		//`	var _parts [][]byte`,
  4818  		// slight optimization of allocations
  4819  		`	_parts := make([][]byte, 0, 2)`,
  4820  		`	aO0, err := swag.WriteJSON(m.A`,
  4821  		`	if err != nil {`,
  4822  		`		return nil, err`,
  4823  		`	_parts = append(_parts, aO0`,
  4824  		`	aO1, err := swag.WriteJSON(m.BAllOf1`,
  4825  		`	if err != nil {`,
  4826  		`		return nil, err`,
  4827  		`	_parts = append(_parts, aO1`,
  4828  		`	return swag.ConcatJSON(_parts...), nil`,
  4829  		`func (m *B) Validate(formats strfmt.Registry) error {`,
  4830  		`	if err := m.A.Validate(formats); err != nil {`,
  4831  		`	if err := m.BAllOf1.Validate(formats); err != nil {`,
  4832  		`		return errors.CompositeValidationError(res...`,
  4833  	},
  4834  		// not expected
  4835  		todo,
  4836  		// output in log
  4837  		noLines,
  4838  		noLines)
  4839  
  4840  	// load expectations for model: b_all_of1.go
  4841  	flattenRun.AddExpectations("b_all_of1.go", []string{
  4842  		`type BAllOf1 struct {`,
  4843  		"	F3 *string `json:\"f3\"`",
  4844  		"	F4 []string `json:\"f4\"`",
  4845  		`func (m *BAllOf1) Validate(formats strfmt.Registry) error {`,
  4846  		`	if err := m.validateF3(formats); err != nil {`,
  4847  		`	if err := m.validateF4(formats); err != nil {`,
  4848  		`		return errors.CompositeValidationError(res...`,
  4849  		`func (m *BAllOf1) validateF3(formats strfmt.Registry) error {`,
  4850  		`	if err := validate.Required("f3", "body", m.F3); err != nil {`,
  4851  		`func (m *BAllOf1) validateF4(formats strfmt.Registry) error {`,
  4852  		`	if err := validate.Required("f4", "body", m.F4); err != nil {`,
  4853  	},
  4854  		// not expected
  4855  		todo,
  4856  		// output in log
  4857  		noLines,
  4858  		noLines)
  4859  
  4860  	// load expectations for model: a.go
  4861  	flattenRun.AddExpectations("a.go", []string{
  4862  		`type A struct {`,
  4863  		"	F1 string `json:\"f1,omitempty\"`",
  4864  		"	F2 string `json:\"f2,omitempty\"`",
  4865  		// empty validation
  4866  		"func (m *A) Validate(formats strfmt.Registry) error {\n	return nil\n}",
  4867  	},
  4868  		// not expected
  4869  		todo,
  4870  		// output in log
  4871  		noLines,
  4872  		noLines)
  4873  
  4874  }
  4875  
  4876  func initFixture1042V2() {
  4877  	// testing ../fixtures/bugs/1487/fixture-1042-2.yaml with expand (--skip-flatten)
  4878  
  4879  	/* when the specification incorrectly defines the allOf,
  4880  	generated unmarshalling is wrong.
  4881  	This fixture asserts that with correct spec, the generated models are correct.
  4882  
  4883  	*/
  4884  
  4885  	f := newModelFixture("../fixtures/bugs/1042/fixture-1042-2.yaml", "allOf marshalling")
  4886  	flattenRun := f.AddRun(false)
  4887  
  4888  	// load expectations for model: error_model.go
  4889  	flattenRun.AddExpectations("error_model.go", []string{
  4890  		`type ErrorModel struct {`,
  4891  		"	Code *int64 `json:\"code\"`",
  4892  		"	Message *string `json:\"message\"`",
  4893  		`func (m *ErrorModel) Validate(formats strfmt.Registry) error {`,
  4894  		`	if err := m.validateCode(formats); err != nil {`,
  4895  		`	if err := m.validateMessage(formats); err != nil {`,
  4896  		`		return errors.CompositeValidationError(res...`,
  4897  		`func (m *ErrorModel) validateCode(formats strfmt.Registry) error {`,
  4898  		`	if err := validate.Required("code", "body", m.Code); err != nil {`,
  4899  		`	if err := validate.MinimumInt("code", "body", int64(*m.Code), 100, false); err != nil {`,
  4900  		`	if err := validate.MaximumInt("code", "body", int64(*m.Code), 600, false); err != nil {`,
  4901  		`func (m *ErrorModel) validateMessage(formats strfmt.Registry) error {`,
  4902  		`	if err := validate.Required("message", "body", m.Message); err != nil {`,
  4903  	},
  4904  		// not expected
  4905  		todo,
  4906  		// output in log
  4907  		noLines,
  4908  		noLines)
  4909  
  4910  	// load expectations for model: extended_error_model.go
  4911  	flattenRun.AddExpectations("extended_error_model.go", []string{
  4912  		`type ExtendedErrorModel struct {`,
  4913  		`	ErrorModel`,
  4914  		`	ExtendedErrorModelAllOf1`,
  4915  		`func (m *ExtendedErrorModel) UnmarshalJSON(raw []byte) error {`,
  4916  		`	var aO0 ErrorModel`,
  4917  		`	if err := swag.ReadJSON(raw, &aO0); err != nil {`,
  4918  		`	m.ErrorModel = aO0`,
  4919  		`	var aO1 ExtendedErrorModelAllOf1`,
  4920  		`	if err := swag.ReadJSON(raw, &aO1); err != nil {`,
  4921  		`	m.ExtendedErrorModelAllOf1 = aO1`,
  4922  		`func (m ExtendedErrorModel) MarshalJSON() ([]byte, error) {`,
  4923  		//`	var _parts [][]byte`,
  4924  		// slight optimization of allocations
  4925  		`	_parts := make([][]byte, 0, 2)`,
  4926  		`	aO0, err := swag.WriteJSON(m.ErrorModel`,
  4927  		`	if err != nil {`,
  4928  		`		return nil, err`,
  4929  		`	_parts = append(_parts, aO0`,
  4930  		`	aO1, err := swag.WriteJSON(m.ExtendedErrorModelAllOf1`,
  4931  		`	if err != nil {`,
  4932  		`		return nil, err`,
  4933  		`	_parts = append(_parts, aO1`,
  4934  		`	return swag.ConcatJSON(_parts...), nil`,
  4935  		`func (m *ExtendedErrorModel) Validate(formats strfmt.Registry) error {`,
  4936  		`	if err := m.ErrorModel.Validate(formats); err != nil {`,
  4937  		`	if err := m.ExtendedErrorModelAllOf1.Validate(formats); err != nil {`,
  4938  		`		return errors.CompositeValidationError(res...`,
  4939  	},
  4940  		// not expected
  4941  		todo,
  4942  		// output in log
  4943  		noLines,
  4944  		noLines)
  4945  
  4946  	// load expectations for model: extended_error_model_all_of1.go
  4947  	flattenRun.AddExpectations("extended_error_model_all_of1.go", []string{
  4948  		`type ExtendedErrorModelAllOf1 struct {`,
  4949  		"	RootCause *string `json:\"rootCause\"`",
  4950  		`func (m *ExtendedErrorModelAllOf1) Validate(formats strfmt.Registry) error {`,
  4951  		`	if err := m.validateRootCause(formats); err != nil {`,
  4952  		`		return errors.CompositeValidationError(res...`,
  4953  		`func (m *ExtendedErrorModelAllOf1) validateRootCause(formats strfmt.Registry) error {`,
  4954  		`	if err := validate.Required("rootCause", "body", m.RootCause); err != nil {`,
  4955  	},
  4956  		// not expected
  4957  		todo,
  4958  		// output in log
  4959  		noLines,
  4960  		noLines)
  4961  
  4962  }
  4963  
  4964  func initFixture979() {
  4965  	// testing ../fixtures/bugs/1487/fixture-979.yaml with expand (--skip-flatten)
  4966  
  4967  	/* checking that properties is enough to figure out an object schema
  4968  	 */
  4969  
  4970  	f := newModelFixture("../fixtures/bugs/979/fixture-979.yaml", "allOf without the explicit type object")
  4971  	flattenRun := f.AddRun(false)
  4972  
  4973  	// load expectations for model: cluster.go
  4974  	flattenRun.AddExpectations("cluster.go", []string{
  4975  		`type Cluster struct {`,
  4976  		`	NewCluster`,
  4977  		`	ClusterAllOf1`,
  4978  		`func (m *Cluster) UnmarshalJSON(raw []byte) error {`,
  4979  		`	var aO0 NewCluster`,
  4980  		`	if err := swag.ReadJSON(raw, &aO0); err != nil {`,
  4981  		`	m.NewCluster = aO0`,
  4982  		`	var aO1 ClusterAllOf1`,
  4983  		`	if err := swag.ReadJSON(raw, &aO1); err != nil {`,
  4984  		`	m.ClusterAllOf1 = aO1`,
  4985  		`func (m Cluster) MarshalJSON() ([]byte, error) {`,
  4986  		//`	var _parts [][]byte`,
  4987  		// slight optimization of allocations
  4988  		`	_parts := make([][]byte, 0, 2)`,
  4989  		`	aO0, err := swag.WriteJSON(m.NewCluster`,
  4990  		`	if err != nil {`,
  4991  		`		return nil, err`,
  4992  		`	_parts = append(_parts, aO0`,
  4993  		`	aO1, err := swag.WriteJSON(m.ClusterAllOf1`,
  4994  		`	if err != nil {`,
  4995  		`		return nil, err`,
  4996  		`	_parts = append(_parts, aO1`,
  4997  		`	return swag.ConcatJSON(_parts...), nil`,
  4998  		`func (m *Cluster) Validate(formats strfmt.Registry) error {`,
  4999  		`	if err := m.NewCluster.Validate(formats); err != nil {`,
  5000  		`	if err := m.ClusterAllOf1.Validate(formats); err != nil {`,
  5001  		`		return errors.CompositeValidationError(res...`,
  5002  	},
  5003  		// not expected
  5004  		todo,
  5005  		// output in log
  5006  		noLines,
  5007  		noLines)
  5008  
  5009  	// load expectations for model: new_cluster.go
  5010  	flattenRun.AddExpectations("new_cluster.go", []string{
  5011  		`type NewCluster struct {`,
  5012  		"	DummyProp1 int64 `json:\"dummyProp1,omitempty\"`",
  5013  		// empty validation
  5014  		"func (m *NewCluster) Validate(formats strfmt.Registry) error {\n	return nil\n}",
  5015  	},
  5016  		// not expected
  5017  		todo,
  5018  		// output in log
  5019  		noLines,
  5020  		noLines)
  5021  
  5022  	// load expectations for model: cluster_all_of1.go
  5023  	flattenRun.AddExpectations("cluster_all_of1.go", []string{
  5024  		`type ClusterAllOf1 struct {`,
  5025  		"	Result string `json:\"result,omitempty\"`",
  5026  		"	Status string `json:\"status,omitempty\"`",
  5027  		// empty validation
  5028  		"func (m *ClusterAllOf1) Validate(formats strfmt.Registry) error {\n	return nil\n}",
  5029  	},
  5030  		// not expected
  5031  		todo,
  5032  		// output in log
  5033  		noLines,
  5034  		noLines)
  5035  
  5036  }
  5037  
  5038  func initFixture842() {
  5039  	// testing ../fixtures/bugs/1487/fixture-842.yaml with expand (--skip-flatten)
  5040  
  5041  	/* codegen fails to produce code that builds
  5042  	 */
  5043  
  5044  	f := newModelFixture("../fixtures/bugs/842/fixture-842.yaml", "polymorphic type containing an array of the base type")
  5045  	flattenRun := f.AddRun(false)
  5046  
  5047  	// load expectations for model: value_array_all_of1.go
  5048  	flattenRun.AddExpectations("value_array_all_of1.go", []string{
  5049  		`type ValueArrayAllOf1 struct {`,
  5050  		`	valuesField []Value`,
  5051  		`func (m *ValueArrayAllOf1) Values() []Value {`,
  5052  		`	return m.valuesField`,
  5053  		`func (m *ValueArrayAllOf1) SetValues(val []Value) {`,
  5054  		`	m.valuesField = val`,
  5055  		`func (m *ValueArrayAllOf1) Validate(formats strfmt.Registry) error {`,
  5056  		`	if err := m.validateValues(formats); err != nil {`,
  5057  		`		return errors.CompositeValidationError(res...`,
  5058  		`func (m *ValueArrayAllOf1) validateValues(formats strfmt.Registry) error {`,
  5059  		`	if err := validate.Required("Values", "body", m.Values()); err != nil {`,
  5060  		`	for i := 0; i < len(m.Values()); i++ {`,
  5061  		`		if err := m.valuesField[i].Validate(formats); err != nil {`,
  5062  		`			if ve, ok := err.(*errors.Validation); ok {`,
  5063  		`				return ve.ValidateName("Values" + "." + strconv.Itoa(i)`,
  5064  	},
  5065  		// not expected
  5066  		todo,
  5067  		// output in log
  5068  		noLines,
  5069  		noLines)
  5070  
  5071  	// load expectations for model: value_array.go
  5072  	flattenRun.AddExpectations("value_array.go", []string{
  5073  		`type ValueArray struct {`,
  5074  		`	ValueArrayAllOf1`,
  5075  		`func (m *ValueArray) ValueType() string {`,
  5076  		`	return "ValueArray"`,
  5077  		`func (m *ValueArray) SetValueType(val string) {`,
  5078  		`func (m *ValueArray) Validate(formats strfmt.Registry) error {`,
  5079  		`	if err := m.ValueArrayAllOf1.Validate(formats); err != nil {`,
  5080  		`		return errors.CompositeValidationError(res...`,
  5081  	},
  5082  		// not expected
  5083  		todo,
  5084  		// output in log
  5085  		noLines,
  5086  		noLines)
  5087  
  5088  	// load expectations for model: value.go
  5089  	flattenRun.AddExpectations("value.go", []string{
  5090  		`type Value interface {`,
  5091  		`	runtime.Validatable`,
  5092  		`	ValueType() string`,
  5093  		`	SetValueType(string`,
  5094  		`type value struct {`,
  5095  		`	valueTypeField string`,
  5096  		`func (m *value) ValueType() string {`,
  5097  		`	return "Value"`,
  5098  		`func (m *value) SetValueType(val string) {`,
  5099  		`func UnmarshalValueSlice(reader io.Reader, consumer runtime.Consumer) ([]Value, error) {`,
  5100  		`	var elements []json.RawMessage`,
  5101  		`	if err := consumer.Consume(reader, &elements); err != nil {`,
  5102  		`		return nil, err`,
  5103  		`	var result []Value`,
  5104  		`	for _, element := range elements {`,
  5105  		`		obj, err := unmarshalValue(element, consumer`,
  5106  		`		if err != nil {`,
  5107  		`			return nil, err`,
  5108  		`		result = append(result, obj`,
  5109  		`	return result, nil`,
  5110  		`func UnmarshalValue(reader io.Reader, consumer runtime.Consumer) (Value, error) {`,
  5111  		`	data, err := ioutil.ReadAll(reader`,
  5112  		`	if err != nil {`,
  5113  		`		return nil, err`,
  5114  		`	return unmarshalValue(data, consumer`,
  5115  		`func unmarshalValue(data []byte, consumer runtime.Consumer) (Value, error) {`,
  5116  		`	buf := bytes.NewBuffer(data`,
  5117  		`	buf2 := bytes.NewBuffer(data`,
  5118  		`	var getType struct {`,
  5119  		"		ValueType string `json:\"ValueType\"`",
  5120  		`	if err := consumer.Consume(buf, &getType); err != nil {`,
  5121  		`		return nil, err`,
  5122  		`	if err := validate.RequiredString("ValueType", "body", getType.ValueType); err != nil {`,
  5123  		`		return nil, err`,
  5124  		`	switch getType.ValueType {`,
  5125  		`	case "Value":`,
  5126  		`		var result value`,
  5127  		`		if err := consumer.Consume(buf2, &result); err != nil {`,
  5128  		`			return nil, err`,
  5129  		`		return &result, nil`,
  5130  		`	case "ValueArray":`,
  5131  		`		var result ValueArray`,
  5132  		`		if err := consumer.Consume(buf2, &result); err != nil {`,
  5133  		`			return nil, err`,
  5134  		`		return &result, nil`,
  5135  		`	return nil, errors.New(422, "invalid ValueType value: %q", getType.ValueType`,
  5136  		// empty validation
  5137  		"func (m *value) Validate(formats strfmt.Registry) error {\n	return nil\n}",
  5138  	},
  5139  		// not expected
  5140  		todo,
  5141  		// output in log
  5142  		noLines,
  5143  		noLines)
  5144  
  5145  }
  5146  
  5147  func initFixture607() {
  5148  	// testing ../fixtures/bugs/1487/fixture-607.yaml with expand (--skip-flatten)
  5149  
  5150  	/* broken code produced on polymorphic type
  5151  	 */
  5152  
  5153  	f := newModelFixture("../fixtures/bugs/607/fixture-607.yaml", "broken code when using array of polymorphic type")
  5154  	flattenRun := f.AddRun(false)
  5155  
  5156  	// load expectations for model: range_filter_all_of1.go
  5157  	flattenRun.AddExpectations("range_filter_all_of1.go", []string{
  5158  		`type RangeFilterAllOf1 struct {`,
  5159  		"	Config *RangeFilterAllOf1Config `json:\"config\"`",
  5160  		`func (m *RangeFilterAllOf1) Validate(formats strfmt.Registry) error {`,
  5161  		`	if err := m.validateConfig(formats); err != nil {`,
  5162  		`		return errors.CompositeValidationError(res...`,
  5163  		`func (m *RangeFilterAllOf1) validateConfig(formats strfmt.Registry) error {`,
  5164  		`	if err := validate.Required("config", "body", m.Config); err != nil {`,
  5165  		`	if m.Config != nil {`,
  5166  		`		if err := m.Config.Validate(formats); err != nil {`,
  5167  		`			if ve, ok := err.(*errors.Validation); ok {`,
  5168  		`				return ve.ValidateName("config"`,
  5169  	},
  5170  		// not expected
  5171  		todo,
  5172  		// output in log
  5173  		noLines,
  5174  		noLines)
  5175  
  5176  	// load expectations for model: filter.go
  5177  	flattenRun.AddExpectations("filter.go", []string{
  5178  		`type Filter interface {`,
  5179  		`	runtime.Validatable`,
  5180  		`	Type() string`,
  5181  		`	SetType(string`,
  5182  		`type filter struct {`,
  5183  		`	typeField string`,
  5184  		`func (m *filter) Type() string {`,
  5185  		`	return "Filter"`,
  5186  		`func (m *filter) SetType(val string) {`,
  5187  		`func UnmarshalFilterSlice(reader io.Reader, consumer runtime.Consumer) ([]Filter, error) {`,
  5188  		`	var elements []json.RawMessage`,
  5189  		`	if err := consumer.Consume(reader, &elements); err != nil {`,
  5190  		`		return nil, err`,
  5191  		`	var result []Filter`,
  5192  		`	for _, element := range elements {`,
  5193  		`		obj, err := unmarshalFilter(element, consumer`,
  5194  		`		if err != nil {`,
  5195  		`			return nil, err`,
  5196  		`		result = append(result, obj`,
  5197  		`	return result, nil`,
  5198  		`func UnmarshalFilter(reader io.Reader, consumer runtime.Consumer) (Filter, error) {`,
  5199  		`	data, err := ioutil.ReadAll(reader`,
  5200  		`	if err != nil {`,
  5201  		`		return nil, err`,
  5202  		`	return unmarshalFilter(data, consumer`,
  5203  		`func unmarshalFilter(data []byte, consumer runtime.Consumer) (Filter, error) {`,
  5204  		`	buf := bytes.NewBuffer(data`,
  5205  		`	buf2 := bytes.NewBuffer(data`,
  5206  		`	var getType struct {`,
  5207  		"		Type string `json:\"type\"`",
  5208  		`	if err := consumer.Consume(buf, &getType); err != nil {`,
  5209  		`		return nil, err`,
  5210  		`	if err := validate.RequiredString("type", "body", getType.Type); err != nil {`,
  5211  		`		return nil, err`,
  5212  		`	switch getType.Type {`,
  5213  		`	case "AndFilter":`,
  5214  		`		var result AndFilter`,
  5215  		`		if err := consumer.Consume(buf2, &result); err != nil {`,
  5216  		`			return nil, err`,
  5217  		`		return &result, nil`,
  5218  		`	case "Filter":`,
  5219  		`		var result filter`,
  5220  		`		if err := consumer.Consume(buf2, &result); err != nil {`,
  5221  		`			return nil, err`,
  5222  		`		return &result, nil`,
  5223  		`	case "RangeFilter":`,
  5224  		`		var result RangeFilter`,
  5225  		`		if err := consumer.Consume(buf2, &result); err != nil {`,
  5226  		`			return nil, err`,
  5227  		`		return &result, nil`,
  5228  		`	return nil, errors.New(422, "invalid type value: %q", getType.Type`,
  5229  		// empty validation
  5230  		"func (m *filter) Validate(formats strfmt.Registry) error {\n	return nil\n}",
  5231  	},
  5232  		// not expected
  5233  		todo,
  5234  		// output in log
  5235  		noLines,
  5236  		noLines)
  5237  
  5238  	// load expectations for model: and_filter_all_of1.go
  5239  	flattenRun.AddExpectations("and_filter_all_of1.go", []string{
  5240  		`type AndFilterAllOf1 struct {`,
  5241  		`	configField []Filter`,
  5242  		`func (m *AndFilterAllOf1) Config() []Filter {`,
  5243  		`	return m.configField`,
  5244  		`func (m *AndFilterAllOf1) SetConfig(val []Filter) {`,
  5245  		`	m.configField = val`,
  5246  		`func (m *AndFilterAllOf1) UnmarshalJSON(raw []byte) error {`,
  5247  		`	var data struct {`,
  5248  		"		Config json.RawMessage `json:\"config\"`",
  5249  		`	buf := bytes.NewBuffer(raw`,
  5250  		`	dec := json.NewDecoder(buf`,
  5251  		`	dec.UseNumber(`,
  5252  		`	if err := dec.Decode(&data); err != nil {`,
  5253  		`	propConfig, err := UnmarshalFilterSlice(bytes.NewBuffer(data.Config), runtime.JSONConsumer()`,
  5254  		`	if err != nil && err != io.EOF {`,
  5255  		`	var result AndFilterAllOf1`,
  5256  		`	result.configField = propConfig`,
  5257  		`	*m = result`,
  5258  		`func (m AndFilterAllOf1) MarshalJSON() ([]byte, error) {`,
  5259  		`	var b1, b2, b3 []byte`,
  5260  		`	var err error`,
  5261  		`	b1, err = json.Marshal(struct {`,
  5262  		`	}{})`,
  5263  		`	if err != nil {`,
  5264  		`		return nil, err`,
  5265  		`	b2, err = json.Marshal(struct {`,
  5266  		"		Config []Filter `json:\"config\"`",
  5267  		`	}{`,
  5268  		`		Config: m.configField,`,
  5269  		`	})`,
  5270  		`	if err != nil {`,
  5271  		`		return nil, err`,
  5272  		`	return swag.ConcatJSON(b1, b2, b3), nil`,
  5273  		`func (m *AndFilterAllOf1) Validate(formats strfmt.Registry) error {`,
  5274  		`	if err := m.validateConfig(formats); err != nil {`,
  5275  		`		return errors.CompositeValidationError(res...`,
  5276  		`func (m *AndFilterAllOf1) validateConfig(formats strfmt.Registry) error {`,
  5277  		`	if err := validate.Required("config", "body", m.Config()); err != nil {`,
  5278  		`	for i := 0; i < len(m.Config()); i++ {`,
  5279  		`		if err := m.configField[i].Validate(formats); err != nil {`,
  5280  		`			if ve, ok := err.(*errors.Validation); ok {`,
  5281  		`				return ve.ValidateName("config" + "." + strconv.Itoa(i)`,
  5282  	},
  5283  		// not expected
  5284  		todo,
  5285  		// output in log
  5286  		noLines,
  5287  		noLines)
  5288  
  5289  	// load expectations for model: and_filter.go
  5290  	flattenRun.AddExpectations("and_filter.go", []string{
  5291  		`type AndFilter struct {`,
  5292  		`	AndFilterAllOf1`,
  5293  		`func (m *AndFilter) Type() string {`,
  5294  		`	return "AndFilter"`,
  5295  		`func (m *AndFilter) SetType(val string) {`,
  5296  		`func (m *AndFilter) UnmarshalJSON(raw []byte) error {`,
  5297  		`	var data struct {`,
  5298  		`		AndFilterAllOf1`,
  5299  		`	buf := bytes.NewBuffer(raw`,
  5300  		`	dec := json.NewDecoder(buf`,
  5301  		`	dec.UseNumber(`,
  5302  		`	if err := dec.Decode(&data); err != nil {`,
  5303  		`	var base struct {`,
  5304  		"		Type string `json:\"type\"`",
  5305  		`	buf = bytes.NewBuffer(raw`,
  5306  		`	dec = json.NewDecoder(buf`,
  5307  		`	dec.UseNumber(`,
  5308  		`	if err := dec.Decode(&base); err != nil {`,
  5309  		`	var result AndFilter`,
  5310  		`	if base.Type != result.Type() {`,
  5311  		`		return errors.New(422, "invalid type value: %q", base.Type`,
  5312  		`	result.AndFilterAllOf1 = data.AndFilterAllOf1`,
  5313  		`	*m = result`,
  5314  		`func (m AndFilter) MarshalJSON() ([]byte, error) {`,
  5315  		`	var b1, b2, b3 []byte`,
  5316  		`	var err error`,
  5317  		`	b1, err = json.Marshal(struct {`,
  5318  		`		AndFilterAllOf1`,
  5319  		`	}{`,
  5320  		`		AndFilterAllOf1: m.AndFilterAllOf1,`,
  5321  		`	})`,
  5322  		`	if err != nil {`,
  5323  		`		return nil, err`,
  5324  		`	b2, err = json.Marshal(struct {`,
  5325  		"		Type string `json:\"type\"`",
  5326  		`	}{`,
  5327  		`		Type: m.Type(),`,
  5328  		`	})`,
  5329  		`	if err != nil {`,
  5330  		`		return nil, err`,
  5331  		`	return swag.ConcatJSON(b1, b2, b3), nil`,
  5332  		`func (m *AndFilter) Validate(formats strfmt.Registry) error {`,
  5333  		`	if err := m.AndFilterAllOf1.Validate(formats); err != nil {`,
  5334  		`		return errors.CompositeValidationError(res...`,
  5335  	},
  5336  		// not expected
  5337  		todo,
  5338  		// output in log
  5339  		noLines,
  5340  		noLines)
  5341  
  5342  	// load expectations for model: range_filter.go
  5343  	flattenRun.AddExpectations("range_filter.go", []string{
  5344  		`type RangeFilter struct {`,
  5345  		`	RangeFilterAllOf1`,
  5346  		`func (m *RangeFilter) Type() string {`,
  5347  		`	return "RangeFilter"`,
  5348  		`func (m *RangeFilter) SetType(val string) {`,
  5349  		`func (m *RangeFilter) UnmarshalJSON(raw []byte) error {`,
  5350  		`	var data struct {`,
  5351  		`		RangeFilterAllOf1`,
  5352  		`	buf := bytes.NewBuffer(raw`,
  5353  		`	dec := json.NewDecoder(buf`,
  5354  		`	dec.UseNumber(`,
  5355  		`	if err := dec.Decode(&data); err != nil {`,
  5356  		`	var base struct {`,
  5357  		"		Type string `json:\"type\"`",
  5358  		`	buf = bytes.NewBuffer(raw`,
  5359  		`	dec = json.NewDecoder(buf`,
  5360  		`	dec.UseNumber(`,
  5361  		`	if err := dec.Decode(&base); err != nil {`,
  5362  		`	var result RangeFilter`,
  5363  		`	if base.Type != result.Type() {`,
  5364  		`		return errors.New(422, "invalid type value: %q", base.Type`,
  5365  		`	result.RangeFilterAllOf1 = data.RangeFilterAllOf1`,
  5366  		`	*m = result`,
  5367  		`func (m RangeFilter) MarshalJSON() ([]byte, error) {`,
  5368  		`	var b1, b2, b3 []byte`,
  5369  		`	var err error`,
  5370  		`	b1, err = json.Marshal(struct {`,
  5371  		`		RangeFilterAllOf1`,
  5372  		`	}{`,
  5373  		`		RangeFilterAllOf1: m.RangeFilterAllOf1,`,
  5374  		`	})`,
  5375  		`	if err != nil {`,
  5376  		`		return nil, err`,
  5377  		`	b2, err = json.Marshal(struct {`,
  5378  		"		Type string `json:\"type\"`",
  5379  		`	}{`,
  5380  		`		Type: m.Type(),`,
  5381  		`	})`,
  5382  		`	if err != nil {`,
  5383  		`		return nil, err`,
  5384  		`	return swag.ConcatJSON(b1, b2, b3), nil`,
  5385  		`func (m *RangeFilter) Validate(formats strfmt.Registry) error {`,
  5386  		`	if err := m.RangeFilterAllOf1.Validate(formats); err != nil {`,
  5387  		`		return errors.CompositeValidationError(res...`,
  5388  	},
  5389  		// not expected
  5390  		todo,
  5391  		// output in log
  5392  		noLines,
  5393  		noLines)
  5394  
  5395  	// load expectations for model: range_filter_all_of1_config.go
  5396  	flattenRun.AddExpectations("range_filter_all_of1_config.go", []string{
  5397  		`type RangeFilterAllOf1Config struct {`,
  5398  		"	Gt float64 `json:\"gt,omitempty\"`",
  5399  		"	Gte float64 `json:\"gte,omitempty\"`",
  5400  		"	Lt float64 `json:\"lt,omitempty\"`",
  5401  		"	Lte float64 `json:\"lte,omitempty\"`",
  5402  		// empty validation
  5403  		"func (m *RangeFilterAllOf1Config) Validate(formats strfmt.Registry) error {\n	return nil\n}",
  5404  	},
  5405  		// not expected
  5406  		todo,
  5407  		// output in log
  5408  		noLines,
  5409  		noLines)
  5410  
  5411  }
  5412  
  5413  func initFixture1336() {
  5414  	// testing ../fixtures/bugs/1487/fixture-1336.yaml with expand (--skip-flatten)
  5415  
  5416  	/* broken code produced on polymorphic type
  5417  	 */
  5418  
  5419  	f := newModelFixture("../fixtures/bugs/1336/fixture-1336.yaml", "broken code when using array of polymorphic type")
  5420  	flattenRun := f.AddRun(false)
  5421  
  5422  	// load expectations for model: node.go
  5423  	flattenRun.AddExpectations("node.go", []string{
  5424  		`type Node interface {`,
  5425  		`	runtime.Validatable`,
  5426  		`	NodeType() string`,
  5427  		`	SetNodeType(string`,
  5428  		`type node struct {`,
  5429  		`	nodeTypeField string`,
  5430  		`func (m *node) NodeType() string {`,
  5431  		`	return "Node"`,
  5432  		`func (m *node) SetNodeType(val string) {`,
  5433  		`func UnmarshalNodeSlice(reader io.Reader, consumer runtime.Consumer) ([]Node, error) {`,
  5434  		`	var elements []json.RawMessage`,
  5435  		`	if err := consumer.Consume(reader, &elements); err != nil {`,
  5436  		`		return nil, err`,
  5437  		`	var result []Node`,
  5438  		`	for _, element := range elements {`,
  5439  		`		obj, err := unmarshalNode(element, consumer`,
  5440  		`		if err != nil {`,
  5441  		`			return nil, err`,
  5442  		`		result = append(result, obj`,
  5443  		`	return result, nil`,
  5444  		`func UnmarshalNode(reader io.Reader, consumer runtime.Consumer) (Node, error) {`,
  5445  		`	data, err := ioutil.ReadAll(reader`,
  5446  		`	if err != nil {`,
  5447  		`		return nil, err`,
  5448  		`	return unmarshalNode(data, consumer`,
  5449  		`func unmarshalNode(data []byte, consumer runtime.Consumer) (Node, error) {`,
  5450  		`	buf := bytes.NewBuffer(data`,
  5451  		`	buf2 := bytes.NewBuffer(data`,
  5452  		`	var getType struct {`,
  5453  		"		NodeType string `json:\"NodeType\"`",
  5454  		`	if err := consumer.Consume(buf, &getType); err != nil {`,
  5455  		`		return nil, err`,
  5456  		`	if err := validate.RequiredString("NodeType", "body", getType.NodeType); err != nil {`,
  5457  		`		return nil, err`,
  5458  		`	switch getType.NodeType {`,
  5459  		`	case "CodeBlockNode":`,
  5460  		`		var result CodeBlockNode`,
  5461  		`		if err := consumer.Consume(buf2, &result); err != nil {`,
  5462  		`			return nil, err`,
  5463  		`		return &result, nil`,
  5464  		`	case "DocBlockNode":`,
  5465  		`		var result DocBlockNode`,
  5466  		`		if err := consumer.Consume(buf2, &result); err != nil {`,
  5467  		`			return nil, err`,
  5468  		`		return &result, nil`,
  5469  		`	case "Node":`,
  5470  		`		var result node`,
  5471  		`		if err := consumer.Consume(buf2, &result); err != nil {`,
  5472  		`			return nil, err`,
  5473  		`		return &result, nil`,
  5474  		`	return nil, errors.New(422, "invalid NodeType value: %q", getType.NodeType`,
  5475  		// empty validation
  5476  		"func (m *node) Validate(formats strfmt.Registry) error {\n	return nil\n}",
  5477  	},
  5478  		// not expected
  5479  		todo,
  5480  		// output in log
  5481  		noLines,
  5482  		noLines)
  5483  
  5484  	// load expectations for model: code_block_node_all_of1.go
  5485  	flattenRun.AddExpectations("code_block_node_all_of1.go", []string{
  5486  		`type CodeBlockNodeAllOf1 struct {`,
  5487  		"	Code string `json:\"Code,omitempty\"`",
  5488  		// empty validation
  5489  		"func (m *CodeBlockNodeAllOf1) Validate(formats strfmt.Registry) error {\n	return nil\n}",
  5490  	},
  5491  		// not expected
  5492  		todo,
  5493  		// output in log
  5494  		noLines,
  5495  		noLines)
  5496  
  5497  	// load expectations for model: graph.go
  5498  	flattenRun.AddExpectations("graph.go", []string{
  5499  		`type Graph struct {`,
  5500  		`	nodesField []Node`,
  5501  		`func (m *Graph) Nodes() []Node {`,
  5502  		`	return m.nodesField`,
  5503  		`func (m *Graph) SetNodes(val []Node) {`,
  5504  		`	m.nodesField = val`,
  5505  		`func (m *Graph) UnmarshalJSON(raw []byte) error {`,
  5506  		`	var data struct {`,
  5507  		"		Nodes json.RawMessage `json:\"Nodes\"`",
  5508  		`	buf := bytes.NewBuffer(raw`,
  5509  		`	dec := json.NewDecoder(buf`,
  5510  		`	dec.UseNumber(`,
  5511  		`	if err := dec.Decode(&data); err != nil {`,
  5512  		`		nodes, err := UnmarshalNodeSlice(bytes.NewBuffer(data.Nodes), runtime.JSONConsumer()`,
  5513  		`	if err != nil && err != io.EOF {`,
  5514  		`	var result Graph`,
  5515  		`	result.nodesField = propNodes`,
  5516  		`	*m = result`,
  5517  		`func (m Graph) MarshalJSON() ([]byte, error) {`,
  5518  		`	var b1, b2, b3 []byte`,
  5519  		`	var err error`,
  5520  		`	b1, err = json.Marshal(struct {`,
  5521  		`	}{})`,
  5522  		`	if err != nil {`,
  5523  		`		return nil, err`,
  5524  		`	b2, err = json.Marshal(struct {`,
  5525  		"		Nodes []Node `json:\"Nodes\"`",
  5526  		`	}{`,
  5527  		`		Nodes: m.nodesField,`,
  5528  		`	})`,
  5529  		`	if err != nil {`,
  5530  		`		return nil, err`,
  5531  		`	return swag.ConcatJSON(b1, b2, b3), nil`,
  5532  		`func (m *Graph) Validate(formats strfmt.Registry) error {`,
  5533  		`		return errors.CompositeValidationError(res...`,
  5534  	},
  5535  		// not expected
  5536  		todo,
  5537  		// output in log
  5538  		noLines,
  5539  		noLines)
  5540  
  5541  	// load expectations for model: doc_block_node_all_of1.go
  5542  	flattenRun.AddExpectations("doc_block_node_all_of1.go", []string{
  5543  		`type DocBlockNodeAllOf1 struct {`,
  5544  		"	Doc string `json:\"Doc,omitempty\"`",
  5545  		// empty validation
  5546  		"func (m *DocBlockNodeAllOf1) Validate(formats strfmt.Registry) error {\n	return nil\n}",
  5547  	},
  5548  		// not expected
  5549  		todo,
  5550  		// output in log
  5551  		noLines,
  5552  		noLines)
  5553  
  5554  	// load expectations for model: doc_block_node.go
  5555  	flattenRun.AddExpectations("doc_block_node.go", []string{
  5556  		`type DocBlockNode struct {`,
  5557  		`	DocBlockNodeAllOf1`,
  5558  		`func (m *DocBlockNode) NodeType() string {`,
  5559  		`	return "DocBlockNode"`,
  5560  		`func (m *DocBlockNode) SetNodeType(val string) {`,
  5561  		`func (m *DocBlockNode) UnmarshalJSON(raw []byte) error {`,
  5562  		`	var data struct {`,
  5563  		`		DocBlockNodeAllOf1`,
  5564  		`	buf := bytes.NewBuffer(raw`,
  5565  		`	dec := json.NewDecoder(buf`,
  5566  		`	dec.UseNumber(`,
  5567  		`	if err := dec.Decode(&data); err != nil {`,
  5568  		`	var base struct {`,
  5569  		"		NodeType string `json:\"NodeType\"`",
  5570  		`	buf = bytes.NewBuffer(raw`,
  5571  		`	dec = json.NewDecoder(buf`,
  5572  		`	dec.UseNumber(`,
  5573  		`	if err := dec.Decode(&base); err != nil {`,
  5574  		`	var result DocBlockNode`,
  5575  		`	if base.NodeType != result.NodeType() {`,
  5576  		`		return errors.New(422, "invalid NodeType value: %q", base.NodeType`,
  5577  		`	result.DocBlockNodeAllOf1 = data.DocBlockNodeAllOf1`,
  5578  		`	*m = result`,
  5579  		`func (m DocBlockNode) MarshalJSON() ([]byte, error) {`,
  5580  		`	var b1, b2, b3 []byte`,
  5581  		`	var err error`,
  5582  		`	b1, err = json.Marshal(struct {`,
  5583  		`		DocBlockNodeAllOf1`,
  5584  		`	}{`,
  5585  		`		DocBlockNodeAllOf1: m.DocBlockNodeAllOf1,`,
  5586  		`	})`,
  5587  		`	if err != nil {`,
  5588  		`		return nil, err`,
  5589  		`	b2, err = json.Marshal(struct {`,
  5590  		"		NodeType string `json:\"NodeType\"`",
  5591  		`	}{`,
  5592  		`		NodeType: m.NodeType(),`,
  5593  		`	})`,
  5594  		`	if err != nil {`,
  5595  		`		return nil, err`,
  5596  		`	return swag.ConcatJSON(b1, b2, b3), nil`,
  5597  		`func (m *DocBlockNode) Validate(formats strfmt.Registry) error {`,
  5598  		`	if err := m.DocBlockNodeAllOf1.Validate(formats); err != nil {`,
  5599  		`		return errors.CompositeValidationError(res...`,
  5600  	},
  5601  		// not expected
  5602  		todo,
  5603  		// output in log
  5604  		noLines,
  5605  		noLines)
  5606  
  5607  	// load expectations for model: code_block_node.go
  5608  	flattenRun.AddExpectations("code_block_node.go", []string{
  5609  		`type CodeBlockNode struct {`,
  5610  		`	CodeBlockNodeAllOf1`,
  5611  		`func (m *CodeBlockNode) NodeType() string {`,
  5612  		`	return "CodeBlockNode"`,
  5613  		`func (m *CodeBlockNode) SetNodeType(val string) {`,
  5614  		`func (m *CodeBlockNode) UnmarshalJSON(raw []byte) error {`,
  5615  		`	var data struct {`,
  5616  		`		CodeBlockNodeAllOf1`,
  5617  		`	buf := bytes.NewBuffer(raw`,
  5618  		`	dec := json.NewDecoder(buf`,
  5619  		`	dec.UseNumber(`,
  5620  		`	if err := dec.Decode(&data); err != nil {`,
  5621  		`	var base struct {`,
  5622  		"		NodeType string `json:\"NodeType\"`",
  5623  		`	buf = bytes.NewBuffer(raw`,
  5624  		`	dec = json.NewDecoder(buf`,
  5625  		`	dec.UseNumber(`,
  5626  		`	if err := dec.Decode(&base); err != nil {`,
  5627  		`	var result CodeBlockNode`,
  5628  		`	if base.NodeType != result.NodeType() {`,
  5629  		`		return errors.New(422, "invalid NodeType value: %q", base.NodeType`,
  5630  		`	result.CodeBlockNodeAllOf1 = data.CodeBlockNodeAllOf1`,
  5631  		`	*m = result`,
  5632  		`func (m CodeBlockNode) MarshalJSON() ([]byte, error) {`,
  5633  		`	var b1, b2, b3 []byte`,
  5634  		`	var err error`,
  5635  		`	b1, err = json.Marshal(struct {`,
  5636  		`		CodeBlockNodeAllOf1`,
  5637  		`	}{`,
  5638  		`		CodeBlockNodeAllOf1: m.CodeBlockNodeAllOf1,`,
  5639  		`	})`,
  5640  		`	if err != nil {`,
  5641  		`		return nil, err`,
  5642  		`	b2, err = json.Marshal(struct {`,
  5643  		"		NodeType string `json:\"NodeType\"`",
  5644  		`	}{`,
  5645  		`		NodeType: m.NodeType(),`,
  5646  		`	})`,
  5647  		`	if err != nil {`,
  5648  		`		return nil, err`,
  5649  		`	return swag.ConcatJSON(b1, b2, b3), nil`,
  5650  		`func (m *CodeBlockNode) Validate(formats strfmt.Registry) error {`,
  5651  		`	if err := m.CodeBlockNodeAllOf1.Validate(formats); err != nil {`,
  5652  		`		return errors.CompositeValidationError(res...`,
  5653  	},
  5654  		// not expected
  5655  		todo,
  5656  		// output in log
  5657  		noLines,
  5658  		noLines)
  5659  
  5660  }
  5661  
  5662  func initFixtureErrors() {
  5663  	// testing ../fixtures/bugs/1487/fixture-errors.yaml with expand (--skip-flatten)
  5664  
  5665  	/*
  5666  		invalid specs supported by go-swagger
  5667  	*/
  5668  
  5669  	f := newModelFixture("../fixtures/bugs/1487/fixture-errors.yaml", "broken spec to exercise error handling")
  5670  	flattenRun := f.AddRun(false)
  5671  	expandRun := f.AddRun(true)
  5672  
  5673  	// load expectations for model: node.go
  5674  	flattenRun.AddExpectations("array_without_items.go", []string{
  5675  		`type ArrayWithoutItems []interface{}`,
  5676  		// empty validation
  5677  		"func (m ArrayWithoutItems) Validate(formats strfmt.Registry) error {\n	return nil\n}",
  5678  	},
  5679  		// not expected
  5680  		todo,
  5681  		// output in log
  5682  		// NOTE would expect warning for a non-swagger compliant, but nonetheless supposed construct (not implemented)
  5683  		noLines,
  5684  		noLines)
  5685  
  5686  	expandRun.AddExpectations("array_without_items.go", flattenRun.ExpectedFor("ArrayWithoutItems").ExpectedLines, todo, noLines, noLines)
  5687  
  5688  	flattenRun.AddExpectations("multiple_types.go", []string{
  5689  		`type MultipleTypes interface{`,
  5690  	},
  5691  		// not expected
  5692  		validatable,
  5693  		// output in log
  5694  		// expect warning
  5695  		warning,
  5696  		noLines)
  5697  
  5698  	expandRun.AddExpectations("multiple_types.go", flattenRun.ExpectedFor("MultipleTypes").ExpectedLines, validatable, noLines, noLines)
  5699  }
  5700  
  5701  func initTodolistSchemavalidation() {
  5702  	// testing todolist.schemavalidation.yaml with flatten and expand (--skip-flatten)
  5703  
  5704  	/*
  5705  	   A very simple api description that makes a json only API to submit to do's.
  5706  
  5707  	*/
  5708  
  5709  	f := newModelFixture("../fixtures/codegen/todolist.schemavalidation.yml", "Private to-do list")
  5710  	flattenRun := f.AddRun(false)
  5711  	expandRun := f.AddRun(true)
  5712  
  5713  	// load expectations for model: all_of_validations_meta_all_of6.go
  5714  	flattenRun.AddExpectations("all_of_validations_meta_all_of6.go", []string{
  5715  		`type AllOfValidationsMetaAllOf6 struct {`,
  5716  		"	Coords *AllOfValidationsMetaAllOf6Coords `json:\"coords,omitempty\"`",
  5717  		`func (m *AllOfValidationsMetaAllOf6) Validate(formats strfmt.Registry) error {`,
  5718  		`	if err := m.validateCoords(formats); err != nil {`,
  5719  		`		return errors.CompositeValidationError(res...`,
  5720  		`func (m *AllOfValidationsMetaAllOf6) validateCoords(formats strfmt.Registry) error {`,
  5721  		`	if swag.IsZero(m.Coords) {`,
  5722  		`	if m.Coords != nil {`,
  5723  		`		if err := m.Coords.Validate(formats); err != nil {`,
  5724  		`			if ve, ok := err.(*errors.Validation); ok {`,
  5725  		`				return ve.ValidateName("coords"`,
  5726  	},
  5727  		// not expected
  5728  		todo,
  5729  		// output in log
  5730  		noLines,
  5731  		noLines)
  5732  
  5733  	// load expectations for model: nested_array_validations.go
  5734  	flattenRun.AddExpectations("nested_array_validations.go", []string{
  5735  		`type NestedArrayValidations struct {`,
  5736  		"	Tags [][][]string `json:\"tags\"`",
  5737  		`func (m *NestedArrayValidations) Validate(formats strfmt.Registry) error {`,
  5738  		`	if err := m.validateTags(formats); err != nil {`,
  5739  		`		return errors.CompositeValidationError(res...`,
  5740  		`func (m *NestedArrayValidations) validateTags(formats strfmt.Registry) error {`,
  5741  		`	if swag.IsZero(m.Tags) {`,
  5742  		`	iTagsSize := int64(len(m.Tags)`,
  5743  		`	if err := validate.MinItems("tags", "body", iTagsSize, 3); err != nil {`,
  5744  		`	if err := validate.MaxItems("tags", "body", iTagsSize, 10); err != nil {`,
  5745  		`	for i := 0; i < len(m.Tags); i++ {`,
  5746  		`		iiTagsSize := int64(len(m.Tags[i])`,
  5747  		`		if err := validate.MinItems("tags"+"."+strconv.Itoa(i), "body", iiTagsSize, 3); err != nil {`,
  5748  		`		if err := validate.MaxItems("tags"+"."+strconv.Itoa(i), "body", iiTagsSize, 10); err != nil {`,
  5749  		`		for ii := 0; ii < len(m.Tags[i]); ii++ {`,
  5750  		`			iiiTagsSize := int64(len(m.Tags[i][ii])`,
  5751  		`			if err := validate.MinItems("tags"+"."+strconv.Itoa(i)+"."+strconv.Itoa(ii), "body", iiiTagsSize, 3); err != nil {`,
  5752  		`			if err := validate.MaxItems("tags"+"."+strconv.Itoa(i)+"."+strconv.Itoa(ii), "body", iiiTagsSize, 10); err != nil {`,
  5753  		`			for iii := 0; iii < len(m.Tags[i][ii]); iii++ {`,
  5754  		`				if err := validate.MinLength("tags"+"."+strconv.Itoa(i)+"."+strconv.Itoa(ii)+"."+strconv.Itoa(iii), "body", string(m.Tags[i][ii][iii]), 3); err != nil {`,
  5755  		`				if err := validate.MaxLength("tags"+"."+strconv.Itoa(i)+"."+strconv.Itoa(ii)+"."+strconv.Itoa(iii), "body", string(m.Tags[i][ii][iii]), 10); err != nil {`,
  5756  		"				if err := validate.Pattern(\"tags\"+\".\"+strconv.Itoa(i)+\".\"+strconv.Itoa(ii)+\".\"+strconv.Itoa(iii), \"body\", string(m.Tags[i][ii][iii]), `\\w+`); err != nil {",
  5757  	},
  5758  		// not expected
  5759  		todo,
  5760  		// output in log
  5761  		noLines,
  5762  		noLines)
  5763  
  5764  	expandRun.AddExpectations("nested_array_validations.go", flattenRun.ExpectedFor("NestedArrayValidations").ExpectedLines, todo, noLines, noLines)
  5765  
  5766  	// load expectations for model: all_of_validations_meta_all_of4.go
  5767  	flattenRun.AddExpectations("all_of_validations_meta_all_of4.go", []string{
  5768  		`type AllOfValidationsMetaAllOf4 struct {`,
  5769  		"	Opts map[string]int32 `json:\"opts,omitempty\"`",
  5770  		`func (m *AllOfValidationsMetaAllOf4) Validate(formats strfmt.Registry) error {`,
  5771  		`	if err := m.validateOpts(formats); err != nil {`,
  5772  		`		return errors.CompositeValidationError(res...`,
  5773  		`func (m *AllOfValidationsMetaAllOf4) validateOpts(formats strfmt.Registry) error {`,
  5774  		`	if swag.IsZero(m.Opts) {`,
  5775  		`	for k := range m.Opts {`,
  5776  		//`		if swag.IsZero(m.Opts[k]) {`,
  5777  		`		if err := validate.MinimumInt("opts"+"."+k, "body", int64(m.Opts[k]), 2, false); err != nil {`,
  5778  		`		if err := validate.MaximumInt("opts"+"."+k, "body", int64(m.Opts[k]), 50, false); err != nil {`,
  5779  		`		if err := validate.MultipleOf("opts"+"."+k, "body", float64(m.Opts[k]), 1.5); err != nil {`,
  5780  	},
  5781  		// not expected
  5782  		todo,
  5783  		// output in log
  5784  		noLines,
  5785  		noLines)
  5786  
  5787  	// load expectations for model: simple_zero_allowed.go
  5788  	flattenRun.AddExpectations("simple_zero_allowed.go", []string{
  5789  		`type SimpleZeroAllowed struct {`,
  5790  		"	ID string `json:\"id,omitempty\"`",
  5791  		"	Name *string `json:\"name\"`",
  5792  		"	Urls []string `json:\"urls\"`",
  5793  		`func (m *SimpleZeroAllowed) Validate(formats strfmt.Registry) error {`,
  5794  		`	if err := m.validateID(formats); err != nil {`,
  5795  		`	if err := m.validateName(formats); err != nil {`,
  5796  		`	if err := m.validateUrls(formats); err != nil {`,
  5797  		`		return errors.CompositeValidationError(res...`,
  5798  		`func (m *SimpleZeroAllowed) validateID(formats strfmt.Registry) error {`,
  5799  		`	if swag.IsZero(m.ID) {`,
  5800  		`	if err := validate.MinLength("id", "body", string(m.ID), 2); err != nil {`,
  5801  		`	if err := validate.MaxLength("id", "body", string(m.ID), 50); err != nil {`,
  5802  		"	if err := validate.Pattern(\"id\", \"body\", string(m.ID), `[A-Za-z0-9][\\w- ]+`); err != nil {",
  5803  		`func (m *SimpleZeroAllowed) validateName(formats strfmt.Registry) error {`,
  5804  		`	if err := validate.Required("name", "body", m.Name); err != nil {`,
  5805  		`	if err := validate.MinLength("name", "body", string(*m.Name), 2); err != nil {`,
  5806  		`	if err := validate.MaxLength("name", "body", string(*m.Name), 50); err != nil {`,
  5807  		"	if err := validate.Pattern(\"name\", \"body\", string(*m.Name), `[A-Za-z0-9][\\w- ]+`); err != nil {",
  5808  		`func (m *SimpleZeroAllowed) validateUrls(formats strfmt.Registry) error {`,
  5809  		`	if err := validate.Required("urls", "body", m.Urls); err != nil {`,
  5810  	},
  5811  		// not expected
  5812  		todo,
  5813  		// output in log
  5814  		noLines,
  5815  		noLines)
  5816  
  5817  	expandRun.AddExpectations("simple_zero_allowed.go", flattenRun.ExpectedFor("SimpleZeroAllowed").ExpectedLines, todo, noLines, noLines)
  5818  
  5819  	// load expectations for model: named_all_of_all_of6_coords_all_of0.go
  5820  	flattenRun.AddExpectations("named_all_of_all_of6_coords_all_of0.go", []string{
  5821  		`type NamedAllOfAllOf6CoordsAllOf0 struct {`,
  5822  		"	Name string `json:\"name,omitempty\"`",
  5823  		`func (m *NamedAllOfAllOf6CoordsAllOf0) Validate(formats strfmt.Registry) error {`,
  5824  		`	if err := m.validateName(formats); err != nil {`,
  5825  		`		return errors.CompositeValidationError(res...`,
  5826  		`func (m *NamedAllOfAllOf6CoordsAllOf0) validateName(formats strfmt.Registry) error {`,
  5827  		`	if swag.IsZero(m.Name) {`,
  5828  		`	if err := validate.MinLength("name", "body", string(m.Name), 2); err != nil {`,
  5829  		`	if err := validate.MaxLength("name", "body", string(m.Name), 50); err != nil {`,
  5830  		"	if err := validate.Pattern(\"name\", \"body\", string(m.Name), `[A-Za-z0-9][\\w- ]+`); err != nil {",
  5831  	},
  5832  		// not expected
  5833  		todo,
  5834  		// output in log
  5835  		noLines,
  5836  		noLines)
  5837  
  5838  	// load expectations for model: named_all_of_all_of6.go
  5839  	flattenRun.AddExpectations("named_all_of_all_of6.go", []string{
  5840  		`type NamedAllOfAllOf6 struct {`,
  5841  		"	Coords *NamedAllOfAllOf6Coords `json:\"coords,omitempty\"`",
  5842  		`func (m *NamedAllOfAllOf6) Validate(formats strfmt.Registry) error {`,
  5843  		`	if err := m.validateCoords(formats); err != nil {`,
  5844  		`		return errors.CompositeValidationError(res...`,
  5845  		`func (m *NamedAllOfAllOf6) validateCoords(formats strfmt.Registry) error {`,
  5846  		`	if swag.IsZero(m.Coords) {`,
  5847  		`	if m.Coords != nil {`,
  5848  		`		if err := m.Coords.Validate(formats); err != nil {`,
  5849  		`			if ve, ok := err.(*errors.Validation); ok {`,
  5850  		`				return ve.ValidateName("coords"`,
  5851  	},
  5852  		// not expected
  5853  		todo,
  5854  		// output in log
  5855  		noLines,
  5856  		noLines)
  5857  
  5858  	// load expectations for model: named_array_multi.go
  5859  	flattenRun.AddExpectations("named_array_multi.go", []string{
  5860  		`type NamedArrayMulti struct {`,
  5861  		"	P0 *string `json:\"-\"`",
  5862  		"	P1 *float64 `json:\"-\"`",
  5863  		`func (m *NamedArrayMulti) Validate(formats strfmt.Registry) error {`,
  5864  		`	if err := m.validateP0(formats); err != nil {`,
  5865  		`	if err := m.validateP1(formats); err != nil {`,
  5866  		`		return errors.CompositeValidationError(res...`,
  5867  		`func (m *NamedArrayMulti) validateP0(formats strfmt.Registry) error {`,
  5868  		`	if err := validate.Required("0", "body", m.P0); err != nil {`,
  5869  		`	if err := validate.MinLength("0", "body", string(*m.P0), 3); err != nil {`,
  5870  		`	if err := validate.MaxLength("0", "body", string(*m.P0), 10); err != nil {`,
  5871  		"	if err := validate.Pattern(\"0\", \"body\", string(*m.P0), `\\w+`); err != nil {",
  5872  		`func (m *NamedArrayMulti) validateP1(formats strfmt.Registry) error {`,
  5873  		`	if err := validate.Required("1", "body", m.P1); err != nil {`,
  5874  		`	if err := validate.Minimum("1", "body", float64(*m.P1), 3, false); err != nil {`,
  5875  		`	if err := validate.Maximum("1", "body", float64(*m.P1), 12, false); err != nil {`,
  5876  		`	if err := validate.MultipleOf("1", "body", float64(*m.P1), 1.5); err != nil {`,
  5877  	},
  5878  		// not expected
  5879  		todo,
  5880  		// output in log
  5881  		noLines,
  5882  		noLines)
  5883  
  5884  	expandRun.AddExpectations("named_array_multi.go", flattenRun.ExpectedFor("NamedArrayMulti").ExpectedLines, todo, noLines, noLines)
  5885  
  5886  	// load expectations for model: named_array.go
  5887  	flattenRun.AddExpectations("named_array.go", []string{
  5888  		`type NamedArray []string`,
  5889  		`func (m NamedArray) Validate(formats strfmt.Registry) error {`,
  5890  		`	iNamedArraySize := int64(len(m)`,
  5891  		`	if err := validate.MinItems("", "body", iNamedArraySize, 3); err != nil {`,
  5892  		`	if err := validate.MaxItems("", "body", iNamedArraySize, 10); err != nil {`,
  5893  		`	for i := 0; i < len(m); i++ {`,
  5894  		`		if err := validate.MinLength(strconv.Itoa(i), "body", string(m[i]), 3); err != nil {`,
  5895  		`		if err := validate.MaxLength(strconv.Itoa(i), "body", string(m[i]), 10); err != nil {`,
  5896  		"		if err := validate.Pattern(strconv.Itoa(i), \"body\", string(m[i]), `\\w+`); err != nil {",
  5897  		`		return errors.CompositeValidationError(res...`,
  5898  	},
  5899  		// not expected
  5900  		todo,
  5901  		// output in log
  5902  		noLines,
  5903  		noLines)
  5904  
  5905  	expandRun.AddExpectations("named_array.go", flattenRun.ExpectedFor("NamedArray").ExpectedLines, todo, noLines, noLines)
  5906  
  5907  	// load expectations for model: named_number.go
  5908  	flattenRun.AddExpectations("named_number.go", []string{
  5909  		`type NamedNumber int32`,
  5910  		`func (m NamedNumber) Validate(formats strfmt.Registry) error {`,
  5911  		`	if err := validate.MinimumInt("", "body", int64(m), 0, true); err != nil {`,
  5912  		`	if err := validate.MaximumInt("", "body", int64(m), 500, false); err != nil {`,
  5913  		`	if err := validate.MultipleOf("", "body", float64(m), 1.5); err != nil {`,
  5914  		`		return errors.CompositeValidationError(res...`,
  5915  	},
  5916  		// not expected
  5917  		todo,
  5918  		// output in log
  5919  		noLines,
  5920  		noLines)
  5921  
  5922  	expandRun.AddExpectations("named_number.go", flattenRun.ExpectedFor("NamedNumber").ExpectedLines, todo, noLines, noLines)
  5923  
  5924  	// load expectations for model: nested_map_validations.go
  5925  	flattenRun.AddExpectations("nested_map_validations.go", []string{
  5926  		`type NestedMapValidations struct {`,
  5927  		"	Meta map[string]map[string]map[string]int64 `json:\"meta,omitempty\"`",
  5928  		`func (m *NestedMapValidations) Validate(formats strfmt.Registry) error {`,
  5929  		`	if err := m.validateMeta(formats); err != nil {`,
  5930  		`		return errors.CompositeValidationError(res...`,
  5931  		`func (m *NestedMapValidations) validateMeta(formats strfmt.Registry) error {`,
  5932  		`	if swag.IsZero(m.Meta) {`,
  5933  		`	for k := range m.Meta {`,
  5934  		//`		if swag.IsZero(m.Meta[k]) {`,
  5935  		`		for kk := range m.Meta[k] {`,
  5936  		//`			if swag.IsZero(m.Meta[k][kk]) {`,
  5937  		`			for kkk := range m.Meta[k][kk] {`,
  5938  		//`				if swag.IsZero(m.Meta[k][kk][kkk]) {`,
  5939  		`				if err := validate.MinimumInt("meta"+"."+k+"."+kk+"."+kkk, "body", int64(m.Meta[k][kk][kkk]), 3, false); err != nil {`,
  5940  		`				if err := validate.MaximumInt("meta"+"."+k+"."+kk+"."+kkk, "body", int64(m.Meta[k][kk][kkk]), 6, false); err != nil {`,
  5941  		`				if err := validate.MultipleOf("meta"+"."+k+"."+kk+"."+kkk, "body", float64(m.Meta[k][kk][kkk]), 1); err != nil {`,
  5942  	},
  5943  		// not expected
  5944  		todo,
  5945  		// output in log
  5946  		noLines,
  5947  		noLines)
  5948  
  5949  	expandRun.AddExpectations("nested_map_validations.go", flattenRun.ExpectedFor("NestedMapValidations").ExpectedLines, todo, noLines, noLines)
  5950  
  5951  	// load expectations for model: array_multi_validations_args.go
  5952  	flattenRun.AddExpectations("array_multi_validations_args.go", []string{
  5953  		`type ArrayMultiValidationsArgs struct {`,
  5954  		"	P0 *string `json:\"-\"`",
  5955  		"	P1 *float64 `json:\"-\"`",
  5956  		`func (m *ArrayMultiValidationsArgs) Validate(formats strfmt.Registry) error {`,
  5957  		`	if err := m.validateP0(formats); err != nil {`,
  5958  		`	if err := m.validateP1(formats); err != nil {`,
  5959  		`		return errors.CompositeValidationError(res...`,
  5960  		`func (m *ArrayMultiValidationsArgs) validateP0(formats strfmt.Registry) error {`,
  5961  		`	if err := validate.Required("0", "body", m.P0); err != nil {`,
  5962  		`	if err := validate.MinLength("0", "body", string(*m.P0), 3); err != nil {`,
  5963  		`	if err := validate.MaxLength("0", "body", string(*m.P0), 10); err != nil {`,
  5964  		"	if err := validate.Pattern(\"0\", \"body\", string(*m.P0), `\\w+`); err != nil {",
  5965  		`func (m *ArrayMultiValidationsArgs) validateP1(formats strfmt.Registry) error {`,
  5966  		`	if err := validate.Required("1", "body", m.P1); err != nil {`,
  5967  		`	if err := validate.Minimum("1", "body", float64(*m.P1), 3, false); err != nil {`,
  5968  		`	if err := validate.Maximum("1", "body", float64(*m.P1), 12, false); err != nil {`,
  5969  		`	if err := validate.MultipleOf("1", "body", float64(*m.P1), 1.5); err != nil {`,
  5970  	},
  5971  		// not expected
  5972  		todo,
  5973  		// output in log
  5974  		noLines,
  5975  		noLines)
  5976  
  5977  	// load expectations for model: named_map_complex_additional_properties.go
  5978  	flattenRun.AddExpectations("named_map_complex_additional_properties.go", []string{
  5979  		`type NamedMapComplexAdditionalProperties struct {`,
  5980  		"	Age int32 `json:\"age,omitempty\"`",
  5981  		"	Name string `json:\"name,omitempty\"`",
  5982  		`func (m *NamedMapComplexAdditionalProperties) Validate(formats strfmt.Registry) error {`,
  5983  		`	if err := m.validateAge(formats); err != nil {`,
  5984  		`	if err := m.validateName(formats); err != nil {`,
  5985  		`		return errors.CompositeValidationError(res...`,
  5986  		`func (m *NamedMapComplexAdditionalProperties) validateAge(formats strfmt.Registry) error {`,
  5987  		`	if swag.IsZero(m.Age) {`,
  5988  		`	if err := validate.MinimumInt("age", "body", int64(m.Age), 1, true); err != nil {`,
  5989  		`	if err := validate.MaximumInt("age", "body", int64(m.Age), 200, true); err != nil {`,
  5990  		`	if err := validate.MultipleOf("age", "body", float64(m.Age), 1); err != nil {`,
  5991  		`func (m *NamedMapComplexAdditionalProperties) validateName(formats strfmt.Registry) error {`,
  5992  		`	if swag.IsZero(m.Name) {`,
  5993  		`	if err := validate.MinLength("name", "body", string(m.Name), 10); err != nil {`,
  5994  		`	if err := validate.MaxLength("name", "body", string(m.Name), 50); err != nil {`,
  5995  		"	if err := validate.Pattern(\"name\", \"body\", string(m.Name), `\\w+`); err != nil {",
  5996  	},
  5997  		// not expected
  5998  		todo,
  5999  		// output in log
  6000  		noLines,
  6001  		noLines)
  6002  
  6003  	// load expectations for model: named_nested_map_complex.go
  6004  	flattenRun.AddExpectations("named_nested_map_complex.go", []string{
  6005  		// maps are now simple types
  6006  		//`type NamedNestedMapComplex map[string]NamedNestedMapComplexAdditionalProperties`,
  6007  		`type NamedNestedMapComplex map[string]map[string]map[string]NamedNestedMapComplexAdditionalPropertiesAdditionalPropertiesAdditionalProperties`,
  6008  		`func (m NamedNestedMapComplex) Validate(formats strfmt.Registry) error {`,
  6009  		`	for k := range m {`,
  6010  		//`		if swag.IsZero(m[k]) {`,
  6011  		`		for kk := range m[k] {`,
  6012  		//`			if swag.IsZero(m[k][kk]) {`,
  6013  		`			for kkk := range m[k][kk] {`,
  6014  		`				if err := validate.Required(k+"."+kk+"."+kkk, "body", m[k][kk][kkk]); err != nil {`,
  6015  		`				if val, ok := m[k][kk][kkk]; ok {`,
  6016  		`					if err := val.Validate(formats); err != nil {`,
  6017  		`		return errors.CompositeValidationError(res...`,
  6018  	},
  6019  		// not expected
  6020  		todo,
  6021  		// output in log
  6022  		noLines,
  6023  		noLines)
  6024  
  6025  	expandRun.AddExpectations("named_nested_map_complex.go", []string{
  6026  		`type NamedNestedMapComplex map[string]map[string]map[string]NamedNestedMapComplexAnon`,
  6027  		`func (m NamedNestedMapComplex) Validate(formats strfmt.Registry) error {`,
  6028  		`	for k := range m {`,
  6029  		//`		if swag.IsZero(m[k]) {`,
  6030  		`		for kk := range m[k] {`,
  6031  		//`			if swag.IsZero(m[k][kk]) {`,
  6032  		`			for kkk := range m[k][kk] {`,
  6033  		//`				if swag.IsZero(m[k][kk][kkk]) {`,
  6034  		`				if val, ok := m[k][kk][kkk]; ok {`,
  6035  		`					if err := val.Validate(formats); err != nil {`,
  6036  		`		return errors.CompositeValidationError(res...`,
  6037  		`type NamedNestedMapComplexAnon struct {`,
  6038  		"	Age int32 `json:\"age,omitempty\"`",
  6039  		"	Name string `json:\"name,omitempty\"`",
  6040  		`func (m *NamedNestedMapComplexAnon) Validate(formats strfmt.Registry) error {`,
  6041  		`	if err := m.validateAge(formats); err != nil {`,
  6042  		`	if err := m.validateName(formats); err != nil {`,
  6043  		`		return errors.CompositeValidationError(res...`,
  6044  		`func (m *NamedNestedMapComplexAnon) validateAge(formats strfmt.Registry) error {`,
  6045  		`	if swag.IsZero(m.Age) {`,
  6046  		`	if err := validate.MinimumInt("age", "body", int64(m.Age), 1, true); err != nil {`,
  6047  		`	if err := validate.MaximumInt("age", "body", int64(m.Age), 200, true); err != nil {`,
  6048  		`	if err := validate.MultipleOf("age", "body", float64(m.Age), 1); err != nil {`,
  6049  		`func (m *NamedNestedMapComplexAnon) validateName(formats strfmt.Registry) error {`,
  6050  		`	if swag.IsZero(m.Name) {`,
  6051  		`	if err := validate.MinLength("name", "body", string(m.Name), 10); err != nil {`,
  6052  		`	if err := validate.MaxLength("name", "body", string(m.Name), 50); err != nil {`,
  6053  		"	if err := validate.Pattern(\"name\", \"body\", string(m.Name), `\\w+`); err != nil {",
  6054  	},
  6055  		// not expected
  6056  		todo,
  6057  		// output in log
  6058  		noLines,
  6059  		noLines)
  6060  
  6061  	// load expectations for model: all_of_validations_meta_all_of1.go
  6062  	flattenRun.AddExpectations("all_of_validations_meta_all_of1.go", []string{
  6063  		`type AllOfValidationsMetaAllOf1 struct {`,
  6064  		"	Age int32 `json:\"age,omitempty\"`",
  6065  		`func (m *AllOfValidationsMetaAllOf1) Validate(formats strfmt.Registry) error {`,
  6066  		`	if err := m.validateAge(formats); err != nil {`,
  6067  		`		return errors.CompositeValidationError(res...`,
  6068  		`func (m *AllOfValidationsMetaAllOf1) validateAge(formats strfmt.Registry) error {`,
  6069  		`	if swag.IsZero(m.Age) {`,
  6070  		`	if err := validate.MinimumInt("age", "body", int64(m.Age), 2, false); err != nil {`,
  6071  		`	if err := validate.MaximumInt("age", "body", int64(m.Age), 50, false); err != nil {`,
  6072  		`	if err := validate.MultipleOf("age", "body", float64(m.Age), 1.5); err != nil {`,
  6073  	},
  6074  		// not expected
  6075  		todo,
  6076  		// output in log
  6077  		noLines,
  6078  		noLines)
  6079  
  6080  	// load expectations for model: nested_map_complex_validations_meta_additional_properties_additional_properties.go
  6081  	// NOTE(fredbi): maps are now simple types - this definition is no more generated
  6082  
  6083  	// load expectations for model: tag.go
  6084  	flattenRun.AddExpectations("tag.go", []string{
  6085  		`type Tag struct {`,
  6086  		"	ID int64 `json:\"id,omitempty\"`",
  6087  		"	Name string `json:\"name,omitempty\"`",
  6088  		// empty validation
  6089  		"func (m *Tag) Validate(formats strfmt.Registry) error {\n	return nil\n}",
  6090  	},
  6091  		// not expected
  6092  		todo,
  6093  		// output in log
  6094  		noLines,
  6095  		noLines)
  6096  
  6097  	expandRun.AddExpectations("tag.go", flattenRun.ExpectedFor("Tag").ExpectedLines, todo, noLines, noLines)
  6098  
  6099  	// load expectations for model: nested_object_validations_args.go
  6100  	flattenRun.AddExpectations("nested_object_validations_args.go", []string{
  6101  		`type NestedObjectValidationsArgs struct {`,
  6102  		"	Meta *NestedObjectValidationsArgsMeta `json:\"meta,omitempty\"`",
  6103  		`func (m *NestedObjectValidationsArgs) Validate(formats strfmt.Registry) error {`,
  6104  		`	if err := m.validateMeta(formats); err != nil {`,
  6105  		`		return errors.CompositeValidationError(res...`,
  6106  		`func (m *NestedObjectValidationsArgs) validateMeta(formats strfmt.Registry) error {`,
  6107  		`	if swag.IsZero(m.Meta) {`,
  6108  		`	if m.Meta != nil {`,
  6109  		`		if err := m.Meta.Validate(formats); err != nil {`,
  6110  		`			if ve, ok := err.(*errors.Validation); ok {`,
  6111  		`				return ve.ValidateName("meta"`,
  6112  	},
  6113  		// not expected
  6114  		todo,
  6115  		// output in log
  6116  		noLines,
  6117  		noLines)
  6118  
  6119  	// load expectations for model: named_all_of_all_of6_coords_all_of1.go
  6120  	flattenRun.AddExpectations("named_all_of_all_of6_coords_all_of1.go", []string{
  6121  		`type NamedAllOfAllOf6CoordsAllOf1 struct {`,
  6122  		"	Age int32 `json:\"age,omitempty\"`",
  6123  		`func (m *NamedAllOfAllOf6CoordsAllOf1) Validate(formats strfmt.Registry) error {`,
  6124  		`	if err := m.validateAge(formats); err != nil {`,
  6125  		`		return errors.CompositeValidationError(res...`,
  6126  		`func (m *NamedAllOfAllOf6CoordsAllOf1) validateAge(formats strfmt.Registry) error {`,
  6127  		`	if swag.IsZero(m.Age) {`,
  6128  		`	if err := validate.MinimumInt("age", "body", int64(m.Age), 2, false); err != nil {`,
  6129  		`	if err := validate.MaximumInt("age", "body", int64(m.Age), 50, false); err != nil {`,
  6130  		`	if err := validate.MultipleOf("age", "body", float64(m.Age), 1.5); err != nil {`,
  6131  	},
  6132  		// not expected
  6133  		todo,
  6134  		// output in log
  6135  		noLines,
  6136  		noLines)
  6137  
  6138  	// load expectations for model: named_all_of_all_of6_coords.go
  6139  	flattenRun.AddExpectations("named_all_of_all_of6_coords.go", []string{
  6140  		`type NamedAllOfAllOf6Coords struct {`,
  6141  		`	NamedAllOfAllOf6CoordsAllOf0`,
  6142  		`	NamedAllOfAllOf6CoordsAllOf1`,
  6143  		`func (m *NamedAllOfAllOf6Coords) Validate(formats strfmt.Registry) error {`,
  6144  		`	if err := m.NamedAllOfAllOf6CoordsAllOf0.Validate(formats); err != nil {`,
  6145  		`	if err := m.NamedAllOfAllOf6CoordsAllOf1.Validate(formats); err != nil {`,
  6146  		`		return errors.CompositeValidationError(res...`,
  6147  	},
  6148  		// not expected
  6149  		todo,
  6150  		// output in log
  6151  		noLines,
  6152  		noLines)
  6153  
  6154  	// load expectations for model: array_multi_validations.go
  6155  	flattenRun.AddExpectations("array_multi_validations.go", []string{
  6156  		`type ArrayMultiValidations struct {`,
  6157  		"	Args ArrayMultiValidationsArgs `json:\"args,omitempty\"`",
  6158  		`func (m *ArrayMultiValidations) Validate(formats strfmt.Registry) error {`,
  6159  		`		return errors.CompositeValidationError(res...`,
  6160  	},
  6161  		// not expected
  6162  		todo,
  6163  		// output in log
  6164  		noLines,
  6165  		noLines)
  6166  
  6167  	expandRun.AddExpectations("array_multi_validations.go", []string{
  6168  		`type ArrayMultiValidations struct {`,
  6169  		"	Args *ArrayMultiValidationsArgsTuple0 `json:\"args,omitempty\"`",
  6170  		`func (m *ArrayMultiValidations) Validate(formats strfmt.Registry) error {`,
  6171  		`	if err := m.validateArgs(formats); err != nil {`,
  6172  		`		return errors.CompositeValidationError(res...`,
  6173  		`func (m *ArrayMultiValidations) validateArgs(formats strfmt.Registry) error {`,
  6174  		`	if swag.IsZero(m.Args) {`,
  6175  		`	if m.Args != nil {`,
  6176  		`		if err := m.Args.Validate(formats); err != nil {`,
  6177  		`			if ve, ok := err.(*errors.Validation); ok {`,
  6178  		`				return ve.ValidateName("args"`,
  6179  		`type ArrayMultiValidationsArgsTuple0 struct {`,
  6180  		"	P0 *string `json:\"-\"`",
  6181  		"	P1 *float64 `json:\"-\"`",
  6182  		`func (m *ArrayMultiValidationsArgsTuple0) Validate(formats strfmt.Registry) error {`,
  6183  		`	if err := m.validateP0(formats); err != nil {`,
  6184  		`	if err := m.validateP1(formats); err != nil {`,
  6185  		`		return errors.CompositeValidationError(res...`,
  6186  		`func (m *ArrayMultiValidationsArgsTuple0) validateP0(formats strfmt.Registry) error {`,
  6187  		`	if err := validate.Required("P0", "body", m.P0); err != nil {`,
  6188  		`	if err := validate.MinLength("P0", "body", string(*m.P0), 3); err != nil {`,
  6189  		`	if err := validate.MaxLength("P0", "body", string(*m.P0), 10); err != nil {`,
  6190  		"	if err := validate.Pattern(\"P0\", \"body\", string(*m.P0), `\\w+`); err != nil {",
  6191  		`func (m *ArrayMultiValidationsArgsTuple0) validateP1(formats strfmt.Registry) error {`,
  6192  		`	if err := validate.Required("P1", "body", m.P1); err != nil {`,
  6193  		`	if err := validate.Minimum("P1", "body", float64(*m.P1), 3, false); err != nil {`,
  6194  		`	if err := validate.Maximum("P1", "body", float64(*m.P1), 12, false); err != nil {`,
  6195  		`	if err := validate.MultipleOf("P1", "body", float64(*m.P1), 1.5); err != nil {`,
  6196  	},
  6197  		// not expected
  6198  		todo,
  6199  		// output in log
  6200  		noLines,
  6201  		noLines)
  6202  
  6203  	// load expectations for model: string_validations.go
  6204  	flattenRun.AddExpectations("string_validations.go", []string{
  6205  		`type StringValidations struct {`,
  6206  		"	Name string `json:\"name,omitempty\"`",
  6207  		`func (m *StringValidations) Validate(formats strfmt.Registry) error {`,
  6208  		`	if err := m.validateName(formats); err != nil {`,
  6209  		`		return errors.CompositeValidationError(res...`,
  6210  		`func (m *StringValidations) validateName(formats strfmt.Registry) error {`,
  6211  		`	if swag.IsZero(m.Name) {`,
  6212  		`	if err := validate.MinLength("name", "body", string(m.Name), 2); err != nil {`,
  6213  		`	if err := validate.MaxLength("name", "body", string(m.Name), 50); err != nil {`,
  6214  		"	if err := validate.Pattern(\"name\", \"body\", string(m.Name), `[A-Za-z0-9][\\w- ]+`); err != nil {",
  6215  	},
  6216  		// not expected
  6217  		todo,
  6218  		// output in log
  6219  		noLines,
  6220  		noLines)
  6221  
  6222  	expandRun.AddExpectations("string_validations.go", flattenRun.ExpectedFor("StringValidations").ExpectedLines, todo, noLines, noLines)
  6223  
  6224  	// load expectations for model: required_props.go
  6225  	flattenRun.AddExpectations("required_props.go", []string{
  6226  		`type RequiredProps struct {`,
  6227  		"	Age *int32 `json:\"age\"`",
  6228  		"	CreatedAt *strfmt.DateTime `json:\"createdAt\"`",
  6229  		"	ID *int64 `json:\"id\"`",
  6230  		"	Name *string `json:\"name\"`",
  6231  		"	Score *float32 `json:\"score\"`",
  6232  		"	Tags []string `json:\"tags\"`",
  6233  		`func (m *RequiredProps) Validate(formats strfmt.Registry) error {`,
  6234  		`	if err := m.validateAge(formats); err != nil {`,
  6235  		`	if err := m.validateCreatedAt(formats); err != nil {`,
  6236  		`	if err := m.validateID(formats); err != nil {`,
  6237  		`	if err := m.validateName(formats); err != nil {`,
  6238  		`	if err := m.validateScore(formats); err != nil {`,
  6239  		`	if err := m.validateTags(formats); err != nil {`,
  6240  		`		return errors.CompositeValidationError(res...`,
  6241  		`func (m *RequiredProps) validateAge(formats strfmt.Registry) error {`,
  6242  		`	if err := validate.Required("age", "body", m.Age); err != nil {`,
  6243  		`func (m *RequiredProps) validateCreatedAt(formats strfmt.Registry) error {`,
  6244  		`	if err := validate.Required("createdAt", "body", m.CreatedAt); err != nil {`,
  6245  		`	if err := validate.FormatOf("createdAt", "body", "date-time", m.CreatedAt.String(), formats); err != nil {`,
  6246  		`func (m *RequiredProps) validateID(formats strfmt.Registry) error {`,
  6247  		`	if err := validate.Required("id", "body", m.ID); err != nil {`,
  6248  		`func (m *RequiredProps) validateName(formats strfmt.Registry) error {`,
  6249  		`	if err := validate.Required("name", "body", m.Name); err != nil {`,
  6250  		`func (m *RequiredProps) validateScore(formats strfmt.Registry) error {`,
  6251  		`	if err := validate.Required("score", "body", m.Score); err != nil {`,
  6252  		`func (m *RequiredProps) validateTags(formats strfmt.Registry) error {`,
  6253  		`	if err := validate.Required("tags", "body", m.Tags); err != nil {`,
  6254  	},
  6255  		// not expected
  6256  		todo,
  6257  		// output in log
  6258  		noLines,
  6259  		noLines)
  6260  
  6261  	expandRun.AddExpectations("required_props.go", flattenRun.ExpectedFor("RequiredProps").ExpectedLines, todo, noLines, noLines)
  6262  
  6263  	// load expectations for model: named_all_of_all_of5.go
  6264  	flattenRun.AddExpectations("named_all_of_all_of5.go", []string{
  6265  		`type NamedAllOfAllOf5 struct {`,
  6266  		"	ExtOpts map[string]map[string]map[string]int32 `json:\"extOpts,omitempty\"`",
  6267  		`func (m *NamedAllOfAllOf5) Validate(formats strfmt.Registry) error {`,
  6268  		`	if err := m.validateExtOpts(formats); err != nil {`,
  6269  		`		return errors.CompositeValidationError(res...`,
  6270  		`func (m *NamedAllOfAllOf5) validateExtOpts(formats strfmt.Registry) error {`,
  6271  		`	if swag.IsZero(m.ExtOpts) {`,
  6272  		`	for k := range m.ExtOpts {`,
  6273  		//`		if swag.IsZero(m.ExtOpts[k]) {`,
  6274  		`		for kk := range m.ExtOpts[k] {`,
  6275  		//`			if swag.IsZero(m.ExtOpts[k][kk]) {`,
  6276  		`			for kkk := range m.ExtOpts[k][kk] {`,
  6277  		//`				if swag.IsZero(m.ExtOpts[k][kk][kkk]) {`,
  6278  		`				if err := validate.MinimumInt("extOpts"+"."+k+"."+kk+"."+kkk, "body", int64(m.ExtOpts[k][kk][kkk]), 2, false); err != nil {`,
  6279  		`				if err := validate.MaximumInt("extOpts"+"."+k+"."+kk+"."+kkk, "body", int64(m.ExtOpts[k][kk][kkk]), 50, false); err != nil {`,
  6280  		`				if err := validate.MultipleOf("extOpts"+"."+k+"."+kk+"."+kkk, "body", float64(m.ExtOpts[k][kk][kkk]), 1.5); err != nil {`,
  6281  	},
  6282  		// not expected
  6283  		todo,
  6284  		// output in log
  6285  		noLines,
  6286  		noLines)
  6287  
  6288  	// load expectations for model: named_map.go
  6289  	flattenRun.AddExpectations("named_map.go", []string{
  6290  		`type NamedMap map[string]int64`,
  6291  		`func (m NamedMap) Validate(formats strfmt.Registry) error {`,
  6292  		`	for k := range m {`,
  6293  		//`		if swag.IsZero(m[k]) {`,
  6294  		`		if err := validate.MinimumInt(k, "body", int64(m[k]), 3, false); err != nil {`,
  6295  		`		if err := validate.MaximumInt(k, "body", int64(m[k]), 6, false); err != nil {`,
  6296  		`		if err := validate.MultipleOf(k, "body", float64(m[k]), 1); err != nil {`,
  6297  		`		return errors.CompositeValidationError(res...`,
  6298  	},
  6299  		// not expected
  6300  		todo,
  6301  		// output in log
  6302  		noLines,
  6303  		noLines)
  6304  
  6305  	expandRun.AddExpectations("named_map.go", flattenRun.ExpectedFor("NamedMap").ExpectedLines, todo, noLines, noLines)
  6306  
  6307  	// load expectations for model: named_string.go
  6308  	flattenRun.AddExpectations("named_string.go", []string{
  6309  		`type NamedString string`,
  6310  		`func (m NamedString) Validate(formats strfmt.Registry) error {`,
  6311  		`	if err := validate.MinLength("", "body", string(m), 2); err != nil {`,
  6312  		`	if err := validate.MaxLength("", "body", string(m), 50); err != nil {`,
  6313  		"	if err := validate.Pattern(\"\", \"body\", string(m), `[A-Za-z0-9][\\w- ]+`); err != nil {",
  6314  		`		return errors.CompositeValidationError(res...`,
  6315  	},
  6316  		// not expected
  6317  		todo,
  6318  		// output in log
  6319  		noLines,
  6320  		noLines)
  6321  
  6322  	expandRun.AddExpectations("named_string.go", flattenRun.ExpectedFor("NamedString").ExpectedLines, todo, noLines, noLines)
  6323  
  6324  	// load expectations for model: named_all_of_all_of3.go
  6325  	flattenRun.AddExpectations("named_all_of_all_of3.go", []string{
  6326  		`type NamedAllOfAllOf3 struct {`,
  6327  		"	Assoc [][][]string `json:\"assoc\"`",
  6328  		`func (m *NamedAllOfAllOf3) Validate(formats strfmt.Registry) error {`,
  6329  		`	if err := m.validateAssoc(formats); err != nil {`,
  6330  		`		return errors.CompositeValidationError(res...`,
  6331  		`func (m *NamedAllOfAllOf3) validateAssoc(formats strfmt.Registry) error {`,
  6332  		`	if swag.IsZero(m.Assoc) {`,
  6333  		`	iAssocSize := int64(len(m.Assoc)`,
  6334  		`	if err := validate.MinItems("assoc", "body", iAssocSize, 5); err != nil {`,
  6335  		`	if err := validate.MaxItems("assoc", "body", iAssocSize, 20); err != nil {`,
  6336  		`	for i := 0; i < len(m.Assoc); i++ {`,
  6337  		`		iiAssocSize := int64(len(m.Assoc[i])`,
  6338  		`		if err := validate.MinItems("assoc"+"."+strconv.Itoa(i), "body", iiAssocSize, 5); err != nil {`,
  6339  		`		if err := validate.MaxItems("assoc"+"."+strconv.Itoa(i), "body", iiAssocSize, 20); err != nil {`,
  6340  		`		for ii := 0; ii < len(m.Assoc[i]); ii++ {`,
  6341  		`			iiiAssocSize := int64(len(m.Assoc[i][ii])`,
  6342  		`			if err := validate.MinItems("assoc"+"."+strconv.Itoa(i)+"."+strconv.Itoa(ii), "body", iiiAssocSize, 5); err != nil {`,
  6343  		`			if err := validate.MaxItems("assoc"+"."+strconv.Itoa(i)+"."+strconv.Itoa(ii), "body", iiiAssocSize, 20); err != nil {`,
  6344  		`			for iii := 0; iii < len(m.Assoc[i][ii]); iii++ {`,
  6345  		`				if err := validate.MinLength("assoc"+"."+strconv.Itoa(i)+"."+strconv.Itoa(ii)+"."+strconv.Itoa(iii), "body", string(m.Assoc[i][ii][iii]), 2); err != nil {`,
  6346  		`				if err := validate.MaxLength("assoc"+"."+strconv.Itoa(i)+"."+strconv.Itoa(ii)+"."+strconv.Itoa(iii), "body", string(m.Assoc[i][ii][iii]), 50); err != nil {`,
  6347  		"				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 {",
  6348  	},
  6349  		// not expected
  6350  		todo,
  6351  		// output in log
  6352  		noLines,
  6353  		noLines)
  6354  
  6355  	// load expectations for model: map_complex_validations.go
  6356  	flattenRun.AddExpectations("map_complex_validations.go", []string{
  6357  		`type MapComplexValidations struct {`,
  6358  		// maps are now simple types
  6359  		//"	Meta MapComplexValidationsMeta `json:\"meta,omitempty\"`",
  6360  		"Meta map[string]MapComplexValidationsMetaAdditionalProperties `json:\"meta,omitempty\"`",
  6361  		`func (m *MapComplexValidations) Validate(formats strfmt.Registry) error {`,
  6362  		`	if err := m.validateMeta(formats); err != nil {`,
  6363  		`		return errors.CompositeValidationError(res...`,
  6364  		`func (m *MapComplexValidations) validateMeta(formats strfmt.Registry) error {`,
  6365  		`	if swag.IsZero(m.Meta) {`,
  6366  		//`	if err := m.Meta.Validate(formats); err != nil {`,
  6367  		//`		if ve, ok := err.(*errors.Validation); ok {`,
  6368  		//`			return ve.ValidateName("meta"`,
  6369  		`            		for k := range m.Meta {`,
  6370  		`            			if val, ok := m.Meta[k]; ok {`,
  6371  		`            				if err := val.Validate(formats); err != nil {`,
  6372  	},
  6373  		// not expected
  6374  		todo,
  6375  		// output in log
  6376  		noLines,
  6377  		noLines)
  6378  
  6379  	expandRun.AddExpectations("map_complex_validations.go", []string{
  6380  		`type MapComplexValidations struct {`,
  6381  		"	Meta map[string]MapComplexValidationsMetaAnon `json:\"meta,omitempty\"`",
  6382  		`func (m *MapComplexValidations) Validate(formats strfmt.Registry) error {`,
  6383  		`	if err := m.validateMeta(formats); err != nil {`,
  6384  		`		return errors.CompositeValidationError(res...`,
  6385  		`func (m *MapComplexValidations) validateMeta(formats strfmt.Registry) error {`,
  6386  		`	if swag.IsZero(m.Meta) {`,
  6387  		`	for k := range m.Meta {`,
  6388  		//`		if swag.IsZero(m.Meta[k]) {`,
  6389  		`		if val, ok := m.Meta[k]; ok {`,
  6390  		`			if err := val.Validate(formats); err != nil {`,
  6391  		`type MapComplexValidationsMetaAnon struct {`,
  6392  		"	Age int32 `json:\"age,omitempty\"`",
  6393  		"	Name string `json:\"name,omitempty\"`",
  6394  		`func (m *MapComplexValidationsMetaAnon) Validate(formats strfmt.Registry) error {`,
  6395  		`	if err := m.validateAge(formats); err != nil {`,
  6396  		`	if err := m.validateName(formats); err != nil {`,
  6397  		`		return errors.CompositeValidationError(res...`,
  6398  		`func (m *MapComplexValidationsMetaAnon) validateAge(formats strfmt.Registry) error {`,
  6399  		`	if swag.IsZero(m.Age) {`,
  6400  		`	if err := validate.MinimumInt("age", "body", int64(m.Age), 1, true); err != nil {`,
  6401  		`	if err := validate.MaximumInt("age", "body", int64(m.Age), 200, true); err != nil {`,
  6402  		`	if err := validate.MultipleOf("age", "body", float64(m.Age), 1); err != nil {`,
  6403  		`func (m *MapComplexValidationsMetaAnon) validateName(formats strfmt.Registry) error {`,
  6404  		`	if swag.IsZero(m.Name) {`,
  6405  		`	if err := validate.MinLength("name", "body", string(m.Name), 10); err != nil {`,
  6406  		`	if err := validate.MaxLength("name", "body", string(m.Name), 50); err != nil {`,
  6407  		"	if err := validate.Pattern(\"name\", \"body\", string(m.Name), `\\w+`); err != nil {",
  6408  	},
  6409  		// not expected
  6410  		todo,
  6411  		// output in log
  6412  		noLines,
  6413  		noLines)
  6414  
  6415  	// load expectations for model: named_nested_map_complex_additional_properties_additional_properties_additional_properties.go
  6416  	flattenRun.AddExpectations("named_nested_map_complex_additional_properties_additional_properties_additional_properties.go", []string{
  6417  		`type NamedNestedMapComplexAdditionalPropertiesAdditionalPropertiesAdditionalProperties struct {`,
  6418  		"	Age int32 `json:\"age,omitempty\"`",
  6419  		"	Name string `json:\"name,omitempty\"`",
  6420  		`func (m *NamedNestedMapComplexAdditionalPropertiesAdditionalPropertiesAdditionalProperties) Validate(formats strfmt.Registry) error {`,
  6421  		`	if err := m.validateAge(formats); err != nil {`,
  6422  		`	if err := m.validateName(formats); err != nil {`,
  6423  		`		return errors.CompositeValidationError(res...`,
  6424  		`func (m *NamedNestedMapComplexAdditionalPropertiesAdditionalPropertiesAdditionalProperties) validateAge(formats strfmt.Registry) error {`,
  6425  		`	if swag.IsZero(m.Age) {`,
  6426  		`	if err := validate.MinimumInt("age", "body", int64(m.Age), 1, true); err != nil {`,
  6427  		`	if err := validate.MaximumInt("age", "body", int64(m.Age), 200, true); err != nil {`,
  6428  		`	if err := validate.MultipleOf("age", "body", float64(m.Age), 1); err != nil {`,
  6429  		`func (m *NamedNestedMapComplexAdditionalPropertiesAdditionalPropertiesAdditionalProperties) validateName(formats strfmt.Registry) error {`,
  6430  		`	if swag.IsZero(m.Name) {`,
  6431  		`	if err := validate.MinLength("name", "body", string(m.Name), 10); err != nil {`,
  6432  		`	if err := validate.MaxLength("name", "body", string(m.Name), 50); err != nil {`,
  6433  		"	if err := validate.Pattern(\"name\", \"body\", string(m.Name), `\\w+`); err != nil {",
  6434  	},
  6435  		// not expected
  6436  		todo,
  6437  		// output in log
  6438  		noLines,
  6439  		noLines)
  6440  
  6441  	// load expectations for model: all_of_validations_meta_all_of6_coords.go
  6442  	flattenRun.AddExpectations("all_of_validations_meta_all_of6_coords.go", []string{
  6443  		`type AllOfValidationsMetaAllOf6Coords struct {`,
  6444  		`	AllOfValidationsMetaAllOf6CoordsAllOf0`,
  6445  		`	AllOfValidationsMetaAllOf6CoordsAllOf1`,
  6446  		`func (m *AllOfValidationsMetaAllOf6Coords) Validate(formats strfmt.Registry) error {`,
  6447  		`	if err := m.AllOfValidationsMetaAllOf6CoordsAllOf0.Validate(formats); err != nil {`,
  6448  		`	if err := m.AllOfValidationsMetaAllOf6CoordsAllOf1.Validate(formats); err != nil {`,
  6449  		`		return errors.CompositeValidationError(res...`,
  6450  	},
  6451  		// not expected
  6452  		todo,
  6453  		// output in log
  6454  		noLines,
  6455  		noLines)
  6456  
  6457  	// load expectations for model: array_validations.go
  6458  	flattenRun.AddExpectations("array_validations.go", []string{
  6459  		`type ArrayValidations struct {`,
  6460  		"	Tags []string `json:\"tags\"`",
  6461  		`func (m *ArrayValidations) Validate(formats strfmt.Registry) error {`,
  6462  		`	if err := m.validateTags(formats); err != nil {`,
  6463  		`		return errors.CompositeValidationError(res...`,
  6464  		`func (m *ArrayValidations) validateTags(formats strfmt.Registry) error {`,
  6465  		`	if swag.IsZero(m.Tags) {`,
  6466  		`	iTagsSize := int64(len(m.Tags)`,
  6467  		`	if err := validate.MinItems("tags", "body", iTagsSize, 3); err != nil {`,
  6468  		`	if err := validate.MaxItems("tags", "body", iTagsSize, 10); err != nil {`,
  6469  		`	for i := 0; i < len(m.Tags); i++ {`,
  6470  		`		if err := validate.MinLength("tags"+"."+strconv.Itoa(i), "body", string(m.Tags[i]), 3); err != nil {`,
  6471  		`		if err := validate.MaxLength("tags"+"."+strconv.Itoa(i), "body", string(m.Tags[i]), 10); err != nil {`,
  6472  		"		if err := validate.Pattern(\"tags\"+\".\"+strconv.Itoa(i), \"body\", string(m.Tags[i]), `\\w+`); err != nil {",
  6473  	},
  6474  		// not expected
  6475  		todo,
  6476  		// output in log
  6477  		noLines,
  6478  		noLines)
  6479  
  6480  	expandRun.AddExpectations("array_validations.go", flattenRun.ExpectedFor("ArrayValidations").ExpectedLines, todo, noLines, noLines)
  6481  
  6482  	// load expectations for model: all_of_validations_meta.go
  6483  	flattenRun.AddExpectations("all_of_validations_meta.go", []string{
  6484  		`type AllOfValidationsMeta struct {`,
  6485  		`	AllOfValidationsMetaAllOf0`,
  6486  		`	AllOfValidationsMetaAllOf1`,
  6487  		`	AllOfValidationsMetaAllOf2`,
  6488  		`	AllOfValidationsMetaAllOf3`,
  6489  		`	AllOfValidationsMetaAllOf4`,
  6490  		`	AllOfValidationsMetaAllOf5`,
  6491  		`	AllOfValidationsMetaAllOf6`,
  6492  		`func (m *AllOfValidationsMeta) Validate(formats strfmt.Registry) error {`,
  6493  		`	if err := m.AllOfValidationsMetaAllOf0.Validate(formats); err != nil {`,
  6494  		`	if err := m.AllOfValidationsMetaAllOf1.Validate(formats); err != nil {`,
  6495  		`	if err := m.AllOfValidationsMetaAllOf2.Validate(formats); err != nil {`,
  6496  		`	if err := m.AllOfValidationsMetaAllOf3.Validate(formats); err != nil {`,
  6497  		`	if err := m.AllOfValidationsMetaAllOf4.Validate(formats); err != nil {`,
  6498  		`	if err := m.AllOfValidationsMetaAllOf5.Validate(formats); err != nil {`,
  6499  		`	if err := m.AllOfValidationsMetaAllOf6.Validate(formats); err != nil {`,
  6500  		`		return errors.CompositeValidationError(res...`,
  6501  	},
  6502  		// not expected
  6503  		todo,
  6504  		// output in log
  6505  		noLines,
  6506  		noLines)
  6507  
  6508  	// load expectations for model: map_complex_validations_meta_additional_properties.go
  6509  	flattenRun.AddExpectations("map_complex_validations_meta_additional_properties.go", []string{
  6510  		`type MapComplexValidationsMetaAdditionalProperties struct {`,
  6511  		"	Age int32 `json:\"age,omitempty\"`",
  6512  		"	Name string `json:\"name,omitempty\"`",
  6513  		`func (m *MapComplexValidationsMetaAdditionalProperties) Validate(formats strfmt.Registry) error {`,
  6514  		`	if err := m.validateAge(formats); err != nil {`,
  6515  		`	if err := m.validateName(formats); err != nil {`,
  6516  		`		return errors.CompositeValidationError(res...`,
  6517  		`func (m *MapComplexValidationsMetaAdditionalProperties) validateAge(formats strfmt.Registry) error {`,
  6518  		`	if swag.IsZero(m.Age) {`,
  6519  		`	if err := validate.MinimumInt("age", "body", int64(m.Age), 1, true); err != nil {`,
  6520  		`	if err := validate.MaximumInt("age", "body", int64(m.Age), 200, true); err != nil {`,
  6521  		`	if err := validate.MultipleOf("age", "body", float64(m.Age), 1); err != nil {`,
  6522  		`func (m *MapComplexValidationsMetaAdditionalProperties) validateName(formats strfmt.Registry) error {`,
  6523  		`	if swag.IsZero(m.Name) {`,
  6524  		`	if err := validate.MinLength("name", "body", string(m.Name), 10); err != nil {`,
  6525  		`	if err := validate.MaxLength("name", "body", string(m.Name), 50); err != nil {`,
  6526  		"	if err := validate.Pattern(\"name\", \"body\", string(m.Name), `\\w+`); err != nil {",
  6527  	},
  6528  		// not expected
  6529  		todo,
  6530  		// output in log
  6531  		noLines,
  6532  		noLines)
  6533  
  6534  	// load expectations for model: nested_map_complex_validations_meta_additional_properties.go
  6535  	// NOTE(fredbi): maps are simple types and this definition is no more generated
  6536  
  6537  	// load expectations for model: all_of_validations_meta_all_of6_coords_all_of1.go
  6538  	flattenRun.AddExpectations("all_of_validations_meta_all_of6_coords_all_of1.go", []string{
  6539  		`type AllOfValidationsMetaAllOf6CoordsAllOf1 struct {`,
  6540  		"	Age int32 `json:\"age,omitempty\"`",
  6541  		`func (m *AllOfValidationsMetaAllOf6CoordsAllOf1) Validate(formats strfmt.Registry) error {`,
  6542  		`	if err := m.validateAge(formats); err != nil {`,
  6543  		`		return errors.CompositeValidationError(res...`,
  6544  		`func (m *AllOfValidationsMetaAllOf6CoordsAllOf1) validateAge(formats strfmt.Registry) error {`,
  6545  		`	if swag.IsZero(m.Age) {`,
  6546  		`	if err := validate.MinimumInt("age", "body", int64(m.Age), 2, false); err != nil {`,
  6547  		`	if err := validate.MaximumInt("age", "body", int64(m.Age), 50, false); err != nil {`,
  6548  		`	if err := validate.MultipleOf("age", "body", float64(m.Age), 1.5); err != nil {`,
  6549  	},
  6550  		// not expected
  6551  		todo,
  6552  		// output in log
  6553  		noLines,
  6554  		noLines)
  6555  
  6556  	// load expectations for model: all_of_validations_meta_all_of3.go
  6557  	flattenRun.AddExpectations("all_of_validations_meta_all_of3.go", []string{
  6558  		`type AllOfValidationsMetaAllOf3 struct {`,
  6559  		"	Assoc [][][]string `json:\"assoc\"`",
  6560  		`func (m *AllOfValidationsMetaAllOf3) Validate(formats strfmt.Registry) error {`,
  6561  		`	if err := m.validateAssoc(formats); err != nil {`,
  6562  		`		return errors.CompositeValidationError(res...`,
  6563  		`func (m *AllOfValidationsMetaAllOf3) validateAssoc(formats strfmt.Registry) error {`,
  6564  		`	if swag.IsZero(m.Assoc) {`,
  6565  		`	iAssocSize := int64(len(m.Assoc)`,
  6566  		`	if err := validate.MinItems("assoc", "body", iAssocSize, 5); err != nil {`,
  6567  		`	if err := validate.MaxItems("assoc", "body", iAssocSize, 20); err != nil {`,
  6568  		`	for i := 0; i < len(m.Assoc); i++ {`,
  6569  		`		iiAssocSize := int64(len(m.Assoc[i])`,
  6570  		`		if err := validate.MinItems("assoc"+"."+strconv.Itoa(i), "body", iiAssocSize, 5); err != nil {`,
  6571  		`		if err := validate.MaxItems("assoc"+"."+strconv.Itoa(i), "body", iiAssocSize, 20); err != nil {`,
  6572  		`		for ii := 0; ii < len(m.Assoc[i]); ii++ {`,
  6573  		`			iiiAssocSize := int64(len(m.Assoc[i][ii])`,
  6574  		`			if err := validate.MinItems("assoc"+"."+strconv.Itoa(i)+"."+strconv.Itoa(ii), "body", iiiAssocSize, 5); err != nil {`,
  6575  		`			if err := validate.MaxItems("assoc"+"."+strconv.Itoa(i)+"."+strconv.Itoa(ii), "body", iiiAssocSize, 20); err != nil {`,
  6576  		`			for iii := 0; iii < len(m.Assoc[i][ii]); iii++ {`,
  6577  		`				if err := validate.MinLength("assoc"+"."+strconv.Itoa(i)+"."+strconv.Itoa(ii)+"."+strconv.Itoa(iii), "body", string(m.Assoc[i][ii][iii]), 2); err != nil {`,
  6578  		`				if err := validate.MaxLength("assoc"+"."+strconv.Itoa(i)+"."+strconv.Itoa(ii)+"."+strconv.Itoa(iii), "body", string(m.Assoc[i][ii][iii]), 50); err != nil {`,
  6579  		"				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 {",
  6580  	},
  6581  		// not expected
  6582  		todo,
  6583  		// output in log
  6584  		noLines,
  6585  		noLines)
  6586  
  6587  	// load expectations for model: nested_object_validations.go
  6588  	flattenRun.AddExpectations("nested_object_validations.go", []string{
  6589  		`type NestedObjectValidations struct {`,
  6590  		"	Args *NestedObjectValidationsArgs `json:\"args,omitempty\"`",
  6591  		`func (m *NestedObjectValidations) Validate(formats strfmt.Registry) error {`,
  6592  		`	if err := m.validateArgs(formats); err != nil {`,
  6593  		`		return errors.CompositeValidationError(res...`,
  6594  		`func (m *NestedObjectValidations) validateArgs(formats strfmt.Registry) error {`,
  6595  		`	if swag.IsZero(m.Args) {`,
  6596  		`	if m.Args != nil {`,
  6597  		`		if err := m.Args.Validate(formats); err != nil {`,
  6598  		`			if ve, ok := err.(*errors.Validation); ok {`,
  6599  		`				return ve.ValidateName("args"`,
  6600  	},
  6601  		// not expected
  6602  		todo,
  6603  		// output in log
  6604  		noLines,
  6605  		noLines)
  6606  
  6607  	expandRun.AddExpectations("nested_object_validations.go", []string{
  6608  		`type NestedObjectValidations struct {`,
  6609  		"	Args *NestedObjectValidationsArgs `json:\"args,omitempty\"`",
  6610  		`func (m *NestedObjectValidations) Validate(formats strfmt.Registry) error {`,
  6611  		`	if err := m.validateArgs(formats); err != nil {`,
  6612  		`		return errors.CompositeValidationError(res...`,
  6613  		`func (m *NestedObjectValidations) validateArgs(formats strfmt.Registry) error {`,
  6614  		`	if swag.IsZero(m.Args) {`,
  6615  		`	if m.Args != nil {`,
  6616  		`		if err := m.Args.Validate(formats); err != nil {`,
  6617  		`			if ve, ok := err.(*errors.Validation); ok {`,
  6618  		`				return ve.ValidateName("args"`,
  6619  		`type NestedObjectValidationsArgs struct {`,
  6620  		"	Meta *NestedObjectValidationsArgsMeta `json:\"meta,omitempty\"`",
  6621  		`func (m *NestedObjectValidationsArgs) Validate(formats strfmt.Registry) error {`,
  6622  		`	if err := m.validateMeta(formats); err != nil {`,
  6623  		`		return errors.CompositeValidationError(res...`,
  6624  		`func (m *NestedObjectValidationsArgs) validateMeta(formats strfmt.Registry) error {`,
  6625  		`	if swag.IsZero(m.Meta) {`,
  6626  		`	if m.Meta != nil {`,
  6627  		`		if err := m.Meta.Validate(formats); err != nil {`,
  6628  		`			if ve, ok := err.(*errors.Validation); ok {`,
  6629  		`				return ve.ValidateName("args" + "." + "meta"`,
  6630  		`type NestedObjectValidationsArgsMeta struct {`,
  6631  		"	First string `json:\"first,omitempty\"`",
  6632  		"	Fourth [][][]float32 `json:\"fourth\"`",
  6633  		"	Second float64 `json:\"second,omitempty\"`",
  6634  		"	Third []float32 `json:\"third\"`",
  6635  		`func (m *NestedObjectValidationsArgsMeta) Validate(formats strfmt.Registry) error {`,
  6636  		`	if err := m.validateFirst(formats); err != nil {`,
  6637  		`	if err := m.validateFourth(formats); err != nil {`,
  6638  		`	if err := m.validateSecond(formats); err != nil {`,
  6639  		`	if err := m.validateThird(formats); err != nil {`,
  6640  		`		return errors.CompositeValidationError(res...`,
  6641  		`func (m *NestedObjectValidationsArgsMeta) validateFirst(formats strfmt.Registry) error {`,
  6642  		`	if swag.IsZero(m.First) {`,
  6643  		`	if err := validate.MinLength("args"+"."+"meta"+"."+"first", "body", string(m.First), 2); err != nil {`,
  6644  		`	if err := validate.MaxLength("args"+"."+"meta"+"."+"first", "body", string(m.First), 50); err != nil {`,
  6645  		"	if err := validate.Pattern(\"args\"+\".\"+\"meta\"+\".\"+\"first\", \"body\", string(m.First), `^\\w+`); err != nil {",
  6646  		`func (m *NestedObjectValidationsArgsMeta) validateFourth(formats strfmt.Registry) error {`,
  6647  		`	if swag.IsZero(m.Fourth) {`,
  6648  		`	iFourthSize := int64(len(m.Fourth)`,
  6649  		`	if err := validate.MinItems("args"+"."+"meta"+"."+"fourth", "body", iFourthSize, 5); err != nil {`,
  6650  		`	if err := validate.MaxItems("args"+"."+"meta"+"."+"fourth", "body", iFourthSize, 93); err != nil {`,
  6651  		`	for i := 0; i < len(m.Fourth); i++ {`,
  6652  		`		iiFourthSize := int64(len(m.Fourth[i])`,
  6653  		`		if err := validate.MinItems("args"+"."+"meta"+"."+"fourth"+"."+strconv.Itoa(i), "body", iiFourthSize, 5); err != nil {`,
  6654  		`		if err := validate.MaxItems("args"+"."+"meta"+"."+"fourth"+"."+strconv.Itoa(i), "body", iiFourthSize, 93); err != nil {`,
  6655  		`		for ii := 0; ii < len(m.Fourth[i]); ii++ {`,
  6656  		`			iiiFourthSize := int64(len(m.Fourth[i][ii])`,
  6657  		`			if err := validate.MinItems("args"+"."+"meta"+"."+"fourth"+"."+strconv.Itoa(i)+"."+strconv.Itoa(ii), "body", iiiFourthSize, 5); err != nil {`,
  6658  		`			if err := validate.MaxItems("args"+"."+"meta"+"."+"fourth"+"."+strconv.Itoa(i)+"."+strconv.Itoa(ii), "body", iiiFourthSize, 93); err != nil {`,
  6659  		`			for iii := 0; iii < len(m.Fourth[i][ii]); iii++ {`,
  6660  		`				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 {`,
  6661  		`				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 {`,
  6662  		`				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 {`,
  6663  		`func (m *NestedObjectValidationsArgsMeta) validateSecond(formats strfmt.Registry) error {`,
  6664  		`	if swag.IsZero(m.Second) {`,
  6665  		`	if err := validate.Minimum("args"+"."+"meta"+"."+"second", "body", float64(m.Second), 3, false); err != nil {`,
  6666  		`	if err := validate.Maximum("args"+"."+"meta"+"."+"second", "body", float64(m.Second), 51, false); err != nil {`,
  6667  		`	if err := validate.MultipleOf("args"+"."+"meta"+"."+"second", "body", float64(m.Second), 1.5); err != nil {`,
  6668  		`func (m *NestedObjectValidationsArgsMeta) validateThird(formats strfmt.Registry) error {`,
  6669  		`	if swag.IsZero(m.Third) {`,
  6670  		`	iThirdSize := int64(len(m.Third)`,
  6671  		`	if err := validate.MinItems("args"+"."+"meta"+"."+"third", "body", iThirdSize, 5); err != nil {`,
  6672  		`	if err := validate.MaxItems("args"+"."+"meta"+"."+"third", "body", iThirdSize, 93); err != nil {`,
  6673  		`	for i := 0; i < len(m.Third); i++ {`,
  6674  		`		if err := validate.Minimum("args"+"."+"meta"+"."+"third"+"."+strconv.Itoa(i), "body", float64(m.Third[i]), 3, false); err != nil {`,
  6675  		`		if err := validate.Maximum("args"+"."+"meta"+"."+"third"+"."+strconv.Itoa(i), "body", float64(m.Third[i]), 6, false); err != nil {`,
  6676  		`		if err := validate.MultipleOf("args"+"."+"meta"+"."+"third"+"."+strconv.Itoa(i), "body", float64(m.Third[i]), 0.5); err != nil {`,
  6677  	},
  6678  		// not expected
  6679  		todo,
  6680  		// output in log
  6681  		noLines,
  6682  		noLines)
  6683  
  6684  	// load expectations for model: named_array_additional.go
  6685  	flattenRun.AddExpectations("named_array_additional.go", []string{
  6686  		`type NamedArrayAdditional struct {`,
  6687  		"	P0 *string `json:\"-\"`",
  6688  		"	P1 *float64 `json:\"-\"`",
  6689  		"	NamedArrayAdditionalItems []int64 `json:\"-\"`",
  6690  		`func (m *NamedArrayAdditional) Validate(formats strfmt.Registry) error {`,
  6691  		`	if err := m.validateP0(formats); err != nil {`,
  6692  		`	if err := m.validateP1(formats); err != nil {`,
  6693  		`	if err := m.validateNamedArrayAdditionalItems(formats); err != nil {`,
  6694  		`		return errors.CompositeValidationError(res...`,
  6695  		`func (m *NamedArrayAdditional) validateP0(formats strfmt.Registry) error {`,
  6696  		`	if err := validate.Required("0", "body", m.P0); err != nil {`,
  6697  		`	if err := validate.MinLength("0", "body", string(*m.P0), 3); err != nil {`,
  6698  		`	if err := validate.MaxLength("0", "body", string(*m.P0), 10); err != nil {`,
  6699  		"	if err := validate.Pattern(\"0\", \"body\", string(*m.P0), `\\w+`); err != nil {",
  6700  		`func (m *NamedArrayAdditional) validateP1(formats strfmt.Registry) error {`,
  6701  		`	if err := validate.Required("1", "body", m.P1); err != nil {`,
  6702  		`	if err := validate.Minimum("1", "body", float64(*m.P1), 3, false); err != nil {`,
  6703  		`	if err := validate.Maximum("1", "body", float64(*m.P1), 12, false); err != nil {`,
  6704  		`	if err := validate.MultipleOf("1", "body", float64(*m.P1), 1.5); err != nil {`,
  6705  		`func (m *NamedArrayAdditional) validateNamedArrayAdditionalItems(formats strfmt.Registry) error {`,
  6706  		`	for i := range m.NamedArrayAdditionalItems {`,
  6707  		`		if err := validate.MinimumInt(strconv.Itoa(i+2), "body", int64(m.NamedArrayAdditionalItems[i]), 3, false); err != nil {`,
  6708  		`		if err := validate.MaximumInt(strconv.Itoa(i+2), "body", int64(m.NamedArrayAdditionalItems[i]), 6, false); err != nil {`,
  6709  		`		if err := validate.MultipleOf(strconv.Itoa(i+2), "body", float64(m.NamedArrayAdditionalItems[i]), 1); err != nil {`,
  6710  	},
  6711  		// not expected
  6712  		todo,
  6713  		// output in log
  6714  		noLines,
  6715  		noLines)
  6716  
  6717  	expandRun.AddExpectations("named_array_additional.go", flattenRun.ExpectedFor("NamedArrayAdditional").ExpectedLines, todo, noLines, noLines)
  6718  
  6719  	// load expectations for model: pet.go
  6720  	flattenRun.AddExpectations("pet.go", []string{
  6721  		`type Pet struct {`,
  6722  		"	Category *Category `json:\"category,omitempty\"`",
  6723  		"	ID int64 `json:\"id,omitempty\"`",
  6724  		"	Name *string `json:\"name\"`",
  6725  		"	PhotoUrls []string `json:\"photoUrls\" xml:\"photoUrl\"`",
  6726  		"	Status string `json:\"status,omitempty\"`",
  6727  		"	Tags []*Tag `json:\"tags\" xml:\"tag\"`",
  6728  		`func (m *Pet) Validate(formats strfmt.Registry) error {`,
  6729  		`	if err := m.validateCategory(formats); err != nil {`,
  6730  		`	if err := m.validateName(formats); err != nil {`,
  6731  		`	if err := m.validatePhotoUrls(formats); err != nil {`,
  6732  		`	if err := m.validateStatus(formats); err != nil {`,
  6733  		`	if err := m.validateTags(formats); err != nil {`,
  6734  		`		return errors.CompositeValidationError(res...`,
  6735  		`func (m *Pet) validateCategory(formats strfmt.Registry) error {`,
  6736  		`	if swag.IsZero(m.Category) {`,
  6737  		`	if m.Category != nil {`,
  6738  		`		if err := m.Category.Validate(formats); err != nil {`,
  6739  		`			if ve, ok := err.(*errors.Validation); ok {`,
  6740  		`				return ve.ValidateName("category"`,
  6741  		`func (m *Pet) validateName(formats strfmt.Registry) error {`,
  6742  		`	if err := validate.Required("name", "body", m.Name); err != nil {`,
  6743  		`func (m *Pet) validatePhotoUrls(formats strfmt.Registry) error {`,
  6744  		`	if err := validate.Required("photoUrls", "body", m.PhotoUrls); err != nil {`,
  6745  		`var petTypeStatusPropEnum []interface{`,
  6746  		`	var res []string`,
  6747  		"	if err := json.Unmarshal([]byte(`[\"available\",\"pending\",\"sold\"]`), &res); err != nil {",
  6748  		`	for _, v := range res {`,
  6749  		`		petTypeStatusPropEnum = append(petTypeStatusPropEnum, v`,
  6750  		`	PetStatusAvailable string = "available"`,
  6751  		`	PetStatusPending string = "pending"`,
  6752  		`	PetStatusSold string = "sold"`,
  6753  		`func (m *Pet) validateStatusEnum(path, location string, value string) error {`,
  6754  		`	if err := validate.EnumCase(path, location, value, petTypeStatusPropEnum, true); err != nil {`,
  6755  		`func (m *Pet) validateStatus(formats strfmt.Registry) error {`,
  6756  		`	if swag.IsZero(m.Status) {`,
  6757  		`	if err := m.validateStatusEnum("status", "body", m.Status); err != nil {`,
  6758  		`func (m *Pet) validateTags(formats strfmt.Registry) error {`,
  6759  		`	if swag.IsZero(m.Tags) {`,
  6760  		`	for i := 0; i < len(m.Tags); i++ {`,
  6761  		// do we need Required when item is nullable?
  6762  		// nullable not required:
  6763  		`		if swag.IsZero(m.Tags[i]) {`,
  6764  		// nullable required:
  6765  		//`if err := validate.Required("tags"+"."+strconv.Itoa(i), "body", m.Tags[i]); err != nil {`,
  6766  		`		if m.Tags[i] != nil {`,
  6767  		`			if err := m.Tags[i].Validate(formats); err != nil {`,
  6768  		`				if ve, ok := err.(*errors.Validation); ok {`,
  6769  		`					return ve.ValidateName("tags" + "." + strconv.Itoa(i)`,
  6770  	},
  6771  		// not expected
  6772  		todo,
  6773  		// output in log
  6774  		noLines,
  6775  		noLines)
  6776  
  6777  	expandRun.AddExpectations("pet.go", []string{
  6778  		`type Pet struct {`,
  6779  		"	Category *PetCategory `json:\"category,omitempty\"`",
  6780  		"	ID int64 `json:\"id,omitempty\"`",
  6781  		"	Name *string `json:\"name\"`",
  6782  		"	PhotoUrls []string `json:\"photoUrls\" xml:\"photoUrl\"`",
  6783  		"	Status string `json:\"status,omitempty\"`",
  6784  		"	Tags []*PetTagsItems0 `json:\"tags\" xml:\"tag\"`",
  6785  		`func (m *Pet) Validate(formats strfmt.Registry) error {`,
  6786  		`	if err := m.validateCategory(formats); err != nil {`,
  6787  		`	if err := m.validateName(formats); err != nil {`,
  6788  		`	if err := m.validatePhotoUrls(formats); err != nil {`,
  6789  		`	if err := m.validateStatus(formats); err != nil {`,
  6790  		`	if err := m.validateTags(formats); err != nil {`,
  6791  		`		return errors.CompositeValidationError(res...`,
  6792  		`func (m *Pet) validateCategory(formats strfmt.Registry) error {`,
  6793  		`	if swag.IsZero(m.Category) {`,
  6794  		`	if m.Category != nil {`,
  6795  		`		if err := m.Category.Validate(formats); err != nil {`,
  6796  		`			if ve, ok := err.(*errors.Validation); ok {`,
  6797  		`				return ve.ValidateName("category"`,
  6798  		`func (m *Pet) validateName(formats strfmt.Registry) error {`,
  6799  		`	if err := validate.Required("name", "body", m.Name); err != nil {`,
  6800  		`func (m *Pet) validatePhotoUrls(formats strfmt.Registry) error {`,
  6801  		`	if err := validate.Required("photoUrls", "body", m.PhotoUrls); err != nil {`,
  6802  		`var petTypeStatusPropEnum []interface{`,
  6803  		`	var res []string`,
  6804  		"	if err := json.Unmarshal([]byte(`[\"available\",\"pending\",\"sold\"]`), &res); err != nil {",
  6805  		`	for _, v := range res {`,
  6806  		`		petTypeStatusPropEnum = append(petTypeStatusPropEnum, v`,
  6807  		`	PetStatusAvailable string = "available"`,
  6808  		`	PetStatusPending string = "pending"`,
  6809  		`	PetStatusSold string = "sold"`,
  6810  		`func (m *Pet) validateStatusEnum(path, location string, value string) error {`,
  6811  		`	if err := validate.EnumCase(path, location, value, petTypeStatusPropEnum, true); err != nil {`,
  6812  		`func (m *Pet) validateStatus(formats strfmt.Registry) error {`,
  6813  		`	if swag.IsZero(m.Status) {`,
  6814  		`	if err := m.validateStatusEnum("status", "body", m.Status); err != nil {`,
  6815  		`func (m *Pet) validateTags(formats strfmt.Registry) error {`,
  6816  		`	if swag.IsZero(m.Tags) {`,
  6817  		`	for i := 0; i < len(m.Tags); i++ {`,
  6818  		// do we need Required when item is nullable?
  6819  		// nullable not required:
  6820  		`		if swag.IsZero(m.Tags[i]) {`,
  6821  		// nullable required:
  6822  		//`		if err := validate.Required("tags"+"."+strconv.Itoa(i), "body", m.Tags[i]); err != nil {`,
  6823  		`		if m.Tags[i] != nil {`,
  6824  		`			if err := m.Tags[i].Validate(formats); err != nil {`,
  6825  		`				if ve, ok := err.(*errors.Validation); ok {`,
  6826  		`					return ve.ValidateName("tags" + "." + strconv.Itoa(i)`,
  6827  		`type PetCategory struct {`,
  6828  		"	ID int64 `json:\"id,omitempty\"`",
  6829  		"	Name string `json:\"name,omitempty\"`",
  6830  		// empty validation
  6831  		"func (m *PetCategory) Validate(formats strfmt.Registry) error {\n	return nil\n}",
  6832  		`type PetTagsItems0 struct {`,
  6833  		"	ID int64 `json:\"id,omitempty\"`",
  6834  		"	Name string `json:\"name,omitempty\"`",
  6835  		// empty validation
  6836  		"func (m *PetTagsItems0) Validate(formats strfmt.Registry) error {\n	return nil\n}",
  6837  	},
  6838  		// not expected
  6839  		todo,
  6840  		// output in log
  6841  		noLines,
  6842  		noLines)
  6843  
  6844  	// load expectations for model: map_complex_validations_meta.go
  6845  	// NOTE(fredbi): maps are simple types and this definition is no more generated
  6846  
  6847  	// load expectations for model: array_additional_validations_args.go
  6848  	flattenRun.AddExpectations("array_additional_validations_args.go", []string{
  6849  		`type ArrayAdditionalValidationsArgs struct {`,
  6850  		"	P0 *string `json:\"-\"`",
  6851  		"	P1 *float64 `json:\"-\"`",
  6852  		"	ArrayAdditionalValidationsArgsItems []int64 `json:\"-\"`",
  6853  		`func (m *ArrayAdditionalValidationsArgs) Validate(formats strfmt.Registry) error {`,
  6854  		`	if err := m.validateP0(formats); err != nil {`,
  6855  		`	if err := m.validateP1(formats); err != nil {`,
  6856  		`	if err := m.validateArrayAdditionalValidationsArgsItems(formats); err != nil {`,
  6857  		`		return errors.CompositeValidationError(res...`,
  6858  		`func (m *ArrayAdditionalValidationsArgs) validateP0(formats strfmt.Registry) error {`,
  6859  		`	if err := validate.Required("0", "body", m.P0); err != nil {`,
  6860  		`	if err := validate.MinLength("0", "body", string(*m.P0), 3); err != nil {`,
  6861  		`	if err := validate.MaxLength("0", "body", string(*m.P0), 10); err != nil {`,
  6862  		"	if err := validate.Pattern(\"0\", \"body\", string(*m.P0), `\\w+`); err != nil {",
  6863  		`func (m *ArrayAdditionalValidationsArgs) validateP1(formats strfmt.Registry) error {`,
  6864  		`	if err := validate.Required("1", "body", m.P1); err != nil {`,
  6865  		`	if err := validate.Minimum("1", "body", float64(*m.P1), 3, false); err != nil {`,
  6866  		`	if err := validate.Maximum("1", "body", float64(*m.P1), 12, false); err != nil {`,
  6867  		`	if err := validate.MultipleOf("1", "body", float64(*m.P1), 1.5); err != nil {`,
  6868  		`func (m *ArrayAdditionalValidationsArgs) validateArrayAdditionalValidationsArgsItems(formats strfmt.Registry) error {`,
  6869  		`	for i := range m.ArrayAdditionalValidationsArgsItems {`,
  6870  		`		if err := validate.MinimumInt(strconv.Itoa(i+2), "body", int64(m.ArrayAdditionalValidationsArgsItems[i]), 3, false); err != nil {`,
  6871  		`		if err := validate.MaximumInt(strconv.Itoa(i+2), "body", int64(m.ArrayAdditionalValidationsArgsItems[i]), 6, false); err != nil {`,
  6872  		`		if err := validate.MultipleOf(strconv.Itoa(i+2), "body", float64(m.ArrayAdditionalValidationsArgsItems[i]), 1); err != nil {`,
  6873  	},
  6874  		// not expected
  6875  		todo,
  6876  		// output in log
  6877  		noLines,
  6878  		noLines)
  6879  
  6880  	// load expectations for model: all_of_validations_meta_all_of2.go
  6881  	flattenRun.AddExpectations("all_of_validations_meta_all_of2.go", []string{
  6882  		`type AllOfValidationsMetaAllOf2 struct {`,
  6883  		"	Args []string `json:\"args\"`",
  6884  		`func (m *AllOfValidationsMetaAllOf2) Validate(formats strfmt.Registry) error {`,
  6885  		`	if err := m.validateArgs(formats); err != nil {`,
  6886  		`		return errors.CompositeValidationError(res...`,
  6887  		`func (m *AllOfValidationsMetaAllOf2) validateArgs(formats strfmt.Registry) error {`,
  6888  		`	if swag.IsZero(m.Args) {`,
  6889  		`	iArgsSize := int64(len(m.Args)`,
  6890  		`	if err := validate.MinItems("args", "body", iArgsSize, 5); err != nil {`,
  6891  		`	if err := validate.MaxItems("args", "body", iArgsSize, 20); err != nil {`,
  6892  		`	for i := 0; i < len(m.Args); i++ {`,
  6893  		`		if err := validate.MinLength("args"+"."+strconv.Itoa(i), "body", string(m.Args[i]), 2); err != nil {`,
  6894  		`		if err := validate.MaxLength("args"+"."+strconv.Itoa(i), "body", string(m.Args[i]), 50); err != nil {`,
  6895  		"		if err := validate.Pattern(\"args\"+\".\"+strconv.Itoa(i), \"body\", string(m.Args[i]), `[A-Za-z0-9][\\w- ]+`); err != nil {",
  6896  	},
  6897  		// not expected
  6898  		todo,
  6899  		// output in log
  6900  		noLines,
  6901  		noLines)
  6902  
  6903  	// load expectations for model: all_of_validations_meta_all_of0.go
  6904  	flattenRun.AddExpectations("all_of_validations_meta_all_of0.go", []string{
  6905  		`type AllOfValidationsMetaAllOf0 struct {`,
  6906  		"	Name string `json:\"name,omitempty\"`",
  6907  		`func (m *AllOfValidationsMetaAllOf0) Validate(formats strfmt.Registry) error {`,
  6908  		`	if err := m.validateName(formats); err != nil {`,
  6909  		`		return errors.CompositeValidationError(res...`,
  6910  		`func (m *AllOfValidationsMetaAllOf0) validateName(formats strfmt.Registry) error {`,
  6911  		`	if swag.IsZero(m.Name) {`,
  6912  		`	if err := validate.MinLength("name", "body", string(m.Name), 2); err != nil {`,
  6913  		`	if err := validate.MaxLength("name", "body", string(m.Name), 50); err != nil {`,
  6914  		"	if err := validate.Pattern(\"name\", \"body\", string(m.Name), `[A-Za-z0-9][\\w- ]+`); err != nil {",
  6915  	},
  6916  		// not expected
  6917  		todo,
  6918  		// output in log
  6919  		noLines,
  6920  		noLines)
  6921  
  6922  	// load expectations for model: named_all_of_all_of4.go
  6923  	flattenRun.AddExpectations("named_all_of_all_of4.go", []string{
  6924  		`type NamedAllOfAllOf4 struct {`,
  6925  		"	Opts map[string]float64 `json:\"opts,omitempty\"`",
  6926  		`func (m *NamedAllOfAllOf4) Validate(formats strfmt.Registry) error {`,
  6927  		`	if err := m.validateOpts(formats); err != nil {`,
  6928  		`		return errors.CompositeValidationError(res...`,
  6929  		`func (m *NamedAllOfAllOf4) validateOpts(formats strfmt.Registry) error {`,
  6930  		`	if swag.IsZero(m.Opts) {`,
  6931  		`	for k := range m.Opts {`,
  6932  		//`		if swag.IsZero(m.Opts[k]) {`,
  6933  		`		if err := validate.Minimum("opts"+"."+k, "body", float64(m.Opts[k]), 2, false); err != nil {`,
  6934  		`		if err := validate.Maximum("opts"+"."+k, "body", float64(m.Opts[k]), 50, false); err != nil {`,
  6935  		`		if err := validate.MultipleOf("opts"+"."+k, "body", float64(m.Opts[k]), 1.5); err != nil {`,
  6936  	},
  6937  		// not expected
  6938  		todo,
  6939  		// output in log
  6940  		noLines,
  6941  		noLines)
  6942  
  6943  	// load expectations for model: named_all_of_all_of0.go
  6944  	flattenRun.AddExpectations("named_all_of_all_of0.go", []string{
  6945  		`type NamedAllOfAllOf0 struct {`,
  6946  		"	Name string `json:\"name,omitempty\"`",
  6947  		`func (m *NamedAllOfAllOf0) Validate(formats strfmt.Registry) error {`,
  6948  		`	if err := m.validateName(formats); err != nil {`,
  6949  		`		return errors.CompositeValidationError(res...`,
  6950  		`func (m *NamedAllOfAllOf0) validateName(formats strfmt.Registry) error {`,
  6951  		`	if swag.IsZero(m.Name) {`,
  6952  		`	if err := validate.MinLength("name", "body", string(m.Name), 2); err != nil {`,
  6953  		`	if err := validate.MaxLength("name", "body", string(m.Name), 50); err != nil {`,
  6954  		"	if err := validate.Pattern(\"name\", \"body\", string(m.Name), `[A-Za-z0-9][\\w- ]+`); err != nil {",
  6955  	},
  6956  		// not expected
  6957  		todo,
  6958  		// output in log
  6959  		noLines,
  6960  		noLines)
  6961  
  6962  	// load expectations for model: nested_map_complex_validations_meta_additional_properties_additional_properties_additional_properties.go
  6963  	flattenRun.AddExpectations("nested_map_complex_validations_meta_additional_properties_additional_properties_additional_properties.go", []string{
  6964  		`type NestedMapComplexValidationsMetaAdditionalPropertiesAdditionalPropertiesAdditionalProperties struct {`,
  6965  		"	Age int32 `json:\"age,omitempty\"`",
  6966  		"	Name string `json:\"name,omitempty\"`",
  6967  		`func (m *NestedMapComplexValidationsMetaAdditionalPropertiesAdditionalPropertiesAdditionalProperties) Validate(formats strfmt.Registry) error {`,
  6968  		`	if err := m.validateAge(formats); err != nil {`,
  6969  		`	if err := m.validateName(formats); err != nil {`,
  6970  		`		return errors.CompositeValidationError(res...`,
  6971  		`func (m *NestedMapComplexValidationsMetaAdditionalPropertiesAdditionalPropertiesAdditionalProperties) validateAge(formats strfmt.Registry) error {`,
  6972  		`	if swag.IsZero(m.Age) {`,
  6973  		`	if err := validate.MinimumInt("age", "body", int64(m.Age), 1, true); err != nil {`,
  6974  		`	if err := validate.MaximumInt("age", "body", int64(m.Age), 200, true); err != nil {`,
  6975  		`	if err := validate.MultipleOf("age", "body", float64(m.Age), 1); err != nil {`,
  6976  		`func (m *NestedMapComplexValidationsMetaAdditionalPropertiesAdditionalPropertiesAdditionalProperties) validateName(formats strfmt.Registry) error {`,
  6977  		`	if swag.IsZero(m.Name) {`,
  6978  		`	if err := validate.MinLength("name", "body", string(m.Name), 10); err != nil {`,
  6979  		`	if err := validate.MaxLength("name", "body", string(m.Name), 50); err != nil {`,
  6980  		"	if err := validate.Pattern(\"name\", \"body\", string(m.Name), `\\w+`); err != nil {",
  6981  	},
  6982  		// not expected
  6983  		todo,
  6984  		// output in log
  6985  		noLines,
  6986  		noLines)
  6987  
  6988  	// load expectations for model: refed_all_of_validations.go
  6989  	flattenRun.AddExpectations("refed_all_of_validations.go", []string{
  6990  		`type RefedAllOfValidations struct {`,
  6991  		`	NamedString`,
  6992  		`	NamedNumber`,
  6993  		`func (m *RefedAllOfValidations) Validate(formats strfmt.Registry) error {`,
  6994  		`	if err := m.NamedString.Validate(formats); err != nil {`,
  6995  		`	if err := m.NamedNumber.Validate(formats); err != nil {`,
  6996  		`		return errors.CompositeValidationError(res...`,
  6997  	},
  6998  		// not expected
  6999  		todo,
  7000  		// output in log
  7001  		noLines,
  7002  		noLines)
  7003  
  7004  	expandRun.AddExpectations("refed_all_of_validations.go", []string{
  7005  		`type RefedAllOfValidations struct {`,
  7006  		`	RefedAllOfValidationsAllOf0`,
  7007  		`	RefedAllOfValidationsAllOf1`,
  7008  		`func (m *RefedAllOfValidations) Validate(formats strfmt.Registry) error {`,
  7009  		`	if err := m.RefedAllOfValidationsAllOf0.Validate(formats); err != nil {`,
  7010  		`	if err := m.RefedAllOfValidationsAllOf1.Validate(formats); err != nil {`,
  7011  		`		return errors.CompositeValidationError(res...`,
  7012  		`type RefedAllOfValidationsAllOf0 string`,
  7013  		`func (m RefedAllOfValidationsAllOf0) Validate(formats strfmt.Registry) error {`,
  7014  		`	if err := validate.MinLength("", "body", string(m), 2); err != nil {`,
  7015  		`	if err := validate.MaxLength("", "body", string(m), 50); err != nil {`,
  7016  		"	if err := validate.Pattern(\"\", \"body\", string(m), `[A-Za-z0-9][\\w- ]+`); err != nil {",
  7017  		`		return errors.CompositeValidationError(res...`,
  7018  		`type RefedAllOfValidationsAllOf1 int32`,
  7019  		`func (m RefedAllOfValidationsAllOf1) Validate(formats strfmt.Registry) error {`,
  7020  		`	if err := validate.MinimumInt("", "body", int64(m), 0, true); err != nil {`,
  7021  		`	if err := validate.MaximumInt("", "body", int64(m), 500, false); err != nil {`,
  7022  		`	if err := validate.MultipleOf("", "body", float64(m), 1.5); err != nil {`,
  7023  		`		return errors.CompositeValidationError(res...`,
  7024  	},
  7025  		// not expected
  7026  		todo,
  7027  		// output in log
  7028  		noLines,
  7029  		noLines)
  7030  
  7031  	// load expectations for model: update_org.go
  7032  	flattenRun.AddExpectations("update_org.go", []string{
  7033  		`type UpdateOrg struct {`,
  7034  		"	Email string `json:\"email,omitempty\"`",
  7035  		"	InvoiceEmail bool `json:\"invoice_email,omitempty\"`",
  7036  		"	TagExpiration *int64 `json:\"tag_expiration,omitempty\"`",
  7037  		`func (m *UpdateOrg) Validate(formats strfmt.Registry) error {`,
  7038  		`	if err := m.validateTagExpiration(formats); err != nil {`,
  7039  		`		return errors.CompositeValidationError(res...`,
  7040  		`func (m *UpdateOrg) validateTagExpiration(formats strfmt.Registry) error {`,
  7041  		`	if swag.IsZero(m.TagExpiration) {`,
  7042  		`	if err := validate.MinimumInt("tag_expiration", "body", int64(*m.TagExpiration), 0, false); err != nil {`,
  7043  		`	if err := validate.MaximumInt("tag_expiration", "body", int64(*m.TagExpiration), 2.592e+06, false); err != nil {`,
  7044  	},
  7045  		// not expected
  7046  		todo,
  7047  		// output in log
  7048  		noLines,
  7049  		noLines)
  7050  
  7051  	expandRun.AddExpectations("update_org.go", flattenRun.ExpectedFor("UpdateOrg").ExpectedLines, todo, noLines, noLines)
  7052  
  7053  	// load expectations for model: number_validations.go
  7054  	flattenRun.AddExpectations("number_validations.go", []string{
  7055  		`type NumberValidations struct {`,
  7056  		"	Age int32 `json:\"age,omitempty\"`",
  7057  		`func (m *NumberValidations) Validate(formats strfmt.Registry) error {`,
  7058  		`	if err := m.validateAge(formats); err != nil {`,
  7059  		`		return errors.CompositeValidationError(res...`,
  7060  		`func (m *NumberValidations) validateAge(formats strfmt.Registry) error {`,
  7061  		`	if swag.IsZero(m.Age) {`,
  7062  		`	if err := validate.MinimumInt("age", "body", int64(m.Age), 0, true); err != nil {`,
  7063  		`	if err := validate.MaximumInt("age", "body", int64(m.Age), 500, false); err != nil {`,
  7064  		`	if err := validate.MultipleOf("age", "body", float64(m.Age), 1.5); err != nil {`,
  7065  	},
  7066  		// not expected
  7067  		todo,
  7068  		// output in log
  7069  		noLines,
  7070  		noLines)
  7071  
  7072  	expandRun.AddExpectations("number_validations.go", flattenRun.ExpectedFor("NumberValidations").ExpectedLines, todo, noLines, noLines)
  7073  
  7074  	// load expectations for model: nested_map_complex_validations.go
  7075  	flattenRun.AddExpectations("nested_map_complex_validations.go", []string{
  7076  		`type NestedMapComplexValidations struct {`,
  7077  		// maps are now simple types
  7078  		//"	Meta NestedMapComplexValidationsMeta `json:\"meta,omitempty\"`",
  7079  		"	Meta map[string]map[string]map[string]NestedMapComplexValidationsMetaAdditionalPropertiesAdditionalPropertiesAdditionalProperties `json:\"meta,omitempty\"`",
  7080  		`func (m *NestedMapComplexValidations) Validate(formats strfmt.Registry) error {`,
  7081  		`	if err := m.validateMeta(formats); err != nil {`,
  7082  		`		return errors.CompositeValidationError(res...`,
  7083  		`func (m *NestedMapComplexValidations) validateMeta(formats strfmt.Registry) error {`,
  7084  		`	if swag.IsZero(m.Meta) {`,
  7085  		//`	if err := m.Meta.Validate(formats); err != nil {`,
  7086  		`            		for k := range m.Meta {`,
  7087  		//`            			if swag.IsZero(m.Meta[k]) { // not required`,
  7088  		`            			for kk := range m.Meta[k] {`,
  7089  		//`            				if swag.IsZero(m.Meta[k][kk]) { // not required`,
  7090  		`            				for kkk := range m.Meta[k][kk] {`,
  7091  		`	            				if err := validate.Required("meta"+"."+k+"."+kk+"."+kkk, "body", m.Meta[k][kk][kkk]); err != nil {`,
  7092  		`            					if val, ok := m.Meta[k][kk][kkk]; ok {`,
  7093  		`            						if err := val.Validate(formats); err != nil {`,
  7094  	},
  7095  		// not expected
  7096  		todo,
  7097  		// output in log
  7098  		noLines,
  7099  		noLines)
  7100  
  7101  	expandRun.AddExpectations("nested_map_complex_validations.go", []string{
  7102  		`type NestedMapComplexValidations struct {`,
  7103  		"	Meta map[string]map[string]map[string]NestedMapComplexValidationsMetaAnon `json:\"meta,omitempty\"`",
  7104  		`func (m *NestedMapComplexValidations) Validate(formats strfmt.Registry) error {`,
  7105  		`	if err := m.validateMeta(formats); err != nil {`,
  7106  		`		return errors.CompositeValidationError(res...`,
  7107  		`func (m *NestedMapComplexValidations) validateMeta(formats strfmt.Registry) error {`,
  7108  		`	if swag.IsZero(m.Meta) {`,
  7109  		`	for k := range m.Meta {`,
  7110  		//`		if swag.IsZero(m.Meta[k]) {`,
  7111  		`		for kk := range m.Meta[k] {`,
  7112  		//`			if swag.IsZero(m.Meta[k][kk]) {`,
  7113  		`			for kkk := range m.Meta[k][kk] {`,
  7114  		//`				if swag.IsZero(m.Meta[k][kk][kkk]) {`,
  7115  		`				if val, ok := m.Meta[k][kk][kkk]; ok {`,
  7116  		`					if err := val.Validate(formats); err != nil {`,
  7117  		`type NestedMapComplexValidationsMetaAnon struct {`,
  7118  		"	Age int32 `json:\"age,omitempty\"`",
  7119  		"	Name string `json:\"name,omitempty\"`",
  7120  		`func (m *NestedMapComplexValidationsMetaAnon) Validate(formats strfmt.Registry) error {`,
  7121  		`	if err := m.validateAge(formats); err != nil {`,
  7122  		`	if err := m.validateName(formats); err != nil {`,
  7123  		`		return errors.CompositeValidationError(res...`,
  7124  		`func (m *NestedMapComplexValidationsMetaAnon) validateAge(formats strfmt.Registry) error {`,
  7125  		`	if swag.IsZero(m.Age) {`,
  7126  		`	if err := validate.MinimumInt("age", "body", int64(m.Age), 1, true); err != nil {`,
  7127  		`	if err := validate.MaximumInt("age", "body", int64(m.Age), 200, true); err != nil {`,
  7128  		`	if err := validate.MultipleOf("age", "body", float64(m.Age), 1); err != nil {`,
  7129  		`func (m *NestedMapComplexValidationsMetaAnon) validateName(formats strfmt.Registry) error {`,
  7130  		`	if swag.IsZero(m.Name) {`,
  7131  		`	if err := validate.MinLength("name", "body", string(m.Name), 10); err != nil {`,
  7132  		`	if err := validate.MaxLength("name", "body", string(m.Name), 50); err != nil {`,
  7133  		"	if err := validate.Pattern(\"name\", \"body\", string(m.Name), `\\w+`); err != nil {",
  7134  	},
  7135  		// not expected
  7136  		todo,
  7137  		// output in log
  7138  		noLines,
  7139  		noLines)
  7140  
  7141  	// load expectations for model: category.go
  7142  	flattenRun.AddExpectations("category.go", []string{
  7143  		`type Category struct {`,
  7144  		"	ID int64 `json:\"id,omitempty\"`",
  7145  		"	Name string `json:\"name,omitempty\"`",
  7146  		// empty validation
  7147  		"func (m *Category) Validate(formats strfmt.Registry) error {\n	return nil\n}",
  7148  	},
  7149  		// not expected
  7150  		todo,
  7151  		// output in log
  7152  		noLines,
  7153  		noLines)
  7154  
  7155  	expandRun.AddExpectations("category.go", flattenRun.ExpectedFor("Category").ExpectedLines, todo, noLines, noLines)
  7156  
  7157  	// load expectations for model: named_all_of_all_of2.go
  7158  	flattenRun.AddExpectations("named_all_of_all_of2.go", []string{
  7159  		`type NamedAllOfAllOf2 struct {`,
  7160  		"	Args []string `json:\"args\"`",
  7161  		`func (m *NamedAllOfAllOf2) Validate(formats strfmt.Registry) error {`,
  7162  		`	if err := m.validateArgs(formats); err != nil {`,
  7163  		`		return errors.CompositeValidationError(res...`,
  7164  		`func (m *NamedAllOfAllOf2) validateArgs(formats strfmt.Registry) error {`,
  7165  		`	if swag.IsZero(m.Args) {`,
  7166  		`	iArgsSize := int64(len(m.Args)`,
  7167  		`	if err := validate.MinItems("args", "body", iArgsSize, 5); err != nil {`,
  7168  		`	if err := validate.MaxItems("args", "body", iArgsSize, 20); err != nil {`,
  7169  		`	for i := 0; i < len(m.Args); i++ {`,
  7170  		`		if err := validate.MinLength("args"+"."+strconv.Itoa(i), "body", string(m.Args[i]), 2); err != nil {`,
  7171  		`		if err := validate.MaxLength("args"+"."+strconv.Itoa(i), "body", string(m.Args[i]), 50); err != nil {`,
  7172  		"		if err := validate.Pattern(\"args\"+\".\"+strconv.Itoa(i), \"body\", string(m.Args[i]), `[A-Za-z0-9][\\w- ]+`); err != nil {",
  7173  	},
  7174  		// not expected
  7175  		todo,
  7176  		// output in log
  7177  		noLines,
  7178  		noLines)
  7179  
  7180  	// load expectations for model: named_nested_map_complex_additional_properties_additional_properties.go
  7181  	// NOTE(fredbi): maps are now simple types - this definition is no more generated
  7182  
  7183  	// load expectations for model: named_nested_map_complex_additional_properties.go
  7184  	// NOTE(fredbi): maps are now simple types - this definition is no more generated
  7185  
  7186  	// load expectations for model: named_nested_array.go
  7187  	flattenRun.AddExpectations("named_nested_array.go", []string{
  7188  		`type NamedNestedArray [][][]string`,
  7189  		`func (m NamedNestedArray) Validate(formats strfmt.Registry) error {`,
  7190  		`	iNamedNestedArraySize := int64(len(m)`,
  7191  		`	if err := validate.MinItems("", "body", iNamedNestedArraySize, 3); err != nil {`,
  7192  		`	if err := validate.MaxItems("", "body", iNamedNestedArraySize, 10); err != nil {`,
  7193  		`	for i := 0; i < len(m); i++ {`,
  7194  		`		iiNamedNestedArraySize := int64(len(m[i])`,
  7195  		`		if err := validate.MinItems(strconv.Itoa(i), "body", iiNamedNestedArraySize, 3); err != nil {`,
  7196  		`		if err := validate.MaxItems(strconv.Itoa(i), "body", iiNamedNestedArraySize, 10); err != nil {`,
  7197  		`		for ii := 0; ii < len(m[i]); ii++ {`,
  7198  		`			iiiNamedNestedArraySize := int64(len(m[i][ii])`,
  7199  		`			if err := validate.MinItems(strconv.Itoa(i)+"."+strconv.Itoa(ii), "body", iiiNamedNestedArraySize, 3); err != nil {`,
  7200  		`			if err := validate.MaxItems(strconv.Itoa(i)+"."+strconv.Itoa(ii), "body", iiiNamedNestedArraySize, 10); err != nil {`,
  7201  		`			for iii := 0; iii < len(m[i][ii]); iii++ {`,
  7202  		`				if err := validate.MinLength(strconv.Itoa(i)+"."+strconv.Itoa(ii)+"."+strconv.Itoa(iii), "body", string(m[i][ii][iii]), 3); err != nil {`,
  7203  		`				if err := validate.MaxLength(strconv.Itoa(i)+"."+strconv.Itoa(ii)+"."+strconv.Itoa(iii), "body", string(m[i][ii][iii]), 10); err != nil {`,
  7204  		"				if err := validate.Pattern(strconv.Itoa(i)+\".\"+strconv.Itoa(ii)+\".\"+strconv.Itoa(iii), \"body\", string(m[i][ii][iii]), `\\w+`); err != nil {",
  7205  		`		return errors.CompositeValidationError(res...`,
  7206  	},
  7207  		// not expected
  7208  		todo,
  7209  		// output in log
  7210  		noLines,
  7211  		noLines)
  7212  
  7213  	expandRun.AddExpectations("named_nested_array.go", flattenRun.ExpectedFor("NamedNestedArray").ExpectedLines, todo, noLines, noLines)
  7214  
  7215  	// load expectations for model: named_all_of.go
  7216  	flattenRun.AddExpectations("named_all_of.go", []string{
  7217  		`type NamedAllOf struct {`,
  7218  		`	NamedAllOfAllOf0`,
  7219  		`	NamedAllOfAllOf1`,
  7220  		`	NamedAllOfAllOf2`,
  7221  		`	NamedAllOfAllOf3`,
  7222  		`	NamedAllOfAllOf4`,
  7223  		`	NamedAllOfAllOf5`,
  7224  		`	NamedAllOfAllOf6`,
  7225  		`func (m *NamedAllOf) Validate(formats strfmt.Registry) error {`,
  7226  		`	if err := m.NamedAllOfAllOf0.Validate(formats); err != nil {`,
  7227  		`	if err := m.NamedAllOfAllOf1.Validate(formats); err != nil {`,
  7228  		`	if err := m.NamedAllOfAllOf2.Validate(formats); err != nil {`,
  7229  		`	if err := m.NamedAllOfAllOf3.Validate(formats); err != nil {`,
  7230  		`	if err := m.NamedAllOfAllOf4.Validate(formats); err != nil {`,
  7231  		`	if err := m.NamedAllOfAllOf5.Validate(formats); err != nil {`,
  7232  		`	if err := m.NamedAllOfAllOf6.Validate(formats); err != nil {`,
  7233  		`		return errors.CompositeValidationError(res...`,
  7234  	},
  7235  		// not expected
  7236  		todo,
  7237  		// output in log
  7238  		noLines,
  7239  		noLines)
  7240  
  7241  	expandRun.AddExpectations("named_all_of.go", []string{
  7242  		`type NamedAllOf struct {`,
  7243  		"	Name string `json:\"name,omitempty\"`",
  7244  		"	Age int32 `json:\"age,omitempty\"`",
  7245  		"	Args []string `json:\"args\"`",
  7246  		"	Assoc [][][]string `json:\"assoc\"`",
  7247  		"	Opts map[string]float64 `json:\"opts,omitempty\"`",
  7248  		"	ExtOpts map[string]map[string]map[string]int32 `json:\"extOpts,omitempty\"`",
  7249  		`	Coords struct {`,
  7250  		"		Name string `json:\"name,omitempty\"`",
  7251  		"		Age int32 `json:\"age,omitempty\"`",
  7252  		"	} `json:\"coords,omitempty\"`",
  7253  		`func (m *NamedAllOf) Validate(formats strfmt.Registry) error {`,
  7254  		`	if err := m.validateName(formats); err != nil {`,
  7255  		`	if err := m.validateAge(formats); err != nil {`,
  7256  		`	if err := m.validateArgs(formats); err != nil {`,
  7257  		`	if err := m.validateAssoc(formats); err != nil {`,
  7258  		`	if err := m.validateOpts(formats); err != nil {`,
  7259  		`	if err := m.validateExtOpts(formats); err != nil {`,
  7260  		`	if err := m.validateCoords(formats); err != nil {`,
  7261  		`		return errors.CompositeValidationError(res...`,
  7262  		`func (m *NamedAllOf) validateName(formats strfmt.Registry) error {`,
  7263  		`	if swag.IsZero(m.Name) {`,
  7264  		`	if err := validate.MinLength("name", "body", string(m.Name), 2); err != nil {`,
  7265  		`	if err := validate.MaxLength("name", "body", string(m.Name), 50); err != nil {`,
  7266  		"	if err := validate.Pattern(\"name\", \"body\", string(m.Name), `[A-Za-z0-9][\\w- ]+`); err != nil {",
  7267  		`func (m *NamedAllOf) validateAge(formats strfmt.Registry) error {`,
  7268  		`	if swag.IsZero(m.Age) {`,
  7269  		`	if err := validate.MinimumInt("age", "body", int64(m.Age), 2, false); err != nil {`,
  7270  		`	if err := validate.MaximumInt("age", "body", int64(m.Age), 50, false); err != nil {`,
  7271  		`	if err := validate.MultipleOf("age", "body", float64(m.Age), 1.5); err != nil {`,
  7272  		`func (m *NamedAllOf) validateArgs(formats strfmt.Registry) error {`,
  7273  		`	if swag.IsZero(m.Args) {`,
  7274  		`	iArgsSize := int64(len(m.Args)`,
  7275  		`	if err := validate.MinItems("args", "body", iArgsSize, 5); err != nil {`,
  7276  		`	if err := validate.MaxItems("args", "body", iArgsSize, 20); err != nil {`,
  7277  		`	for i := 0; i < len(m.Args); i++ {`,
  7278  		`		if err := validate.MinLength("args"+"."+strconv.Itoa(i), "body", string(m.Args[i]), 2); err != nil {`,
  7279  		`		if err := validate.MaxLength("args"+"."+strconv.Itoa(i), "body", string(m.Args[i]), 50); err != nil {`,
  7280  		"		if err := validate.Pattern(\"args\"+\".\"+strconv.Itoa(i), \"body\", string(m.Args[i]), `[A-Za-z0-9][\\w- ]+`); err != nil {",
  7281  		`func (m *NamedAllOf) validateAssoc(formats strfmt.Registry) error {`,
  7282  		`	if swag.IsZero(m.Assoc) {`,
  7283  		`	iAssocSize := int64(len(m.Assoc)`,
  7284  		`	if err := validate.MinItems("assoc", "body", iAssocSize, 5); err != nil {`,
  7285  		`	if err := validate.MaxItems("assoc", "body", iAssocSize, 20); err != nil {`,
  7286  		`	for i := 0; i < len(m.Assoc); i++ {`,
  7287  		`		iiAssocSize := int64(len(m.Assoc[i])`,
  7288  		`		if err := validate.MinItems("assoc"+"."+strconv.Itoa(i), "body", iiAssocSize, 5); err != nil {`,
  7289  		`		if err := validate.MaxItems("assoc"+"."+strconv.Itoa(i), "body", iiAssocSize, 20); err != nil {`,
  7290  		`		for ii := 0; ii < len(m.Assoc[i]); ii++ {`,
  7291  		`			iiiAssocSize := int64(len(m.Assoc[i][ii])`,
  7292  		`			if err := validate.MinItems("assoc"+"."+strconv.Itoa(i)+"."+strconv.Itoa(ii), "body", iiiAssocSize, 5); err != nil {`,
  7293  		`			if err := validate.MaxItems("assoc"+"."+strconv.Itoa(i)+"."+strconv.Itoa(ii), "body", iiiAssocSize, 20); err != nil {`,
  7294  		`			for iii := 0; iii < len(m.Assoc[i][ii]); iii++ {`,
  7295  		`				if err := validate.MinLength("assoc"+"."+strconv.Itoa(i)+"."+strconv.Itoa(ii)+"."+strconv.Itoa(iii), "body", string(m.Assoc[i][ii][iii]), 2); err != nil {`,
  7296  		`				if err := validate.MaxLength("assoc"+"."+strconv.Itoa(i)+"."+strconv.Itoa(ii)+"."+strconv.Itoa(iii), "body", string(m.Assoc[i][ii][iii]), 50); err != nil {`,
  7297  		"				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 {",
  7298  		`func (m *NamedAllOf) validateOpts(formats strfmt.Registry) error {`,
  7299  		`	if swag.IsZero(m.Opts) {`,
  7300  		`	for k := range m.Opts {`,
  7301  		//`		if swag.IsZero(m.Opts[k]) {`,
  7302  		`		if err := validate.Minimum("opts"+"."+k, "body", float64(m.Opts[k]), 2, false); err != nil {`,
  7303  		`		if err := validate.Maximum("opts"+"."+k, "body", float64(m.Opts[k]), 50, false); err != nil {`,
  7304  		`		if err := validate.MultipleOf("opts"+"."+k, "body", float64(m.Opts[k]), 1.5); err != nil {`,
  7305  		`func (m *NamedAllOf) validateExtOpts(formats strfmt.Registry) error {`,
  7306  		`	if swag.IsZero(m.ExtOpts) {`,
  7307  		`	for k := range m.ExtOpts {`,
  7308  		//`		if swag.IsZero(m.ExtOpts[k]) {`,
  7309  		`		for kk := range m.ExtOpts[k] {`,
  7310  		//`			if swag.IsZero(m.ExtOpts[k][kk]) {`,
  7311  		`			for kkk := range m.ExtOpts[k][kk] {`,
  7312  		//`				if swag.IsZero(m.ExtOpts[k][kk][kkk]) {`,
  7313  		`				if err := validate.MinimumInt("extOpts"+"."+k+"."+kk+"."+kkk, "body", int64(m.ExtOpts[k][kk][kkk]), 2, false); err != nil {`,
  7314  		`				if err := validate.MaximumInt("extOpts"+"."+k+"."+kk+"."+kkk, "body", int64(m.ExtOpts[k][kk][kkk]), 50, false); err != nil {`,
  7315  		`				if err := validate.MultipleOf("extOpts"+"."+k+"."+kk+"."+kkk, "body", float64(m.ExtOpts[k][kk][kkk]), 1.5); err != nil {`,
  7316  		`func (m *NamedAllOf) validateCoords(formats strfmt.Registry) error {`,
  7317  		`	if swag.IsZero(m.Coords) {`,
  7318  		`	if err := validate.MinLength("coords"+"."+"name", "body", string(m.Coords.Name), 2); err != nil {`,
  7319  		`	if err := validate.MaxLength("coords"+"."+"name", "body", string(m.Coords.Name), 50); err != nil {`,
  7320  		"	if err := validate.Pattern(\"coords\"+\".\"+\"name\", \"body\", string(m.Coords.Name), `[A-Za-z0-9][\\w- ]+`); err != nil {",
  7321  		`	if err := validate.MinimumInt("coords"+"."+"age", "body", int64(m.Coords.Age), 2, false); err != nil {`,
  7322  		`	if err := validate.MaximumInt("coords"+"."+"age", "body", int64(m.Coords.Age), 50, false); err != nil {`,
  7323  		`	if err := validate.MultipleOf("coords"+"."+"age", "body", float64(m.Coords.Age), 1.5); err != nil {`,
  7324  	},
  7325  		// not expected
  7326  		todo,
  7327  		// output in log
  7328  		noLines,
  7329  		noLines)
  7330  
  7331  	// load expectations for model: named_map_complex.go
  7332  	flattenRun.AddExpectations("named_map_complex.go", []string{
  7333  		`type NamedMapComplex map[string]NamedMapComplexAdditionalProperties`,
  7334  		`func (m NamedMapComplex) Validate(formats strfmt.Registry) error {`,
  7335  		`	for k := range m {`,
  7336  		`		if err := validate.Required(k, "body", m[k]); err != nil {`,
  7337  		`		if val, ok := m[k]; ok {`,
  7338  		`			if err := val.Validate(formats); err != nil {`,
  7339  		`		return errors.CompositeValidationError(res...`,
  7340  	},
  7341  		// not expected
  7342  		todo,
  7343  		// output in log
  7344  		noLines,
  7345  		noLines)
  7346  
  7347  	expandRun.AddExpectations("named_map_complex.go", []string{
  7348  		`type NamedMapComplex map[string]NamedMapComplexAnon`,
  7349  		`func (m NamedMapComplex) Validate(formats strfmt.Registry) error {`,
  7350  		`	for k := range m {`,
  7351  		//`		if swag.IsZero(m[k]) {`,
  7352  		`		if val, ok := m[k]; ok {`,
  7353  		`			if err := val.Validate(formats); err != nil {`,
  7354  		`		return errors.CompositeValidationError(res...`,
  7355  		`type NamedMapComplexAnon struct {`,
  7356  		"	Age int32 `json:\"age,omitempty\"`",
  7357  		"	Name string `json:\"name,omitempty\"`",
  7358  		`func (m *NamedMapComplexAnon) Validate(formats strfmt.Registry) error {`,
  7359  		`	if err := m.validateAge(formats); err != nil {`,
  7360  		`	if err := m.validateName(formats); err != nil {`,
  7361  		`		return errors.CompositeValidationError(res...`,
  7362  		`func (m *NamedMapComplexAnon) validateAge(formats strfmt.Registry) error {`,
  7363  		`	if swag.IsZero(m.Age) {`,
  7364  		`	if err := validate.MinimumInt("age", "body", int64(m.Age), 1, true); err != nil {`,
  7365  		`	if err := validate.MaximumInt("age", "body", int64(m.Age), 200, true); err != nil {`,
  7366  		`	if err := validate.MultipleOf("age", "body", float64(m.Age), 1); err != nil {`,
  7367  		`func (m *NamedMapComplexAnon) validateName(formats strfmt.Registry) error {`,
  7368  		`	if swag.IsZero(m.Name) {`,
  7369  		`	if err := validate.MinLength("name", "body", string(m.Name), 10); err != nil {`,
  7370  		`	if err := validate.MaxLength("name", "body", string(m.Name), 50); err != nil {`,
  7371  		"	if err := validate.Pattern(\"name\", \"body\", string(m.Name), `\\w+`); err != nil {",
  7372  	},
  7373  		// not expected
  7374  		todo,
  7375  		// output in log
  7376  		noLines,
  7377  		noLines)
  7378  
  7379  	// load expectations for model: nested_map_complex_validations_meta.go
  7380  	// NOTE(fredbi): maps are now simple types - this definition is no more generated
  7381  
  7382  	// load expectations for model: array_additional_validations.go
  7383  	flattenRun.AddExpectations("array_additional_validations.go", []string{
  7384  		`type ArrayAdditionalValidations struct {`,
  7385  		"	Args ArrayAdditionalValidationsArgs `json:\"args,omitempty\"`",
  7386  		`func (m *ArrayAdditionalValidations) Validate(formats strfmt.Registry) error {`,
  7387  		`	if err := m.validateArgs(formats); err != nil {`,
  7388  		`		return errors.CompositeValidationError(res...`,
  7389  		`func (m *ArrayAdditionalValidations) validateArgs(formats strfmt.Registry) error {`,
  7390  		`	if swag.IsZero(m.Args) {`,
  7391  		`	if err := m.Args.Validate(formats); err != nil {`,
  7392  		`		if ve, ok := err.(*errors.Validation); ok {`,
  7393  		`			return ve.ValidateName("args"`,
  7394  	},
  7395  		// not expected
  7396  		todo,
  7397  		// output in log
  7398  		noLines,
  7399  		noLines)
  7400  
  7401  	expandRun.AddExpectations("array_additional_validations.go", []string{
  7402  		`type ArrayAdditionalValidations struct {`,
  7403  		"	Args *ArrayAdditionalValidationsArgsTuple0 `json:\"args,omitempty\"`",
  7404  		`func (m *ArrayAdditionalValidations) Validate(formats strfmt.Registry) error {`,
  7405  		`	if err := m.validateArgs(formats); err != nil {`,
  7406  		`		return errors.CompositeValidationError(res...`,
  7407  		`func (m *ArrayAdditionalValidations) validateArgs(formats strfmt.Registry) error {`,
  7408  		`	if swag.IsZero(m.Args) {`,
  7409  		`	if m.Args != nil {`,
  7410  		`		if err := m.Args.Validate(formats); err != nil {`,
  7411  		`			if ve, ok := err.(*errors.Validation); ok {`,
  7412  		`				return ve.ValidateName("args"`,
  7413  		`type ArrayAdditionalValidationsArgsTuple0 struct {`,
  7414  		"	P0 *string `json:\"-\"`",
  7415  		"	P1 *float64 `json:\"-\"`",
  7416  		"	ArrayAdditionalValidationsArgsTuple0Items []int64 `json:\"-\"`",
  7417  		`func (m *ArrayAdditionalValidationsArgsTuple0) Validate(formats strfmt.Registry) error {`,
  7418  		`	if err := m.validateP0(formats); err != nil {`,
  7419  		`	if err := m.validateP1(formats); err != nil {`,
  7420  		`	if err := m.validateArrayAdditionalValidationsArgsTuple0Items(formats); err != nil {`,
  7421  		`		return errors.CompositeValidationError(res...`,
  7422  		`func (m *ArrayAdditionalValidationsArgsTuple0) validateP0(formats strfmt.Registry) error {`,
  7423  		`	if err := validate.Required("P0", "body", m.P0); err != nil {`,
  7424  		`	if err := validate.MinLength("P0", "body", string(*m.P0), 3); err != nil {`,
  7425  		`	if err := validate.MaxLength("P0", "body", string(*m.P0), 10); err != nil {`,
  7426  		"	if err := validate.Pattern(\"P0\", \"body\", string(*m.P0), `\\w+`); err != nil {",
  7427  		`func (m *ArrayAdditionalValidationsArgsTuple0) validateP1(formats strfmt.Registry) error {`,
  7428  		`	if err := validate.Required("P1", "body", m.P1); err != nil {`,
  7429  		`	if err := validate.Minimum("P1", "body", float64(*m.P1), 3, false); err != nil {`,
  7430  		`	if err := validate.Maximum("P1", "body", float64(*m.P1), 12, false); err != nil {`,
  7431  		`	if err := validate.MultipleOf("P1", "body", float64(*m.P1), 1.5); err != nil {`,
  7432  		`func (m *ArrayAdditionalValidationsArgsTuple0) validateArrayAdditionalValidationsArgsTuple0Items(formats strfmt.Registry) error {`,
  7433  		`	for i := range m.ArrayAdditionalValidationsArgsTuple0Items {`,
  7434  		`		if err := validate.MinimumInt(strconv.Itoa(i), "body", int64(m.ArrayAdditionalValidationsArgsTuple0Items[i]), 3, false); err != nil {`,
  7435  		`		if err := validate.MaximumInt(strconv.Itoa(i), "body", int64(m.ArrayAdditionalValidationsArgsTuple0Items[i]), 6, false); err != nil {`,
  7436  		`		if err := validate.MultipleOf(strconv.Itoa(i), "body", float64(m.ArrayAdditionalValidationsArgsTuple0Items[i]), 1); err != nil {`,
  7437  	},
  7438  		// not expected
  7439  		todo,
  7440  		// output in log
  7441  		noLines,
  7442  		noLines)
  7443  
  7444  	// load expectations for model: nested_object_validations_args_meta.go
  7445  	flattenRun.AddExpectations("nested_object_validations_args_meta.go", []string{
  7446  		`type NestedObjectValidationsArgsMeta struct {`,
  7447  		"	First string `json:\"first,omitempty\"`",
  7448  		"	Fourth [][][]float32 `json:\"fourth\"`",
  7449  		"	Second float64 `json:\"second,omitempty\"`",
  7450  		"	Third []float32 `json:\"third\"`",
  7451  		`func (m *NestedObjectValidationsArgsMeta) Validate(formats strfmt.Registry) error {`,
  7452  		`	if err := m.validateFirst(formats); err != nil {`,
  7453  		`	if err := m.validateFourth(formats); err != nil {`,
  7454  		`	if err := m.validateSecond(formats); err != nil {`,
  7455  		`	if err := m.validateThird(formats); err != nil {`,
  7456  		`		return errors.CompositeValidationError(res...`,
  7457  		`func (m *NestedObjectValidationsArgsMeta) validateFirst(formats strfmt.Registry) error {`,
  7458  		`	if swag.IsZero(m.First) {`,
  7459  		`	if err := validate.MinLength("first", "body", string(m.First), 2); err != nil {`,
  7460  		`	if err := validate.MaxLength("first", "body", string(m.First), 50); err != nil {`,
  7461  		"	if err := validate.Pattern(\"first\", \"body\", string(m.First), `^\\w+`); err != nil {",
  7462  		`func (m *NestedObjectValidationsArgsMeta) validateFourth(formats strfmt.Registry) error {`,
  7463  		`	if swag.IsZero(m.Fourth) {`,
  7464  		`	iFourthSize := int64(len(m.Fourth)`,
  7465  		`	if err := validate.MinItems("fourth", "body", iFourthSize, 5); err != nil {`,
  7466  		`	if err := validate.MaxItems("fourth", "body", iFourthSize, 93); err != nil {`,
  7467  		`	for i := 0; i < len(m.Fourth); i++ {`,
  7468  		`		iiFourthSize := int64(len(m.Fourth[i])`,
  7469  		`		if err := validate.MinItems("fourth"+"."+strconv.Itoa(i), "body", iiFourthSize, 5); err != nil {`,
  7470  		`		if err := validate.MaxItems("fourth"+"."+strconv.Itoa(i), "body", iiFourthSize, 93); err != nil {`,
  7471  		`		for ii := 0; ii < len(m.Fourth[i]); ii++ {`,
  7472  		`			iiiFourthSize := int64(len(m.Fourth[i][ii])`,
  7473  		`			if err := validate.MinItems("fourth"+"."+strconv.Itoa(i)+"."+strconv.Itoa(ii), "body", iiiFourthSize, 5); err != nil {`,
  7474  		`			if err := validate.MaxItems("fourth"+"."+strconv.Itoa(i)+"."+strconv.Itoa(ii), "body", iiiFourthSize, 93); err != nil {`,
  7475  		`			for iii := 0; iii < len(m.Fourth[i][ii]); iii++ {`,
  7476  		`				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 {`,
  7477  		`				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 {`,
  7478  		`				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 {`,
  7479  		`func (m *NestedObjectValidationsArgsMeta) validateSecond(formats strfmt.Registry) error {`,
  7480  		`	if swag.IsZero(m.Second) {`,
  7481  		`	if err := validate.Minimum("second", "body", float64(m.Second), 3, false); err != nil {`,
  7482  		`	if err := validate.Maximum("second", "body", float64(m.Second), 51, false); err != nil {`,
  7483  		`	if err := validate.MultipleOf("second", "body", float64(m.Second), 1.5); err != nil {`,
  7484  		`func (m *NestedObjectValidationsArgsMeta) validateThird(formats strfmt.Registry) error {`,
  7485  		`	if swag.IsZero(m.Third) {`,
  7486  		`	iThirdSize := int64(len(m.Third)`,
  7487  		`	if err := validate.MinItems("third", "body", iThirdSize, 5); err != nil {`,
  7488  		`	if err := validate.MaxItems("third", "body", iThirdSize, 93); err != nil {`,
  7489  		`	for i := 0; i < len(m.Third); i++ {`,
  7490  		`		if err := validate.Minimum("third"+"."+strconv.Itoa(i), "body", float64(m.Third[i]), 3, false); err != nil {`,
  7491  		`		if err := validate.Maximum("third"+"."+strconv.Itoa(i), "body", float64(m.Third[i]), 6, false); err != nil {`,
  7492  		`		if err := validate.MultipleOf("third"+"."+strconv.Itoa(i), "body", float64(m.Third[i]), 0.5); err != nil {`,
  7493  	},
  7494  		// not expected
  7495  		todo,
  7496  		// output in log
  7497  		noLines,
  7498  		noLines)
  7499  
  7500  	// load expectations for model: map_validations.go
  7501  	flattenRun.AddExpectations("map_validations.go", []string{
  7502  		`type MapValidations struct {`,
  7503  		"	Meta map[string]int64 `json:\"meta,omitempty\"`",
  7504  		`func (m *MapValidations) Validate(formats strfmt.Registry) error {`,
  7505  		`	if err := m.validateMeta(formats); err != nil {`,
  7506  		`		return errors.CompositeValidationError(res...`,
  7507  		`func (m *MapValidations) validateMeta(formats strfmt.Registry) error {`,
  7508  		`	if swag.IsZero(m.Meta) {`,
  7509  		`	for k := range m.Meta {`,
  7510  		//`		if swag.IsZero(m.Meta[k]) {`,
  7511  		`		if err := validate.MinimumInt("meta"+"."+k, "body", int64(m.Meta[k]), 3, false); err != nil {`,
  7512  		`		if err := validate.MaximumInt("meta"+"."+k, "body", int64(m.Meta[k]), 6, false); err != nil {`,
  7513  		`		if err := validate.MultipleOf("meta"+"."+k, "body", float64(m.Meta[k]), 1); err != nil {`,
  7514  	},
  7515  		// not expected
  7516  		todo,
  7517  		// output in log
  7518  		noLines,
  7519  		noLines)
  7520  
  7521  	expandRun.AddExpectations("map_validations.go", flattenRun.ExpectedFor("MapValidations").ExpectedLines, todo, noLines, noLines)
  7522  
  7523  	// load expectations for model: named_all_of_all_of1.go
  7524  	flattenRun.AddExpectations("named_all_of_all_of1.go", []string{
  7525  		`type NamedAllOfAllOf1 struct {`,
  7526  		"	Age int32 `json:\"age,omitempty\"`",
  7527  		`func (m *NamedAllOfAllOf1) Validate(formats strfmt.Registry) error {`,
  7528  		`	if err := m.validateAge(formats); err != nil {`,
  7529  		`		return errors.CompositeValidationError(res...`,
  7530  		`func (m *NamedAllOfAllOf1) validateAge(formats strfmt.Registry) error {`,
  7531  		`	if swag.IsZero(m.Age) {`,
  7532  		`	if err := validate.MinimumInt("age", "body", int64(m.Age), 2, false); err != nil {`,
  7533  		`	if err := validate.MaximumInt("age", "body", int64(m.Age), 50, false); err != nil {`,
  7534  		`	if err := validate.MultipleOf("age", "body", float64(m.Age), 1.5); err != nil {`,
  7535  	},
  7536  		// not expected
  7537  		todo,
  7538  		// output in log
  7539  		noLines,
  7540  		noLines)
  7541  
  7542  	// load expectations for model: all_of_validations_meta_all_of5.go
  7543  	flattenRun.AddExpectations("all_of_validations_meta_all_of5.go", []string{
  7544  		`type AllOfValidationsMetaAllOf5 struct {`,
  7545  		"	ExtOpts map[string]map[string]map[string]int32 `json:\"extOpts,omitempty\"`",
  7546  		`func (m *AllOfValidationsMetaAllOf5) Validate(formats strfmt.Registry) error {`,
  7547  		`	if err := m.validateExtOpts(formats); err != nil {`,
  7548  		`		return errors.CompositeValidationError(res...`,
  7549  		`func (m *AllOfValidationsMetaAllOf5) validateExtOpts(formats strfmt.Registry) error {`,
  7550  		`	if swag.IsZero(m.ExtOpts) {`,
  7551  		`	for k := range m.ExtOpts {`,
  7552  		//`		if swag.IsZero(m.ExtOpts[k]) {`,
  7553  		`		for kk := range m.ExtOpts[k] {`,
  7554  		//`			if swag.IsZero(m.ExtOpts[k][kk]) {`,
  7555  		`			for kkk := range m.ExtOpts[k][kk] {`,
  7556  		//`				if swag.IsZero(m.ExtOpts[k][kk][kkk]) {`,
  7557  		`				if err := validate.MinimumInt("extOpts"+"."+k+"."+kk+"."+kkk, "body", int64(m.ExtOpts[k][kk][kkk]), 2, false); err != nil {`,
  7558  		`				if err := validate.MaximumInt("extOpts"+"."+k+"."+kk+"."+kkk, "body", int64(m.ExtOpts[k][kk][kkk]), 50, false); err != nil {`,
  7559  		`				if err := validate.MultipleOf("extOpts"+"."+k+"."+kk+"."+kkk, "body", float64(m.ExtOpts[k][kk][kkk]), 1.5); err != nil {`,
  7560  	},
  7561  		// not expected
  7562  		todo,
  7563  		// output in log
  7564  		noLines,
  7565  		noLines)
  7566  
  7567  	// load expectations for model: all_of_validations.go
  7568  	flattenRun.AddExpectations("all_of_validations.go", []string{
  7569  		`type AllOfValidations struct {`,
  7570  		"	Meta *AllOfValidationsMeta `json:\"meta,omitempty\"`",
  7571  		`func (m *AllOfValidations) Validate(formats strfmt.Registry) error {`,
  7572  		`	if err := m.validateMeta(formats); err != nil {`,
  7573  		`		return errors.CompositeValidationError(res...`,
  7574  		`func (m *AllOfValidations) validateMeta(formats strfmt.Registry) error {`,
  7575  		`	if swag.IsZero(m.Meta) {`,
  7576  		`	if m.Meta != nil {`,
  7577  		`		if err := m.Meta.Validate(formats); err != nil {`,
  7578  		`			if ve, ok := err.(*errors.Validation); ok {`,
  7579  		`				return ve.ValidateName("meta"`,
  7580  	},
  7581  		// not expected
  7582  		todo,
  7583  		// output in log
  7584  		noLines,
  7585  		noLines)
  7586  
  7587  	expandRun.AddExpectations("all_of_validations.go", []string{
  7588  		`type AllOfValidations struct {`,
  7589  		`	Meta struct {`,
  7590  		"		Name string `json:\"name,omitempty\"`",
  7591  		"		Age int32 `json:\"age,omitempty\"`",
  7592  		"		Args []string `json:\"args\"`",
  7593  		"		Assoc [][][]string `json:\"assoc\"`",
  7594  		"		Opts map[string]int32 `json:\"opts,omitempty\"`",
  7595  		"		ExtOpts map[string]map[string]map[string]int32 `json:\"extOpts,omitempty\"`",
  7596  		`		Coords struct {`,
  7597  		"			Name string `json:\"name,omitempty\"`",
  7598  		"			Age int32 `json:\"age,omitempty\"`",
  7599  		"		} `json:\"coords,omitempty\"`",
  7600  		"	} `json:\"meta,omitempty\"`",
  7601  		`func (m *AllOfValidations) Validate(formats strfmt.Registry) error {`,
  7602  		`	if err := m.validateMeta(formats); err != nil {`,
  7603  		`		return errors.CompositeValidationError(res...`,
  7604  		`func (m *AllOfValidations) validateMeta(formats strfmt.Registry) error {`,
  7605  		`	if swag.IsZero(m.Meta) {`,
  7606  		`	if err := validate.MinLength("meta"+"."+"name", "body", string(m.Meta.Name), 2); err != nil {`,
  7607  		`	if err := validate.MaxLength("meta"+"."+"name", "body", string(m.Meta.Name), 50); err != nil {`,
  7608  		"	if err := validate.Pattern(\"meta\"+\".\"+\"name\", \"body\", string(m.Meta.Name), `[A-Za-z0-9][\\w- ]+`); err != nil {",
  7609  		`	if err := validate.MinimumInt("meta"+"."+"age", "body", int64(m.Meta.Age), 2, false); err != nil {`,
  7610  		`	if err := validate.MaximumInt("meta"+"."+"age", "body", int64(m.Meta.Age), 50, false); err != nil {`,
  7611  		`	if err := validate.MultipleOf("meta"+"."+"age", "body", float64(m.Meta.Age), 1.5); err != nil {`,
  7612  		`	iArgsSize := int64(len(m.Meta.Args)`,
  7613  		`	if err := validate.MinItems("meta"+"."+"args", "body", iArgsSize, 5); err != nil {`,
  7614  		`	if err := validate.MaxItems("meta"+"."+"args", "body", iArgsSize, 20); err != nil {`,
  7615  		`	for i := 0; i < len(m.Meta.Args); i++ {`,
  7616  		`		if err := validate.MinLength("meta"+"."+"args"+"."+strconv.Itoa(i), "body", string(m.Meta.Args[i]), 2); err != nil {`,
  7617  		`		if err := validate.MaxLength("meta"+"."+"args"+"."+strconv.Itoa(i), "body", string(m.Meta.Args[i]), 50); err != nil {`,
  7618  		"		if err := validate.Pattern(\"meta\"+\".\"+\"args\"+\".\"+strconv.Itoa(i), \"body\", string(m.Meta.Args[i]), `[A-Za-z0-9][\\w- ]+`); err != nil {",
  7619  		`	iAssocSize := int64(len(m.Meta.Assoc)`,
  7620  		`	if err := validate.MinItems("meta"+"."+"assoc", "body", iAssocSize, 5); err != nil {`,
  7621  		`	if err := validate.MaxItems("meta"+"."+"assoc", "body", iAssocSize, 20); err != nil {`,
  7622  		`	for i := 0; i < len(m.Meta.Assoc); i++ {`,
  7623  		`		iiAssocSize := int64(len(m.Meta.Assoc[i])`,
  7624  		`		if err := validate.MinItems("meta"+"."+"assoc"+"."+strconv.Itoa(i), "body", iiAssocSize, 5); err != nil {`,
  7625  		`		if err := validate.MaxItems("meta"+"."+"assoc"+"."+strconv.Itoa(i), "body", iiAssocSize, 20); err != nil {`,
  7626  		`		for ii := 0; ii < len(m.Meta.Assoc[i]); ii++ {`,
  7627  		`			iiiAssocSize := int64(len(m.Meta.Assoc[i][ii])`,
  7628  		`			if err := validate.MinItems("meta"+"."+"assoc"+"."+strconv.Itoa(i)+"."+strconv.Itoa(ii), "body", iiiAssocSize, 5); err != nil {`,
  7629  		`			if err := validate.MaxItems("meta"+"."+"assoc"+"."+strconv.Itoa(i)+"."+strconv.Itoa(ii), "body", iiiAssocSize, 20); err != nil {`,
  7630  		`			for iii := 0; iii < len(m.Meta.Assoc[i][ii]); iii++ {`,
  7631  		`				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 {`,
  7632  		`				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 {`,
  7633  		"				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 {",
  7634  		`	for k := range m.Meta.Opts {`,
  7635  		//`		if swag.IsZero(m.Meta.Opts[k]) {`,
  7636  		`		if err := validate.MinimumInt("meta"+"."+"opts"+"."+k, "body", int64(m.Meta.Opts[k]), 2, false); err != nil {`,
  7637  		`		if err := validate.MaximumInt("meta"+"."+"opts"+"."+k, "body", int64(m.Meta.Opts[k]), 50, false); err != nil {`,
  7638  		`		if err := validate.MultipleOf("meta"+"."+"opts"+"."+k, "body", float64(m.Meta.Opts[k]), 1.5); err != nil {`,
  7639  		`	for k := range m.Meta.ExtOpts {`,
  7640  		//`		if swag.IsZero(m.Meta.ExtOpts[k]) {`,
  7641  		`		for kk := range m.Meta.ExtOpts[k] {`,
  7642  		//`			if swag.IsZero(m.Meta.ExtOpts[k][kk]) {`,
  7643  		`			for kkk := range m.Meta.ExtOpts[k][kk] {`,
  7644  		//`				if swag.IsZero(m.Meta.ExtOpts[k][kk][kkk]) {`,
  7645  		`				if err := validate.MinimumInt("meta"+"."+"extOpts"+"."+k+"."+kk+"."+kkk, "body", int64(m.Meta.ExtOpts[k][kk][kkk]), 2, false); err != nil {`,
  7646  		`				if err := validate.MaximumInt("meta"+"."+"extOpts"+"."+k+"."+kk+"."+kkk, "body", int64(m.Meta.ExtOpts[k][kk][kkk]), 50, false); err != nil {`,
  7647  		`				if err := validate.MultipleOf("meta"+"."+"extOpts"+"."+k+"."+kk+"."+kkk, "body", float64(m.Meta.ExtOpts[k][kk][kkk]), 1.5); err != nil {`,
  7648  		`	if err := validate.MinLength("meta"+"."+"coords"+"."+"name", "body", string(m.Meta.Coords.Name), 2); err != nil {`,
  7649  		`	if err := validate.MaxLength("meta"+"."+"coords"+"."+"name", "body", string(m.Meta.Coords.Name), 50); err != nil {`,
  7650  		"	if err := validate.Pattern(\"meta\"+\".\"+\"coords\"+\".\"+\"name\", \"body\", string(m.Meta.Coords.Name), `[A-Za-z0-9][\\w- ]+`); err != nil {",
  7651  		`	if err := validate.MinimumInt("meta"+"."+"coords"+"."+"age", "body", int64(m.Meta.Coords.Age), 2, false); err != nil {`,
  7652  		`	if err := validate.MaximumInt("meta"+"."+"coords"+"."+"age", "body", int64(m.Meta.Coords.Age), 50, false); err != nil {`,
  7653  		`	if err := validate.MultipleOf("meta"+"."+"coords"+"."+"age", "body", float64(m.Meta.Coords.Age), 1.5); err != nil {`,
  7654  	},
  7655  		// not expected
  7656  		todo,
  7657  		// output in log
  7658  		noLines,
  7659  		noLines)
  7660  
  7661  	// load expectations for model: named_nested_object_meta.go
  7662  	flattenRun.AddExpectations("named_nested_object_meta.go", []string{
  7663  		`type NamedNestedObjectMeta struct {`,
  7664  		"	First string `json:\"first,omitempty\"`",
  7665  		"	Fourth [][][]float32 `json:\"fourth\"`",
  7666  		"	Second float64 `json:\"second,omitempty\"`",
  7667  		"	Third []float32 `json:\"third\"`",
  7668  		`func (m *NamedNestedObjectMeta) Validate(formats strfmt.Registry) error {`,
  7669  		`	if err := m.validateFirst(formats); err != nil {`,
  7670  		`	if err := m.validateFourth(formats); err != nil {`,
  7671  		`	if err := m.validateSecond(formats); err != nil {`,
  7672  		`	if err := m.validateThird(formats); err != nil {`,
  7673  		`		return errors.CompositeValidationError(res...`,
  7674  		`func (m *NamedNestedObjectMeta) validateFirst(formats strfmt.Registry) error {`,
  7675  		`	if swag.IsZero(m.First) {`,
  7676  		`	if err := validate.MinLength("first", "body", string(m.First), 2); err != nil {`,
  7677  		`	if err := validate.MaxLength("first", "body", string(m.First), 50); err != nil {`,
  7678  		"	if err := validate.Pattern(\"first\", \"body\", string(m.First), `^\\w+`); err != nil {",
  7679  		`func (m *NamedNestedObjectMeta) validateFourth(formats strfmt.Registry) error {`,
  7680  		`	if swag.IsZero(m.Fourth) {`,
  7681  		`	iFourthSize := int64(len(m.Fourth)`,
  7682  		`	if err := validate.MinItems("fourth", "body", iFourthSize, 5); err != nil {`,
  7683  		`	if err := validate.MaxItems("fourth", "body", iFourthSize, 93); err != nil {`,
  7684  		`	for i := 0; i < len(m.Fourth); i++ {`,
  7685  		`		iiFourthSize := int64(len(m.Fourth[i])`,
  7686  		`		if err := validate.MinItems("fourth"+"."+strconv.Itoa(i), "body", iiFourthSize, 5); err != nil {`,
  7687  		`		if err := validate.MaxItems("fourth"+"."+strconv.Itoa(i), "body", iiFourthSize, 93); err != nil {`,
  7688  		`		for ii := 0; ii < len(m.Fourth[i]); ii++ {`,
  7689  		`			iiiFourthSize := int64(len(m.Fourth[i][ii])`,
  7690  		`			if err := validate.MinItems("fourth"+"."+strconv.Itoa(i)+"."+strconv.Itoa(ii), "body", iiiFourthSize, 5); err != nil {`,
  7691  		`			if err := validate.MaxItems("fourth"+"."+strconv.Itoa(i)+"."+strconv.Itoa(ii), "body", iiiFourthSize, 93); err != nil {`,
  7692  		`			for iii := 0; iii < len(m.Fourth[i][ii]); iii++ {`,
  7693  		`				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 {`,
  7694  		`				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 {`,
  7695  		`				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 {`,
  7696  		`func (m *NamedNestedObjectMeta) validateSecond(formats strfmt.Registry) error {`,
  7697  		`	if swag.IsZero(m.Second) {`,
  7698  		`	if err := validate.Minimum("second", "body", float64(m.Second), 3, false); err != nil {`,
  7699  		`	if err := validate.Maximum("second", "body", float64(m.Second), 51, false); err != nil {`,
  7700  		`	if err := validate.MultipleOf("second", "body", float64(m.Second), 1.5); err != nil {`,
  7701  		`func (m *NamedNestedObjectMeta) validateThird(formats strfmt.Registry) error {`,
  7702  		`	if swag.IsZero(m.Third) {`,
  7703  		`	iThirdSize := int64(len(m.Third)`,
  7704  		`	if err := validate.MinItems("third", "body", iThirdSize, 5); err != nil {`,
  7705  		`	if err := validate.MaxItems("third", "body", iThirdSize, 93); err != nil {`,
  7706  		`	for i := 0; i < len(m.Third); i++ {`,
  7707  		`		if err := validate.Minimum("third"+"."+strconv.Itoa(i), "body", float64(m.Third[i]), 3, false); err != nil {`,
  7708  		`		if err := validate.Maximum("third"+"."+strconv.Itoa(i), "body", float64(m.Third[i]), 6, false); err != nil {`,
  7709  		`		if err := validate.MultipleOf("third"+"."+strconv.Itoa(i), "body", float64(m.Third[i]), 0.5); err != nil {`,
  7710  	},
  7711  		// not expected
  7712  		todo,
  7713  		// output in log
  7714  		noLines,
  7715  		noLines)
  7716  
  7717  	// load expectations for model: named_nested_object.go
  7718  	flattenRun.AddExpectations("named_nested_object.go", []string{
  7719  		`type NamedNestedObject struct {`,
  7720  		"	Meta *NamedNestedObjectMeta `json:\"meta,omitempty\"`",
  7721  		`func (m *NamedNestedObject) Validate(formats strfmt.Registry) error {`,
  7722  		`	if err := m.validateMeta(formats); err != nil {`,
  7723  		`		return errors.CompositeValidationError(res...`,
  7724  		`func (m *NamedNestedObject) validateMeta(formats strfmt.Registry) error {`,
  7725  		`	if swag.IsZero(m.Meta) {`,
  7726  		`	if m.Meta != nil {`,
  7727  		`		if err := m.Meta.Validate(formats); err != nil {`,
  7728  		`			if ve, ok := err.(*errors.Validation); ok {`,
  7729  		`				return ve.ValidateName("meta"`,
  7730  	},
  7731  		// not expected
  7732  		todo,
  7733  		// output in log
  7734  		noLines,
  7735  		noLines)
  7736  
  7737  	expandRun.AddExpectations("named_nested_object.go", []string{
  7738  		`type NamedNestedObject struct {`,
  7739  		"	Meta *NamedNestedObjectMeta `json:\"meta,omitempty\"`",
  7740  		`func (m *NamedNestedObject) Validate(formats strfmt.Registry) error {`,
  7741  		`	if err := m.validateMeta(formats); err != nil {`,
  7742  		`		return errors.CompositeValidationError(res...`,
  7743  		`func (m *NamedNestedObject) validateMeta(formats strfmt.Registry) error {`,
  7744  		`	if swag.IsZero(m.Meta) {`,
  7745  		`	if m.Meta != nil {`,
  7746  		`		if err := m.Meta.Validate(formats); err != nil {`,
  7747  		`			if ve, ok := err.(*errors.Validation); ok {`,
  7748  		`				return ve.ValidateName("meta"`,
  7749  		`type NamedNestedObjectMeta struct {`,
  7750  		"	First string `json:\"first,omitempty\"`",
  7751  		"	Fourth [][][]float32 `json:\"fourth\"`",
  7752  		"	Second float64 `json:\"second,omitempty\"`",
  7753  		"	Third []float32 `json:\"third\"`",
  7754  		`func (m *NamedNestedObjectMeta) Validate(formats strfmt.Registry) error {`,
  7755  		`	if err := m.validateFirst(formats); err != nil {`,
  7756  		`	if err := m.validateFourth(formats); err != nil {`,
  7757  		`	if err := m.validateSecond(formats); err != nil {`,
  7758  		`	if err := m.validateThird(formats); err != nil {`,
  7759  		`		return errors.CompositeValidationError(res...`,
  7760  		`func (m *NamedNestedObjectMeta) validateFirst(formats strfmt.Registry) error {`,
  7761  		`	if swag.IsZero(m.First) {`,
  7762  		`	if err := validate.MinLength("meta"+"."+"first", "body", string(m.First), 2); err != nil {`,
  7763  		`	if err := validate.MaxLength("meta"+"."+"first", "body", string(m.First), 50); err != nil {`,
  7764  		"	if err := validate.Pattern(\"meta\"+\".\"+\"first\", \"body\", string(m.First), `^\\w+`); err != nil {",
  7765  		`func (m *NamedNestedObjectMeta) validateFourth(formats strfmt.Registry) error {`,
  7766  		`	if swag.IsZero(m.Fourth) {`,
  7767  		`	iFourthSize := int64(len(m.Fourth)`,
  7768  		`	if err := validate.MinItems("meta"+"."+"fourth", "body", iFourthSize, 5); err != nil {`,
  7769  		`	if err := validate.MaxItems("meta"+"."+"fourth", "body", iFourthSize, 93); err != nil {`,
  7770  		`	for i := 0; i < len(m.Fourth); i++ {`,
  7771  		`		iiFourthSize := int64(len(m.Fourth[i])`,
  7772  		`		if err := validate.MinItems("meta"+"."+"fourth"+"."+strconv.Itoa(i), "body", iiFourthSize, 5); err != nil {`,
  7773  		`		if err := validate.MaxItems("meta"+"."+"fourth"+"."+strconv.Itoa(i), "body", iiFourthSize, 93); err != nil {`,
  7774  		`		for ii := 0; ii < len(m.Fourth[i]); ii++ {`,
  7775  		`			iiiFourthSize := int64(len(m.Fourth[i][ii])`,
  7776  		`			if err := validate.MinItems("meta"+"."+"fourth"+"."+strconv.Itoa(i)+"."+strconv.Itoa(ii), "body", iiiFourthSize, 5); err != nil {`,
  7777  		`			if err := validate.MaxItems("meta"+"."+"fourth"+"."+strconv.Itoa(i)+"."+strconv.Itoa(ii), "body", iiiFourthSize, 93); err != nil {`,
  7778  		`			for iii := 0; iii < len(m.Fourth[i][ii]); iii++ {`,
  7779  		`				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 {`,
  7780  		`				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 {`,
  7781  		`				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 {`,
  7782  		`func (m *NamedNestedObjectMeta) validateSecond(formats strfmt.Registry) error {`,
  7783  		`	if swag.IsZero(m.Second) {`,
  7784  		`	if err := validate.Minimum("meta"+"."+"second", "body", float64(m.Second), 3, false); err != nil {`,
  7785  		`	if err := validate.Maximum("meta"+"."+"second", "body", float64(m.Second), 51, false); err != nil {`,
  7786  		`	if err := validate.MultipleOf("meta"+"."+"second", "body", float64(m.Second), 1.5); err != nil {`,
  7787  		`func (m *NamedNestedObjectMeta) validateThird(formats strfmt.Registry) error {`,
  7788  		`	if swag.IsZero(m.Third) {`,
  7789  		`	iThirdSize := int64(len(m.Third)`,
  7790  		`	if err := validate.MinItems("meta"+"."+"third", "body", iThirdSize, 5); err != nil {`,
  7791  		`	if err := validate.MaxItems("meta"+"."+"third", "body", iThirdSize, 93); err != nil {`,
  7792  		`	for i := 0; i < len(m.Third); i++ {`,
  7793  		`		if err := validate.Minimum("meta"+"."+"third"+"."+strconv.Itoa(i), "body", float64(m.Third[i]), 3, false); err != nil {`,
  7794  		`		if err := validate.Maximum("meta"+"."+"third"+"."+strconv.Itoa(i), "body", float64(m.Third[i]), 6, false); err != nil {`,
  7795  		`		if err := validate.MultipleOf("meta"+"."+"third"+"."+strconv.Itoa(i), "body", float64(m.Third[i]), 0.5); err != nil {`,
  7796  	},
  7797  		// not expected
  7798  		todo,
  7799  		// output in log
  7800  		noLines,
  7801  		noLines)
  7802  
  7803  	// load expectations for model: all_of_validations_meta_all_of6_coords_all_of0.go
  7804  	flattenRun.AddExpectations("all_of_validations_meta_all_of6_coords_all_of0.go", []string{
  7805  		`type AllOfValidationsMetaAllOf6CoordsAllOf0 struct {`,
  7806  		"	Name string `json:\"name,omitempty\"`",
  7807  		`func (m *AllOfValidationsMetaAllOf6CoordsAllOf0) Validate(formats strfmt.Registry) error {`,
  7808  		`	if err := m.validateName(formats); err != nil {`,
  7809  		`		return errors.CompositeValidationError(res...`,
  7810  		`func (m *AllOfValidationsMetaAllOf6CoordsAllOf0) validateName(formats strfmt.Registry) error {`,
  7811  		`	if swag.IsZero(m.Name) {`,
  7812  		`	if err := validate.MinLength("name", "body", string(m.Name), 2); err != nil {`,
  7813  		`	if err := validate.MaxLength("name", "body", string(m.Name), 50); err != nil {`,
  7814  		"	if err := validate.Pattern(\"name\", \"body\", string(m.Name), `[A-Za-z0-9][\\w- ]+`); err != nil {",
  7815  	},
  7816  		// not expected
  7817  		todo,
  7818  		// output in log
  7819  		noLines,
  7820  		noLines)
  7821  
  7822  	// load expectations for model: named_nested_map.go
  7823  	flattenRun.AddExpectations("named_nested_map.go", []string{
  7824  		`type NamedNestedMap map[string]map[string]map[string]int64`,
  7825  		`func (m NamedNestedMap) Validate(formats strfmt.Registry) error {`,
  7826  		`	for k := range m {`,
  7827  		//`		if swag.IsZero(m[k]) {`,
  7828  		`		for kk := range m[k] {`,
  7829  		//`			if swag.IsZero(m[k][kk]) {`,
  7830  		`			for kkk := range m[k][kk] {`,
  7831  		//`				if swag.IsZero(m[k][kk][kkk]) {`,
  7832  		`				if err := validate.MinimumInt(k+"."+kk+"."+kkk, "body", int64(m[k][kk][kkk]), 3, false); err != nil {`,
  7833  		`				if err := validate.MaximumInt(k+"."+kk+"."+kkk, "body", int64(m[k][kk][kkk]), 6, false); err != nil {`,
  7834  		`				if err := validate.MultipleOf(k+"."+kk+"."+kkk, "body", float64(m[k][kk][kkk]), 1); err != nil {`,
  7835  		`		return errors.CompositeValidationError(res...`,
  7836  	},
  7837  		// not expected
  7838  		todo,
  7839  		// output in log
  7840  		noLines,
  7841  		noLines)
  7842  
  7843  	expandRun.AddExpectations("named_nested_map.go", flattenRun.ExpectedFor("NamedNestedMap").ExpectedLines, todo, noLines, noLines)
  7844  }
  7845  
  7846  func initFixtureNestedMaps() {
  7847  	// testing fixture-nested-maps.yaml with flatten and expand (--skip-flatten)
  7848  
  7849  	/*
  7850  	   Test specifically focused on nested maps (e.g.nested additionalProperties)
  7851  
  7852  	*/
  7853  
  7854  	f := newModelFixture("../fixtures/bugs/1487/fixture-nested-maps.yaml", "Nested maps")
  7855  	flattenRun := f.AddRun(false)
  7856  	expandRun := f.AddRun(true)
  7857  
  7858  	// load expectations for model: alias_interface.go
  7859  	flattenRun.AddExpectations("alias_interface.go", []string{
  7860  		`type AliasInterface interface{`,
  7861  	},
  7862  		// not expected
  7863  		validatable,
  7864  		// output in log
  7865  		noLines,
  7866  		noLines)
  7867  
  7868  	expandRun.AddExpectations("alias_interface.go", flattenRun.ExpectedFor("AliasInterface").ExpectedLines, validatable, noLines, noLines)
  7869  
  7870  	// load expectations for model: test_nested_aliased_interface.go
  7871  	flattenRun.AddExpectations("test_nested_aliased_interface.go", []string{
  7872  		`type TestNestedAliasedInterface struct {`,
  7873  		"	Meta map[string]map[string]map[string]AliasInterface `json:\"meta,omitempty\"`",
  7874  		// empty validation
  7875  		"func (m *TestNestedAliasedInterface) Validate(formats strfmt.Registry) error {\n	return nil\n}",
  7876  	},
  7877  		// not expected
  7878  		todo,
  7879  		// output in log
  7880  		noLines,
  7881  		noLines)
  7882  
  7883  	expandRun.AddExpectations("test_nested_aliased_interface.go", []string{
  7884  		`type TestNestedAliasedInterface struct {`,
  7885  		"	Meta map[string]map[string]map[string]interface{} `json:\"meta,omitempty\"`",
  7886  		// empty validation
  7887  		"func (m *TestNestedAliasedInterface) Validate(formats strfmt.Registry) error {\n	return nil\n}",
  7888  	},
  7889  		// not expected
  7890  		todo,
  7891  		// output in log
  7892  		noLines,
  7893  		noLines)
  7894  
  7895  	// load expectations for model: nested_map_validations.go
  7896  	flattenRun.AddExpectations("nested_map_validations.go", []string{
  7897  		`type NestedMapValidations struct {`,
  7898  		"	Meta map[string]map[string]map[string]int64 `json:\"meta,omitempty\"`",
  7899  		`func (m *NestedMapValidations) Validate(formats strfmt.Registry) error {`,
  7900  		`	if err := m.validateMeta(formats); err != nil {`,
  7901  		`		return errors.CompositeValidationError(res...`,
  7902  		`func (m *NestedMapValidations) validateMeta(formats strfmt.Registry) error {`,
  7903  		`	if swag.IsZero(m.Meta) {`,
  7904  		`	for k := range m.Meta {`,
  7905  		//`		if swag.IsZero(m.Meta[k]) {`,
  7906  		`		for kk := range m.Meta[k] {`,
  7907  		//`			if swag.IsZero(m.Meta[k][kk]) {`,
  7908  		`			for kkk := range m.Meta[k][kk] {`,
  7909  		//`				if swag.IsZero(m.Meta[k][kk][kkk]) {`,
  7910  		`				if err := validate.MinimumInt("meta"+"."+k+"."+kk+"."+kkk, "body", int64(m.Meta[k][kk][kkk]), 3, false); err != nil {`,
  7911  		`				if err := validate.MaximumInt("meta"+"."+k+"."+kk+"."+kkk, "body", int64(m.Meta[k][kk][kkk]), 6, false); err != nil {`,
  7912  		`				if err := validate.MultipleOf("meta"+"."+k+"."+kk+"."+kkk, "body", float64(m.Meta[k][kk][kkk]), 1); err != nil {`,
  7913  	},
  7914  		// not expected
  7915  		todo,
  7916  		// output in log
  7917  		noLines,
  7918  		noLines)
  7919  
  7920  	expandRun.AddExpectations("nested_map_validations.go", flattenRun.ExpectedFor("NestedMapValidations").ExpectedLines, todo, noLines, noLines)
  7921  
  7922  	// load expectations for model: named_nested_map_complex.go
  7923  	flattenRun.AddExpectations("named_nested_map_complex.go", []string{
  7924  		//`type NamedNestedMapComplex map[string]NamedNestedMapComplexAdditionalProperties`,
  7925  		`type NamedNestedMapComplex map[string]map[string]map[string]NamedNestedMapComplexAdditionalPropertiesAdditionalPropertiesAdditionalProperties`,
  7926  		`func (m NamedNestedMapComplex) Validate(formats strfmt.Registry) error {`,
  7927  		`	for k := range m {`,
  7928  		//`		if swag.IsZero(m[k]) {`,
  7929  		`		for kk := range m[k] {`,
  7930  		//`			if swag.IsZero(m[k][kk]) {`,
  7931  		`			for kkk := range m[k][kk] {`,
  7932  		`				if err := validate.Required(k+"."+kk+"."+kkk, "body", m[k][kk][kkk]); err != nil {`,
  7933  		`				if val, ok := m[k][kk][kkk]; ok {`,
  7934  		`					if err := val.Validate(formats); err != nil {`,
  7935  		`		return errors.CompositeValidationError(res...`,
  7936  	},
  7937  		// not expected
  7938  		todo,
  7939  		// output in log
  7940  		noLines,
  7941  		noLines)
  7942  
  7943  	expandRun.AddExpectations("named_nested_map_complex.go", []string{
  7944  		`type NamedNestedMapComplex map[string]map[string]map[string]NamedNestedMapComplexAnon`,
  7945  		`func (m NamedNestedMapComplex) Validate(formats strfmt.Registry) error {`,
  7946  		`	for k := range m {`,
  7947  		//`		if swag.IsZero(m[k]) {`,
  7948  		`		for kk := range m[k] {`,
  7949  		//`			if swag.IsZero(m[k][kk]) {`,
  7950  		`			for kkk := range m[k][kk] {`,
  7951  		//`				if swag.IsZero(m[k][kk][kkk]) {`,
  7952  		`				if val, ok := m[k][kk][kkk]; ok {`,
  7953  		`					if err := val.Validate(formats); err != nil {`,
  7954  		`		return errors.CompositeValidationError(res...`,
  7955  		`type NamedNestedMapComplexAnon struct {`,
  7956  		"	Age int32 `json:\"age,omitempty\"`",
  7957  		"	Name string `json:\"name,omitempty\"`",
  7958  		`func (m *NamedNestedMapComplexAnon) Validate(formats strfmt.Registry) error {`,
  7959  		`	if err := m.validateAge(formats); err != nil {`,
  7960  		`	if err := m.validateName(formats); err != nil {`,
  7961  		`		return errors.CompositeValidationError(res...`,
  7962  		`func (m *NamedNestedMapComplexAnon) validateAge(formats strfmt.Registry) error {`,
  7963  		`	if swag.IsZero(m.Age) {`,
  7964  		`	if err := validate.MinimumInt("age", "body", int64(m.Age), 1, true); err != nil {`,
  7965  		`	if err := validate.MaximumInt("age", "body", int64(m.Age), 200, true); err != nil {`,
  7966  		`	if err := validate.MultipleOf("age", "body", float64(m.Age), 1); err != nil {`,
  7967  		`func (m *NamedNestedMapComplexAnon) validateName(formats strfmt.Registry) error {`,
  7968  		`	if swag.IsZero(m.Name) {`,
  7969  		`	if err := validate.MinLength("name", "body", string(m.Name), 10); err != nil {`,
  7970  		`	if err := validate.MaxLength("name", "body", string(m.Name), 50); err != nil {`,
  7971  		"	if err := validate.Pattern(\"name\", \"body\", string(m.Name), `\\w+`); err != nil {",
  7972  	},
  7973  		// not expected
  7974  		todo,
  7975  		// output in log
  7976  		noLines,
  7977  		noLines)
  7978  
  7979  	// load expectations for model: nested_map_complex_validations_meta_additional_properties_additional_properties.go
  7980  	// NOTE(fredbi): maps are now simple types - this definition is no more generated
  7981  
  7982  	// load expectations for model: nested_map_no_validations_additional_properties_additional_properties.go
  7983  	// NOTE(fredbi): maps are now simple types - this definition is no more generated
  7984  
  7985  	// load expectations for model: test_nested_interface.go
  7986  	flattenRun.AddExpectations("test_nested_interface.go", []string{
  7987  		`type TestNestedInterface struct {`,
  7988  		"	Meta map[string]map[string]map[string]interface{} `json:\"meta,omitempty\"`",
  7989  		// empty validation
  7990  		"func (m *TestNestedInterface) Validate(formats strfmt.Registry) error {\n	return nil\n}",
  7991  	},
  7992  		// not expected
  7993  		todo,
  7994  		// output in log
  7995  		noLines,
  7996  		noLines)
  7997  
  7998  	expandRun.AddExpectations("test_nested_interface.go", flattenRun.ExpectedFor("TestNestedInterface").ExpectedLines, todo, noLines, noLines)
  7999  
  8000  	// load expectations for model: named_nested_map_complex_additional_properties_additional_properties_additional_properties.go
  8001  	flattenRun.AddExpectations("named_nested_map_complex_additional_properties_additional_properties_additional_properties.go", []string{
  8002  		`type NamedNestedMapComplexAdditionalPropertiesAdditionalPropertiesAdditionalProperties struct {`,
  8003  		"	Age int32 `json:\"age,omitempty\"`",
  8004  		"	Name string `json:\"name,omitempty\"`",
  8005  		`func (m *NamedNestedMapComplexAdditionalPropertiesAdditionalPropertiesAdditionalProperties) Validate(formats strfmt.Registry) error {`,
  8006  		`	if err := m.validateAge(formats); err != nil {`,
  8007  		`	if err := m.validateName(formats); err != nil {`,
  8008  		`		return errors.CompositeValidationError(res...`,
  8009  		`func (m *NamedNestedMapComplexAdditionalPropertiesAdditionalPropertiesAdditionalProperties) validateAge(formats strfmt.Registry) error {`,
  8010  		`	if swag.IsZero(m.Age) {`,
  8011  		`	if err := validate.MinimumInt("age", "body", int64(m.Age), 1, true); err != nil {`,
  8012  		`	if err := validate.MaximumInt("age", "body", int64(m.Age), 200, true); err != nil {`,
  8013  		`	if err := validate.MultipleOf("age", "body", float64(m.Age), 1); err != nil {`,
  8014  		`func (m *NamedNestedMapComplexAdditionalPropertiesAdditionalPropertiesAdditionalProperties) validateName(formats strfmt.Registry) error {`,
  8015  		`	if swag.IsZero(m.Name) {`,
  8016  		`	if err := validate.MinLength("name", "body", string(m.Name), 10); err != nil {`,
  8017  		`	if err := validate.MaxLength("name", "body", string(m.Name), 50); err != nil {`,
  8018  		"	if err := validate.Pattern(\"name\", \"body\", string(m.Name), `\\w+`); err != nil {",
  8019  	},
  8020  		// not expected
  8021  		todo,
  8022  		// output in log
  8023  		noLines,
  8024  		noLines)
  8025  
  8026  	// load expectations for model: nested_map_no_validations_additional_properties.go
  8027  	// NOTE(fredbi): maps are simple types and this definition is no more generated
  8028  
  8029  	expandRun.AddExpectations("nested_map_no_validations.go", []string{
  8030  		`type NestedMapNoValidations map[string]map[string]map[string]NestedMapNoValidationsAnon`,
  8031  		`func (m NestedMapNoValidations) Validate(formats strfmt.Registry) error {`,
  8032  		`	for k := range m {`,
  8033  		//`		if swag.IsZero(m[k]) {`,
  8034  		`		for kk := range m[k] {`,
  8035  		//`			if swag.IsZero(m[k][kk]) {`,
  8036  		`			for kkk := range m[k][kk] {`,
  8037  		//`				if swag.IsZero(m[k][kk][kkk]) {`,
  8038  		`				if val, ok := m[k][kk][kkk]; ok {`,
  8039  		`					if err := val.Validate(formats); err != nil {`,
  8040  		`		return errors.CompositeValidationError(res...`,
  8041  		`type NestedMapNoValidationsAnon struct {`,
  8042  		"	Age int64 `json:\"age,omitempty\"`",
  8043  		"	Name string `json:\"name,omitempty\"`",
  8044  		// empty validation
  8045  		"func (m *NestedMapNoValidationsAnon) Validate(formats strfmt.Registry) error {\n	return nil\n}",
  8046  	},
  8047  		// not expected
  8048  		todo,
  8049  		// output in log
  8050  		noLines,
  8051  		noLines)
  8052  
  8053  	// load expectations for model: nested_map_complex_validations_meta_additional_properties.go
  8054  	// NOTE(fredbi): maps are simple types and this definition is no more generated
  8055  
  8056  	// load expectations for model: nested_map_no_validations_additional_properties_additional_properties_additional_properties.go
  8057  	// NOTE: maps are now simple types - this definition is no more generated
  8058  
  8059  	// load expectations for model: nested_map_no_validations.go
  8060  	flattenRun.AddExpectations("nested_map_no_validations.go", []string{
  8061  		//`type NestedMapNoValidations map[string]NestedMapNoValidationsAdditionalProperties`,
  8062  		`type NestedMapNoValidations map[string]map[string]map[string]NestedMapNoValidationsAdditionalPropertiesAdditionalPropertiesAdditionalProperties`,
  8063  		`func (m NestedMapNoValidations) Validate(formats strfmt.Registry) error {`,
  8064  		`	for k := range m {`,
  8065  		//`		if swag.IsZero(m[k]) {`,
  8066  		`       	for kk := range m[k] {`,
  8067  		//`        		if swag.IsZero(m[k][kk]) { // not required`,
  8068  		`            		for kkk := range m[k][kk] {`,
  8069  		`            			if val, ok := m[k][kk][kkk]; ok {`,
  8070  		`            			if err := validate.Required(k+"."+kk+"."+kkk, "body", m[k][kk][kkk]); err != nil {`,
  8071  		`            				if err := val.Validate(formats); err != nil {`,
  8072  		`		return errors.CompositeValidationError(res...`,
  8073  	},
  8074  		// not expected
  8075  		todo,
  8076  		// output in log
  8077  		noLines,
  8078  		noLines)
  8079  
  8080  	// load expectations for model: nested_map_complex_validations_meta_additional_properties_additional_properties_additional_properties.go
  8081  	flattenRun.AddExpectations("nested_map_complex_validations_meta_additional_properties_additional_properties_additional_properties.go", []string{
  8082  		`type NestedMapComplexValidationsMetaAdditionalPropertiesAdditionalPropertiesAdditionalProperties struct {`,
  8083  		"	Age int32 `json:\"age,omitempty\"`",
  8084  		"	Name string `json:\"name,omitempty\"`",
  8085  		`func (m *NestedMapComplexValidationsMetaAdditionalPropertiesAdditionalPropertiesAdditionalProperties) Validate(formats strfmt.Registry) error {`,
  8086  		`	if err := m.validateAge(formats); err != nil {`,
  8087  		`	if err := m.validateName(formats); err != nil {`,
  8088  		`		return errors.CompositeValidationError(res...`,
  8089  		`func (m *NestedMapComplexValidationsMetaAdditionalPropertiesAdditionalPropertiesAdditionalProperties) validateAge(formats strfmt.Registry) error {`,
  8090  		`	if swag.IsZero(m.Age) {`,
  8091  		`	if err := validate.MinimumInt("age", "body", int64(m.Age), 1, true); err != nil {`,
  8092  		`	if err := validate.MaximumInt("age", "body", int64(m.Age), 200, true); err != nil {`,
  8093  		`	if err := validate.MultipleOf("age", "body", float64(m.Age), 1); err != nil {`,
  8094  		`func (m *NestedMapComplexValidationsMetaAdditionalPropertiesAdditionalPropertiesAdditionalProperties) validateName(formats strfmt.Registry) error {`,
  8095  		`	if swag.IsZero(m.Name) {`,
  8096  		`	if err := validate.MinLength("name", "body", string(m.Name), 10); err != nil {`,
  8097  		`	if err := validate.MaxLength("name", "body", string(m.Name), 50); err != nil {`,
  8098  		"	if err := validate.Pattern(\"name\", \"body\", string(m.Name), `\\w+`); err != nil {",
  8099  	},
  8100  		// not expected
  8101  		todo,
  8102  		// output in log
  8103  		noLines,
  8104  		noLines)
  8105  
  8106  	// load expectations for model: nested_map_complex_validations.go
  8107  	flattenRun.AddExpectations("nested_map_complex_validations.go", []string{
  8108  		`type NestedMapComplexValidations struct {`,
  8109  		// maps are now simple types
  8110  		//"	Meta NestedMapComplexValidationsMeta `json:\"meta,omitempty\"`",
  8111  		"	Meta map[string]map[string]map[string]NestedMapComplexValidationsMetaAdditionalPropertiesAdditionalPropertiesAdditionalProperties `json:\"meta,omitempty\"`",
  8112  		`func (m *NestedMapComplexValidations) Validate(formats strfmt.Registry) error {`,
  8113  		`	if err := m.validateMeta(formats); err != nil {`,
  8114  		`		return errors.CompositeValidationError(res...`,
  8115  		`func (m *NestedMapComplexValidations) validateMeta(formats strfmt.Registry) error {`,
  8116  		`	if swag.IsZero(m.Meta) {`,
  8117  		`          		for k := range m.Meta {`,
  8118  		//`          			if swag.IsZero(m.Meta[k]) { // not required`,
  8119  		`          			for kk := range m.Meta[k] {`,
  8120  		//`          				if swag.IsZero(m.Meta[k][kk]) { // not required`,
  8121  		`          				for kkk := range m.Meta[k][kk] {`,
  8122  		`          				if err := validate.Required("meta"+"."+k+"."+kk+"."+kkk, "body", m.Meta[k][kk][kkk]); err != nil {`,
  8123  		`          					if val, ok := m.Meta[k][kk][kkk]; ok {`,
  8124  		`          						if err := val.Validate(formats); err != nil {`,
  8125  	},
  8126  		// not expected
  8127  		todo,
  8128  		// output in log
  8129  		noLines,
  8130  		noLines)
  8131  
  8132  	// load expectations for model: named_nested_map_complex_additional_properties_additional_properties.go
  8133  	// NOTE(fredbi): maps are now simple types - this definition is no more generated
  8134  
  8135  	// load expectations for model: named_nested_map_complex_additional_properties.go
  8136  	// NOTE(fredbi): maps are now simple types - this definition is no more generated
  8137  
  8138  	// load expectations for model: nested_map_complex_validations_meta.go
  8139  	// NOTE(fredbi): maps are now simple types - this definition is no more generated
  8140  }
  8141  
  8142  func initFixture844Variations() {
  8143  	// testing fixture-844-variations.yaml with flatten and expand (--skip-flatten)
  8144  
  8145  	/*
  8146  	   repro
  8147  	*/
  8148  
  8149  	f := newModelFixture("../fixtures/bugs/1487/fixture-844-variations.yaml", "allOf bugs with empty objects")
  8150  	flattenRun := f.AddRun(false)
  8151  	expandRun := f.AddRun(true)
  8152  
  8153  	// load expectations for model: foo.go
  8154  	flattenRun.AddExpectations("foo.go", []string{
  8155  		`type Foo interface{`,
  8156  	},
  8157  		// not expected
  8158  		validatable,
  8159  		// output in log
  8160  		noLines,
  8161  		noLines)
  8162  
  8163  	expandRun.AddExpectations("foo.go", flattenRun.ExpectedFor("Foo").ExpectedLines, validatable, noLines, noLines)
  8164  
  8165  	// load expectations for model: variation2.go
  8166  	flattenRun.AddExpectations("variation2.go", []string{
  8167  		`type Variation2 struct {`,
  8168  		"	Prop1 EmptyEnum `json:\"prop1,omitempty\"`",
  8169  		// empty validation
  8170  		"func (m *Variation2) Validate(formats strfmt.Registry) error {\n	return nil\n}",
  8171  	},
  8172  		// not expected
  8173  		todo,
  8174  		// output in log
  8175  		noLines,
  8176  		noLines)
  8177  
  8178  	expandRun.AddExpectations("variation2.go", []string{
  8179  		`type Variation2 struct {`,
  8180  		"	Prop1 interface{} `json:\"prop1,omitempty\"`",
  8181  		// empty validation
  8182  		"func (m *Variation2) Validate(formats strfmt.Registry) error {\n	return nil\n}",
  8183  	},
  8184  		// not expected
  8185  		todo,
  8186  		// output in log
  8187  		noLines,
  8188  		noLines)
  8189  
  8190  	// load expectations for model: bar.go
  8191  	flattenRun.AddExpectations("bar.go", []string{
  8192  		`type Bar interface{`,
  8193  	},
  8194  		// not expected
  8195  		validatable,
  8196  		// output in log
  8197  		noLines,
  8198  		noLines)
  8199  
  8200  	expandRun.AddExpectations("bar.go", flattenRun.ExpectedFor("Bar").ExpectedLines, validatable, noLines, noLines)
  8201  
  8202  	// load expectations for model: variation3.go
  8203  	flattenRun.AddExpectations("variation3.go", []string{
  8204  		`type Variation3 struct {`,
  8205  		"	Prop1 []EmptyEnum `json:\"prop1\"`",
  8206  		`func (m *Variation3) Validate(formats strfmt.Registry) error {`,
  8207  		`	if err := m.validateProp1(formats); err != nil {`,
  8208  		`		return errors.CompositeValidationError(res...`,
  8209  		`func (m *Variation3) validateProp1(formats strfmt.Registry) error {`,
  8210  		`	if swag.IsZero(m.Prop1) {`,
  8211  		`	iProp1Size := int64(len(m.Prop1)`,
  8212  		`	if err := validate.MinItems("prop1", "body", iProp1Size, 10); err != nil {`,
  8213  	},
  8214  		// not expected
  8215  		todo,
  8216  		// output in log
  8217  		noLines,
  8218  		noLines)
  8219  
  8220  	expandRun.AddExpectations("variation3.go", []string{
  8221  		`type Variation3 struct {`,
  8222  		"	Prop1 []interface{} `json:\"prop1\"`",
  8223  		`func (m *Variation3) Validate(formats strfmt.Registry) error {`,
  8224  		`	if err := m.validateProp1(formats); err != nil {`,
  8225  		`		return errors.CompositeValidationError(res...`,
  8226  		`var variation3Prop1ItemsEnum []interface{`,
  8227  		`	var res []interface{`,
  8228  		"	if err := json.Unmarshal([]byte(`[\"abc\",\"def\"]`), &res); err != nil {",
  8229  		`	for _, v := range res {`,
  8230  		`		variation3Prop1ItemsEnum = append(variation3Prop1ItemsEnum, v`,
  8231  		`func (m *Variation3) validateProp1ItemsEnum(path, location string, value interface{}) error {`,
  8232  		`	if err := validate.EnumCase(path, location, value, variation3Prop1ItemsEnum, true); err != nil {`,
  8233  		`func (m *Variation3) validateProp1(formats strfmt.Registry) error {`,
  8234  		`	if swag.IsZero(m.Prop1) {`,
  8235  		`	iProp1Size := int64(len(m.Prop1)`,
  8236  		`	if err := validate.MinItems("prop1", "body", iProp1Size, 10); err != nil {`,
  8237  	},
  8238  		// not expected
  8239  		todo,
  8240  		// output in log
  8241  		noLines,
  8242  		noLines)
  8243  
  8244  	// load expectations for model: tuple_variation.go
  8245  	flattenRun.AddExpectations("tuple_variation.go", []string{
  8246  		`type TupleVariation struct {`,
  8247  		"	P0 *int64 `json:\"-\"`",
  8248  		"	P1 Bar `json:\"-\"`",
  8249  		"	P2 NonInterface `json:\"-\"`",
  8250  		"	P3 []Bar `json:\"-\"`",
  8251  		"	TupleVariationItems []interface{} `json:\"-\"`",
  8252  		`func (m *TupleVariation) Validate(formats strfmt.Registry) error {`,
  8253  		`	if err := m.validateP0(formats); err != nil {`,
  8254  		`	if err := m.validateP1(formats); err != nil {`,
  8255  		`	if err := m.validateP2(formats); err != nil {`,
  8256  		`	if err := m.validateP3(formats); err != nil {`,
  8257  		`	if err := m.validateTupleVariationItems(formats); err != nil {`,
  8258  		`		return errors.CompositeValidationError(res...`,
  8259  		`func (m *TupleVariation) validateP0(formats strfmt.Registry) error {`,
  8260  		`	if err := validate.Required("0", "body", m.P0); err != nil {`,
  8261  		`	if err := validate.MaximumInt("0", "body", int64(*m.P0), 10, false); err != nil {`,
  8262  		`func (m *TupleVariation) validateP1(formats strfmt.Registry) error {`,
  8263  		`	if err := validate.Required("1", "body", m.P1); err != nil {`,
  8264  		`func (m *TupleVariation) validateP2(formats strfmt.Registry) error {`,
  8265  		`	if err := m.P2.Validate(formats); err != nil {`,
  8266  		`		if ve, ok := err.(*errors.Validation); ok {`,
  8267  		`			return ve.ValidateName("2"`,
  8268  		`func (m *TupleVariation) validateP3(formats strfmt.Registry) error {`,
  8269  		`	if err := validate.Required("3", "body", m.P3); err != nil {`,
  8270  		`	iP3Size := int64(len(m.P3)`,
  8271  		`	if err := validate.MaxItems("3", "body", iP3Size, 10); err != nil {`,
  8272  		// empty validation
  8273  		"func (m *TupleVariation) validateTupleVariationItems(formats strfmt.Registry) error {\n\n	return nil\n}",
  8274  	},
  8275  		// not expected
  8276  		todo,
  8277  		// output in log
  8278  		noLines,
  8279  		noLines)
  8280  
  8281  	expandRun.AddExpectations("tuple_variation.go", []string{
  8282  		`type TupleVariation struct {`,
  8283  		"	P0 *int64 `json:\"-\"`",
  8284  		"	P1 interface{} `json:\"-\"`",
  8285  		"	P2 map[string]strfmt.Date `json:\"-\"`",
  8286  		"	P3 []interface{} `json:\"-\"`",
  8287  		"	TupleVariationItems []interface{} `json:\"-\"`",
  8288  		`func (m *TupleVariation) Validate(formats strfmt.Registry) error {`,
  8289  		`	if err := m.validateP0(formats); err != nil {`,
  8290  		`	if err := m.validateP1(formats); err != nil {`,
  8291  		`	if err := m.validateP2(formats); err != nil {`,
  8292  		`	if err := m.validateP3(formats); err != nil {`,
  8293  		`	if err := m.validateTupleVariationItems(formats); err != nil {`,
  8294  		`		return errors.CompositeValidationError(res...`,
  8295  		`func (m *TupleVariation) validateP0(formats strfmt.Registry) error {`,
  8296  		`	if err := validate.Required("0", "body", m.P0); err != nil {`,
  8297  		`	if err := validate.MaximumInt("0", "body", int64(*m.P0), 10, false); err != nil {`,
  8298  		`func (m *TupleVariation) validateP1(formats strfmt.Registry) error {`,
  8299  		`	if err := validate.Required("1", "body", m.P1); err != nil {`,
  8300  		`func (m *TupleVariation) validateP2(formats strfmt.Registry) error {`,
  8301  		`	for k := range m.P2 {`,
  8302  		//`		if swag.IsZero(m.P2[k]) {`,
  8303  		`		if err := validate.FormatOf("2"+"."+k, "body", "date", m.P2[k].String(), formats); err != nil {`,
  8304  		`func (m *TupleVariation) validateP3(formats strfmt.Registry) error {`,
  8305  		`	if err := validate.Required("3", "body", m.P3); err != nil {`,
  8306  		`	iP3Size := int64(len(m.P3)`,
  8307  		`	if err := validate.MaxItems("3", "body", iP3Size, 10); err != nil {`,
  8308  		// empty validation
  8309  		"func (m *TupleVariation) validateTupleVariationItems(formats strfmt.Registry) error {\n\n	return nil\n}",
  8310  	},
  8311  		// not expected
  8312  		todo,
  8313  		// output in log
  8314  		noLines,
  8315  		noLines)
  8316  
  8317  	// load expectations for model: add_items_variation.go
  8318  	flattenRun.AddExpectations("add_items_variation.go", []string{
  8319  		`type AddItemsVariation struct {`,
  8320  		"	P0 *int64 `json:\"-\"`",
  8321  		"	P1 Bar `json:\"-\"`",
  8322  		"	AddItemsVariationItems [][]Foo `json:\"-\"`",
  8323  		`func (m *AddItemsVariation) Validate(formats strfmt.Registry) error {`,
  8324  		`	if err := m.validateP0(formats); err != nil {`,
  8325  		`	if err := m.validateP1(formats); err != nil {`,
  8326  		`	if err := m.validateAddItemsVariationItems(formats); err != nil {`,
  8327  		`		return errors.CompositeValidationError(res...`,
  8328  		`func (m *AddItemsVariation) validateP0(formats strfmt.Registry) error {`,
  8329  		`	if err := validate.Required("0", "body", m.P0); err != nil {`,
  8330  		`	if err := validate.MaximumInt("0", "body", int64(*m.P0), 10, false); err != nil {`,
  8331  		`func (m *AddItemsVariation) validateP1(formats strfmt.Registry) error {`,
  8332  		`	if err := validate.Required("1", "body", m.P1); err != nil {`,
  8333  		`func (m *AddItemsVariation) validateAddItemsVariationItems(formats strfmt.Registry) error {`,
  8334  		`	for i := range m.AddItemsVariationItems {`,
  8335  		`		if err := validate.UniqueItems(strconv.Itoa(i+2), "body", m.AddItemsVariationItems[i]); err != nil {`,
  8336  	},
  8337  		// not expected
  8338  		todo,
  8339  		// output in log
  8340  		noLines,
  8341  		noLines)
  8342  
  8343  	expandRun.AddExpectations("add_items_variation.go", []string{
  8344  		`type AddItemsVariation struct {`,
  8345  		"	P0 *int64 `json:\"-\"`",
  8346  		"	P1 interface{} `json:\"-\"`",
  8347  		"	AddItemsVariationItems [][]interface{} `json:\"-\"`",
  8348  		`func (m *AddItemsVariation) Validate(formats strfmt.Registry) error {`,
  8349  		`	if err := m.validateP0(formats); err != nil {`,
  8350  		`	if err := m.validateP1(formats); err != nil {`,
  8351  		`	if err := m.validateAddItemsVariationItems(formats); err != nil {`,
  8352  		`		return errors.CompositeValidationError(res...`,
  8353  		`func (m *AddItemsVariation) validateP0(formats strfmt.Registry) error {`,
  8354  		`	if err := validate.Required("0", "body", m.P0); err != nil {`,
  8355  		`	if err := validate.MaximumInt("0", "body", int64(*m.P0), 10, false); err != nil {`,
  8356  		`func (m *AddItemsVariation) validateP1(formats strfmt.Registry) error {`,
  8357  		`	if err := validate.Required("1", "body", m.P1); err != nil {`,
  8358  		`func (m *AddItemsVariation) validateAddItemsVariationItems(formats strfmt.Registry) error {`,
  8359  		`	for i := range m.AddItemsVariationItems {`,
  8360  		`		if err := validate.UniqueItems(strconv.Itoa(i+2), "body", m.AddItemsVariationItems[i]); err != nil {`,
  8361  	},
  8362  		// not expected
  8363  		todo,
  8364  		// output in log
  8365  		noLines,
  8366  		noLines)
  8367  
  8368  	// load expectations for model: non_interface.go
  8369  	flattenRun.AddExpectations("non_interface.go", []string{
  8370  		`type NonInterface map[string]strfmt.Date`,
  8371  		`func (m NonInterface) Validate(formats strfmt.Registry) error {`,
  8372  		`	for k := range m {`,
  8373  		//`		if swag.IsZero(m[k]) {`,
  8374  		`		if err := validate.FormatOf(k, "body", "date", m[k].String(), formats); err != nil {`,
  8375  		`		return errors.CompositeValidationError(res...`,
  8376  	},
  8377  		// not expected
  8378  		todo,
  8379  		// output in log
  8380  		noLines,
  8381  		noLines)
  8382  
  8383  	expandRun.AddExpectations("non_interface.go", flattenRun.ExpectedFor("NonInterface").ExpectedLines, todo, noLines, noLines)
  8384  
  8385  	// load expectations for model: variation0.go
  8386  	flattenRun.AddExpectations("variation0.go", []string{
  8387  		`type Variation0 struct {`,
  8388  		`	Foo`,
  8389  		`	Bar`,
  8390  		// empty validation
  8391  		"func (m *Variation0) Validate(formats strfmt.Registry) error {\n	return nil\n}",
  8392  	},
  8393  		// not expected
  8394  		todo,
  8395  		// output in log
  8396  		noLines,
  8397  		noLines)
  8398  
  8399  	expandRun.AddExpectations("variation0.go", []string{
  8400  		`type Variation0 struct {`,
  8401  		`	Variation0AllOf0`,
  8402  		`	Variation0AllOf1`,
  8403  		`type Variation0AllOf0 interface{}`,
  8404  		`type Variation0AllOf1 interface{}`,
  8405  		// empty validation
  8406  		"func (m *Variation0) Validate(formats strfmt.Registry) error {\n	return nil\n}",
  8407  	},
  8408  		// not expected
  8409  		todo,
  8410  		// output in log
  8411  		noLines,
  8412  		noLines)
  8413  
  8414  	// load expectations for model: variation1.go
  8415  	flattenRun.AddExpectations("variation1.go", []string{
  8416  		`type Variation1 struct {`,
  8417  		`	Foo`,
  8418  		`	NonInterface`,
  8419  		`func (m *Variation1) Validate(formats strfmt.Registry) error {`,
  8420  		`	if err := m.NonInterface.Validate(formats); err != nil {`,
  8421  		`		return errors.CompositeValidationError(res...`,
  8422  	},
  8423  		// not expected
  8424  		todo,
  8425  		// output in log
  8426  		noLines,
  8427  		noLines)
  8428  
  8429  	expandRun.AddExpectations("variation1.go", []string{
  8430  		`type Variation1 struct {`,
  8431  		`	Variation1AllOf0`,
  8432  		"	AO1 map[string]strfmt.Date `json:\"-\"`",
  8433  		`func (m *Variation1) Validate(formats strfmt.Registry) error {`,
  8434  		`	for k := range m.AO1 {`,
  8435  		//`		if swag.IsZero(m.AO1[k]) {`,
  8436  		`		if err := validate.FormatOf(k, "body", "date", m.AO1[k].String(), formats); err != nil {`,
  8437  		`		return errors.CompositeValidationError(res...`,
  8438  		`type Variation1AllOf0 interface{}`,
  8439  	},
  8440  		// not expected
  8441  		todo,
  8442  		// output in log
  8443  		noLines,
  8444  		noLines)
  8445  
  8446  	// load expectations for model: empty_enum.go
  8447  	flattenRun.AddExpectations("empty_enum.go", []string{
  8448  		`type EmptyEnum interface{}`,
  8449  	},
  8450  		// not expected
  8451  		validatable,
  8452  		// output in log
  8453  		noLines,
  8454  		noLines)
  8455  
  8456  	expandRun.AddExpectations("empty_enum.go", flattenRun.ExpectedFor("EmptyEnum").ExpectedLines, validatable, noLines, noLines)
  8457  
  8458  	// load expectations for model: get_o_k_body.go
  8459  	flattenRun.AddExpectations("get_o_k_body.go", []string{
  8460  		`type GetOKBody struct {`,
  8461  		`	Foo`,
  8462  		`	Bar`,
  8463  		// empty validation
  8464  		"func (m *GetOKBody) Validate(formats strfmt.Registry) error {\n	return nil\n}",
  8465  	},
  8466  		// not expected
  8467  		todo,
  8468  		// output in log
  8469  		noLines,
  8470  		noLines)
  8471  
  8472  }
  8473  
  8474  func initFixtureMoreAddProps() {
  8475  	// testing fixture-moreAddProps.yaml with flatten and expand (--skip-flatten)
  8476  
  8477  	/*
  8478  	   various patterns of additionalProperties
  8479  	*/
  8480  
  8481  	f := newModelFixture("../fixtures/bugs/1487/fixture-moreAddProps.yaml", "fixture for additionalProperties")
  8482  	flattenRun := f.AddRun(false)
  8483  	expandRun := f.AddRun(true)
  8484  
  8485  	// load expectations for model: trial.go
  8486  	flattenRun.AddExpectations("trial.go", []string{
  8487  		`type Trial struct {`,
  8488  		"	A1 strfmt.DateTime `json:\"a1,omitempty\"`",
  8489  		"	AdditionalProperties *TrialAdditionalProperties `json:\"additionalProperties,omitempty\"`",
  8490  		`func (m *Trial) Validate(formats strfmt.Registry) error {`,
  8491  		`	if err := m.validateA1(formats); err != nil {`,
  8492  		`	if err := m.validateAdditionalProperties(formats); err != nil {`,
  8493  		`		return errors.CompositeValidationError(res...`,
  8494  		`func (m *Trial) validateA1(formats strfmt.Registry) error {`,
  8495  		`	if swag.IsZero(m.A1) {`,
  8496  		`	if err := validate.FormatOf("a1", "body", "date-time", m.A1.String(), formats); err != nil {`,
  8497  		`func (m *Trial) validateAdditionalProperties(formats strfmt.Registry) error {`,
  8498  		`	if swag.IsZero(m.AdditionalProperties) {`,
  8499  		`	if m.AdditionalProperties != nil {`,
  8500  		`		if err := m.AdditionalProperties.Validate(formats); err != nil {`,
  8501  		`			if ve, ok := err.(*errors.Validation); ok {`,
  8502  		`				return ve.ValidateName("additionalProperties"`,
  8503  	},
  8504  		// not expected
  8505  		todo,
  8506  		// output in log
  8507  		noLines,
  8508  		noLines)
  8509  
  8510  	// load expectations for model: trial_additional_properties.go
  8511  	flattenRun.AddExpectations("trial_additional_properties.go", []string{
  8512  		`type TrialAdditionalProperties struct {`,
  8513  		"	Discourse string `json:\"discourse,omitempty\"`",
  8514  		"	HoursSpent float64 `json:\"hoursSpent,omitempty\"`",
  8515  		"	TrialAdditionalPropertiesAdditionalProperties map[string]interface{} `json:\"-\"`",
  8516  		// empty validation
  8517  		"func (m *TrialAdditionalProperties) Validate(formats strfmt.Registry) error {\n	return nil\n}",
  8518  	},
  8519  		// not expected
  8520  		todo,
  8521  		// output in log
  8522  		noLines,
  8523  		noLines)
  8524  
  8525  	// load expectations for model: additional_transitive_refed_object_thing_additional_properties.go
  8526  	flattenRun.AddExpectations("additional_transitive_refed_object_thing_additional_properties.go", []string{
  8527  		`type AdditionalTransitiveRefedObjectThingAdditionalProperties struct {`,
  8528  		"	Prop1 *AdditionalTransitiveRefedObjectThingAdditionalPropertiesProp1 `json:\"prop1,omitempty\"`",
  8529  		"	AdditionalTransitiveRefedObjectThingAdditionalProperties map[string]*AdditionalTransitiveRefedObjectThingAdditionalPropertiesAdditionalProperties `json:\"-\"`",
  8530  		`func (m *AdditionalTransitiveRefedObjectThingAdditionalProperties) Validate(formats strfmt.Registry) error {`,
  8531  		`	if err := m.validateProp1(formats); err != nil {`,
  8532  		`	for k := range m.AdditionalTransitiveRefedObjectThingAdditionalProperties {`,
  8533  		`		if val, ok := m.AdditionalTransitiveRefedObjectThingAdditionalProperties[k]; ok {`,
  8534  		`			if val != nil {`,
  8535  		`				if err := val.Validate(formats); err != nil {`,
  8536  		`		return errors.CompositeValidationError(res...`,
  8537  		`func (m *AdditionalTransitiveRefedObjectThingAdditionalProperties) validateProp1(formats strfmt.Registry) error {`,
  8538  		`	if swag.IsZero(m.Prop1) {`,
  8539  		`	if m.Prop1 != nil {`,
  8540  		`		if err := m.Prop1.Validate(formats); err != nil {`,
  8541  		`			if ve, ok := err.(*errors.Validation); ok {`,
  8542  		`				return ve.ValidateName("prop1"`,
  8543  	},
  8544  		// not expected
  8545  		todo,
  8546  		// output in log
  8547  		noLines,
  8548  		noLines)
  8549  
  8550  	// load expectations for model: additional_transitive_refed_object_thing_additional_properties_prop1.go
  8551  	flattenRun.AddExpectations("additional_transitive_refed_object_thing_additional_properties_prop1.go", []string{
  8552  		`type AdditionalTransitiveRefedObjectThingAdditionalPropertiesProp1 struct {`,
  8553  		"	ThisOneNotRequiredEither int64 `json:\"thisOneNotRequiredEither,omitempty\"`",
  8554  		"	AdditionalTransitiveRefedObjectThingAdditionalPropertiesProp1 map[string]*AdditionalTransitiveRefedObjectThingAdditionalPropertiesProp1AdditionalProperties `json:\"-\"`",
  8555  		`func (m *AdditionalTransitiveRefedObjectThingAdditionalPropertiesProp1) Validate(formats strfmt.Registry) error {`,
  8556  		`	if err := m.validateThisOneNotRequiredEither(formats); err != nil {`,
  8557  		`	for k := range m.AdditionalTransitiveRefedObjectThingAdditionalPropertiesProp1 {`,
  8558  		`		if val, ok := m.AdditionalTransitiveRefedObjectThingAdditionalPropertiesProp1[k]; ok {`,
  8559  		`			if val != nil {`,
  8560  		`				if err := val.Validate(formats); err != nil {`,
  8561  		`		return errors.CompositeValidationError(res...`,
  8562  		`func (m *AdditionalTransitiveRefedObjectThingAdditionalPropertiesProp1) validateThisOneNotRequiredEither(formats strfmt.Registry) error {`,
  8563  		`	if swag.IsZero(m.ThisOneNotRequiredEither) {`,
  8564  		`	if err := validate.MaximumInt("thisOneNotRequiredEither", "body", int64(m.ThisOneNotRequiredEither), 20, false); err != nil {`,
  8565  	},
  8566  		// not expected
  8567  		todo,
  8568  		// output in log
  8569  		noLines,
  8570  		noLines)
  8571  
  8572  	// load expectations for model: additional_transitive_refed_thing.go
  8573  	flattenRun.AddExpectations("additional_transitive_refed_thing.go", []string{
  8574  		`type AdditionalTransitiveRefedThing struct {`,
  8575  		"	ThisOneNotRequired int64 `json:\"thisOneNotRequired,omitempty\"`",
  8576  		"	AdditionalTransitiveRefedThing map[string][]*AdditionalTransitiveRefedThingAdditionalPropertiesItems `json:\"-\"`",
  8577  		`func (m *AdditionalTransitiveRefedThing) Validate(formats strfmt.Registry) error {`,
  8578  		`	if err := m.validateThisOneNotRequired(formats); err != nil {`,
  8579  		`	for k := range m.AdditionalTransitiveRefedThing {`,
  8580  		`		if err := validate.Required(k, "body", m.AdditionalTransitiveRefedThing[k]); err != nil {`,
  8581  		`		if err := validate.UniqueItems(k, "body", m.AdditionalTransitiveRefedThing[k]); err != nil {`,
  8582  		`		for i := 0; i < len(m.AdditionalTransitiveRefedThing[k]); i++ {`,
  8583  		// do we need Required when item is nullable?
  8584  		// nullable not required:
  8585  		`			if swag.IsZero(m.AdditionalTransitiveRefedThing[k][i]) {`,
  8586  		// nullable not required:
  8587  		//`			if err := validate.Required(k+"."+strconv.Itoa(i), "body", m.AdditionalTransitiveRefedThing[k][i]); err != nil {`,
  8588  		`			if m.AdditionalTransitiveRefedThing[k][i] != nil {`,
  8589  		`				if err := m.AdditionalTransitiveRefedThing[k][i].Validate(formats); err != nil {`,
  8590  		`					if ve, ok := err.(*errors.Validation); ok {`,
  8591  		`						return ve.ValidateName(k + "." + strconv.Itoa(i)`,
  8592  		`		return errors.CompositeValidationError(res...`,
  8593  		`func (m *AdditionalTransitiveRefedThing) validateThisOneNotRequired(formats strfmt.Registry) error {`,
  8594  		`	if swag.IsZero(m.ThisOneNotRequired) {`,
  8595  		`	if err := validate.MaximumInt("thisOneNotRequired", "body", int64(m.ThisOneNotRequired), 10, false); err != nil {`,
  8596  	},
  8597  		// not expected
  8598  		todo,
  8599  		// output in log
  8600  		noLines,
  8601  		noLines)
  8602  
  8603  	// load expectations for model: additional_transitive_refed_thing_additional_properties_items_additional_properties_additional_properties.go
  8604  	flattenRun.AddExpectations("additional_transitive_refed_thing_additional_properties_items_additional_properties_additional_properties.go", []string{
  8605  		`type AdditionalTransitiveRefedThingAdditionalPropertiesItemsAdditionalPropertiesAdditionalProperties struct {`,
  8606  		"	Discourse string `json:\"discourse,omitempty\"`",
  8607  		"	HoursSpent float64 `json:\"hoursSpent,omitempty\"`",
  8608  		"	AdditionalTransitiveRefedThingAdditionalPropertiesItemsAdditionalPropertiesAdditionalPropertiesAdditionalProperties map[string]interface{} `json:\"-\"`",
  8609  		// empty validation
  8610  		"func (m *AdditionalTransitiveRefedThingAdditionalPropertiesItemsAdditionalPropertiesAdditionalProperties) Validate(formats strfmt.Registry) error {\n	return nil\n}",
  8611  	},
  8612  		// not expected
  8613  		todo,
  8614  		// output in log
  8615  		noLines,
  8616  		noLines)
  8617  
  8618  	// load expectations for model: additional_transitive_refed_object_thing.go
  8619  	flattenRun.AddExpectations("additional_transitive_refed_object_thing.go", []string{
  8620  		`type AdditionalTransitiveRefedObjectThing struct {`,
  8621  		"	ThisOneNotRequired int64 `json:\"thisOneNotRequired,omitempty\"`",
  8622  		"	AdditionalTransitiveRefedObjectThing map[string]*AdditionalTransitiveRefedObjectThingAdditionalProperties `json:\"-\"`",
  8623  		`func (m *AdditionalTransitiveRefedObjectThing) Validate(formats strfmt.Registry) error {`,
  8624  		`	if err := m.validateThisOneNotRequired(formats); err != nil {`,
  8625  		`	for k := range m.AdditionalTransitiveRefedObjectThing {`,
  8626  		`		if val, ok := m.AdditionalTransitiveRefedObjectThing[k]; ok {`,
  8627  		`			if val != nil {`,
  8628  		`				if err := val.Validate(formats); err != nil {`,
  8629  		`		return errors.CompositeValidationError(res...`,
  8630  		`func (m *AdditionalTransitiveRefedObjectThing) validateThisOneNotRequired(formats strfmt.Registry) error {`,
  8631  		`	if swag.IsZero(m.ThisOneNotRequired) {`,
  8632  		`	if err := validate.MaximumInt("thisOneNotRequired", "body", int64(m.ThisOneNotRequired), 10, false); err != nil {`,
  8633  	},
  8634  		// not expected
  8635  		todo,
  8636  		// output in log
  8637  		noLines,
  8638  		noLines)
  8639  
  8640  	// load expectations for model: additional_transitive_refed_object_thing_additional_properties_additional_properties.go
  8641  	flattenRun.AddExpectations("additional_transitive_refed_object_thing_additional_properties_additional_properties.go", []string{
  8642  		`type AdditionalTransitiveRefedObjectThingAdditionalPropertiesAdditionalProperties struct {`,
  8643  		"	Discourse string `json:\"discourse,omitempty\"`",
  8644  		"	HoursSpent float64 `json:\"hoursSpent,omitempty\"`",
  8645  		"	AdditionalTransitiveRefedObjectThingAdditionalPropertiesAdditionalPropertiesAdditionalProperties map[string]interface{} `json:\"-\"`",
  8646  		// empty validation
  8647  		"func (m *AdditionalTransitiveRefedObjectThingAdditionalPropertiesAdditionalProperties) Validate(formats strfmt.Registry) error {\n	return nil\n}",
  8648  	},
  8649  		// not expected
  8650  		todo,
  8651  		// output in log
  8652  		noLines,
  8653  		noLines)
  8654  
  8655  	// load expectations for model: additional_transitive_refed_object_thing_additional_properties_prop1_additional_properties.go
  8656  	flattenRun.AddExpectations("additional_transitive_refed_object_thing_additional_properties_prop1_additional_properties.go", []string{
  8657  		`type AdditionalTransitiveRefedObjectThingAdditionalPropertiesProp1AdditionalProperties struct {`,
  8658  		"	A1 strfmt.DateTime `json:\"a1,omitempty\"`",
  8659  		"	B1 strfmt.Date `json:\"b1,omitempty\"`",
  8660  		"	AdditionalTransitiveRefedObjectThingAdditionalPropertiesProp1AdditionalPropertiesAdditionalProperties map[string]interface{} `json:\"-\"`",
  8661  		`func (m *AdditionalTransitiveRefedObjectThingAdditionalPropertiesProp1AdditionalProperties) Validate(formats strfmt.Registry) error {`,
  8662  		`	if err := m.validateA1(formats); err != nil {`,
  8663  		`	if err := m.validateB1(formats); err != nil {`,
  8664  		`		return errors.CompositeValidationError(res...`,
  8665  		`func (m *AdditionalTransitiveRefedObjectThingAdditionalPropertiesProp1AdditionalProperties) validateA1(formats strfmt.Registry) error {`,
  8666  		`	if swag.IsZero(m.A1) {`,
  8667  		`	if err := validate.FormatOf("a1", "body", "date-time", m.A1.String(), formats); err != nil {`,
  8668  		`func (m *AdditionalTransitiveRefedObjectThingAdditionalPropertiesProp1AdditionalProperties) validateB1(formats strfmt.Registry) error {`,
  8669  		`	if swag.IsZero(m.B1) {`,
  8670  		`	if err := validate.FormatOf("b1", "body", "date", m.B1.String(), formats); err != nil {`,
  8671  	},
  8672  		// not expected
  8673  		todo,
  8674  		// output in log
  8675  		noLines,
  8676  		noLines)
  8677  
  8678  	// load expectations for model: additional_transitive_refed_thing_additional_properties_items.go
  8679  	flattenRun.AddExpectations("additional_transitive_refed_thing_additional_properties_items.go", []string{
  8680  		`type AdditionalTransitiveRefedThingAdditionalPropertiesItems struct {`,
  8681  		"	ThisOneNotRequiredEither int64 `json:\"thisOneNotRequiredEither,omitempty\"`",
  8682  		"	AdditionalTransitiveRefedThingAdditionalPropertiesItems map[string]*AdditionalTransitiveRefedThingAdditionalPropertiesItemsAdditionalProperties `json:\"-\"`",
  8683  		`func (m *AdditionalTransitiveRefedThingAdditionalPropertiesItems) Validate(formats strfmt.Registry) error {`,
  8684  		`	if err := m.validateThisOneNotRequiredEither(formats); err != nil {`,
  8685  		`	for k := range m.AdditionalTransitiveRefedThingAdditionalPropertiesItems {`,
  8686  		`		if val, ok := m.AdditionalTransitiveRefedThingAdditionalPropertiesItems[k]; ok {`,
  8687  		`			if val != nil {`,
  8688  		`				if err := val.Validate(formats); err != nil {`,
  8689  		`		return errors.CompositeValidationError(res...`,
  8690  		`func (m *AdditionalTransitiveRefedThingAdditionalPropertiesItems) validateThisOneNotRequiredEither(formats strfmt.Registry) error {`,
  8691  		`	if swag.IsZero(m.ThisOneNotRequiredEither) {`,
  8692  		`	if err := validate.MaximumInt("thisOneNotRequiredEither", "body", int64(m.ThisOneNotRequiredEither), 20, false); err != nil {`,
  8693  	},
  8694  		// not expected
  8695  		todo,
  8696  		// output in log
  8697  		noLines,
  8698  		noLines)
  8699  
  8700  	// load expectations for model: additional_transitive_refed_thing_additional_properties_items_additional_properties.go
  8701  	flattenRun.AddExpectations("additional_transitive_refed_thing_additional_properties_items_additional_properties.go", []string{
  8702  		`type AdditionalTransitiveRefedThingAdditionalPropertiesItemsAdditionalProperties struct {`,
  8703  		"	A1 strfmt.DateTime `json:\"a1,omitempty\"`",
  8704  		"	B1 strfmt.DateTime `json:\"b1,omitempty\"`",
  8705  		"	AdditionalTransitiveRefedThingAdditionalPropertiesItemsAdditionalProperties map[string]*AdditionalTransitiveRefedThingAdditionalPropertiesItemsAdditionalPropertiesAdditionalProperties `json:\"-\"`",
  8706  		`func (m *AdditionalTransitiveRefedThingAdditionalPropertiesItemsAdditionalProperties) Validate(formats strfmt.Registry) error {`,
  8707  		`	if err := m.validateA1(formats); err != nil {`,
  8708  		`	if err := m.validateB1(formats); err != nil {`,
  8709  		`	for k := range m.AdditionalTransitiveRefedThingAdditionalPropertiesItemsAdditionalProperties {`,
  8710  		`		if val, ok := m.AdditionalTransitiveRefedThingAdditionalPropertiesItemsAdditionalProperties[k]; ok {`,
  8711  		`			if val != nil {`,
  8712  		`				if err := val.Validate(formats); err != nil {`,
  8713  		`		return errors.CompositeValidationError(res...`,
  8714  		`func (m *AdditionalTransitiveRefedThingAdditionalPropertiesItemsAdditionalProperties) validateA1(formats strfmt.Registry) error {`,
  8715  		`	if swag.IsZero(m.A1) {`,
  8716  		`	if err := validate.FormatOf("a1", "body", "date-time", m.A1.String(), formats); err != nil {`,
  8717  		`func (m *AdditionalTransitiveRefedThingAdditionalPropertiesItemsAdditionalProperties) validateB1(formats strfmt.Registry) error {`,
  8718  		`	if swag.IsZero(m.B1) {`,
  8719  		`	if err := validate.FormatOf("b1", "body", "date-time", m.B1.String(), formats); err != nil {`,
  8720  	},
  8721  		// not expected
  8722  		todo,
  8723  		// output in log
  8724  		noLines,
  8725  		noLines)
  8726  
  8727  	// load expectations for model: trial.go
  8728  	expandRun.AddExpectations("trial.go", []string{
  8729  		`type Trial struct {`,
  8730  		"	A1 strfmt.DateTime `json:\"a1,omitempty\"`",
  8731  		"	AdditionalProperties *TrialAdditionalProperties `json:\"additionalProperties,omitempty\"`",
  8732  		`func (m *Trial) Validate(formats strfmt.Registry) error {`,
  8733  		`	if err := m.validateA1(formats); err != nil {`,
  8734  		`	if err := m.validateAdditionalProperties(formats); err != nil {`,
  8735  		`		return errors.CompositeValidationError(res...`,
  8736  		`func (m *Trial) validateA1(formats strfmt.Registry) error {`,
  8737  		`	if swag.IsZero(m.A1) {`,
  8738  		`	if err := validate.FormatOf("a1", "body", "date-time", m.A1.String(), formats); err != nil {`,
  8739  		`func (m *Trial) validateAdditionalProperties(formats strfmt.Registry) error {`,
  8740  		`	if swag.IsZero(m.AdditionalProperties) {`,
  8741  		`	if m.AdditionalProperties != nil {`,
  8742  		`		if err := m.AdditionalProperties.Validate(formats); err != nil {`,
  8743  		`			if ve, ok := err.(*errors.Validation); ok {`,
  8744  		`				return ve.ValidateName("additionalProperties"`,
  8745  		`type TrialAdditionalProperties struct {`,
  8746  		"	Discourse string `json:\"discourse,omitempty\"`",
  8747  		"	HoursSpent float64 `json:\"hoursSpent,omitempty\"`",
  8748  		"	TrialAdditionalPropertiesAdditionalProperties map[string]interface{} `json:\"-\"`",
  8749  		// empty validation
  8750  		"func (m *TrialAdditionalProperties) Validate(formats strfmt.Registry) error {\n	return nil\n}",
  8751  	},
  8752  		// not expected
  8753  		todo,
  8754  		// output in log
  8755  		noLines,
  8756  		noLines)
  8757  
  8758  	// load expectations for model: additional_transitive_refed_thing.go
  8759  	expandRun.AddExpectations("additional_transitive_refed_thing.go", []string{
  8760  		`type AdditionalTransitiveRefedThing struct {`,
  8761  		"	ThisOneNotRequired int64 `json:\"thisOneNotRequired,omitempty\"`",
  8762  		"	AdditionalTransitiveRefedThing map[string][]*AdditionalTransitiveRefedThingItems0 `json:\"-\"`",
  8763  		`func (m *AdditionalTransitiveRefedThing) Validate(formats strfmt.Registry) error {`,
  8764  		`	if err := m.validateThisOneNotRequired(formats); err != nil {`,
  8765  		`	for k := range m.AdditionalTransitiveRefedThing {`,
  8766  		`		if err := validate.Required(k, "body", m.AdditionalTransitiveRefedThing[k]); err != nil {`,
  8767  		`		if err := validate.UniqueItems(k, "body", m.AdditionalTransitiveRefedThing[k]); err != nil {`,
  8768  		`		for i := 0; i < len(m.AdditionalTransitiveRefedThing[k]); i++ {`,
  8769  		// do we need Required when item is nullable?
  8770  		// nullable not required:
  8771  		`			if swag.IsZero(m.AdditionalTransitiveRefedThing[k][i]) {`,
  8772  		// nullable required:
  8773  		//`			if err := validate.Required(k+"."+strconv.Itoa(i), "body", m.AdditionalTransitiveRefedThing[k][i]); err != nil {`,
  8774  		`			if m.AdditionalTransitiveRefedThing[k][i] != nil {`,
  8775  		`				if err := m.AdditionalTransitiveRefedThing[k][i].Validate(formats); err != nil {`,
  8776  		`					if ve, ok := err.(*errors.Validation); ok {`,
  8777  		`						return ve.ValidateName(k + "." + strconv.Itoa(i)`,
  8778  		`		return errors.CompositeValidationError(res...`,
  8779  		`func (m *AdditionalTransitiveRefedThing) validateThisOneNotRequired(formats strfmt.Registry) error {`,
  8780  		`	if swag.IsZero(m.ThisOneNotRequired) {`,
  8781  		`	if err := validate.MaximumInt("thisOneNotRequired", "body", int64(m.ThisOneNotRequired), 10, false); err != nil {`,
  8782  		`type AdditionalTransitiveRefedThingItems0 struct {`,
  8783  		"	ThisOneNotRequiredEither int64 `json:\"thisOneNotRequiredEither,omitempty\"`",
  8784  		"	AdditionalTransitiveRefedThingItems0 map[string]*AdditionalTransitiveRefedThingItems0Anon `json:\"-\"`",
  8785  		`func (m *AdditionalTransitiveRefedThingItems0) Validate(formats strfmt.Registry) error {`,
  8786  		`	if err := m.validateThisOneNotRequiredEither(formats); err != nil {`,
  8787  		`	for k := range m.AdditionalTransitiveRefedThingItems0 {`,
  8788  		`		if val, ok := m.AdditionalTransitiveRefedThingItems0[k]; ok {`,
  8789  		`			if val != nil {`,
  8790  		`				if err := val.Validate(formats); err != nil {`,
  8791  		`		return errors.CompositeValidationError(res...`,
  8792  		`func (m *AdditionalTransitiveRefedThingItems0) validateThisOneNotRequiredEither(formats strfmt.Registry) error {`,
  8793  		`	if swag.IsZero(m.ThisOneNotRequiredEither) {`,
  8794  		`	if err := validate.MaximumInt("thisOneNotRequiredEither", "body", int64(m.ThisOneNotRequiredEither), 20, false); err != nil {`,
  8795  		`type AdditionalTransitiveRefedThingItems0Anon struct {`,
  8796  		"	A1 strfmt.DateTime `json:\"a1,omitempty\"`",
  8797  		"	B1 strfmt.DateTime `json:\"b1,omitempty\"`",
  8798  		"	AdditionalTransitiveRefedThingItems0Anon map[string]*AdditionalTransitiveRefedThingItems0AnonAnon `json:\"-\"`",
  8799  		`func (m *AdditionalTransitiveRefedThingItems0Anon) Validate(formats strfmt.Registry) error {`,
  8800  		`	if err := m.validateA1(formats); err != nil {`,
  8801  		`	if err := m.validateB1(formats); err != nil {`,
  8802  		`	for k := range m.AdditionalTransitiveRefedThingItems0Anon {`,
  8803  		`		if val, ok := m.AdditionalTransitiveRefedThingItems0Anon[k]; ok {`,
  8804  		`			if val != nil {`,
  8805  		`				if err := val.Validate(formats); err != nil {`,
  8806  		`		return errors.CompositeValidationError(res...`,
  8807  		`func (m *AdditionalTransitiveRefedThingItems0Anon) validateA1(formats strfmt.Registry) error {`,
  8808  		`	if swag.IsZero(m.A1) {`,
  8809  		`	if err := validate.FormatOf("a1", "body", "date-time", m.A1.String(), formats); err != nil {`,
  8810  		`func (m *AdditionalTransitiveRefedThingItems0Anon) validateB1(formats strfmt.Registry) error {`,
  8811  		`	if swag.IsZero(m.B1) {`,
  8812  		`	if err := validate.FormatOf("b1", "body", "date-time", m.B1.String(), formats); err != nil {`,
  8813  		`type AdditionalTransitiveRefedThingItems0AnonAnon struct {`,
  8814  		"	Discourse string `json:\"discourse,omitempty\"`",
  8815  		"	HoursSpent float64 `json:\"hoursSpent,omitempty\"`",
  8816  		"	AdditionalTransitiveRefedThingItems0AnonAnonAdditionalProperties map[string]interface{} `json:\"-\"`",
  8817  		// empty validation
  8818  		"func (m *AdditionalTransitiveRefedThingItems0AnonAnon) Validate(formats strfmt.Registry) error {\n	return nil\n}",
  8819  	},
  8820  		// not expected
  8821  		todo,
  8822  		// output in log
  8823  		noLines,
  8824  		noLines)
  8825  
  8826  	// load expectations for model: additional_transitive_refed_object_thing.go
  8827  	expandRun.AddExpectations("additional_transitive_refed_object_thing.go", []string{
  8828  		`type AdditionalTransitiveRefedObjectThing struct {`,
  8829  		"	ThisOneNotRequired int64 `json:\"thisOneNotRequired,omitempty\"`",
  8830  		"	AdditionalTransitiveRefedObjectThing map[string]*AdditionalTransitiveRefedObjectThingAnon `json:\"-\"`",
  8831  		`func (m *AdditionalTransitiveRefedObjectThing) Validate(formats strfmt.Registry) error {`,
  8832  		`	if err := m.validateThisOneNotRequired(formats); err != nil {`,
  8833  		`	for k := range m.AdditionalTransitiveRefedObjectThing {`,
  8834  		`		if val, ok := m.AdditionalTransitiveRefedObjectThing[k]; ok {`,
  8835  		`			if val != nil {`,
  8836  		`				if err := val.Validate(formats); err != nil {`,
  8837  		`		return errors.CompositeValidationError(res...`,
  8838  		`func (m *AdditionalTransitiveRefedObjectThing) validateThisOneNotRequired(formats strfmt.Registry) error {`,
  8839  		`	if swag.IsZero(m.ThisOneNotRequired) {`,
  8840  		`	if err := validate.MaximumInt("thisOneNotRequired", "body", int64(m.ThisOneNotRequired), 10, false); err != nil {`,
  8841  		`type AdditionalTransitiveRefedObjectThingAnon struct {`,
  8842  		"	Prop1 *AdditionalTransitiveRefedObjectThingAnonProp1 `json:\"prop1,omitempty\"`",
  8843  		"	AdditionalTransitiveRefedObjectThingAnon map[string]*AdditionalTransitiveRefedObjectThingAnonAnon `json:\"-\"`",
  8844  		`func (m *AdditionalTransitiveRefedObjectThingAnon) Validate(formats strfmt.Registry) error {`,
  8845  		`	if err := m.validateProp1(formats); err != nil {`,
  8846  		`	for k := range m.AdditionalTransitiveRefedObjectThingAnon {`,
  8847  		`		if val, ok := m.AdditionalTransitiveRefedObjectThingAnon[k]; ok {`,
  8848  		`			if val != nil {`,
  8849  		`				if err := val.Validate(formats); err != nil {`,
  8850  		`		return errors.CompositeValidationError(res...`,
  8851  		`func (m *AdditionalTransitiveRefedObjectThingAnon) validateProp1(formats strfmt.Registry) error {`,
  8852  		`	if swag.IsZero(m.Prop1) {`,
  8853  		`	if m.Prop1 != nil {`,
  8854  		`		if err := m.Prop1.Validate(formats); err != nil {`,
  8855  		`			if ve, ok := err.(*errors.Validation); ok {`,
  8856  		`				return ve.ValidateName("prop1"`,
  8857  		`type AdditionalTransitiveRefedObjectThingAnonAnon struct {`,
  8858  		"	Discourse string `json:\"discourse,omitempty\"`",
  8859  		"	HoursSpent float64 `json:\"hoursSpent,omitempty\"`",
  8860  		"	AdditionalTransitiveRefedObjectThingAnonAnonAdditionalProperties map[string]interface{} `json:\"-\"`",
  8861  		`type AdditionalTransitiveRefedObjectThingAnonProp1 struct {`,
  8862  		"	ThisOneNotRequiredEither int64 `json:\"thisOneNotRequiredEither,omitempty\"`",
  8863  		"	AdditionalTransitiveRefedObjectThingAnonProp1 map[string]*AdditionalTransitiveRefedObjectThingAnonProp1Anon `json:\"-\"`",
  8864  		`func (m *AdditionalTransitiveRefedObjectThingAnonProp1) Validate(formats strfmt.Registry) error {`,
  8865  		`	if err := m.validateThisOneNotRequiredEither(formats); err != nil {`,
  8866  		`	for k := range m.AdditionalTransitiveRefedObjectThingAnonProp1 {`,
  8867  		`		if val, ok := m.AdditionalTransitiveRefedObjectThingAnonProp1[k]; ok {`,
  8868  		`			if val != nil {`,
  8869  		`				if err := val.Validate(formats); err != nil {`,
  8870  		`		return errors.CompositeValidationError(res...`,
  8871  		`func (m *AdditionalTransitiveRefedObjectThingAnonProp1) validateThisOneNotRequiredEither(formats strfmt.Registry) error {`,
  8872  		`	if swag.IsZero(m.ThisOneNotRequiredEither) {`,
  8873  		`	if err := validate.MaximumInt("prop1"+"."+"thisOneNotRequiredEither", "body", int64(m.ThisOneNotRequiredEither), 20, false); err != nil {`,
  8874  		`type AdditionalTransitiveRefedObjectThingAnonProp1Anon struct {`,
  8875  		"	A1 strfmt.DateTime `json:\"a1,omitempty\"`",
  8876  		"	B1 strfmt.Date `json:\"b1,omitempty\"`",
  8877  		"	AdditionalTransitiveRefedObjectThingAnonProp1AnonAdditionalProperties map[string]interface{} `json:\"-\"`",
  8878  		`func (m *AdditionalTransitiveRefedObjectThingAnonProp1Anon) Validate(formats strfmt.Registry) error {`,
  8879  		`	if err := m.validateA1(formats); err != nil {`,
  8880  		`	if err := m.validateB1(formats); err != nil {`,
  8881  		`		return errors.CompositeValidationError(res...`,
  8882  		`func (m *AdditionalTransitiveRefedObjectThingAnonProp1Anon) validateA1(formats strfmt.Registry) error {`,
  8883  		`	if swag.IsZero(m.A1) {`,
  8884  		`	if err := validate.FormatOf("a1", "body", "date-time", m.A1.String(), formats); err != nil {`,
  8885  		`func (m *AdditionalTransitiveRefedObjectThingAnonProp1Anon) validateB1(formats strfmt.Registry) error {`,
  8886  		`	if swag.IsZero(m.B1) {`,
  8887  		`	if err := validate.FormatOf("b1", "body", "date", m.B1.String(), formats); err != nil {`,
  8888  		// empty validation
  8889  		"func (m *AdditionalTransitiveRefedObjectThingAnonAnon) Validate(formats strfmt.Registry) error {\n	return nil\n}",
  8890  	},
  8891  		// not expected
  8892  		todo,
  8893  		// output in log
  8894  		noLines,
  8895  		noLines)
  8896  
  8897  }
  8898  
  8899  func initFixture1537() {
  8900  	// testing fixture-1537.yaml with flatten and expand (--skip-flatten)
  8901  	// TODO: expand
  8902  
  8903  	/*
  8904  	   repro issue 1537
  8905  	*/
  8906  
  8907  	f := newModelFixture("../fixtures/bugs/1537/fixture-1537.yaml", "param body required with array of objects")
  8908  	thisRun := f.AddRun(false)
  8909  
  8910  	// load expectations for model: profile_array.go
  8911  	thisRun.AddExpectations("profile_array.go", []string{
  8912  		`type ProfileArray struct {`,
  8913  		"	ProfileCfg []*ProfileCfg `json:\"profileCfg\"`",
  8914  		`func (m *ProfileArray) Validate(formats strfmt.Registry) error {`,
  8915  		`	if err := m.validateProfileCfg(formats); err != nil {`,
  8916  		`		return errors.CompositeValidationError(res...`,
  8917  		`func (m *ProfileArray) validateProfileCfg(formats strfmt.Registry) error {`,
  8918  		`	if err := validate.Required("profileCfg", "body", m.ProfileCfg); err != nil {`,
  8919  		`	for i := 0; i < len(m.ProfileCfg); i++ {`,
  8920  		// do we need Required when item is nullable?
  8921  		// nullable not required:
  8922  		`		if swag.IsZero(m.ProfileCfg[i]) {`,
  8923  		// nullable required:
  8924  		//`if err := validate.Required("profileCfg"+"."+strconv.Itoa(i), "body", m.ProfileCfg[i]); err != nil {`,
  8925  		`		if m.ProfileCfg[i] != nil {`,
  8926  		`			if err := m.ProfileCfg[i].Validate(formats); err != nil {`,
  8927  		`				if ve, ok := err.(*errors.Validation); ok {`,
  8928  		`					return ve.ValidateName("profileCfg" + "." + strconv.Itoa(i)`,
  8929  	},
  8930  		// not expected
  8931  		todo,
  8932  		// output in log
  8933  		noLines,
  8934  		noLines)
  8935  
  8936  	// load expectations for model: profile.go
  8937  	thisRun.AddExpectations("profile.go", []string{
  8938  		`type Profile struct {`,
  8939  		"	ProfileCfg ProfileCfgs `json:\"profileCfg,omitempty\"`",
  8940  		`func (m *Profile) Validate(formats strfmt.Registry) error {`,
  8941  		`	if err := m.validateProfileCfg(formats); err != nil {`,
  8942  		`		return errors.CompositeValidationError(res...`,
  8943  		`func (m *Profile) validateProfileCfg(formats strfmt.Registry) error {`,
  8944  		`	if swag.IsZero(m.ProfileCfg) {`,
  8945  		`	if err := m.ProfileCfg.Validate(formats); err != nil {`,
  8946  		`		if ve, ok := err.(*errors.Validation); ok {`,
  8947  		`			return ve.ValidateName("profileCfg"`,
  8948  	},
  8949  		// not expected
  8950  		todo,
  8951  		// output in log
  8952  		noLines,
  8953  		noLines)
  8954  
  8955  	// load expectations for model: profile_cfgs.go
  8956  	thisRun.AddExpectations("profile_cfgs.go", []string{
  8957  		`type ProfileCfgs []*ProfileCfg`,
  8958  		`func (m ProfileCfgs) Validate(formats strfmt.Registry) error {`,
  8959  		`	for i := 0; i < len(m); i++ {`,
  8960  		// do we need Required when item is nullable?
  8961  		// nullable not required:
  8962  		`		if swag.IsZero(m[i]) {`,
  8963  		// nullable required:
  8964  		//`if err := validate.Required(strconv.Itoa(i), "body", m[i]); err != nil {`,
  8965  		`		if m[i] != nil {`,
  8966  		`			if err := m[i].Validate(formats); err != nil {`,
  8967  		`				if ve, ok := err.(*errors.Validation); ok {`,
  8968  		`					return ve.ValidateName(strconv.Itoa(i)`,
  8969  		`		return errors.CompositeValidationError(res...`,
  8970  	},
  8971  		// not expected
  8972  		todo,
  8973  		// output in log
  8974  		noLines,
  8975  		noLines)
  8976  
  8977  	// load expectations for model: profile_cfg.go
  8978  	thisRun.AddExpectations("profile_cfg.go", []string{
  8979  		`type ProfileCfg struct {`,
  8980  		"	Value1 int32 `json:\"value1,omitempty\"`",
  8981  		"	Value2 int32 `json:\"value2,omitempty\"`",
  8982  		// empty validation
  8983  		"func (m *ProfileCfg) Validate(formats strfmt.Registry) error {\n	return nil\n}",
  8984  	},
  8985  		// not expected
  8986  		todo,
  8987  		// output in log
  8988  		noLines,
  8989  		noLines)
  8990  
  8991  	// load expectations for model: profile_required.go
  8992  	thisRun.AddExpectations("profile_required.go", []string{
  8993  		`type ProfileRequired struct {`,
  8994  		"	ProfileCfg ProfileCfgs `json:\"profileCfg\"`",
  8995  		`func (m *ProfileRequired) Validate(formats strfmt.Registry) error {`,
  8996  		`	if err := m.validateProfileCfg(formats); err != nil {`,
  8997  		`		return errors.CompositeValidationError(res...`,
  8998  		`func (m *ProfileRequired) validateProfileCfg(formats strfmt.Registry) error {`,
  8999  		`	if err := validate.Required("profileCfg", "body", m.ProfileCfg); err != nil {`,
  9000  		`	if err := m.ProfileCfg.Validate(formats); err != nil {`,
  9001  		`		if ve, ok := err.(*errors.Validation); ok {`,
  9002  		`			return ve.ValidateName("profileCfg"`,
  9003  	},
  9004  		// not expected
  9005  		todo,
  9006  		// output in log
  9007  		noLines,
  9008  		noLines)
  9009  
  9010  }
  9011  
  9012  func initFixture1537v2() {
  9013  	// testing fixture-1537-2.yaml with flatten and expand (--skip-flatten)
  9014  	// TODO: expand
  9015  
  9016  	/*
  9017  	   repro issue 1537, with aliased items
  9018  	*/
  9019  
  9020  	f := newModelFixture("../fixtures/bugs/1537/fixture-1537-2.yaml", "param body required with array of aliased items")
  9021  	thisRun := f.AddRun(false)
  9022  
  9023  	// load expectations for model: profiles.go
  9024  	thisRun.AddExpectations("profiles.go", []string{
  9025  		`type Profiles []ProfileCfgs`,
  9026  		`func (m Profiles) Validate(formats strfmt.Registry) error {`,
  9027  		`	for i := 0; i < len(m); i++ {`,
  9028  		`		if err := m[i].Validate(formats); err != nil {`,
  9029  		`			if ve, ok := err.(*errors.Validation); ok {`,
  9030  		`				return ve.ValidateName(strconv.Itoa(i)`,
  9031  		`		return errors.CompositeValidationError(res...`,
  9032  	},
  9033  		// not expected
  9034  		todo,
  9035  		// output in log
  9036  		noLines,
  9037  		noLines)
  9038  
  9039  	// load expectations for model: profile_cfgs_no_validation.go
  9040  	thisRun.AddExpectations("profile_cfgs_no_validation.go", []string{
  9041  		`type ProfileCfgsNoValidation []*ProfileCfg`,
  9042  		`func (m ProfileCfgsNoValidation) Validate(formats strfmt.Registry) error {`,
  9043  		`	for i := 0; i < len(m); i++ {`,
  9044  		// do we need Required when item is nullable?
  9045  		// nullable not required:
  9046  		`		if swag.IsZero(m[i]) {`,
  9047  		// nullable required:
  9048  		//`		if err := validate.Required(strconv.Itoa(i), "body", m[i]); err != nil {`,
  9049  		`		if m[i] != nil {`,
  9050  		`			if err := m[i].Validate(formats); err != nil {`,
  9051  		`				if ve, ok := err.(*errors.Validation); ok {`,
  9052  		`					return ve.ValidateName(strconv.Itoa(i)`,
  9053  		`		return errors.CompositeValidationError(res...`,
  9054  	},
  9055  		// not expected
  9056  		todo,
  9057  		// output in log
  9058  		noLines,
  9059  		noLines)
  9060  
  9061  	// load expectations for model: profile_cfgs.go
  9062  	thisRun.AddExpectations("profile_cfgs.go", []string{
  9063  		`type ProfileCfgs []*ProfileCfg`,
  9064  		`func (m ProfileCfgs) Validate(formats strfmt.Registry) error {`,
  9065  		`	iProfileCfgsSize := int64(len(m)`,
  9066  		`	if err := validate.MaxItems("", "body", iProfileCfgsSize, 10); err != nil {`,
  9067  		`	for i := 0; i < len(m); i++ {`,
  9068  		// do we need Required when item is nullable?
  9069  		// nullable not required:
  9070  		`		if swag.IsZero(m[i]) {`,
  9071  		// nullable required:
  9072  		//`		if err := validate.Required(strconv.Itoa(i), "body", m[i]); err != nil {`,
  9073  		`		if m[i] != nil {`,
  9074  		`			if err := m[i].Validate(formats); err != nil {`,
  9075  		`				if ve, ok := err.(*errors.Validation); ok {`,
  9076  		`					return ve.ValidateName(strconv.Itoa(i)`,
  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: profile_cfg.go
  9086  	thisRun.AddExpectations("profile_cfg.go", []string{
  9087  		`type ProfileCfg struct {`,
  9088  		"	Value1 int32 `json:\"value1,omitempty\"`",
  9089  		"	Value2 int32 `json:\"value2,omitempty\"`",
  9090  		// empty validation
  9091  		"func (m *ProfileCfg) Validate(formats strfmt.Registry) error {\n	return nil\n}",
  9092  	},
  9093  		// not expected
  9094  		todo,
  9095  		// output in log
  9096  		noLines,
  9097  		noLines)
  9098  
  9099  	// load expectations for model: profiles_no_validation.go
  9100  	thisRun.AddExpectations("profiles_no_validation.go", []string{
  9101  		`type ProfilesNoValidation []ProfileCfgsNoValidation`,
  9102  		`func (m ProfilesNoValidation) Validate(formats strfmt.Registry) error {`,
  9103  		`	for i := 0; i < len(m); i++ {`,
  9104  		`		if err := m[i].Validate(formats); err != nil {`,
  9105  		`			if ve, ok := err.(*errors.Validation); ok {`,
  9106  		`				return ve.ValidateName(strconv.Itoa(i)`,
  9107  		`		return errors.CompositeValidationError(res...`,
  9108  	},
  9109  		// not expected
  9110  		todo,
  9111  		// output in log
  9112  		noLines,
  9113  		noLines)
  9114  
  9115  }
  9116  
  9117  func initFixture15365() {
  9118  	// testing fixture-1536-5.yaml with flatten but NOT expand (--skip-flatten)
  9119  
  9120  	f := newModelFixture("../fixtures/bugs/1536/fixture-1536-5.yaml", "param body with maps")
  9121  	thisRun := f.AddRun(false)
  9122  
  9123  	// load expectations for model: model_array_of_nullable.go
  9124  	thisRun.AddExpectations("model_array_of_nullable.go", []string{
  9125  		`type ModelArrayOfNullable []*int64`,
  9126  		`func (m ModelArrayOfNullable) Validate(formats strfmt.Registry) error {`,
  9127  		`	for i := 0; i < len(m); i++ {`,
  9128  		// do we need Required when item is nullable?
  9129  		// nullable not required:
  9130  		`		if swag.IsZero(m[i]) {`,
  9131  		// nullable required:
  9132  		//`		if err := validate.Required(strconv.Itoa(i), "body", m[i]); err != nil {`,
  9133  		`		if err := validate.MinimumInt(strconv.Itoa(i), "body", int64(*m[i]), 0, false); err != nil {`,
  9134  		`		return errors.CompositeValidationError(res...`,
  9135  	},
  9136  		// not expected
  9137  		todo,
  9138  		// output in log
  9139  		noLines,
  9140  		noLines)
  9141  
  9142  	// load expectations for model: model_map_of_nullable_primitive.go
  9143  	thisRun.AddExpectations("model_map_of_nullable_primitive.go", []string{
  9144  		`type ModelMapOfNullablePrimitive map[string]*int64`,
  9145  		`func (m ModelMapOfNullablePrimitive) Validate(formats strfmt.Registry) error {`,
  9146  		`	for k := range m {`,
  9147  		// do we need Required when element is nullable?
  9148  		// nullable not required:
  9149  		`		if swag.IsZero(m[k]) {`,
  9150  		`		if err := validate.MinimumInt(k, "body", int64(*m[k]), 0, false); err != nil {`,
  9151  		`		return errors.CompositeValidationError(res...`,
  9152  	},
  9153  		// not expected
  9154  		todo,
  9155  		// output in log
  9156  		noLines,
  9157  		noLines)
  9158  
  9159  	// load expectations for model: model_array_with_max.go
  9160  	thisRun.AddExpectations("model_array_with_max.go", []string{
  9161  		`type ModelArrayWithMax []interface{`,
  9162  		`func (m ModelArrayWithMax) Validate(formats strfmt.Registry) error {`,
  9163  		`	iModelArrayWithMaxSize := int64(len(m)`,
  9164  		`	if err := validate.MaxItems("", "body", iModelArrayWithMaxSize, 10); err != nil {`,
  9165  		`		return errors.CompositeValidationError(res...`,
  9166  	},
  9167  		// not expected
  9168  		todo,
  9169  		// output in log
  9170  		noLines,
  9171  		noLines)
  9172  
  9173  	// load expectations for model: model_array_of_x_nullable.go
  9174  	thisRun.AddExpectations("model_array_of_x_nullable.go", []string{
  9175  		`type ModelArrayOfXNullable []*int64`,
  9176  		// do we need Required when item is nullable?
  9177  		// nullable not required:
  9178  		"func (m ModelArrayOfXNullable) Validate(formats strfmt.Registry) error {\n	return nil\n}",
  9179  		// nullable required:
  9180  		//`func (m ModelArrayOfXNullable) Validate(formats strfmt.Registry) error {`,
  9181  		//`func (m ModelArrayOfXNullable) Validate(formats strfmt.Registry) error {`,
  9182  		//`for i := 0; i < len(m); i++ {`,
  9183  		//`	if swag.IsZero(m[k]) {`,
  9184  		//`	if err := validate.Required(strconv.Itoa(i), "body", m[i]); err != nil {`,
  9185  	},
  9186  		// not expected
  9187  		todo,
  9188  		// output in log
  9189  		noLines,
  9190  		noLines)
  9191  
  9192  	// load expectations for model: model_array_of_nullable_format.go
  9193  	thisRun.AddExpectations("model_array_of_nullable_format.go", []string{
  9194  		`type ModelArrayOfNullableFormat []*strfmt.UUID`,
  9195  		`func (m ModelArrayOfNullableFormat) Validate(formats strfmt.Registry) error {`,
  9196  		`	for i := 0; i < len(m); i++ {`,
  9197  		// do we need Required when item is nullable?
  9198  		// nullable not required:
  9199  		`		if swag.IsZero(m[i]) {`,
  9200  		// nullable required:
  9201  		//`		if err := validate.Required(strconv.Itoa(i), "body", m[i]); err != nil {`,
  9202  		`		if err := validate.FormatOf(strconv.Itoa(i), "body", "uuid", m[i].String(), formats); err != nil {`,
  9203  		`		return errors.CompositeValidationError(res...`,
  9204  	},
  9205  		// not expected
  9206  		todo,
  9207  		// output in log
  9208  		noLines,
  9209  		noLines)
  9210  
  9211  	// load expectations for model: model_map_of_of_slice_of_nullable_primitive.go
  9212  	thisRun.AddExpectations("model_map_of_of_slice_of_nullable_primitive.go", []string{
  9213  		`type ModelMapOfOfSliceOfNullablePrimitive map[string][]*int64`,
  9214  		`func (m ModelMapOfOfSliceOfNullablePrimitive) Validate(formats strfmt.Registry) error {`,
  9215  		`	for k := range m {`,
  9216  		// do we need Required when element is nullable?
  9217  		// nullable not required:
  9218  		//`		if swag.IsZero(m[k]) {`,
  9219  		`		for i := 0; i < len(m[k]); i++ {`,
  9220  		// do we need Required when item is nullable?
  9221  		// nullable not required:
  9222  		//`			if swag.IsZero(m[k][i]) {`,
  9223  		`			if err := validate.MinimumInt(k+"."+strconv.Itoa(i), "body", int64(*m[k][i]), 0, false); err != nil {`,
  9224  		`		return errors.CompositeValidationError(res...`,
  9225  	},
  9226  		// not expected
  9227  		todo,
  9228  		// output in log
  9229  		noLines,
  9230  		noLines)
  9231  
  9232  	// load expectations for model: model_map_of_ref.go
  9233  	thisRun.AddExpectations("model_map_of_ref.go", []string{
  9234  		`type ModelMapOfRef map[string]ModelArrayWithMax`,
  9235  		`func (m ModelMapOfRef) Validate(formats strfmt.Registry) error {`,
  9236  		`	for k := range m {`,
  9237  		//`		if swag.IsZero(m[k]) {`,
  9238  		`		if err := m[k].Validate(formats); err != nil {`,
  9239  		`			if ve, ok := err.(*errors.Validation); ok {`,
  9240  		`				return ve.ValidateName(k`,
  9241  		`		return errors.CompositeValidationError(res...`,
  9242  	},
  9243  		// not expected
  9244  		todo,
  9245  		// output in log
  9246  		noLines,
  9247  		noLines)
  9248  
  9249  	// load expectations for model: model_array_of_format.go
  9250  	thisRun.AddExpectations("model_array_of_format.go", []string{
  9251  		`type ModelArrayOfFormat []strfmt.UUID`,
  9252  		`func (m ModelArrayOfFormat) Validate(formats strfmt.Registry) error {`,
  9253  		`	for i := 0; i < len(m); i++ {`,
  9254  		`		if err := validate.FormatOf(strconv.Itoa(i), "body", "uuid", m[i].String(), formats); err != nil {`,
  9255  		`		return errors.CompositeValidationError(res...`,
  9256  	},
  9257  		// not expected
  9258  		todo,
  9259  		// output in log
  9260  		noLines,
  9261  		noLines)
  9262  
  9263  	// load expectations for model: model_array_of_ref_no_validations.go
  9264  	thisRun.AddExpectations("model_array_of_ref_no_validations.go", []string{
  9265  		`type ModelArrayOfRefNoValidations []ModelInterface`,
  9266  		// empty validation
  9267  		"func (m ModelArrayOfRefNoValidations) Validate(formats strfmt.Registry) error {\n	return nil\n}",
  9268  	},
  9269  		// not expected
  9270  		todo,
  9271  		// output in log
  9272  		noLines,
  9273  		noLines)
  9274  
  9275  	// load expectations for model: model_array_of_not_nullable.go
  9276  	thisRun.AddExpectations("model_array_of_not_nullable.go", []string{
  9277  		`type ModelArrayOfNotNullable []int64`,
  9278  		`func (m ModelArrayOfNotNullable) Validate(formats strfmt.Registry) error {`,
  9279  		`	for i := 0; i < len(m); i++ {`,
  9280  		`		if err := validate.MinimumInt(strconv.Itoa(i), "body", int64(m[i]), 10, false); err != nil {`,
  9281  		`		return errors.CompositeValidationError(res...`,
  9282  	},
  9283  		// not expected
  9284  		todo,
  9285  		// output in log
  9286  		noLines,
  9287  		noLines)
  9288  
  9289  	// load expectations for model: model_array_of_nullable_string.go
  9290  	thisRun.AddExpectations("model_array_of_nullable_string.go", []string{
  9291  		`type ModelArrayOfNullableString []*string`,
  9292  		// do we need Required when item is nullable?
  9293  		// nullable not required:
  9294  		// empty validation
  9295  		"func (m ModelArrayOfNullableString) Validate(formats strfmt.Registry) error {\n	return nil\n}",
  9296  		// nullable required:
  9297  		//`func (m ModelArrayOfNullableString) Validate(formats strfmt.Registry) error {`,
  9298  		//`for i := 0; i < len(m); i++ {`,
  9299  		//`	if err := validate.Required(strconv.Itoa(i), "body", m[i]); err != nil {`,
  9300  	},
  9301  		// not expected
  9302  		todo,
  9303  		// output in log
  9304  		noLines,
  9305  		noLines)
  9306  
  9307  	// load expectations for model: model_map_of_x_nullable_primitive.go
  9308  	thisRun.AddExpectations("model_map_of_x_nullable_primitive.go", []string{
  9309  		`type ModelMapOfXNullablePrimitive map[string]*int64`,
  9310  		`func (m ModelMapOfXNullablePrimitive) Validate(formats strfmt.Registry) error {`,
  9311  		`	for k := range m {`,
  9312  		// do we need...?
  9313  		`		if swag.IsZero(m[k]) {`,
  9314  		`		if err := validate.MinimumInt(k, "body", int64(*m[k]), 100, false); err != nil {`,
  9315  		`		return errors.CompositeValidationError(res...`,
  9316  	},
  9317  		// not expected
  9318  		todo,
  9319  		// output in log
  9320  		noLines,
  9321  		noLines)
  9322  
  9323  	// load expectations for model: model_array_of_not_nullable_string.go
  9324  	thisRun.AddExpectations("model_array_of_not_nullable_string.go", []string{
  9325  		`type ModelArrayOfNotNullableString []string`,
  9326  		// empty validation
  9327  		"func (m ModelArrayOfNotNullableString) Validate(formats strfmt.Registry) error {\n	return nil\n}",
  9328  	},
  9329  		// not expected
  9330  		todo,
  9331  		// output in log
  9332  		noLines,
  9333  		noLines)
  9334  
  9335  	// load expectations for model: model_array_of_ref_slice_validations.go
  9336  	thisRun.AddExpectations("model_array_of_ref_slice_validations.go", []string{
  9337  		`type ModelArrayOfRefSliceValidations []ModelInterface`,
  9338  		`func (m ModelArrayOfRefSliceValidations) Validate(formats strfmt.Registry) error {`,
  9339  		`	iModelArrayOfRefSliceValidationsSize := int64(len(m)`,
  9340  		`	if err := validate.MaxItems("", "body", iModelArrayOfRefSliceValidationsSize, 10); err != nil {`,
  9341  		`		return errors.CompositeValidationError(res...`,
  9342  	},
  9343  		// not expected
  9344  		todo,
  9345  		// output in log
  9346  		noLines,
  9347  		noLines)
  9348  
  9349  	// load expectations for model: model_interface.go
  9350  	thisRun.AddExpectations("model_interface.go", []string{
  9351  		`type ModelInterface interface{`,
  9352  	},
  9353  		// not expected
  9354  		todo,
  9355  		// output in log
  9356  		noLines,
  9357  		noLines)
  9358  
  9359  	// load expectations for model: model_array_of_ref.go
  9360  	thisRun.AddExpectations("model_array_of_ref.go", []string{
  9361  		`type ModelArrayOfRef []ModelArrayOfXNullable`,
  9362  		`func (m ModelArrayOfRef) Validate(formats strfmt.Registry) error {`,
  9363  		`	for i := 0; i < len(m); i++ {`,
  9364  		`		if err := m[i].Validate(formats); err != nil {`,
  9365  		`			if ve, ok := err.(*errors.Validation); ok {`,
  9366  		`				return ve.ValidateName(strconv.Itoa(i)`,
  9367  		`		return errors.CompositeValidationError(res...`,
  9368  	},
  9369  		// not expected
  9370  		todo,
  9371  		// output in log
  9372  		noLines,
  9373  		noLines)
  9374  }
  9375  
  9376  func initFixture1548() {
  9377  	// testing fixture-1548.yaml with flatten
  9378  
  9379  	/*
  9380  		My App API: check that there is no format validation on Base64 types
  9381  	*/
  9382  
  9383  	f := newModelFixture("../fixtures/bugs/1548/fixture-1548.yaml", "My App API")
  9384  	thisRun := f.AddRun(false)
  9385  
  9386  	// load expectations for model: base64_alias.go
  9387  	thisRun.AddExpectations("base64_alias.go", []string{
  9388  		`type Base64Alias strfmt.Base64`,
  9389  		`func (m *Base64Alias) UnmarshalJSON(b []byte) error {`,
  9390  		`	return ((*strfmt.Base64)(m)).UnmarshalJSON(b`,
  9391  		`func (m Base64Alias) MarshalJSON() ([]byte, error) {`,
  9392  		`	return (strfmt.Base64(m)).MarshalJSON(`,
  9393  		`func (m Base64Alias) Validate(formats strfmt.Registry) error {`,
  9394  	},
  9395  		// not expected
  9396  		[]string{"TODO",
  9397  			"validate.FormatOf(",
  9398  			`return errors.CompositeValidationError(res...`,
  9399  		},
  9400  		// output in log
  9401  		noLines,
  9402  		noLines)
  9403  
  9404  	// load expectations for model: base64_map.go
  9405  	thisRun.AddExpectations("base64_map.go", []string{
  9406  		`type Base64Map map[string]strfmt.Base64`,
  9407  		`func (m Base64Map) Validate(formats strfmt.Registry) error {`,
  9408  		`	for k := range m {`,
  9409  		`		if err := validate.MaxLength(k, "body", string(m[k]), 100); err != nil {`,
  9410  		`		return errors.CompositeValidationError(res...`,
  9411  	},
  9412  		// not expected
  9413  		[]string{"TODO", "validate.FormatOf("},
  9414  		// output in log
  9415  		noLines,
  9416  		noLines)
  9417  
  9418  	// load expectations for model: base64_array.go
  9419  	thisRun.AddExpectations("base64_array.go", []string{
  9420  		`type Base64Array []strfmt.Base64`,
  9421  		`func (m Base64Array) Validate(formats strfmt.Registry) error {`,
  9422  	},
  9423  		// not expected
  9424  		[]string{
  9425  			"TODO",
  9426  			"validate.FormatOf(",
  9427  			`	for i := 0; i < len(m); i++ {`,
  9428  			`		return errors.CompositeValidationError(res...`,
  9429  		},
  9430  		// output in log
  9431  		noLines,
  9432  		noLines)
  9433  
  9434  	// load expectations for model: base64_model.go
  9435  	thisRun.AddExpectations("base64_model.go", []string{
  9436  		`type Base64Model struct {`,
  9437  		"	Prop1 strfmt.Base64 `json:\"prop1,omitempty\"`",
  9438  		`func (m *Base64Model) Validate(formats strfmt.Registry) error {`,
  9439  	},
  9440  		// not expected
  9441  		[]string{
  9442  			"TODO",
  9443  			"validate.FormatOf(",
  9444  			`	if err := m.validateProp1(formats); err != nil {`,
  9445  			`func (m *Base64Model) validateProp1(formats strfmt.Registry) error {`,
  9446  		},
  9447  		// output in log
  9448  		noLines,
  9449  		noLines)
  9450  }
  9451  
  9452  func initFixtureSimpleTuple() {
  9453  	// testing fixture-simple-tuple.yaml with flatten
  9454  
  9455  	/*
  9456  	   A basic test of for serialization generation for tuples and additionalItems.
  9457  
  9458  	*/
  9459  	f := newModelFixture("../fixtures/bugs/1571/fixture-simple-tuple.yaml", "fixture for serializing tuples")
  9460  	flattenRun := f.AddRun(false).WithMinimalFlatten(true)
  9461  	expandRun := f.AddRun(true)
  9462  
  9463  	// load expectations for model: tuple_thing_with_map_element.go
  9464  	flattenRun.AddExpectations("tuple_thing_with_map_element.go", []string{
  9465  		`type TupleThingWithMapElement struct {`,
  9466  		"	P0 map[string]string `json:\"-\"`",
  9467  		"	P1 map[string]int64 `json:\"-\"`",
  9468  		"	TupleThingWithMapElementItems []map[string]strfmt.Date `json:\"-\"`",
  9469  		`func (m *TupleThingWithMapElement) UnmarshalJSON(raw []byte) error {`,
  9470  		`	var stage1 []json.RawMessage`,
  9471  		`	buf := bytes.NewBuffer(raw`,
  9472  		`	dec := json.NewDecoder(buf`,
  9473  		`	dec.UseNumber(`,
  9474  		`	if err := dec.Decode(&stage1); err != nil {`,
  9475  		`	var lastIndex int`,
  9476  		`	if len(stage1) > 0 {`,
  9477  		`		var dataP0 map[string]string`,
  9478  		`		buf = bytes.NewBuffer(stage1[0]`,
  9479  		`		dec := json.NewDecoder(buf`,
  9480  		`		dec.UseNumber(`,
  9481  		`		if err := dec.Decode(&dataP0); err != nil {`,
  9482  		`		m.P0 = dataP0`,
  9483  		`		lastIndex = 0`,
  9484  		`	if len(stage1) > 1 {`,
  9485  		`		var dataP1 map[string]int64`,
  9486  		`		buf = bytes.NewBuffer(stage1[1]`,
  9487  		`		dec := json.NewDecoder(buf`,
  9488  		`		dec.UseNumber(`,
  9489  		`		if err := dec.Decode(&dataP1); err != nil {`,
  9490  		`		m.P1 = dataP1`,
  9491  		`		lastIndex = 1`,
  9492  		`	if len(stage1) > lastIndex+1 {`,
  9493  		`		for _, val := range stage1[lastIndex+1:] {`,
  9494  		`			var toadd map[string]strfmt.Date`,
  9495  		`			buf = bytes.NewBuffer(val`,
  9496  		`			dec := json.NewDecoder(buf`,
  9497  		`			dec.UseNumber(`,
  9498  		`			if err := dec.Decode(&toadd); err != nil {`,
  9499  		`			m.TupleThingWithMapElementItems = append(m.TupleThingWithMapElementItems, toadd`,
  9500  		`func (m TupleThingWithMapElement) MarshalJSON() ([]byte, error) {`,
  9501  		`	data := []interface{}{`,
  9502  		`		m.P0,`,
  9503  		`		m.P1,`,
  9504  		`	for _, v := range m.TupleThingWithMapElementItems {`,
  9505  		`		data = append(data, v`,
  9506  		`	return json.Marshal(data`,
  9507  		`func (m *TupleThingWithMapElement) Validate(formats strfmt.Registry) error {`,
  9508  		`	if err := m.validateP0(formats); err != nil {`,
  9509  		`	if err := m.validateP1(formats); err != nil {`,
  9510  		`	if err := m.validateTupleThingWithMapElementItems(formats); err != nil {`,
  9511  		`		return errors.CompositeValidationError(res...`,
  9512  		`func (m *TupleThingWithMapElement) validateP0(formats strfmt.Registry) error {`,
  9513  		`	if err := validate.Required("0", "body", m.P0); err != nil {`,
  9514  		`	for k := range m.P0 {`,
  9515  		`		if err := validate.MaxLength("0"+"."+k, "body", string(m.P0[k]), 10); err != nil {`,
  9516  		`func (m *TupleThingWithMapElement) validateP1(formats strfmt.Registry) error {`,
  9517  		`	if err := validate.Required("1", "body", m.P1); err != nil {`,
  9518  		`	for k := range m.P1 {`,
  9519  		`		if err := validate.MinimumInt("1"+"."+k, "body", int64(m.P1[k]), 10, false); err != nil {`,
  9520  		`func (m *TupleThingWithMapElement) validateTupleThingWithMapElementItems(formats strfmt.Registry) error {`,
  9521  		`	for i := range m.TupleThingWithMapElementItems {`,
  9522  		`		for k := range m.TupleThingWithMapElementItems[i] {`,
  9523  		`			if err := validate.FormatOf(strconv.Itoa(i+2)+"."+k, "body", "date", ` +
  9524  			`m.TupleThingWithMapElementItems[i][k].String(), formats); err != nil {`,
  9525  	},
  9526  		// not expected
  9527  		todo,
  9528  		// output in log
  9529  		noLines,
  9530  		noLines)
  9531  
  9532  	expandRun.AddExpectations("tuple_thing_with_map_element.go",
  9533  		flattenRun.ExpectedFor("TupleThingWithMapElement").ExpectedLines, todo, noLines, noLines)
  9534  
  9535  	// load expectations for model: true_tuple_thing.go
  9536  	flattenRun.AddExpectations("true_tuple_thing.go", []string{
  9537  		`type TrueTupleThing struct {`,
  9538  		"	P0 *float64 `json:\"-\"`",
  9539  		"	P1 *string `json:\"-\"`",
  9540  		"	TrueTupleThingItems []interface{} `json:\"-\"`",
  9541  		`func (m *TrueTupleThing) UnmarshalJSON(raw []byte) error {`,
  9542  		`	var stage1 []json.RawMessage`,
  9543  		`	buf := bytes.NewBuffer(raw`,
  9544  		`	dec := json.NewDecoder(buf`,
  9545  		`	dec.UseNumber(`,
  9546  		`	if err := dec.Decode(&stage1); err != nil {`,
  9547  		`	var lastIndex int`,
  9548  		`	if len(stage1) > 0 {`,
  9549  		`		var dataP0 float64`,
  9550  		`		buf = bytes.NewBuffer(stage1[0]`,
  9551  		`		dec := json.NewDecoder(buf`,
  9552  		`		dec.UseNumber(`,
  9553  		`		if err := dec.Decode(&dataP0); err != nil {`,
  9554  		`		m.P0 = &dataP0`,
  9555  		`		lastIndex = 0`,
  9556  		`	if len(stage1) > 1 {`,
  9557  		`		var dataP1 string`,
  9558  		`		buf = bytes.NewBuffer(stage1[1]`,
  9559  		`		dec := json.NewDecoder(buf`,
  9560  		`		dec.UseNumber(`,
  9561  		`		if err := dec.Decode(&dataP1); err != nil {`,
  9562  		`		m.P1 = &dataP1`,
  9563  		`		lastIndex = 1`,
  9564  		`	if len(stage1) > lastIndex+1 {`,
  9565  		`		for _, val := range stage1[lastIndex+1:] {`,
  9566  		`			var toadd interface{`,
  9567  		`			buf = bytes.NewBuffer(val`,
  9568  		`			dec := json.NewDecoder(buf`,
  9569  		`			dec.UseNumber(`,
  9570  		`			if err := dec.Decode(&toadd); err != nil {`,
  9571  		`			m.TrueTupleThingItems = append(m.TrueTupleThingItems, toadd`,
  9572  		`func (m TrueTupleThing) MarshalJSON() ([]byte, error) {`,
  9573  		`	data := []interface{}{`,
  9574  		`		m.P0,`,
  9575  		`		m.P1,`,
  9576  		`	for _, v := range m.TrueTupleThingItems {`,
  9577  		`		data = append(data, v`,
  9578  		`	return json.Marshal(data`,
  9579  		`func (m *TrueTupleThing) Validate(formats strfmt.Registry) error {`,
  9580  		`	if err := m.validateP0(formats); err != nil {`,
  9581  		`	if err := m.validateP1(formats); err != nil {`,
  9582  		`	if err := m.validateTrueTupleThingItems(formats); err != nil {`,
  9583  		`		return errors.CompositeValidationError(res...`,
  9584  		`func (m *TrueTupleThing) validateP0(formats strfmt.Registry) error {`,
  9585  		`	if err := validate.Required("0", "body", m.P0); err != nil {`,
  9586  		`func (m *TrueTupleThing) validateP1(formats strfmt.Registry) error {`,
  9587  		`	if err := validate.Required("1", "body", m.P1); err != nil {`,
  9588  		`func (m *TrueTupleThing) validateTrueTupleThingItems(formats strfmt.Registry) error {`,
  9589  	},
  9590  		// not expected
  9591  		todo,
  9592  		// output in log
  9593  		noLines,
  9594  		noLines)
  9595  
  9596  	expandRun.AddExpectations("true_tuple_thing.go",
  9597  		flattenRun.ExpectedFor("TrueTupleThing").ExpectedLines, todo, noLines, noLines)
  9598  
  9599  	// load expectations for model: false_tuple_thing.go
  9600  	flattenRun.AddExpectations("false_tuple_thing.go", []string{
  9601  		`type FalseTupleThing struct {`,
  9602  		"	P0 *float64 `json:\"-\"`",
  9603  		"	P1 *string `json:\"-\"`",
  9604  		`func (m *FalseTupleThing) UnmarshalJSON(raw []byte) error {`,
  9605  		`	var stage1 []json.RawMessage`,
  9606  		`	buf := bytes.NewBuffer(raw`,
  9607  		`	dec := json.NewDecoder(buf`,
  9608  		`	dec.UseNumber(`,
  9609  		`	if err := dec.Decode(&stage1); err != nil {`,
  9610  		`	if len(stage1) > 0 {`,
  9611  		`		var dataP0 float64`,
  9612  		`		buf = bytes.NewBuffer(stage1[0]`,
  9613  		`		dec := json.NewDecoder(buf`,
  9614  		`		dec.UseNumber(`,
  9615  		`		if err := dec.Decode(&dataP0); err != nil {`,
  9616  		`		m.P0 = &dataP0`,
  9617  		`	if len(stage1) > 1 {`,
  9618  		`		var dataP1 string`,
  9619  		`		buf = bytes.NewBuffer(stage1[1]`,
  9620  		`		dec := json.NewDecoder(buf`,
  9621  		`		dec.UseNumber(`,
  9622  		`		if err := dec.Decode(&dataP1); err != nil {`,
  9623  		`		m.P1 = &dataP1`,
  9624  		`func (m FalseTupleThing) MarshalJSON() ([]byte, error) {`,
  9625  		`	data := []interface{}{`,
  9626  		`		m.P0,`,
  9627  		`		m.P1,`,
  9628  		`	return json.Marshal(data`,
  9629  		`func (m *FalseTupleThing) Validate(formats strfmt.Registry) error {`,
  9630  		`	if err := m.validateP0(formats); err != nil {`,
  9631  		`	if err := m.validateP1(formats); err != nil {`,
  9632  		`		return errors.CompositeValidationError(res...`,
  9633  		`func (m *FalseTupleThing) validateP0(formats strfmt.Registry) error {`,
  9634  		`	if err := validate.Required("0", "body", m.P0); err != nil {`,
  9635  		`func (m *FalseTupleThing) validateP1(formats strfmt.Registry) error {`,
  9636  		`	if err := validate.Required("1", "body", m.P1); err != nil {`,
  9637  	},
  9638  		// not expected
  9639  		todo,
  9640  		// output in log
  9641  		noLines,
  9642  		noLines)
  9643  
  9644  	expandRun.AddExpectations("false_tuple_thing.go",
  9645  		flattenRun.ExpectedFor("FalseTupleThing").ExpectedLines, todo, noLines, noLines)
  9646  
  9647  	// load expectations for model: tuple_thing_with_not_nullable.go
  9648  	flattenRun.AddExpectations("tuple_thing_with_not_nullable.go", []string{
  9649  		`type TupleThingWithNotNullable struct {`,
  9650  		"	P0 string `json:\"-\"`",
  9651  		"	P1 *int64 `json:\"-\"`",
  9652  		"	TupleThingWithNotNullableItems []interface{} `json:\"-\"`",
  9653  		`func (m *TupleThingWithNotNullable) UnmarshalJSON(raw []byte) error {`,
  9654  		`	var stage1 []json.RawMessage`,
  9655  		`	buf := bytes.NewBuffer(raw`,
  9656  		`	dec := json.NewDecoder(buf`,
  9657  		`	dec.UseNumber(`,
  9658  		`	if err := dec.Decode(&stage1); err != nil {`,
  9659  		`	var lastIndex int`,
  9660  		`	if len(stage1) > 0 {`,
  9661  		`		var dataP0 string`,
  9662  		`		buf = bytes.NewBuffer(stage1[0]`,
  9663  		`		dec := json.NewDecoder(buf`,
  9664  		`		dec.UseNumber(`,
  9665  		`		if err := dec.Decode(&dataP0); err != nil {`,
  9666  		`		m.P0 = dataP0`,
  9667  		`		lastIndex = 0`,
  9668  		`	if len(stage1) > 1 {`,
  9669  		`		var dataP1 int64`,
  9670  		`		buf = bytes.NewBuffer(stage1[1]`,
  9671  		`		dec := json.NewDecoder(buf`,
  9672  		`		dec.UseNumber(`,
  9673  		`		if err := dec.Decode(&dataP1); err != nil {`,
  9674  		`		m.P1 = &dataP1`,
  9675  		`		lastIndex = 1`,
  9676  		`	if len(stage1) > lastIndex+1 {`,
  9677  		`		for _, val := range stage1[lastIndex+1:] {`,
  9678  		`			var toadd interface{`,
  9679  		`			buf = bytes.NewBuffer(val`,
  9680  		`			dec := json.NewDecoder(buf`,
  9681  		`			dec.UseNumber(`,
  9682  		`			if err := dec.Decode(&toadd); err != nil {`,
  9683  		`			m.TupleThingWithNotNullableItems = append(m.TupleThingWithNotNullableItems, toadd`,
  9684  		`func (m TupleThingWithNotNullable) MarshalJSON() ([]byte, error) {`,
  9685  		`	data := []interface{}{`,
  9686  		`		m.P0,`,
  9687  		`		m.P1,`,
  9688  		`	for _, v := range m.TupleThingWithNotNullableItems {`,
  9689  		`		data = append(data, v`,
  9690  		`	return json.Marshal(data`,
  9691  		`func (m *TupleThingWithNotNullable) Validate(formats strfmt.Registry) error {`,
  9692  		`	if err := m.validateP0(formats); err != nil {`,
  9693  		`	if err := m.validateP1(formats); err != nil {`,
  9694  		`	if err := m.validateTupleThingWithNotNullableItems(formats); err != nil {`,
  9695  		`		return errors.CompositeValidationError(res...`,
  9696  		`func (m *TupleThingWithNotNullable) validateP0(formats strfmt.Registry) error {`,
  9697  		`	if err := validate.RequiredString("0", "body", string(m.P0)); err != nil {`,
  9698  		`	if err := validate.MaxLength("0", "body", string(m.P0), 10); err != nil {`,
  9699  		`func (m *TupleThingWithNotNullable) validateP1(formats strfmt.Registry) error {`,
  9700  		`	if err := validate.Required("1", "body", m.P1); err != nil {`,
  9701  		`	if err := validate.MaximumInt("1", "body", int64(*m.P1), 10, false); err != nil {`,
  9702  		`func (m *TupleThingWithNotNullable) validateTupleThingWithNotNullableItems(formats strfmt.Registry) error {`,
  9703  	},
  9704  		// not expected
  9705  		todo,
  9706  		// output in log
  9707  		noLines,
  9708  		noLines)
  9709  
  9710  	expandRun.AddExpectations("tuple_thing_with_not_nullable.go",
  9711  		flattenRun.ExpectedFor("TupleThingWithNotNullable").ExpectedLines, todo, noLines, noLines)
  9712  
  9713  	// load expectations for model: tuple_thing.go
  9714  	flattenRun.AddExpectations("tuple_thing.go", []string{
  9715  		`type TupleThing struct {`,
  9716  		"	P0 *string `json:\"-\"`",
  9717  		"	P1 *string `json:\"-\"`",
  9718  		`func (m *TupleThing) UnmarshalJSON(raw []byte) error {`,
  9719  		`	var stage1 []json.RawMessage`,
  9720  		`	buf := bytes.NewBuffer(raw`,
  9721  		`	dec := json.NewDecoder(buf`,
  9722  		`	dec.UseNumber(`,
  9723  		`	if err := dec.Decode(&stage1); err != nil {`,
  9724  		`	if len(stage1) > 0 {`,
  9725  		`		var dataP0 string`,
  9726  		`		buf = bytes.NewBuffer(stage1[0]`,
  9727  		`		dec := json.NewDecoder(buf`,
  9728  		`		dec.UseNumber(`,
  9729  		`		if err := dec.Decode(&dataP0); err != nil {`,
  9730  		`		m.P0 = &dataP0`,
  9731  		`	if len(stage1) > 1 {`,
  9732  		`		var dataP1 string`,
  9733  		`		buf = bytes.NewBuffer(stage1[1]`,
  9734  		`		dec := json.NewDecoder(buf`,
  9735  		`		dec.UseNumber(`,
  9736  		`		if err := dec.Decode(&dataP1); err != nil {`,
  9737  		`		m.P1 = &dataP1`,
  9738  		`func (m TupleThing) MarshalJSON() ([]byte, error) {`,
  9739  		`	data := []interface{}{`,
  9740  		`		m.P0,`,
  9741  		`		m.P1,`,
  9742  		`	return json.Marshal(data`,
  9743  		`func (m *TupleThing) Validate(formats strfmt.Registry) error {`,
  9744  		`	if err := m.validateP0(formats); err != nil {`,
  9745  		`	if err := m.validateP1(formats); err != nil {`,
  9746  		`		return errors.CompositeValidationError(res...`,
  9747  		`var tupleThingTypeP0PropEnum []interface{`,
  9748  		`	var res []string`,
  9749  		"	if err := json.Unmarshal([]byte(`[\"CONST1\",\"CONST2\"]`), &res); err != nil {",
  9750  		`	for _, v := range res {`,
  9751  		`		tupleThingTypeP0PropEnum = append(tupleThingTypeP0PropEnum, v`,
  9752  		`	TupleThingP0CONST1 string = "CONST1"`,
  9753  		`	TupleThingP0CONST2 string = "CONST2"`,
  9754  		`func (m *TupleThing) validateP0Enum(path, location string, value string) error {`,
  9755  		`	if err := validate.EnumCase(path, location, value, tupleThingTypeP0PropEnum, true); err != nil {`,
  9756  		`func (m *TupleThing) validateP0(formats strfmt.Registry) error {`,
  9757  		`	if err := validate.Required("0", "body", m.P0); err != nil {`,
  9758  		`	if err := m.validateP0Enum("0", "body", *m.P0); err != nil {`,
  9759  		`var tupleThingTypeP1PropEnum []interface{`,
  9760  		`	var res []string`,
  9761  		"	if err := json.Unmarshal([]byte(`[\"CONST3\",\"CONST4\"]`), &res); err != nil {",
  9762  		`	for _, v := range res {`,
  9763  		`		tupleThingTypeP1PropEnum = append(tupleThingTypeP1PropEnum, v`,
  9764  		`	TupleThingP1CONST3 string = "CONST3"`,
  9765  		`	TupleThingP1CONST4 string = "CONST4"`,
  9766  		`func (m *TupleThing) validateP1Enum(path, location string, value string) error {`,
  9767  		`	if err := validate.EnumCase(path, location, value, tupleThingTypeP1PropEnum, true); err != nil {`,
  9768  		`func (m *TupleThing) validateP1(formats strfmt.Registry) error {`,
  9769  		`	if err := validate.Required("1", "body", m.P1); err != nil {`,
  9770  		`	if err := m.validateP1Enum("1", "body", *m.P1); err != nil {`,
  9771  	},
  9772  		// not expected
  9773  		todo,
  9774  		// output in log
  9775  		noLines,
  9776  		noLines)
  9777  
  9778  	expandRun.AddExpectations("tuple_thing.go",
  9779  		flattenRun.ExpectedFor("TupleThing").ExpectedLines, todo, noLines, noLines)
  9780  
  9781  	// load expectations for model: tuple_thing_with_additional_items.go
  9782  	flattenRun.AddExpectations("tuple_thing_with_additional_items.go", []string{
  9783  		`type TupleThingWithAdditionalItems struct {`,
  9784  		"	P0 *string `json:\"-\"`",
  9785  		"	P1 *int64 `json:\"-\"`",
  9786  		"	TupleThingWithAdditionalItemsItems []int64 `json:\"-\"`",
  9787  		`func (m *TupleThingWithAdditionalItems) UnmarshalJSON(raw []byte) error {`,
  9788  		`	var stage1 []json.RawMessage`,
  9789  		`	buf := bytes.NewBuffer(raw`,
  9790  		`	dec := json.NewDecoder(buf`,
  9791  		`	dec.UseNumber(`,
  9792  		`	if err := dec.Decode(&stage1); err != nil {`,
  9793  		`	var lastIndex int`,
  9794  		`	if len(stage1) > 0 {`,
  9795  		`		var dataP0 string`,
  9796  		`		buf = bytes.NewBuffer(stage1[0]`,
  9797  		`		dec := json.NewDecoder(buf`,
  9798  		`		dec.UseNumber(`,
  9799  		`		if err := dec.Decode(&dataP0); err != nil {`,
  9800  		`		m.P0 = &dataP0`,
  9801  		`		lastIndex = 0`,
  9802  		`	if len(stage1) > 1 {`,
  9803  		`		var dataP1 int64`,
  9804  		`		buf = bytes.NewBuffer(stage1[1]`,
  9805  		`		dec := json.NewDecoder(buf`,
  9806  		`		dec.UseNumber(`,
  9807  		`		if err := dec.Decode(&dataP1); err != nil {`,
  9808  		`		m.P1 = &dataP1`,
  9809  		`		lastIndex = 1`,
  9810  		`	if len(stage1) > lastIndex+1 {`,
  9811  		`		for _, val := range stage1[lastIndex+1:] {`,
  9812  		`			var toadd int64`,
  9813  		`			buf = bytes.NewBuffer(val`,
  9814  		`			dec := json.NewDecoder(buf`,
  9815  		`			dec.UseNumber(`,
  9816  		`			if err := dec.Decode(&toadd); err != nil {`,
  9817  		`			m.TupleThingWithAdditionalItemsItems = append(m.TupleThingWithAdditionalItemsItems, toadd`,
  9818  		`func (m TupleThingWithAdditionalItems) MarshalJSON() ([]byte, error) {`,
  9819  		`	data := []interface{}{`,
  9820  		`		m.P0,`,
  9821  		`		m.P1,`,
  9822  		`	for _, v := range m.TupleThingWithAdditionalItemsItems {`,
  9823  		`		data = append(data, v`,
  9824  		`	return json.Marshal(data`,
  9825  		`func (m *TupleThingWithAdditionalItems) Validate(formats strfmt.Registry) error {`,
  9826  		`	if err := m.validateP0(formats); err != nil {`,
  9827  		`	if err := m.validateP1(formats); err != nil {`,
  9828  		`	if err := m.validateTupleThingWithAdditionalItemsItems(formats); err != nil {`,
  9829  		`		return errors.CompositeValidationError(res...`,
  9830  		`func (m *TupleThingWithAdditionalItems) validateP0(formats strfmt.Registry) error {`,
  9831  		`	if err := validate.Required("0", "body", m.P0); err != nil {`,
  9832  		`func (m *TupleThingWithAdditionalItems) validateP1(formats strfmt.Registry) error {`,
  9833  		`	if err := validate.Required("1", "body", m.P1); err != nil {`,
  9834  		`	if err := validate.MaximumInt("1", "body", int64(*m.P1), 10, false); err != nil {`,
  9835  		`var tupleThingWithAdditionalItemsItemsEnum []interface{`,
  9836  		`	var res []int64`,
  9837  		"	if err := json.Unmarshal([]byte(`[1,2]`), &res); err != nil {",
  9838  		`	for _, v := range res {`,
  9839  		`		tupleThingWithAdditionalItemsItemsEnum = append(tupleThingWithAdditionalItemsItemsEnum, v`,
  9840  		`func (m *TupleThingWithAdditionalItems) validateTupleThingWithAdditionalItemsItemsEnum(path,` +
  9841  			` location string, value int64) error {`,
  9842  		`	if err := validate.EnumCase(path, location, value, tupleThingWithAdditionalItemsItemsEnum, true); err != nil {`,
  9843  		`func (m *TupleThingWithAdditionalItems) validateTupleThingWithAdditionalItemsItems(formats strfmt.Registry)` +
  9844  			` error {`,
  9845  		`	for i := range m.TupleThingWithAdditionalItemsItems {`,
  9846  		`		if err := m.validateTupleThingWithAdditionalItemsItemsEnum(strconv.Itoa(i+2), "body", ` +
  9847  			`m.TupleThingWithAdditionalItemsItems[i]); err != nil {`,
  9848  	},
  9849  		// not expected
  9850  		todo,
  9851  		// output in log
  9852  		noLines,
  9853  		noLines)
  9854  
  9855  	expandRun.AddExpectations("tuple_thing_with_additional_items.go",
  9856  		flattenRun.ExpectedFor("TupleThingWithAdditionalItems").ExpectedLines, todo, noLines, noLines)
  9857  
  9858  	// load expectations for model: tuple_thing_with_array_element.go
  9859  	flattenRun.AddExpectations("tuple_thing_with_array_element.go", []string{
  9860  		`type TupleThingWithArrayElement struct {`,
  9861  		"	P0 []string `json:\"-\"`",
  9862  		"	P1 []int64 `json:\"-\"`",
  9863  		"	TupleThingWithArrayElementItems [][]strfmt.Date `json:\"-\"`",
  9864  		`func (m *TupleThingWithArrayElement) UnmarshalJSON(raw []byte) error {`,
  9865  		`	var stage1 []json.RawMessage`,
  9866  		`	buf := bytes.NewBuffer(raw`,
  9867  		`	dec := json.NewDecoder(buf`,
  9868  		`	dec.UseNumber(`,
  9869  		`	if err := dec.Decode(&stage1); err != nil {`,
  9870  		`	var lastIndex int`,
  9871  		`	if len(stage1) > 0 {`,
  9872  		`		var dataP0 []string`,
  9873  		`		buf = bytes.NewBuffer(stage1[0]`,
  9874  		`		dec := json.NewDecoder(buf`,
  9875  		`		dec.UseNumber(`,
  9876  		`		if err := dec.Decode(&dataP0); err != nil {`,
  9877  		`		m.P0 = dataP0`,
  9878  		`		lastIndex = 0`,
  9879  		`	if len(stage1) > 1 {`,
  9880  		`		var dataP1 []int64`,
  9881  		`		buf = bytes.NewBuffer(stage1[1]`,
  9882  		`		dec := json.NewDecoder(buf`,
  9883  		`		dec.UseNumber(`,
  9884  		`		if err := dec.Decode(&dataP1); err != nil {`,
  9885  		`		m.P1 = dataP1`,
  9886  		`		lastIndex = 1`,
  9887  		`	if len(stage1) > lastIndex+1 {`,
  9888  		`		for _, val := range stage1[lastIndex+1:] {`,
  9889  		`			var toadd []strfmt.Date`,
  9890  		`			buf = bytes.NewBuffer(val`,
  9891  		`			dec := json.NewDecoder(buf`,
  9892  		`			dec.UseNumber(`,
  9893  		`			if err := dec.Decode(&toadd); err != nil {`,
  9894  		`			m.TupleThingWithArrayElementItems = append(m.TupleThingWithArrayElementItems, toadd`,
  9895  		`func (m TupleThingWithArrayElement) MarshalJSON() ([]byte, error) {`,
  9896  		`	data := []interface{}{`,
  9897  		`		m.P0,`,
  9898  		`		m.P1,`,
  9899  		`	for _, v := range m.TupleThingWithArrayElementItems {`,
  9900  		`		data = append(data, v`,
  9901  		`	return json.Marshal(data`,
  9902  		`func (m *TupleThingWithArrayElement) Validate(formats strfmt.Registry) error {`,
  9903  		`	if err := m.validateP0(formats); err != nil {`,
  9904  		`	if err := m.validateP1(formats); err != nil {`,
  9905  		`	if err := m.validateTupleThingWithArrayElementItems(formats); err != nil {`,
  9906  		`		return errors.CompositeValidationError(res...`,
  9907  		`func (m *TupleThingWithArrayElement) validateP0(formats strfmt.Registry) error {`,
  9908  		`	if err := validate.Required("0", "body", m.P0); err != nil {`,
  9909  		`	iP0Size := int64(len(m.P0)`,
  9910  		`	if err := validate.MaxItems("0", "body", iP0Size, 10); err != nil {`,
  9911  		`	for i := 0; i < len(m.P0); i++ {`,
  9912  		`		if err := validate.MaxLength("0"+"."+strconv.Itoa(i), "body", string(m.P0[i]), 10); err != nil {`,
  9913  		`func (m *TupleThingWithArrayElement) validateP1(formats strfmt.Registry) error {`,
  9914  		`	if err := validate.Required("1", "body", m.P1); err != nil {`,
  9915  		`	iP1Size := int64(len(m.P1)`,
  9916  		`	if err := validate.MinItems("1", "body", iP1Size, 20); err != nil {`,
  9917  		`	for i := 0; i < len(m.P1); i++ {`,
  9918  		`		if err := validate.MinimumInt("1"+"."+strconv.Itoa(i), "body", int64(m.P1[i]), 10, false); err != nil {`,
  9919  		`func (m *TupleThingWithArrayElement) validateTupleThingWithArrayElementItems(formats strfmt.Registry) error {`,
  9920  		`	for i := range m.TupleThingWithArrayElementItems {`,
  9921  		`		for ii := 0; ii < len(m.TupleThingWithArrayElementItems[i]); ii++ {`,
  9922  		`			if err := validate.FormatOf(strconv.Itoa(i+2)+"."+strconv.Itoa(ii), "body", ` +
  9923  			`"date", m.TupleThingWithArrayElementItems[i][ii].String(), formats); err != nil {`,
  9924  	},
  9925  		// not expected
  9926  		todo,
  9927  		// output in log
  9928  		noLines,
  9929  		noLines)
  9930  
  9931  	expandRun.AddExpectations("tuple_thing_with_array_element.go",
  9932  		flattenRun.ExpectedFor("TupleThingWithArrayElement").ExpectedLines, todo, noLines, noLines)
  9933  
  9934  	// load expectations for model: array_of_tuples.go
  9935  	flattenRun.AddExpectations("array_of_tuples.go", []string{
  9936  		`type ArrayOfTuples []ArrayOfTuplesTuple0`,
  9937  		`func (m ArrayOfTuples) Validate(formats strfmt.Registry) error {`,
  9938  		`	iArrayOfTuplesSize := int64(len(m)`,
  9939  		`	if err := validate.MinItems("", "body", iArrayOfTuplesSize, 1); err != nil {`,
  9940  		`	for i := 0; i < len(m); i++ {`,
  9941  		`		if err := m[i].Validate(formats); err != nil {`,
  9942  		`			if ve, ok := err.(*errors.Validation); ok {`,
  9943  		`				return ve.ValidateName(strconv.Itoa(i)`,
  9944  		`		return errors.CompositeValidationError(res...`,
  9945  		`type ArrayOfTuplesTuple0 struct {`,
  9946  		"	P0 []string `json:\"-\"`",
  9947  		"	P1 []int64 `json:\"-\"`",
  9948  		"	ArrayOfTuplesTuple0Items [][]strfmt.Date `json:\"-\"`",
  9949  		`func (m *ArrayOfTuplesTuple0) UnmarshalJSON(raw []byte) error {`,
  9950  		`	var stage1 []json.RawMessage`,
  9951  		`	buf := bytes.NewBuffer(raw`,
  9952  		`	dec := json.NewDecoder(buf`,
  9953  		`	dec.UseNumber(`,
  9954  		`	if err := dec.Decode(&stage1); err != nil {`,
  9955  		`	var lastIndex int`,
  9956  		`	if len(stage1) > 0 {`,
  9957  		`		var dataP0 []string`,
  9958  		`		buf = bytes.NewBuffer(stage1[0]`,
  9959  		`		dec := json.NewDecoder(buf`,
  9960  		`		dec.UseNumber(`,
  9961  		`		if err := dec.Decode(&dataP0); err != nil {`,
  9962  		`		m.P0 = dataP0`,
  9963  		`		lastIndex = 0`,
  9964  		`	if len(stage1) > 1 {`,
  9965  		`		var dataP1 []int64`,
  9966  		`		buf = bytes.NewBuffer(stage1[1]`,
  9967  		`		dec := json.NewDecoder(buf`,
  9968  		`		dec.UseNumber(`,
  9969  		`		if err := dec.Decode(&dataP1); err != nil {`,
  9970  		`		m.P1 = dataP1`,
  9971  		`		lastIndex = 1`,
  9972  		`	if len(stage1) > lastIndex+1 {`,
  9973  		`		for _, val := range stage1[lastIndex+1:] {`,
  9974  		`			var toadd []strfmt.Date`,
  9975  		`			buf = bytes.NewBuffer(val`,
  9976  		`			dec := json.NewDecoder(buf`,
  9977  		`			dec.UseNumber(`,
  9978  		`			if err := dec.Decode(&toadd); err != nil {`,
  9979  		`			m.ArrayOfTuplesTuple0Items = append(m.ArrayOfTuplesTuple0Items, toadd`,
  9980  		`func (m ArrayOfTuplesTuple0) MarshalJSON() ([]byte, error) {`,
  9981  		`	data := []interface{}{`,
  9982  		`		m.P0,`,
  9983  		`		m.P1,`,
  9984  		`	for _, v := range m.ArrayOfTuplesTuple0Items {`,
  9985  		`		data = append(data, v`,
  9986  		`	return json.Marshal(data`,
  9987  		`func (m *ArrayOfTuplesTuple0) Validate(formats strfmt.Registry) error {`,
  9988  		`	if err := m.validateP0(formats); err != nil {`,
  9989  		`	if err := m.validateP1(formats); err != nil {`,
  9990  		`	if err := m.validateArrayOfTuplesTuple0Items(formats); err != nil {`,
  9991  		`		return errors.CompositeValidationError(res...`,
  9992  		`func (m *ArrayOfTuplesTuple0) validateP0(formats strfmt.Registry) error {`,
  9993  		`	if err := validate.Required("P0", "body", m.P0); err != nil {`,
  9994  		`	iP0Size := int64(len(m.P0)`,
  9995  		`	if err := validate.MaxItems("P0", "body", iP0Size, 10); err != nil {`,
  9996  		`	for i := 0; i < len(m.P0); i++ {`,
  9997  		`		if err := validate.MaxLength("P0"+"."+strconv.Itoa(i), "body", string(m.P0[i]), 10); err != nil {`,
  9998  		`func (m *ArrayOfTuplesTuple0) validateP1(formats strfmt.Registry) error {`,
  9999  		`	if err := validate.Required("P1", "body", m.P1); err != nil {`,
 10000  		`	iP1Size := int64(len(m.P1)`,
 10001  		`	if err := validate.MinItems("P1", "body", iP1Size, 20); err != nil {`,
 10002  		`	for i := 0; i < len(m.P1); i++ {`,
 10003  		`		if err := validate.MinimumInt("P1"+"."+strconv.Itoa(i), ` +
 10004  			`"body", int64(m.P1[i]), 10, false); err != nil {`,
 10005  		`func (m *ArrayOfTuplesTuple0) validateArrayOfTuplesTuple0Items(formats strfmt.Registry) error {`,
 10006  		`	for i := range m.ArrayOfTuplesTuple0Items {`,
 10007  		`		for ii := 0; ii < len(m.ArrayOfTuplesTuple0Items[i]); ii++ {`,
 10008  		`			if err := validate.FormatOf(strconv.Itoa(i)+"."+strconv.Itoa(ii), ` +
 10009  			`"body", "date", m.ArrayOfTuplesTuple0Items[i][ii].String(), formats); err != nil {`,
 10010  	},
 10011  		// not expected
 10012  		todo,
 10013  		// output in log
 10014  		noLines,
 10015  		noLines)
 10016  
 10017  	expandRun.AddExpectations("array_of_tuples.go",
 10018  		flattenRun.ExpectedFor("ArrayOfTuples").ExpectedLines, todo, noLines, noLines)
 10019  
 10020  	// load expectations for model: tuple_thing_with_object_element.go
 10021  	flattenRun.AddExpectations("tuple_thing_with_object_element.go", []string{
 10022  		`type TupleThingWithObjectElement struct {`,
 10023  		"	P0 *TupleThingWithObjectElementItems0 `json:\"-\"`",
 10024  		"	P1 map[string]int64 `json:\"-\"`",
 10025  		"	TupleThingWithObjectElementItems []map[string]strfmt.Date `json:\"-\"`",
 10026  		`func (m *TupleThingWithObjectElement) UnmarshalJSON(raw []byte) error {`,
 10027  		`	var stage1 []json.RawMessage`,
 10028  		`	buf := bytes.NewBuffer(raw`,
 10029  		`	dec := json.NewDecoder(buf`,
 10030  		`	dec.UseNumber(`,
 10031  		`	if err := dec.Decode(&stage1); err != nil {`,
 10032  		`	var lastIndex int`,
 10033  		`	if len(stage1) > 0 {`,
 10034  		`		var dataP0 TupleThingWithObjectElementItems0`,
 10035  		`		buf = bytes.NewBuffer(stage1[0]`,
 10036  		`		dec := json.NewDecoder(buf`,
 10037  		`		dec.UseNumber(`,
 10038  		`		if err := dec.Decode(&dataP0); err != nil {`,
 10039  		`		m.P0 = &dataP0`,
 10040  		`		lastIndex = 0`,
 10041  		`	if len(stage1) > 1 {`,
 10042  		`		var dataP1 map[string]int64`,
 10043  		`		buf = bytes.NewBuffer(stage1[1]`,
 10044  		`		dec := json.NewDecoder(buf`,
 10045  		`		dec.UseNumber(`,
 10046  		`		if err := dec.Decode(&dataP1); err != nil {`,
 10047  		`		m.P1 = dataP1`,
 10048  		`		lastIndex = 1`,
 10049  		`	if len(stage1) > lastIndex+1 {`,
 10050  		`		for _, val := range stage1[lastIndex+1:] {`,
 10051  		`			var toadd map[string]strfmt.Date`,
 10052  		`			buf = bytes.NewBuffer(val`,
 10053  		`			dec := json.NewDecoder(buf`,
 10054  		`			dec.UseNumber(`,
 10055  		`			if err := dec.Decode(&toadd); err != nil {`,
 10056  		`			m.TupleThingWithObjectElementItems = append(m.TupleThingWithObjectElementItems, toadd`,
 10057  		`func (m TupleThingWithObjectElement) MarshalJSON() ([]byte, error) {`,
 10058  		`	data := []interface{}{`,
 10059  		`		m.P0,`,
 10060  		`		m.P1,`,
 10061  		`	for _, v := range m.TupleThingWithObjectElementItems {`,
 10062  		`		data = append(data, v`,
 10063  		`	return json.Marshal(data`,
 10064  		`func (m *TupleThingWithObjectElement) Validate(formats strfmt.Registry) error {`,
 10065  		`	if err := m.validateP0(formats); err != nil {`,
 10066  		`	if err := m.validateP1(formats); err != nil {`,
 10067  		`	if err := m.validateTupleThingWithObjectElementItems(formats); err != nil {`,
 10068  		`		return errors.CompositeValidationError(res...`,
 10069  		`func (m *TupleThingWithObjectElement) validateP0(formats strfmt.Registry) error {`,
 10070  		`	if err := validate.Required("0", "body", m.P0); err != nil {`,
 10071  		`	if m.P0 != nil {`,
 10072  		`		if err := m.P0.Validate(formats); err != nil {`,
 10073  		`			if ve, ok := err.(*errors.Validation); ok {`,
 10074  		`				return ve.ValidateName("0"`,
 10075  		`func (m *TupleThingWithObjectElement) validateP1(formats strfmt.Registry) error {`,
 10076  		`	if err := validate.Required("1", "body", m.P1); err != nil {`,
 10077  		`	for k := range m.P1 {`,
 10078  		`		if err := validate.MinimumInt("1"+"."+k, "body", int64(m.P1[k]), 10, false); err != nil {`,
 10079  		`func (m *TupleThingWithObjectElement) validateTupleThingWithObjectElementItems(formats strfmt.Registry)` +
 10080  			` error {`,
 10081  		`	for i := range m.TupleThingWithObjectElementItems {`,
 10082  		`		for k := range m.TupleThingWithObjectElementItems[i] {`,
 10083  		`			if err := validate.FormatOf(strconv.Itoa(i+2)+"."+k, "body", "date", ` +
 10084  			`m.TupleThingWithObjectElementItems[i][k].String(), formats); err != nil {`,
 10085  		`type TupleThingWithObjectElementItems0 struct {`,
 10086  		"	Prop1 string `json:\"prop1,omitempty\"`",
 10087  		`func (m *TupleThingWithObjectElementItems0) Validate(formats strfmt.Registry) error {`,
 10088  		`	if err := m.validateProp1(formats); err != nil {`,
 10089  		`		return errors.CompositeValidationError(res...`,
 10090  		`func (m *TupleThingWithObjectElementItems0) validateProp1(formats strfmt.Registry) error {`,
 10091  		`	if swag.IsZero(m.Prop1) {`,
 10092  		`	if err := validate.MaxLength("prop1", "body", string(m.Prop1), 10); err != nil {`,
 10093  	},
 10094  		// not expected
 10095  		todo,
 10096  		// output in log
 10097  		noLines,
 10098  		noLines)
 10099  
 10100  	expandRun.AddExpectations("tuple_thing_with_object_element.go",
 10101  		flattenRun.ExpectedFor("TupleThingWithObjectElement").ExpectedLines, todo, noLines, noLines)
 10102  
 10103  	// load expectations for model: tuple_thing_with_no_additional_items.go
 10104  	flattenRun.AddExpectations("tuple_thing_with_no_additional_items.go", []string{
 10105  		`type TupleThingWithNoAdditionalItems struct {`,
 10106  		"	P0 *string `json:\"-\"`",
 10107  		"	P1 *int64 `json:\"-\"`",
 10108  		`func (m *TupleThingWithNoAdditionalItems) UnmarshalJSON(raw []byte) error {`,
 10109  		`	var stage1 []json.RawMessage`,
 10110  		`	buf := bytes.NewBuffer(raw`,
 10111  		`	dec := json.NewDecoder(buf`,
 10112  		`	dec.UseNumber(`,
 10113  		`	if err := dec.Decode(&stage1); err != nil {`,
 10114  		`	if len(stage1) > 0 {`,
 10115  		`		var dataP0 string`,
 10116  		`		buf = bytes.NewBuffer(stage1[0]`,
 10117  		`		dec := json.NewDecoder(buf`,
 10118  		`		dec.UseNumber(`,
 10119  		`		if err := dec.Decode(&dataP0); err != nil {`,
 10120  		`		m.P0 = &dataP0`,
 10121  		`	if len(stage1) > 1 {`,
 10122  		`		var dataP1 int64`,
 10123  		`		buf = bytes.NewBuffer(stage1[1]`,
 10124  		`		dec := json.NewDecoder(buf`,
 10125  		`		dec.UseNumber(`,
 10126  		`		if err := dec.Decode(&dataP1); err != nil {`,
 10127  		`		m.P1 = &dataP1`,
 10128  		`func (m TupleThingWithNoAdditionalItems) MarshalJSON() ([]byte, error) {`,
 10129  		`	data := []interface{}{`,
 10130  		`		m.P0,`,
 10131  		`		m.P1,`,
 10132  		`	return json.Marshal(data`,
 10133  		`func (m *TupleThingWithNoAdditionalItems) Validate(formats strfmt.Registry) error {`,
 10134  		`	if err := m.validateP0(formats); err != nil {`,
 10135  		`	if err := m.validateP1(formats); err != nil {`,
 10136  		`		return errors.CompositeValidationError(res...`,
 10137  		`func (m *TupleThingWithNoAdditionalItems) validateP0(formats strfmt.Registry) error {`,
 10138  		`	if err := validate.Required("0", "body", m.P0); err != nil {`,
 10139  		`func (m *TupleThingWithNoAdditionalItems) validateP1(formats strfmt.Registry) error {`,
 10140  		`	if err := validate.Required("1", "body", m.P1); err != nil {`,
 10141  		`	if err := validate.MaximumInt("1", "body", int64(*m.P1), 10, false); err != nil {`,
 10142  	},
 10143  		// not expected
 10144  		todo,
 10145  		// output in log
 10146  		noLines,
 10147  		noLines)
 10148  
 10149  	expandRun.AddExpectations("tuple_thing_with_no_additional_items.go",
 10150  		flattenRun.ExpectedFor("TupleThingWithNoAdditionalItems").ExpectedLines, todo, noLines, noLines)
 10151  
 10152  	// load expectations for model: tuple_thing_with_any_additional_items.go
 10153  	flattenRun.AddExpectations("tuple_thing_with_any_additional_items.go", []string{
 10154  		`type TupleThingWithAnyAdditionalItems struct {`,
 10155  		"	P0 *string `json:\"-\"`",
 10156  		"	P1 *int64 `json:\"-\"`",
 10157  		"	TupleThingWithAnyAdditionalItemsItems []interface{} `json:\"-\"`",
 10158  		`func (m *TupleThingWithAnyAdditionalItems) UnmarshalJSON(raw []byte) error {`,
 10159  		`	var stage1 []json.RawMessage`,
 10160  		`	buf := bytes.NewBuffer(raw`,
 10161  		`	dec := json.NewDecoder(buf`,
 10162  		`	dec.UseNumber(`,
 10163  		`	if err := dec.Decode(&stage1); err != nil {`,
 10164  		`	var lastIndex int`,
 10165  		`	if len(stage1) > 0 {`,
 10166  		`		var dataP0 string`,
 10167  		`		buf = bytes.NewBuffer(stage1[0]`,
 10168  		`		dec := json.NewDecoder(buf`,
 10169  		`		dec.UseNumber(`,
 10170  		`		if err := dec.Decode(&dataP0); err != nil {`,
 10171  		`		m.P0 = &dataP0`,
 10172  		`		lastIndex = 0`,
 10173  		`	if len(stage1) > 1 {`,
 10174  		`		var dataP1 int64`,
 10175  		`		buf = bytes.NewBuffer(stage1[1]`,
 10176  		`		dec := json.NewDecoder(buf`,
 10177  		`		dec.UseNumber(`,
 10178  		`		if err := dec.Decode(&dataP1); err != nil {`,
 10179  		`		m.P1 = &dataP1`,
 10180  		`		lastIndex = 1`,
 10181  		`	if len(stage1) > lastIndex+1 {`,
 10182  		`		for _, val := range stage1[lastIndex+1:] {`,
 10183  		`			var toadd interface{`,
 10184  		`			buf = bytes.NewBuffer(val`,
 10185  		`			dec := json.NewDecoder(buf`,
 10186  		`			dec.UseNumber(`,
 10187  		`			if err := dec.Decode(&toadd); err != nil {`,
 10188  		`			m.TupleThingWithAnyAdditionalItemsItems = append(m.TupleThingWithAnyAdditionalItemsItems, toadd`,
 10189  		`func (m TupleThingWithAnyAdditionalItems) MarshalJSON() ([]byte, error) {`,
 10190  		`	data := []interface{}{`,
 10191  		`		m.P0,`,
 10192  		`		m.P1,`,
 10193  		`	for _, v := range m.TupleThingWithAnyAdditionalItemsItems {`,
 10194  		`		data = append(data, v`,
 10195  		`	return json.Marshal(data`,
 10196  		`func (m *TupleThingWithAnyAdditionalItems) Validate(formats strfmt.Registry) error {`,
 10197  		`	if err := m.validateP0(formats); err != nil {`,
 10198  		`	if err := m.validateP1(formats); err != nil {`,
 10199  		`	if err := m.validateTupleThingWithAnyAdditionalItemsItems(formats); err != nil {`,
 10200  		`		return errors.CompositeValidationError(res...`,
 10201  		`func (m *TupleThingWithAnyAdditionalItems) validateP0(formats strfmt.Registry) error {`,
 10202  		`	if err := validate.Required("0", "body", m.P0); err != nil {`,
 10203  		`	if err := validate.MaxLength("0", "body", string(*m.P0), 10); err != nil {`,
 10204  		`func (m *TupleThingWithAnyAdditionalItems) validateP1(formats strfmt.Registry) error {`,
 10205  		`	if err := validate.Required("1", "body", m.P1); err != nil {`,
 10206  		`	if err := validate.MaximumInt("1", "body", int64(*m.P1), 10, false); err != nil {`,
 10207  		`func (m *TupleThingWithAnyAdditionalItems) ` +
 10208  			`validateTupleThingWithAnyAdditionalItemsItems(formats strfmt.Registry) error {`,
 10209  	},
 10210  		// not expected
 10211  		todo,
 10212  		// output in log
 10213  		noLines,
 10214  		noLines)
 10215  
 10216  	expandRun.AddExpectations("tuple_thing_with_any_additional_items.go",
 10217  		flattenRun.ExpectedFor("TupleThingWithAnyAdditionalItems").ExpectedLines, todo, noLines, noLines)
 10218  }
 10219  
 10220  func initFixtureDeepMaps() {
 10221  	// testing fixture-deepMaps.yaml with minimal flatten
 10222  
 10223  	f := newModelFixture("../fixtures/enhancements/1572/fixture-deepMaps.yaml", "issue 1572 - deep maps")
 10224  	thisRun := f.AddRun(false).WithMinimalFlatten(true)
 10225  
 10226  	// load expectations for model: model_object_vanilla.go
 10227  	thisRun.AddExpectations("model_object_vanilla.go", []string{
 10228  		`type ModelObjectVanilla struct {`,
 10229  		"	Prop0 *ModelSanity `json:\"prop0,omitempty\"`",
 10230  		"	Prop1 *ModelSanity `json:\"prop1\"`",
 10231  		"	Prop2 []*ModelSanity `json:\"prop2\"`",
 10232  		"	Prop3 *ModelSanity `json:\"prop3,omitempty\"`",
 10233  		"	Prop4 map[string]ModelSanity `json:\"prop4,omitempty\"`",
 10234  		"	Prop5 int64 `json:\"prop5,omitempty\"`",
 10235  		"	ModelObjectVanilla map[string]map[string]map[string]ModelSanity `json:\"-\"`",
 10236  		`func (m *ModelObjectVanilla) Validate(formats strfmt.Registry) error {`,
 10237  		`	if err := m.validateProp0(formats); err != nil {`,
 10238  		`	if err := m.validateProp1(formats); err != nil {`,
 10239  		`	if err := m.validateProp2(formats); err != nil {`,
 10240  		`	if err := m.validateProp3(formats); err != nil {`,
 10241  		`	if err := m.validateProp4(formats); err != nil {`,
 10242  		`	for k := range m.ModelObjectVanilla {`,
 10243  		`		for kk := range m.ModelObjectVanilla[k] {`,
 10244  		`			for kkk := range m.ModelObjectVanilla[k][kk] {`,
 10245  		`				if err := validate.Required(k+"."+kk+"."+kkk, "body",` +
 10246  			` m.ModelObjectVanilla[k][kk][kkk]); err != nil {`,
 10247  		`				if val, ok := m.ModelObjectVanilla[k][kk][kkk]; ok {`,
 10248  		`					if err := val.Validate(formats); err != nil {`,
 10249  		`		return errors.CompositeValidationError(res...`,
 10250  		`func (m *ModelObjectVanilla) validateProp0(formats strfmt.Registry) error {`,
 10251  		`	if swag.IsZero(m.Prop0) {`,
 10252  		`	if m.Prop0 != nil {`,
 10253  		`		if err := m.Prop0.Validate(formats); err != nil {`,
 10254  		`			if ve, ok := err.(*errors.Validation); ok {`,
 10255  		`				return ve.ValidateName("prop0"`,
 10256  		`func (m *ModelObjectVanilla) validateProp1(formats strfmt.Registry) error {`,
 10257  		`	if err := validate.Required("prop1", "body", m.Prop1); err != nil {`,
 10258  		`	if m.Prop1 != nil {`,
 10259  		`		if err := m.Prop1.Validate(formats); err != nil {`,
 10260  		`			if ve, ok := err.(*errors.Validation); ok {`,
 10261  		`				return ve.ValidateName("prop1"`,
 10262  		`func (m *ModelObjectVanilla) validateProp2(formats strfmt.Registry) error {`,
 10263  		`	if swag.IsZero(m.Prop2) {`,
 10264  		`	for i := 0; i < len(m.Prop2); i++ {`,
 10265  		`		if swag.IsZero(m.Prop2[i]) {`,
 10266  		`		if m.Prop2[i] != nil {`,
 10267  		`			if err := m.Prop2[i].Validate(formats); err != nil {`,
 10268  		`				if ve, ok := err.(*errors.Validation); ok {`,
 10269  		`					return ve.ValidateName("prop2" + "." + strconv.Itoa(i)`,
 10270  		`func (m *ModelObjectVanilla) validateProp3(formats strfmt.Registry) error {`,
 10271  		`	if swag.IsZero(m.Prop3) {`,
 10272  		`	if m.Prop3 != nil {`,
 10273  		`		if err := m.Prop3.Validate(formats); err != nil {`,
 10274  		`			if ve, ok := err.(*errors.Validation); ok {`,
 10275  		`				return ve.ValidateName("prop3"`,
 10276  		`func (m *ModelObjectVanilla) validateProp4(formats strfmt.Registry) error {`,
 10277  		`	if swag.IsZero(m.Prop4) {`,
 10278  		`	for k := range m.Prop4 {`,
 10279  		`		if err := validate.Required("prop4"+"."+k, "body", m.Prop4[k]); err != nil {`,
 10280  		`		if val, ok := m.Prop4[k]; ok {`,
 10281  		`			if err := val.Validate(formats); err != nil {`,
 10282  	},
 10283  		// not expected
 10284  		todo,
 10285  		// output in log
 10286  		noLines,
 10287  		noLines)
 10288  
 10289  	// load expectations for model: model_sanity.go
 10290  	thisRun.AddExpectations("model_sanity.go", []string{
 10291  		`type ModelSanity struct {`,
 10292  		"	PropA string `json:\"propA,omitempty\"`",
 10293  		"	PropB *string `json:\"propB\"`",
 10294  		`func (m *ModelSanity) Validate(formats strfmt.Registry) error {`,
 10295  		`	if err := m.validatePropB(formats); err != nil {`,
 10296  		`		return errors.CompositeValidationError(res...`,
 10297  		`func (m *ModelSanity) validatePropB(formats strfmt.Registry) error {`,
 10298  		`	if err := validate.Required("propB", "body", m.PropB); err != nil {`,
 10299  	},
 10300  		// not expected
 10301  		todo,
 10302  		// output in log
 10303  		noLines,
 10304  		noLines)
 10305  }
 10306  
 10307  func initFixture1617() {
 10308  	// testing fixture-1617.yaml with flatten and expand (--skip-flatten)
 10309  
 10310  	f := newModelFixture("../fixtures/bugs/1617/fixture-1617.yaml", "aaa")
 10311  	thisRun := f.AddRun(false).WithMinimalFlatten(true)
 10312  
 10313  	// load expectations for model: artifact_info.go
 10314  	thisRun.AddExpectations("artifact_info.go", []string{
 10315  		`type ArtifactInfo struct {`,
 10316  		`	ArtifactDescription`,
 10317  		"	Path ArtifactPath `json:\"Path,omitempty\"`",
 10318  		"	Status ArtifactStatus `json:\"Status,omitempty\"`",
 10319  		"	Timestamp strfmt.DateTime `json:\"Timestamp,omitempty\"`",
 10320  		`func (m *ArtifactInfo) UnmarshalJSON(raw []byte) error {`,
 10321  		`	var aO0 ArtifactDescription`,
 10322  		`	if err := swag.ReadJSON(raw, &aO0); err != nil {`,
 10323  		`	m.ArtifactDescription = aO0`,
 10324  		`	var propsArtifactInfo struct {`,
 10325  		"		Path ArtifactPath `json:\"Path,omitempty\"`",
 10326  		"		Status ArtifactStatus `json:\"Status,omitempty\"`",
 10327  		"		Timestamp strfmt.DateTime `json:\"Timestamp,omitempty\"`",
 10328  		`	if err := swag.ReadJSON(raw, &propsArtifactInfo); err != nil {`,
 10329  		`	m.Path = propsArtifactInfo.Path`,
 10330  		`	m.Status = propsArtifactInfo.Status`,
 10331  		`	m.Timestamp = propsArtifactInfo.Timestamp`,
 10332  		`func (m ArtifactInfo) MarshalJSON() ([]byte, error) {`,
 10333  		`	_parts := make([][]byte, 0, 1`,
 10334  		`	aO0, err := swag.WriteJSON(m.ArtifactDescription`,
 10335  		`	if err != nil {`,
 10336  		`		return nil, err`,
 10337  		`	_parts = append(_parts, aO0`,
 10338  		`	var propsArtifactInfo struct {`,
 10339  		"		Path ArtifactPath `json:\"Path,omitempty\"`",
 10340  		"		Status ArtifactStatus `json:\"Status,omitempty\"`",
 10341  		"		Timestamp strfmt.DateTime `json:\"Timestamp,omitempty\"`",
 10342  		`	propsArtifactInfo.Path = m.Path`,
 10343  		`	propsArtifactInfo.Status = m.Status`,
 10344  		`	propsArtifactInfo.Timestamp = m.Timestamp`,
 10345  		`	jsonDataPropsArtifactInfo, errArtifactInfo := swag.WriteJSON(propsArtifactInfo`,
 10346  		`	if errArtifactInfo != nil {`,
 10347  		`		return nil, errArtifactInfo`,
 10348  		`	_parts = append(_parts, jsonDataPropsArtifactInfo`,
 10349  		`	return swag.ConcatJSON(_parts...), nil`,
 10350  		`func (m *ArtifactInfo) Validate(formats strfmt.Registry) error {`,
 10351  		`	if err := m.ArtifactDescription.Validate(formats); err != nil {`,
 10352  		`	if err := m.validatePath(formats); err != nil {`,
 10353  		`	if err := m.validateStatus(formats); err != nil {`,
 10354  		`	if err := m.validateTimestamp(formats); err != nil {`,
 10355  		`		return errors.CompositeValidationError(res...`,
 10356  		`func (m *ArtifactInfo) validatePath(formats strfmt.Registry) error {`,
 10357  		`	if swag.IsZero(m.Path) {`,
 10358  		`	if err := m.Path.Validate(formats); err != nil {`,
 10359  		`		if ve, ok := err.(*errors.Validation); ok {`,
 10360  		`			return ve.ValidateName("Path"`,
 10361  		`func (m *ArtifactInfo) validateStatus(formats strfmt.Registry) error {`,
 10362  		`	if swag.IsZero(m.Status) {`,
 10363  		`	if err := m.Status.Validate(formats); err != nil {`,
 10364  		`		if ve, ok := err.(*errors.Validation); ok {`,
 10365  		`			return ve.ValidateName("Status"`,
 10366  		`func (m *ArtifactInfo) validateTimestamp(formats strfmt.Registry) error {`,
 10367  		`	if swag.IsZero(m.Timestamp) {`,
 10368  		`	if err := validate.FormatOf("Timestamp", "body", "date-time", m.Timestamp.String(), formats); err != nil {`,
 10369  		`func (m *ArtifactInfo) MarshalBinary() ([]byte, error) {`,
 10370  		`	if m == nil {`,
 10371  		`		return nil, nil`,
 10372  		`	return swag.WriteJSON(m`,
 10373  		`func (m *ArtifactInfo) UnmarshalBinary(b []byte) error {`,
 10374  		`	var res ArtifactInfo`,
 10375  		`	if err := swag.ReadJSON(b, &res); err != nil {`,
 10376  		`	*m = res`,
 10377  	},
 10378  		// not expected
 10379  		todo,
 10380  		// output in log
 10381  		noLines,
 10382  		noLines)
 10383  }
 10384  
 10385  func initFixtureRealiasedTypes() {
 10386  	/*
 10387  	   realiased types
 10388  	*/
 10389  
 10390  	f := newModelFixture("../fixtures/bugs/1260/fixture-realiased-types.yaml", "test type realiasing")
 10391  	thisRun := f.AddRun(false).WithMinimalFlatten(true)
 10392  
 10393  	// load expectations for model: g1.go
 10394  	thisRun.AddExpectations("g1.go", []string{
 10395  		`type G1 struct {`,
 10396  		"	Prop1 int64 `json:\"prop1,omitempty\"`",
 10397  		// empty validation
 10398  		"func (m *G1) Validate(formats strfmt.Registry) error {\n	return nil\n}",
 10399  	},
 10400  		// not expected
 10401  		todo,
 10402  		// output in log
 10403  		noLines,
 10404  		noLines)
 10405  
 10406  	// load expectations for model: e2v.go
 10407  	thisRun.AddExpectations("e2v.go", []string{
 10408  		`type E2v = E0v`,
 10409  	},
 10410  		// not expected
 10411  		todo,
 10412  		// output in log
 10413  		noLines,
 10414  		noLines)
 10415  
 10416  	// load expectations for model: a1v.go
 10417  	thisRun.AddExpectations("a1v.go", []string{
 10418  		`type A1v []int64`,
 10419  		`func (m A1v) Validate(formats strfmt.Registry) error {`,
 10420  		`	iA1vSize := int64(len(m)`,
 10421  		`	if err := validate.MaxItems("", "body", iA1vSize, 100); err != nil {`,
 10422  		`	for i := 0; i < len(m); i++ {`,
 10423  		`		if err := validate.MaximumInt(strconv.Itoa(i), "body", int64(m[i]), 100, false); err != nil {`,
 10424  		`		return errors.CompositeValidationError(res...`,
 10425  	},
 10426  		// not expected
 10427  		todo,
 10428  		// output in log
 10429  		noLines,
 10430  		noLines)
 10431  
 10432  	// load expectations for model: f2v.go
 10433  	thisRun.AddExpectations("f2v.go", []string{
 10434  		`type F2v = F0v`,
 10435  	},
 10436  		// not expected
 10437  		todo,
 10438  		// output in log
 10439  		noLines,
 10440  		noLines)
 10441  
 10442  	// load expectations for model: hsubtype1.go
 10443  	thisRun.AddExpectations("hsubtype1.go", []string{
 10444  		`type Hsubtype1 struct {`,
 10445  		`	h1p1Field string`,
 10446  		`	h1p2Field strfmt.Date`,
 10447  		"	Hsp1 uint32 `json:\"hsp1,omitempty\"`",
 10448  		`func (m *Hsubtype1) H1p1() string {`,
 10449  		`	return m.h1p1Field`,
 10450  		`func (m *Hsubtype1) SetH1p1(val string) {`,
 10451  		`	m.h1p1Field = val`,
 10452  		`func (m *Hsubtype1) H1p2() strfmt.Date {`,
 10453  		`	return m.h1p2Field`,
 10454  		`func (m *Hsubtype1) SetH1p2(val strfmt.Date) {`,
 10455  		`	m.h1p2Field = val`,
 10456  		`func (m *Hsubtype1) Validate(formats strfmt.Registry) error {`,
 10457  		`	if err := m.validateH1p2(formats); err != nil {`,
 10458  		`		return errors.CompositeValidationError(res...`,
 10459  		`func (m *Hsubtype1) validateH1p2(formats strfmt.Registry) error {`,
 10460  		`	if swag.IsZero(m.H1p2()) {`,
 10461  		`	if err := validate.FormatOf("h1p2", "body", "date", m.H1p2().String(), formats); err != nil {`,
 10462  	},
 10463  		// not expected
 10464  		todo,
 10465  		// output in log
 10466  		noLines,
 10467  		noLines)
 10468  
 10469  	// load expectations for model: f2.go
 10470  	thisRun.AddExpectations("f2.go", []string{
 10471  		`type F2 = F0`,
 10472  	},
 10473  		// not expected
 10474  		todo,
 10475  		// output in log
 10476  		noLines,
 10477  		noLines)
 10478  
 10479  	// load expectations for model: h0.go
 10480  	thisRun.AddExpectations("h0.go", []string{
 10481  		`type H0 = H1`,
 10482  		`func UnmarshalH0(reader io.Reader, consumer runtime.Consumer) (H0, error) {`,
 10483  		`	return UnmarshalH1(reader, consumer`,
 10484  		`func UnmarshalH0Slice(reader io.Reader, consumer runtime.Consumer) ([]H0, error) {`,
 10485  		`	return UnmarshalH1Slice(reader, consumer`,
 10486  	},
 10487  		// not expected
 10488  		todo,
 10489  		// output in log
 10490  		noLines,
 10491  		noLines)
 10492  
 10493  	// load expectations for model: c1v.go
 10494  	thisRun.AddExpectations("c1v.go", []string{
 10495  		`type C1v interface{`,
 10496  	},
 10497  		// not expected
 10498  		todo,
 10499  		// output in log
 10500  		noLines,
 10501  		noLines)
 10502  
 10503  	// load expectations for model: d0v.go
 10504  	thisRun.AddExpectations("d0v.go", []string{
 10505  		`type D0v = D1v`,
 10506  	},
 10507  		// not expected
 10508  		todo,
 10509  		// output in log
 10510  		noLines,
 10511  		noLines)
 10512  
 10513  	// load expectations for model: e2.go
 10514  	thisRun.AddExpectations("e2.go", []string{
 10515  		`type E2 = E0`,
 10516  	},
 10517  		// not expected
 10518  		todo,
 10519  		// output in log
 10520  		noLines,
 10521  		noLines)
 10522  
 10523  	// load expectations for model: d2v.go
 10524  	thisRun.AddExpectations("d2v.go", []string{
 10525  		`type D2v = D0v`,
 10526  	},
 10527  		// not expected
 10528  		todo,
 10529  		// output in log
 10530  		noLines,
 10531  		noLines)
 10532  
 10533  	// load expectations for model: b2v.go
 10534  	thisRun.AddExpectations("b2v.go", []string{
 10535  		`type B2v = B0v`,
 10536  	},
 10537  		// not expected
 10538  		todo,
 10539  		// output in log
 10540  		noLines,
 10541  		noLines)
 10542  
 10543  	// load expectations for model: a1.go
 10544  	thisRun.AddExpectations("a1.go", []string{
 10545  		`type A1 []int64`,
 10546  		// empty validation
 10547  		"func (m A1) Validate(formats strfmt.Registry) error {\n	return nil\n}",
 10548  	},
 10549  		// not expected
 10550  		todo,
 10551  		// output in log
 10552  		noLines,
 10553  		noLines)
 10554  
 10555  	// load expectations for model: hsubtype2.go
 10556  	thisRun.AddExpectations("hsubtype2.go", []string{
 10557  		`type Hsubtype2 struct {`,
 10558  		`	h1p1Field string`,
 10559  		`	h1p2Field strfmt.Date`,
 10560  		"	Hsp2 strfmt.DateTime `json:\"hsp2,omitempty\"`",
 10561  		`func (m *Hsubtype2) H1p1() string {`,
 10562  		`	return m.h1p1Field`,
 10563  		`func (m *Hsubtype2) SetH1p1(val string) {`,
 10564  		`	m.h1p1Field = val`,
 10565  		`func (m *Hsubtype2) H1p2() strfmt.Date {`,
 10566  		`	return m.h1p2Field`,
 10567  		`func (m *Hsubtype2) SetH1p2(val strfmt.Date) {`,
 10568  		`	m.h1p2Field = val`,
 10569  		`func (m *Hsubtype2) Validate(formats strfmt.Registry) error {`,
 10570  		`	if err := m.validateH1p2(formats); err != nil {`,
 10571  		`	if err := m.validateHsp2(formats); err != nil {`,
 10572  		`		return errors.CompositeValidationError(res...`,
 10573  		`func (m *Hsubtype2) validateH1p2(formats strfmt.Registry) error {`,
 10574  		`	if swag.IsZero(m.H1p2()) {`,
 10575  		`	if err := validate.FormatOf("h1p2", "body", "date", m.H1p2().String(), formats); err != nil {`,
 10576  		`func (m *Hsubtype2) validateHsp2(formats strfmt.Registry) error {`,
 10577  		`	if swag.IsZero(m.Hsp2) {`,
 10578  		`	if err := validate.FormatOf("hsp2", "body", "date-time", m.Hsp2.String(), formats); err != nil {`,
 10579  	},
 10580  		// not expected
 10581  		todo,
 10582  		// output in log
 10583  		noLines,
 10584  		noLines)
 10585  
 10586  	// load expectations for model: b2.go
 10587  	thisRun.AddExpectations("b2.go", []string{
 10588  		`type B2 = B0`,
 10589  	},
 10590  		// not expected
 10591  		todo,
 10592  		// output in log
 10593  		noLines,
 10594  		noLines)
 10595  
 10596  	// load expectations for model: b1.go
 10597  	thisRun.AddExpectations("b1.go", []string{
 10598  		`type B1 map[string]int64`,
 10599  		// empty validation
 10600  		"func (m B1) Validate(formats strfmt.Registry) error {\n	return nil\n}",
 10601  	},
 10602  		// not expected
 10603  		todo,
 10604  		// output in log
 10605  		noLines,
 10606  		noLines)
 10607  
 10608  	// load expectations for model: d0.go
 10609  	thisRun.AddExpectations("d0.go", []string{
 10610  		`type D0 = D1`,
 10611  	},
 10612  		// not expected
 10613  		todo,
 10614  		// output in log
 10615  		noLines,
 10616  		noLines)
 10617  
 10618  	// load expectations for model: g1v.go
 10619  	thisRun.AddExpectations("g1v.go", []string{
 10620  		`type G1v struct {`,
 10621  		"	Prop1v int64 `json:\"prop1v,omitempty\"`",
 10622  		"	Prop2v *int64 `json:\"prop2v\"`",
 10623  		`func (m *G1v) Validate(formats strfmt.Registry) error {`,
 10624  		`	if err := m.validateProp1v(formats); err != nil {`,
 10625  		`	if err := m.validateProp2v(formats); err != nil {`,
 10626  		`		return errors.CompositeValidationError(res...`,
 10627  		`func (m *G1v) validateProp1v(formats strfmt.Registry) error {`,
 10628  		`	if swag.IsZero(m.Prop1v) {`,
 10629  		`	if err := validate.MaximumInt("prop1v", "body", int64(m.Prop1v), 100, false); err != nil {`,
 10630  		`func (m *G1v) validateProp2v(formats strfmt.Registry) error {`,
 10631  		`	if err := validate.Required("prop2v", "body", m.Prop2v); err != nil {`,
 10632  	},
 10633  		// not expected
 10634  		todo,
 10635  		// output in log
 10636  		noLines,
 10637  		noLines)
 10638  
 10639  	// load expectations for model: e0.go
 10640  	thisRun.AddExpectations("e0.go", []string{
 10641  		`type E0 = E1`,
 10642  	},
 10643  		// not expected
 10644  		todo,
 10645  		// output in log
 10646  		noLines,
 10647  		noLines)
 10648  
 10649  	// load expectations for model: f0v.go
 10650  	thisRun.AddExpectations("f0v.go", []string{
 10651  		`type F0v = F1v`,
 10652  	},
 10653  		// not expected
 10654  		todo,
 10655  		// output in log
 10656  		noLines,
 10657  		noLines)
 10658  
 10659  	// load expectations for model: h2.go
 10660  	thisRun.AddExpectations("h2.go", []string{
 10661  		`type H2 = H0`,
 10662  		`func UnmarshalH2(reader io.Reader, consumer runtime.Consumer) (H2, error) {`,
 10663  		`	return UnmarshalH0(reader, consumer`,
 10664  		`func UnmarshalH2Slice(reader io.Reader, consumer runtime.Consumer) ([]H2, error) {`,
 10665  		`	return UnmarshalH0Slice(reader, consumer`,
 10666  	},
 10667  		// not expected
 10668  		todo,
 10669  		// output in log
 10670  		noLines,
 10671  		noLines)
 10672  
 10673  	// load expectations for model: b1v.go
 10674  	thisRun.AddExpectations("b1v.go", []string{
 10675  		`type B1v map[string]int64`,
 10676  		`func (m B1v) Validate(formats strfmt.Registry) error {`,
 10677  		`	for k := range m {`,
 10678  		`		if err := validate.MaximumInt(k, "body", int64(m[k]), 100, false); err != nil {`,
 10679  		`		return errors.CompositeValidationError(res...`,
 10680  	},
 10681  		// not expected
 10682  		todo,
 10683  		// output in log
 10684  		noLines,
 10685  		noLines)
 10686  
 10687  	// load expectations for model: f0.go
 10688  	thisRun.AddExpectations("f0.go", []string{
 10689  		`type F0 = F1`,
 10690  	},
 10691  		// not expected
 10692  		todo,
 10693  		// output in log
 10694  		noLines,
 10695  		noLines)
 10696  
 10697  	// load expectations for model: a2v.go
 10698  	thisRun.AddExpectations("a2v.go", []string{
 10699  		`type A2v = A0v`,
 10700  	},
 10701  		// not expected
 10702  		todo,
 10703  		// output in log
 10704  		noLines,
 10705  		noLines)
 10706  
 10707  	// load expectations for model: hs2.go
 10708  	thisRun.AddExpectations("hs2.go", []string{
 10709  		`type Hs2 struct {`,
 10710  		`	Hs0`,
 10711  		// empty validation
 10712  		"func (m *Hs2) Validate(formats strfmt.Registry) error {\n	return nil\n}",
 10713  	},
 10714  		// not expected
 10715  		todo,
 10716  		// output in log
 10717  		noLines,
 10718  		noLines)
 10719  
 10720  	// load expectations for model: d1v.go
 10721  	thisRun.AddExpectations("d1v.go", []string{
 10722  		`type D1v int64`,
 10723  		`func (m D1v) Validate(formats strfmt.Registry) error {`,
 10724  		`	if err := validate.MaximumInt("", "body", int64(m), 100, false); err != nil {`,
 10725  		`		return errors.CompositeValidationError(res...`,
 10726  	},
 10727  		// not expected
 10728  		todo,
 10729  		// output in log
 10730  		noLines,
 10731  		noLines)
 10732  
 10733  	// load expectations for model: c1.go
 10734  	thisRun.AddExpectations("c1.go", []string{
 10735  		`type C1 interface{`,
 10736  	},
 10737  		// not expected
 10738  		todo,
 10739  		// output in log
 10740  		noLines,
 10741  		noLines)
 10742  
 10743  	// load expectations for model: c2.go
 10744  	thisRun.AddExpectations("c2.go", []string{
 10745  		`type C2 = C0`,
 10746  	},
 10747  		// not expected
 10748  		todo,
 10749  		// output in log
 10750  		noLines,
 10751  		noLines)
 10752  
 10753  	// load expectations for model: e0v.go
 10754  	thisRun.AddExpectations("e0v.go", []string{
 10755  		`type E0v = E1v`,
 10756  	},
 10757  		// not expected
 10758  		todo,
 10759  		// output in log
 10760  		noLines,
 10761  		noLines)
 10762  
 10763  	// load expectations for model: d1.go
 10764  	thisRun.AddExpectations("d1.go", []string{
 10765  		`type D1 int64`,
 10766  		// empty validation
 10767  		"func (m D1) Validate(formats strfmt.Registry) error {\n	return nil\n}",
 10768  	},
 10769  		// not expected
 10770  		todo,
 10771  		// output in log
 10772  		noLines,
 10773  		noLines)
 10774  
 10775  	// load expectations for model: g2.go
 10776  	thisRun.AddExpectations("g2.go", []string{
 10777  		`type G2 struct {`,
 10778  		`	G0`,
 10779  		// empty validation
 10780  		"func (m *G2) Validate(formats strfmt.Registry) error {\n	return nil\n}",
 10781  	},
 10782  		// not expected
 10783  		todo,
 10784  		// output in log
 10785  		noLines,
 10786  		noLines)
 10787  
 10788  	// load expectations for model: d2.go
 10789  	thisRun.AddExpectations("d2.go", []string{
 10790  		`type D2 = D0`,
 10791  	},
 10792  		// not expected
 10793  		todo,
 10794  		// output in log
 10795  		noLines,
 10796  		noLines)
 10797  
 10798  	// load expectations for model: b0.go
 10799  	thisRun.AddExpectations("b0.go", []string{
 10800  		`type B0 = B1`,
 10801  	},
 10802  		// not expected
 10803  		todo,
 10804  		// output in log
 10805  		noLines,
 10806  		noLines)
 10807  
 10808  	// load expectations for model: c2v.go
 10809  	thisRun.AddExpectations("c2v.go", []string{
 10810  		`type C2v = C0v`,
 10811  	},
 10812  		// not expected
 10813  		todo,
 10814  		// output in log
 10815  		noLines,
 10816  		noLines)
 10817  
 10818  	// load expectations for model: g0.go
 10819  	thisRun.AddExpectations("g0.go", []string{
 10820  		`type G0 struct {`,
 10821  		`	G1`,
 10822  		// empty validation
 10823  		"func (m *G0) Validate(formats strfmt.Registry) error {\n	return nil\n}",
 10824  	},
 10825  		// not expected
 10826  		todo,
 10827  		// output in log
 10828  		noLines,
 10829  		noLines)
 10830  
 10831  	// load expectations for model: a0.go
 10832  	thisRun.AddExpectations("a0.go", []string{
 10833  		`type A0 = A1`,
 10834  	},
 10835  		// not expected
 10836  		todo,
 10837  		// output in log
 10838  		noLines,
 10839  		noLines)
 10840  
 10841  	// load expectations for model: a2.go
 10842  	thisRun.AddExpectations("a2.go", []string{
 10843  		`type A2 = A0`,
 10844  	},
 10845  		// not expected
 10846  		todo,
 10847  		// output in log
 10848  		noLines,
 10849  		noLines)
 10850  
 10851  	// load expectations for model: h1.go
 10852  	thisRun.AddExpectations("h1.go", []string{
 10853  		`type H1 interface {`,
 10854  		`	runtime.Validatable`,
 10855  		`	H1p1() string`,
 10856  		`	SetH1p1(string`,
 10857  		`	H1p2() strfmt.Date`,
 10858  		`	SetH1p2(strfmt.Date`,
 10859  		`type h1 struct {`,
 10860  		`	h1p1Field string`,
 10861  		`	h1p2Field strfmt.Date`,
 10862  		`func (m *h1) H1p1() string {`,
 10863  		`	return m.h1p1Field`,
 10864  		`func (m *h1) SetH1p1(val string) {`,
 10865  		`	m.h1p1Field = val`,
 10866  		`func (m *h1) H1p2() strfmt.Date {`,
 10867  		`	return m.h1p2Field`,
 10868  		`func (m *h1) SetH1p2(val strfmt.Date) {`,
 10869  		`	m.h1p2Field = val`,
 10870  		`func UnmarshalH1Slice(reader io.Reader, consumer runtime.Consumer) ([]H1, error) {`,
 10871  		`	var elements []json.RawMessage`,
 10872  		`	if err := consumer.Consume(reader, &elements); err != nil {`,
 10873  		`		return nil, err`,
 10874  		`	var result []H1`,
 10875  		`	for _, element := range elements {`,
 10876  		`		obj, err := unmarshalH1(element, consumer`,
 10877  		`		if err != nil {`,
 10878  		`			return nil, err`,
 10879  		`		result = append(result, obj`,
 10880  		`	return result, nil`,
 10881  		`func UnmarshalH1(reader io.Reader, consumer runtime.Consumer) (H1, error) {`,
 10882  		`	data, err := ioutil.ReadAll(reader`,
 10883  		`	if err != nil {`,
 10884  		`		return nil, err`,
 10885  		`	return unmarshalH1(data, consumer`,
 10886  		`func unmarshalH1(data []byte, consumer runtime.Consumer) (H1, error) {`,
 10887  		`	buf := bytes.NewBuffer(data`,
 10888  		`	buf2 := bytes.NewBuffer(data`,
 10889  		`	var getType struct {`,
 10890  		"		Htype string `json:\"htype\"`",
 10891  		`	if err := consumer.Consume(buf, &getType); err != nil {`,
 10892  		`		return nil, err`,
 10893  		`	if err := validate.RequiredString("htype", "body", getType.Htype); err != nil {`,
 10894  		`		return nil, err`,
 10895  		`	switch getType.Htype {`,
 10896  		`	case "h1":`,
 10897  		`		var result h1`,
 10898  		`		if err := consumer.Consume(buf2, &result); err != nil {`,
 10899  		`			return nil, err`,
 10900  		`		return &result, nil`,
 10901  		`	case "hsubtype1":`,
 10902  		`		var result Hsubtype1`,
 10903  		`		if err := consumer.Consume(buf2, &result); err != nil {`,
 10904  		`			return nil, err`,
 10905  		`		return &result, nil`,
 10906  		`	case "hsubtype2":`,
 10907  		`		var result Hsubtype2`,
 10908  		`		if err := consumer.Consume(buf2, &result); err != nil {`,
 10909  		`			return nil, err`,
 10910  		`		return &result, nil`,
 10911  		`	return nil, errors.New(422, "invalid htype value: %q", getType.Htype`,
 10912  		`func (m *h1) Validate(formats strfmt.Registry) error {`,
 10913  		`	if err := m.validateH1p2(formats); err != nil {`,
 10914  		`		return errors.CompositeValidationError(res...`,
 10915  		`func (m *h1) validateH1p2(formats strfmt.Registry) error {`,
 10916  		`	if swag.IsZero(m.H1p2()) {`,
 10917  		`	if err := validate.FormatOf("h1p2", "body", "date", m.H1p2().String(), formats); err != nil {`,
 10918  	},
 10919  		// not expected
 10920  		todo,
 10921  		// output in log
 10922  		noLines,
 10923  		noLines)
 10924  
 10925  	// load expectations for model: c0v.go
 10926  	thisRun.AddExpectations("c0v.go", []string{
 10927  		`type C0v = C1v`,
 10928  	},
 10929  		// not expected
 10930  		todo,
 10931  		// output in log
 10932  		noLines,
 10933  		noLines)
 10934  
 10935  	// load expectations for model: g2v.go
 10936  	thisRun.AddExpectations("g2v.go", []string{
 10937  		`type G2v struct {`,
 10938  		`	G0v`,
 10939  		// empty validation
 10940  		"func (m *G2v) Validate(formats strfmt.Registry) error {\n	return nil\n}",
 10941  	},
 10942  		// not expected
 10943  		todo,
 10944  		// output in log
 10945  		noLines,
 10946  		noLines)
 10947  
 10948  	// load expectations for model: f1.go
 10949  	thisRun.AddExpectations("f1.go", []string{
 10950  		`type F1 strfmt.UUID`,
 10951  		`func (m F1) Validate(formats strfmt.Registry) error {`,
 10952  		`	if err := validate.FormatOf("", "body", "uuid", strfmt.UUID(m).String(), formats); err != nil {`,
 10953  		`		return errors.CompositeValidationError(res...`,
 10954  	},
 10955  		// not expected
 10956  		todo,
 10957  		// output in log
 10958  		noLines,
 10959  		noLines)
 10960  
 10961  	// load expectations for model: e1.go
 10962  	thisRun.AddExpectations("e1.go", []string{
 10963  		`type E1 strfmt.Date`,
 10964  		`func (m E1) Validate(formats strfmt.Registry) error {`,
 10965  		`	if err := validate.FormatOf("", "body", "date", strfmt.Date(m).String(), formats); err != nil {`,
 10966  		`		return errors.CompositeValidationError(res...`,
 10967  	},
 10968  		// not expected
 10969  		todo,
 10970  		// output in log
 10971  		noLines,
 10972  		noLines)
 10973  
 10974  	// load expectations for model: a0v.go
 10975  	thisRun.AddExpectations("a0v.go", []string{
 10976  		`type A0v = A1v`,
 10977  	},
 10978  		// not expected
 10979  		todo,
 10980  		// output in log
 10981  		noLines,
 10982  		noLines)
 10983  
 10984  	// load expectations for model: c0.go
 10985  	thisRun.AddExpectations("c0.go", []string{
 10986  		`type C0 = C1`,
 10987  	},
 10988  		// not expected
 10989  		todo,
 10990  		// output in log
 10991  		noLines,
 10992  		noLines)
 10993  
 10994  	// load expectations for model: f1v.go
 10995  	thisRun.AddExpectations("f1v.go", []string{
 10996  		`type F1v strfmt.UUID`,
 10997  		`func (m F1v) Validate(formats strfmt.Registry) error {`,
 10998  		`	if err := validate.FormatOf("", "body", "uuid", strfmt.UUID(m).String(), formats); err != nil {`,
 10999  		`		return errors.CompositeValidationError(res...`,
 11000  	},
 11001  		// not expected
 11002  		todo,
 11003  		// output in log
 11004  		noLines,
 11005  		noLines)
 11006  
 11007  	// load expectations for model: e1v.go
 11008  	thisRun.AddExpectations("e1v.go", []string{
 11009  		`type E1v strfmt.Date`,
 11010  		`func (m E1v) Validate(formats strfmt.Registry) error {`,
 11011  		`	if err := validate.FormatOf("", "body", "date", strfmt.Date(m).String(), formats); err != nil {`,
 11012  		`		return errors.CompositeValidationError(res...`,
 11013  	},
 11014  		// not expected
 11015  		todo,
 11016  		// output in log
 11017  		noLines,
 11018  		noLines)
 11019  
 11020  	// load expectations for model: b0v.go
 11021  	thisRun.AddExpectations("b0v.go", []string{
 11022  		`type B0v = B1v`,
 11023  	},
 11024  		// not expected
 11025  		todo,
 11026  		// output in log
 11027  		noLines,
 11028  		noLines)
 11029  
 11030  	// load expectations for model: g0v.go
 11031  	thisRun.AddExpectations("g0v.go", []string{
 11032  		`type G0v struct {`,
 11033  		`	G1v`,
 11034  		// empty validation
 11035  		"func (m *G0v) Validate(formats strfmt.Registry) error {\n	return nil\n}",
 11036  	},
 11037  		// not expected
 11038  		todo,
 11039  		// output in log
 11040  		noLines,
 11041  		noLines)
 11042  
 11043  	// load expectations for model: hs0.go
 11044  	thisRun.AddExpectations("hs0.go", []string{
 11045  		`type Hs0 struct {`,
 11046  		`	Hsubtype1`,
 11047  		// empty validation
 11048  		"func (m *Hs0) Validate(formats strfmt.Registry) error {\n	return nil\n}",
 11049  	},
 11050  		// not expected
 11051  		todo,
 11052  		// output in log
 11053  		noLines,
 11054  		noLines)
 11055  }
 11056  
 11057  func initFixture1993() {
 11058  	/*
 11059  	   required / non required base type
 11060  	*/
 11061  
 11062  	f := newModelFixture("../fixtures/bugs/1993/fixture-1993.yaml", "test required/non required base type")
 11063  	thisRun := f.AddRun(false).WithMinimalFlatten(true)
 11064  
 11065  	// load expectations for model: house.go
 11066  	thisRun.AddExpectations("house.go", []string{
 11067  		`if err := validate.Required("pet", "body", m.Pet()); err != nil {`,
 11068  	},
 11069  		// not expected
 11070  		todo,
 11071  		// output in log
 11072  		noLines,
 11073  		noLines)
 11074  
 11075  	// load expectations for model: empty_house.go
 11076  	thisRun.AddExpectations("empty_house.go", []string{
 11077  		`if swag.IsZero(m.Pet())`,
 11078  	},
 11079  		// not expected
 11080  		todo,
 11081  		// output in log
 11082  		noLines,
 11083  		noLines)
 11084  }
 11085  
 11086  func initFixture2364() {
 11087  	f := newModelFixture("../fixtures/bugs/2364/fixture-2364.yaml", "test non-nullable allOf")
 11088  	thisRun := f.AddRun(false).WithMinimalFlatten(true)
 11089  
 11090  	thisRun.AddExpectations("bundle_attributes_response.go", []string{
 11091  		`type BundleAttributesResponse struct {`,
 11092  		`Items []BundleItemResponse`,
 11093  		`Sections []ItemBundleSectionResponse`,
 11094  		`Type BundleType`,
 11095  	},
 11096  		// not expected
 11097  		todo,
 11098  		// output in log
 11099  		noLines,
 11100  		noLines)
 11101  }