public interface RestInfoProvider
Provides localized Swagger documentation and other related information about a REST resource.
Modifier and Type | Interface and Description |
---|---|
static interface |
RestInfoProvider.Null
Represents no RestInfoProvider.
|
Modifier and Type | Method and Description |
---|---|
String |
getDescription(RestRequest req)
Returns the localized description of the REST resource.
|
String |
getMethodDescription(Method method,
RestRequest req)
Returns the localized description of the specified java method on this servlet.
|
String |
getMethodSummary(Method method,
RestRequest req)
Returns the localized summary of the specified java method.
|
String |
getSiteName(RestRequest req)
Returns the localized site name of the REST resource.
|
Swagger |
getSwagger(RestRequest req)
Returns the localized swagger for the REST resource.
|
String |
getTitle(RestRequest req)
Returns the localized title of the REST resource.
|
Swagger getSwagger(RestRequest req) throws Exception
req
- The incoming HTTP request.Swagger
instance.
Exception
- Throw a RestException
with a specific HTTP error status or any other exception
to cause a String getSiteName(RestRequest req) throws Exception
req
- The current request.Exception
- Throw a RestException
with a specific HTTP error status or any other exception
to cause a String getTitle(RestRequest req) throws Exception
req
- The current request.Exception
- Throw a RestException
with a specific HTTP error status or any other exception
to cause a String getDescription(RestRequest req) throws Exception
req
- The current request.Exception
- Throw a RestException
with a specific HTTP error status or any other exception
to cause a String getMethodSummary(Method method, RestRequest req) throws Exception
method
- The Java method annotated with @RestMethod
.req
- The current request.Exception
- Throw a RestException
with a specific HTTP error status or any other exception
to cause a String getMethodDescription(Method method, RestRequest req) throws Exception
method
- The Java method annotated with @RestMethod
.req
- The current request.Exception
- Throw a RestException
with a specific HTTP error status or any other exception
to cause a Copyright © 2018 Apache. All rights reserved.