Ejemplo n.º 1
0
        public ActionResult <LinkCollectionResponse> Describe()
        {
            var response = new LinkCollectionResponse
            {
                Links = new LinkResponse[]
                {
                    new LinkResponse(this.Url.ActionLink(action: nameof(this.Describe)), rel: "self", "GET"),
                    new LinkResponse(this.Url.ActionLink(action: nameof(ApiController.Describe), controller: "Api"), rel: "parent", "GET"),
                    new LinkResponse(this.Url.ActionLink(action: nameof(CommitsController.Describe), controller: "Commits"), rel: "commits", "GET"),
                },
            };

            return(response);
        }
Ejemplo n.º 2
0
        public ActionResult <LinkCollectionResponse> Describe()
        {
            var response = new LinkCollectionResponse
            {
                Links = new LinkResponse[]
                {
                    new LinkResponse(this.Url.ActionLink(action: nameof(V1Controller.Describe), controller: "V1"), rel: "parent", method: "GET"),
                    new LinkResponse(this.Url.ActionLink(action: nameof(this.Describe)), rel: "self", method: "GET"),
                    new LinkResponse(this.Url.ActionLink(action: nameof(this.CreateChore)), rel: "create_chore_commit", method: "POST"),
                    new LinkResponse(this.Url.ActionLink(action: nameof(this.CreateDocumentation)), rel: "create_documentation_commit", method: "POST"),
                    new LinkResponse(this.Url.ActionLink(action: nameof(this.CreateFeature)), rel: "create_feature_commit", method: "POST"),
                    new LinkResponse(this.Url.ActionLink(action: nameof(this.CreateFix)), rel: "create_fix_commit", method: "POST"),
                },
            };

            return(response);
        }