{8.2.0-updated} @Path

The {@link oaj.http.annotation.Path @Path} annotation can be applied to arguments of @RemoteMethod-annotated methods to denote that they are path parameters on the request.

Example:

@Remote(path="/myproxy") public interface MyProxy { // Explicit names specified for path parameters. // pojo will be converted to UON notation (unless plain-text parts enabled). @RemoteMethod(path="/mymethod1/{foo}/{bar}") String myProxyMethod1(@Path("foo") String foo, @Path("bar") MyPojo pojo); // Multiple values pulled from a NameValuePairSupplier object. // Same as @Path("*"). @RemoteMethod(path="/mymethod2/{foo}/{bar}/{baz}") String myProxyMethod2(@Path NameValuePairSupplier nameValuePairSupplier); // Multiple values pulled from a Map. // Same as @Path("*"). @RemoteMethod(path="/mymethod3/{foo}/{bar}/{baz}") String myProxyMethod3(@Path Map<String,Object> map); // Multiple values pulled from a bean. // Same as @Path("*"). @RemoteMethod(path="/mymethod4/{foo}/{bar}/{baz}") String myProxyMethod4(@Path MyBean myBean); }

Single-part arguments (i.e. those with name != "*") can be any of the following types:

Multi-part arguments (i.e. those with name == "*" or empty) can be any of the following types:

See the link below for information about supported data types in OpenAPI serialization.