code: func (c *EndpointsController) List(ctx *app.ListEndpointsContext) error {
  	c.endpointsLock.Lock()
  	defer c.endpointsLock.Unlock()
  	if c.endpoints == nil {
  		endpoints, err := getEndpoints(ctx, c.FileHandler)
  		if err != nil || endpoints == nil {
  			log.Error(ctx, map[string]interface{}{
  				"err":  errs.WithStack(err),
  				"file": embeddedSwaggerSpecFile,
  			}, err.Error())
  			return jsonapi.JSONErrorResponse(ctx, errs.WithStack(err))
  		}
  		c.endpoints = endpoints
  	}
  	return ctx.OK(&app.EndpointSingle{Data: c.endpoints})
  }
docs: // List runs the list action.