code: func (pTypeDef *Rect) Validate() error {
  	if pTypeDef.P1 == nil {
  		return fmt.Errorf("Rect: Missing required field: p1")
  	}
  	if pTypeDef.P2 == nil {
  		return fmt.Errorf("Rect: Missing required field: p2")
  	}
  	return nil
  }
docs: //
  // Validate - checks for missing required fields, etc
  //