Skip to content

zaxxio/Mappa

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Use cases of Custom Route Annotations for Mapping

[Api]
public interface IPostService
{
    [Route(path: "/posts/{id}/{path}", MethodType.GET)]
    Task<ApiResponse<List<Comment>>> FindById([PathParam("id")] int id, [PathParam("path")] string path);

    [Route(path: "/posts", MethodType.POST)]
    Task<ApiResponse<List<Post>>> FindAll();

    [Route(path: "/posts", MethodType.POST)]
    Task<ApiResponse<Post>> RegisterUser([RequestBody] Post post);

    [Route(path: "/comments", MethodType.GET)]
    Task<ApiResponse<List<Post>>> FindByCommentsByPostId([QueryParam("postId")] int postId);
}

About

Custom HTTP Client from Scratch

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages