コード例 #1
0
func deleteWorkItemLink() {
	a.Description("Delete work item link with given id.")
	a.Security("jwt")
	a.Routing(
		a.DELETE("/:linkId"),
	)
	a.Params(func() {
		a.Param("linkId", d.String, "ID of the work item link to be deleted")
	})
	a.Response(d.OK)
	a.Response(d.BadRequest, JSONAPIErrors)
	a.Response(d.InternalServerError, JSONAPIErrors)
	a.Response(d.NotFound, JSONAPIErrors)
	a.Response(d.Unauthorized, JSONAPIErrors)
}
コード例 #2
0
			a.POST(""),
		)
		a.Description("Create a work item link category")
		a.Payload(createWorkItemLinkCategoryPayload)
		a.Response(d.Created, "/workitemlinkcategories/.*", func() {
			a.Media(workItemLinkCategory)
		})
		a.Response(d.BadRequest, JSONAPIErrors)
		a.Response(d.InternalServerError, JSONAPIErrors)
		a.Response(d.Unauthorized, JSONAPIErrors)
	})

	a.Action("delete", func() {
		a.Security("jwt")
		a.Routing(
			a.DELETE("/:id"),
		)
		a.Description("Delete work item link category with given id.")
		a.Params(func() {
			a.Param("id", d.String, "id")
		})
		a.Response(d.OK)
		a.Response(d.BadRequest, JSONAPIErrors)
		a.Response(d.InternalServerError, JSONAPIErrors)
		a.Response(d.NotFound, JSONAPIErrors)
		a.Response(d.Unauthorized, JSONAPIErrors)
	})

	a.Action("update", func() {
		a.Security("jwt")
		a.Routing(
コード例 #3
0
ファイル: comments.go プロジェクト: Ritsyy/almighty-core
			a.Param("commentId", d.UUID, "commentId")
		})
		a.Payload(commentSingle)
		a.Response(d.OK, func() {
			a.Media(commentSingle)
		})
		a.Response(d.BadRequest, JSONAPIErrors)
		a.Response(d.InternalServerError, JSONAPIErrors)
		a.Response(d.NotFound, JSONAPIErrors)
		a.Response(d.Unauthorized, JSONAPIErrors)
		a.Response(d.Forbidden, JSONAPIErrors)
	})
	a.Action("delete", func() {
		a.Security("jwt")
		a.Routing(
			a.DELETE("/:commentId"),
		)
		a.Description("Delete work item with given id.")
		a.Params(func() {
			a.Param("commentId", d.UUID, "commentId")
		})
		a.Response(d.OK)
		a.Response(d.BadRequest, JSONAPIErrors)
		a.Response(d.InternalServerError, JSONAPIErrors)
		a.Response(d.NotFound, JSONAPIErrors)
		a.Response(d.Unauthorized, JSONAPIErrors)
		a.Response(d.Forbidden, JSONAPIErrors)
	})

})