code: func (c *WorkitemtypesController) List(ctx *app.ListWorkitemtypesContext) error {
  	log.Debug(ctx, map[string]interface{}{"space_id": ctx.SpaceTemplateID}, "Listing work item types per space template")
  	result := &app.WorkItemTypeList{}
  	err := application.Transactional(c.db, func(appl application.Application) error {
  		witModels, err := appl.WorkItemTypes().List(ctx.Context, ctx.SpaceTemplateID)
  		if err != nil {
  			return errs.Wrap(err, "Error listing work item types")
  		}
  
  		return ctx.ConditionalEntities(witModels, c.config.GetCacheControlWorkItemTypes, func() error {
  			// convert from model to app
  			// result := &app.WorkItemTypeList{}
  			result.Data = make([]*app.WorkItemTypeData, len(witModels))
  			for index, value := range witModels {
  				wit := ConvertWorkItemTypeFromModel(ctx.Request, &value)
  				result.Data[index] = &wit
  			}
  			return nil
  		})
  	})
  	if err != nil {
  		return jsonapi.JSONErrorResponse(ctx, err)
  	}
  	return ctx.OK(result)
  }
docs: // List runs the list action