@Bean(properties="description,schema,headers,examples,*") public class ResponseInfo extends SwaggerElement
Constructor and Description |
---|
ResponseInfo() |
Modifier and Type | Method and Description |
---|---|
ResponseInfo |
addExamples(Map<String,Object> values)
Adds one or more values to the
|
ResponseInfo |
addHeaders(Map<String,HeaderInfo> values)
Adds one or more values to the
|
ResponseInfo |
copyFrom(ResponseInfo r)
Copies any non-null fields from the specified object to this object.
|
ResponseInfo |
description(Object value)
Same as
setDescription(String) . |
ResponseInfo |
example(String mimeType,
Object example)
Adds a single value to the
|
ResponseInfo |
examples(Object... values)
Adds one or more values to the
|
<T> T |
get(String property,
Class<T> type)
Generic property getter.
|
String |
getDescription()
Bean property getter:
|
Map<String,Object> |
getExamples()
Bean property getter:
|
Map<String,HeaderInfo> |
getHeaders()
Bean property getter:
|
SchemaInfo |
getSchema()
Bean property getter:
|
ResponseInfo |
header(String name,
HeaderInfo header)
Adds a single value to the
|
ResponseInfo |
headers(Object... values)
Adds one or more values to the
|
ResponseInfo |
schema(Object value)
Same as
setSchema(SchemaInfo) . |
ResponseInfo |
set(String property,
Object value)
Generic property setter.
|
ResponseInfo |
setDescription(String value)
Bean property setter:
|
ResponseInfo |
setExamples(Map<String,Object> value)
Bean property setter:
|
ResponseInfo |
setHeaders(Map<String,HeaderInfo> value)
Bean property setter:
|
ResponseInfo |
setSchema(SchemaInfo value)
Bean property setter:
|
getExtraProperties, isStrict, strict, strict, toString
public ResponseInfo()
public ResponseInfo copyFrom(ResponseInfo r)
r
- The object to copy fields from.
public String getDescription()
A short description of the response.
public ResponseInfo setDescription(String value)
A short description of the response.
value
- The new value for this property.
public ResponseInfo description(Object value)
setDescription(String)
.value
- The new value for this property.
toString()
.
public SchemaInfo getSchema()
A definition of the response structure.
public ResponseInfo setSchema(SchemaInfo value)
A definition of the response structure.
value
- The new value for this property.
public ResponseInfo schema(Object value)
setSchema(SchemaInfo)
.value
- The new value for this property.
SchemaInfo
String
- JSON object representation of SchemaInfo
schema(
public Map<String,HeaderInfo> getHeaders()
A list of headers that are sent with the response.
public ResponseInfo setHeaders(Map<String,HeaderInfo> value)
A list of headers that are sent with the response.
value
- The new value for this property.
public ResponseInfo addHeaders(Map<String,HeaderInfo> values)
values
- The values to add to this property.
public ResponseInfo header(String name, HeaderInfo header)
name
- The header name.header
- The header descriptionspublic ResponseInfo headers(Object... values)
values
- The values to add to this property.
Map<String,HeaderInfo
|String>
String
- JSON object representation of Map<String,HeaderInfo
>
headers(
public Map<String,Object> getExamples()
An example of the response message.
public ResponseInfo setExamples(Map<String,Object> value)
An example of the response message.
value
- The new value for this property.
public ResponseInfo addExamples(Map<String,Object> values)
values
- The values to add to this property.
public ResponseInfo example(String mimeType, Object example)
mimeType
- The mime-type string.example
- The example.public ResponseInfo examples(Object... values)
values
- The values to add to this property.
Map<String,Object>
String
- JSON object representation of Map<String,Object>
examples(
public <T> T get(String property, Class<T> type)
SwaggerElement
Can be used to retrieve non-standard Swagger fields such as
get
in class SwaggerElement
property
- The property name to retrieve.type
- The datatype to cast the value to.public ResponseInfo set(String property, Object value)
SwaggerElement
Can be used to set non-standard Swagger fields such as
set
in class SwaggerElement
property
- The property name to set.value
- The new value for the property.Copyright © 2018 Apache. All rights reserved.