public class SpringFeignClientResponseTypeRule extends Object implements Rule<com.sun.codemodel.JDefinedClass,com.sun.codemodel.JType,ApiActionMetadata>
ResponseEntity as a return type for an endpoint.
If the endpoint declares a response body the first type of the response body will used as return type instead.
#%RAML 0.8
title: myapi
mediaType: application/json
baseUri: /
/base:
get:
/{id}:
get:
responses:
200:
body:
application/json:
schema: NamedResponseType
...
OUTPUT:
ResponseEntity<NamedResponseType>OR:
ResponseEntity<List<NamedResponseType>> (if the NamedResponseType is an "array")
| Constructor and Description |
|---|
SpringFeignClientResponseTypeRule() |
| 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.