MCPcopy
hub / github.com/apache/devlake / Get

Function Get

backend/server/api/blueprints/blueprints.go:97–110  ·  view source on GitHub ↗

@Summary get blueprints @Description get blueprints @Tags framework/blueprints @Accept application/json @Param blueprintId path int true "blueprint id" @Success 200 {object} models.Blueprint @Failure 400 {object} shared.ApiBody "Bad Request" @Failure 500 {object} shared.ApiBody "Internal Error" @

(c *gin.Context)

Source from the content-addressed store, hash-verified

95// @Failure 500 {object} shared.ApiBody "Internal Error"
96// @Router /blueprints/{blueprintId} [get]
97func Get(c *gin.Context) {
98 blueprintId := c.Param("blueprintId")
99 id, err := strconv.ParseUint(blueprintId, 10, 64)
100 if err != nil {
101 shared.ApiOutputError(c, errors.BadInput.Wrap(err, "bad blueprintId format supplied"))
102 return
103 }
104 blueprint, err := services.GetBlueprint(id, true)
105 if err != nil {
106 shared.ApiOutputError(c, errors.Default.Wrap(err, "error getting blueprint"))
107 return
108 }
109 shared.ApiOutputSuccess(c, blueprint, http.StatusOK)
110}
111
112// // @Summary delete blueprints
113// // @Description Delete BluePrints

Callers

nothing calls this directly

Calls 2

WrapMethod · 0.80
GetBlueprintMethod · 0.80

Tested by

no test coverage detected