code: func (b *codeGenOpBuilder) MakeBodyParameter(res *GenParameter, resolver *typeResolver, sch *spec.Schema) error {
  	// resolve schema model
  	schema, ers := b.buildOperationSchema(res.Path, b.Operation.ID+"ParamsBody", swag.ToGoName(b.Operation.ID+" Body"), res.ReceiverName, res.IndexVar, sch, resolver)
  	if ers != nil {
  		return ers
  	}
  	res.Schema = &schema
  	res.Schema.Required = res.Required // Required in body is managed independently from validations
  
  	// build Child items for nested slices and maps
  	var items *GenItems
  	res.KeyVar = "k"
  	res.Schema.KeyVar = "k"
  	if schema.IsMap && !schema.IsInterface {
  		items = b.MakeBodyParameterItemsAndMaps(res, res.Schema.AdditionalProperties)
  	} else if schema.IsArray {
  		items = b.MakeBodyParameterItemsAndMaps(res, res.Schema.Items)
  	} else {
  		items = new(GenItems)
  	}
  
  	// templates assume at least one .Child != nil
  	res.Child = items
  	schema.HasValidations = schema.HasValidations || items.HasValidations
  
  	res.resolvedType = schema.resolvedType
  
  	// simple and schema views share the same validations
  	res.sharedValidations = schema.sharedValidations
  	res.ZeroValue = schema.Zero()
  	return nil
  }
docs: // MakeBodyParameter constructs a body parameter schema