public class BasicRestInfoProvider extends Object implements RestInfoProvider
RestInfoProvider
.
Subclasses can override these methods to tailor how HTTP REST resources are documented.
RestInfoProvider.Null
Constructor and Description |
---|
BasicRestInfoProvider(RestContext context)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
List<MediaType> |
getConsumes(RestRequest req)
Deprecated.
Unused.
|
Contact |
getContact(RestRequest req)
Deprecated.
Unused.
|
String |
getDescription(RestRequest req)
Returns the localized description of this REST resource.
|
ExternalDocumentation |
getExternalDocs(RestRequest req)
Deprecated.
Unused.
|
License |
getLicense(RestRequest req)
Deprecated.
Unused.
|
List<MediaType> |
getMethodConsumes(Method method,
RestRequest req)
Deprecated.
Unused.
|
String |
getMethodDescription(Method method,
RestRequest req)
Returns the localized description of the specified java method on this servlet.
|
ExternalDocumentation |
getMethodExternalDocs(Method method,
RestRequest req)
Deprecated.
Unused.
|
String |
getMethodOperationId(Method method,
RestRequest req)
Deprecated.
Unused.
|
List<ParameterInfo> |
getMethodParameters(Method method,
RestRequest req)
Deprecated.
Unused.
|
List<MediaType> |
getMethodProduces(Method method,
RestRequest req)
Deprecated.
Unused.
|
Map<Integer,ResponseInfo> |
getMethodResponses(Method method,
RestRequest req)
Deprecated.
Unused.
|
String |
getMethodSummary(Method method,
RestRequest req)
Returns the localized summary of the specified java method on this servlet.
|
List<String> |
getMethodTags(Method method,
RestRequest req)
Deprecated.
Unused.
|
List<MediaType> |
getProduces(RestRequest req)
Deprecated.
Unused.
|
String |
getSiteName(RestRequest req)
Returns the localized site name of this REST resource.
|
Swagger |
getSwagger(RestRequest req)
Returns the localized swagger for this REST resource.
|
Swagger |
getSwaggerFromFile(RestRequest req)
Deprecated.
Unused.
|
List<Tag> |
getTags(RestRequest req)
Deprecated.
Unused.
|
String |
getTermsOfService(RestRequest req)
Deprecated.
Unused.
|
String |
getTitle(RestRequest req)
Returns the localized title of this REST resource.
|
String |
getVersion(RestRequest req)
Deprecated.
Unused.
|
boolean |
isDeprecated(Method method,
RestRequest req)
Deprecated.
Unused.
|
public BasicRestInfoProvider(RestContext context)
context
- The resource context.public Swagger getSwagger(RestRequest req) throws Exception
Subclasses can override this method to customize the Swagger.
getSwagger
in interface RestInfoProvider
req
- The incoming HTTP request.Exception
public String getMethodSummary(Method method, RestRequest req) throws Exception
Subclasses can override this method to provide their own summary.
The default implementation returns the value from the following locations (whichever matches first):
@RestMethod(summary)
annotation.
@RestResource(messages)
on the resource class, then any parent classes.
@RestMethod(summary)
annotation.
getMethodSummary
in interface RestInfoProvider
method
- The Java method annotated with @RestMethod
.req
- The current request.Exception
public String getMethodDescription(Method method, RestRequest req) throws Exception
Subclasses can override this method to provide their own description.
The default implementation returns the value from the following locations (whichever matches first):
@RestMethod(description)
annotation.
@RestResource(messages)
on the resource class, then any parent classes.
@RestMethod(description)
annotation.
getMethodDescription
in interface RestInfoProvider
method
- The Java method annotated with @RestMethod
.req
- The current request.Exception
public String getSiteName(RestRequest req) throws Exception
Subclasses can override this method to provide their own site name.
The default implementation returns the value from the following locations (whichever matches first):
@RestResource(siteName)
annotation on this class, and then any parent classes.
@RestResource(messages)
on the resource class, then any parent classes.
@RestResource(siteName)
annotation.
getSiteName
in interface RestInfoProvider
req
- The current request.Exception
public String getTitle(RestRequest req) throws Exception
Subclasses can override this method to provide their own title.
The default implementation returns the value from the following locations (whichever matches first):
@RestResource(siteName)
annotation on this class, and then any parent classes.
@RestResource(messages)
on the resource class, then any parent classes.
@RestResource(title)
annotation.
getTitle
in interface RestInfoProvider
req
- The current request.Exception
public String getDescription(RestRequest req) throws Exception
Subclasses can override this method to provide their own description.
The default implementation returns the value from the following locations (whichever matches first):
@RestResource(description)
annotation on this class, and then any parent classes.
@RestResource(messages)
on the resource class, then any parent classes.
@RestResource(description)
annotation.
getDescription
in interface RestInfoProvider
req
- The current request.Exception
@Deprecated public Contact getContact(RestRequest req) throws Exception
Exception
@Deprecated public License getLicense(RestRequest req) throws Exception
Exception
@Deprecated public String getTermsOfService(RestRequest req) throws Exception
Exception
@Deprecated public String getVersion(RestRequest req) throws Exception
Exception
@Deprecated public List<MediaType> getConsumes(RestRequest req) throws Exception
Exception
@Deprecated public List<MediaType> getProduces(RestRequest req) throws Exception
Exception
@Deprecated public List<Tag> getTags(RestRequest req) throws Exception
Exception
@Deprecated public ExternalDocumentation getExternalDocs(RestRequest req) throws Exception
Exception
@Deprecated public List<MediaType> getMethodConsumes(Method method, RestRequest req) throws Exception
Exception
@Deprecated public ExternalDocumentation getMethodExternalDocs(Method method, RestRequest req) throws Exception
Exception
@Deprecated public String getMethodOperationId(Method method, RestRequest req) throws Exception
Exception
@Deprecated public List<ParameterInfo> getMethodParameters(Method method, RestRequest req) throws Exception
Exception
@Deprecated public List<MediaType> getMethodProduces(Method method, RestRequest req) throws Exception
Exception
@Deprecated public Map<Integer,ResponseInfo> getMethodResponses(Method method, RestRequest req) throws Exception
Exception
@Deprecated public List<String> getMethodTags(Method method, RestRequest req) throws Exception
Exception
@Deprecated public Swagger getSwaggerFromFile(RestRequest req) throws Exception
Exception
@Deprecated public boolean isDeprecated(Method method, RestRequest req) throws Exception
Exception
Copyright © 2018 Apache. All rights reserved.