code: func (c *Client) Generate() error {
  	rs := getAllResources(c.APIDef, false)
  
  	if err := generateAllObjects(c.APIDef, c.Dir); err != nil {
  		return err
  	}
  	// services files
  	if err := c.generateServices(rs); err != nil {
  		return err
  	}
  
  	if err := c.generateSecurity(); err != nil {
  		return err
  	}
  	// main client file
  	if err := c.generateMain(); err != nil {
  		return err
  	}
  	return nil
  }
docs: // Generate generates all Nim client files