code: func (self *Resource) Validate() error {
  	if self.Type == "" {
  		return fmt.Errorf("Resource.type is missing but is a required field")
  	} else {
  		val := Validate(RdlSchema(), "TypeRef", self.Type)
  		if !val.Valid {
  			return fmt.Errorf("Resource.type does not contain a valid TypeRef (%v)", val.Error)
  		}
  	}
  	if self.Method == "" {
  		return fmt.Errorf("Resource.method is missing but is a required field")
  	} else {
  		val := Validate(RdlSchema(), "String", self.Method)
  		if !val.Valid {
  			return fmt.Errorf("Resource.method does not contain a valid String (%v)", val.Error)
  		}
  	}
  	if self.Path == "" {
  		return fmt.Errorf("Resource.path is missing but is a required field")
  	} else {
  		val := Validate(RdlSchema(), "String", self.Path)
  		if !val.Valid {
  			return fmt.Errorf("Resource.path does not contain a valid String (%v)", val.Error)
  		}
  	}
  	if self.Expected == "" {
  		return fmt.Errorf("Resource.expected is missing but is a required field")
  	} else {
  		val := Validate(RdlSchema(), "String", self.Expected)
  		if !val.Valid {
  			return fmt.Errorf("Resource.expected does not contain a valid String (%v)", val.Error)
  		}
  	}
  	return nil
  }
docs: //
  // Validate - checks for missing required fields, etc
  //