code: func (c *LabelController) Create(ctx *app.CreateLabelContext) error {
  	_, err := login.ContextIdentity(ctx)
  	if err != nil {
  		return jsonapi.JSONErrorResponse(ctx, goa.ErrUnauthorized(err.Error()))
  	}
  	if ctx.Payload.Data.Attributes.Name == nil {
  		return jsonapi.JSONErrorResponse(ctx, goa.ErrBadRequest("Name cannot be empty"))
  	}
  	lbl := &label.Label{
  		SpaceID: ctx.SpaceID,
  		Name:    strings.TrimSpace(*ctx.Payload.Data.Attributes.Name),
  	}
  	if ctx.Payload.Data.Attributes.TextColor != nil {
  		lbl.TextColor = *ctx.Payload.Data.Attributes.TextColor
  	}
  	if ctx.Payload.Data.Attributes.BackgroundColor != nil {
  		lbl.BackgroundColor = *ctx.Payload.Data.Attributes.BackgroundColor
  	}
  	if ctx.Payload.Data.Attributes.BorderColor != nil {
  		lbl.BorderColor = *ctx.Payload.Data.Attributes.BorderColor
  	}
  	err = application.Transactional(c.db, func(appl application.Application) error {
  		return appl.Labels().Create(ctx, lbl)
  	})
  	if err != nil {
  		return jsonapi.JSONErrorResponse(ctx, err)
  	}
  	result := &app.LabelSingle{
  		Data: ConvertLabel(ctx.Request, *lbl),
  	}
  	ctx.ResponseData.Header().Set("Location", rest.AbsoluteURL(ctx.Request, app.LabelHref(ctx.SpaceID, result.Data.ID)))
  	return ctx.Created(result)
  }
docs: // Create runs the create action.