public class SpringCallableResponseEntityRule extends Object implements Rule<com.sun.codemodel.JDefinedClass,com.sun.codemodel.JType,ApiActionMetadata>
Callable as a return type for an endpoint. If the
endpoint declares a response body the first type of the response body will added as a generic
type to the ResponseEntity.
#%RAML 0.8 title: myapi mediaType: application/json baseUri: /
/base: get: /{id}: get: responses: 200: body: application/json: schema: NamedResponseType ...
OUTPUT: @Callable<ResponseEntity<NamedResponseType>>| Constructor and Description |
|---|
SpringCallableResponseEntityRule() |
| Modifier and Type | Method and Description |
|---|---|
com.sun.codemodel.JType |
apply(ApiActionMetadata endpointMetadata,
com.sun.codemodel.JDefinedClass generatableType)
Add whatever Java source is required to the given generatable to
represent this rule.
|
public com.sun.codemodel.JType apply(ApiActionMetadata endpointMetadata, com.sun.codemodel.JDefinedClass generatableType)
Ruleapply in interface Rule<com.sun.codemodel.JDefinedClass,com.sun.codemodel.JType,ApiActionMetadata>endpointMetadata - The meta data from which the code is build.generatableType - A code generation construct to which this rule should be appliedCopyright © 2017. All rights reserved.