MCPcopy Index your code
hub / github.com/APIParkLab/APIPark / Swagger

Method Swagger

controller/service/iml.go:453–474  ·  view source on GitHub ↗
(ctx *gin.Context)

Source from the content-addressed store, hash-verified

451}
452
453func (i *imlServiceController) Swagger(ctx *gin.Context) {
454 id, has := ctx.Params.Get("id")
455 if !has {
456 ctx.JSON(200, &pm3.Response{
457 Code: -1,
458 Success: "fail",
459 Message: fmt.Sprintf("id is required"),
460 })
461 return
462 }
463 tmp, err := i.swagger(ctx, id)
464 if err != nil {
465 ctx.JSON(200, &pm3.Response{
466 Code: -1,
467 Success: "fail",
468 Message: err.Error(),
469 })
470 return
471 }
472 ctx.JSON(200, tmp)
473 return
474}
475
476func (i *imlServiceController) Simple(ctx *gin.Context) ([]*service_dto.SimpleServiceItem, error) {
477 return i.module.Simple(ctx)

Callers

nothing calls this directly

Calls 2

swaggerMethod · 0.95
GetMethod · 0.65

Tested by

no test coverage detected