Skip to content

Encapsulate API basics in a APIWrapper4J #208

@ultimate

Description

@ultimate

One could create a separate library, that provides all the tools to wrap APIs. For example a user could define an interface

interface KaroAPI {
   @Path("/user")
   public User checkUser();
}

and then call a builder to create the API using Java Proxy (https://stackoverflow.com/a/6914491/4090157):

karoAPI = APIBuilder.create(KaroAPI.ckass, "https://www.karopapier.de/api");

where the proxy would analyze the interface and the annotations set to generically build the API

Note: this should allow different serialization / deserialization (e.g. json or xml)

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions