Package foo.zaaarf.routecartographer
Class Route
- java.lang.Object
-
- foo.zaaarf.routecartographer.Route
-
public class Route extends java.lang.Object
Representation of a REST route.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Route.DTO
Representation of a DTO type.static class
Route.Param
Representation of a parameter of a REST route.
-
Field Summary
Fields Modifier and Type Field Description java.lang.String[]
consumes
The media types consumed by the endpoint.boolean
deprecated
Whether the endpoint is deprecated.Route.DTO
inputType
ARoute.DTO
representing the request body.java.lang.String[]
methods
The supportedRequestMethod
s, as strings.Route.Param[]
params
An array ofRoute.Param
s, representing parameters accepted by the endpoint.java.lang.String[]
paths
The paths of the endpoint.java.lang.String[]
produces
The media types produced by the endpoint.Route.DTO
returnType
ARoute.DTO
representing the response body.
-
Constructor Summary
Constructors Constructor Description Route(java.lang.String[] paths, RequestMethod[] methods, java.lang.String[] consumes, java.lang.String[] produces, boolean deprecated, Route.DTO returnType, Route.DTO inputType, Route.Param... params)
The one and only constructor.
-
-
-
Field Detail
-
paths
public final java.lang.String[] paths
The paths of the endpoint.
-
methods
public final java.lang.String[] methods
The supportedRequestMethod
s, as strings.
-
produces
public final java.lang.String[] produces
The media types produced by the endpoint. May be null if not specified.
-
consumes
public final java.lang.String[] consumes
The media types consumed by the endpoint. May be null if not specified.
-
deprecated
public final boolean deprecated
Whether the endpoint is deprecated.
-
params
public final Route.Param[] params
An array ofRoute.Param
s, representing parameters accepted by the endpoint.
-
-
Constructor Detail
-
Route
public Route(java.lang.String[] paths, RequestMethod[] methods, java.lang.String[] consumes, java.lang.String[] produces, boolean deprecated, Route.DTO returnType, Route.DTO inputType, Route.Param... params)
The one and only constructor.- Parameters:
paths
- the paths of the endpointmethods
- theRequestMethod
s accepted by the endpointconsumes
- the media types consumed by the endpoint, may be nullproduces
- the media types produced by the endpoint, may be nulldeprecated
- whether the endpoint is deprecatedreturnType
- the DTO for the response type, may be nullinputType
- the DTO for the request type, may be nullparams
-Route.Param
s of the endpoint, may be null
-
-