@Bean(bpi="title,description,version,contact,license,termsOfService,*") public class Info extends SwaggerElement
The metadata can be used by the clients if needed, and can be presented in the Swagger-UI for convenience.
Constructor and Description |
---|
Info()
Default constructor.
|
Info(Info copyFrom)
Copy constructor.
|
Modifier and Type | Method and Description |
---|---|
Info |
contact(Object value)
Same as
setContact(Contact) . |
Info |
copy()
Make a deep copy of this object.
|
Info |
description(Object value)
Same as
setDescription(String) . |
<T> T |
get(String property,
Class<T> type)
Generic property getter.
|
Contact |
getContact()
Bean property getter:
|
String |
getDescription()
Bean property getter:
|
License |
getLicense()
Bean property getter:
|
String |
getTermsOfService()
Bean property getter:
|
String |
getTitle()
Bean property getter:
|
String |
getVersion()
Bean property getter:
|
boolean |
hasDescription()
Returns
|
boolean |
hasTermsOfService()
Returns
|
boolean |
hasTitle()
Returns
|
boolean |
hasVersion()
Returns
|
Set<String> |
keySet()
Returns all the keys on this element.
|
Info |
license(Object value)
Same as
setLicense(License) . |
Info |
set(String property,
Object value)
Generic property setter.
|
Info |
setContact(Contact value)
Bean property setter:
|
Info |
setDescription(String value)
Bean property setter:
|
Info |
setLicense(License value)
Bean property setter:
|
Info |
setTermsOfService(String value)
Bean property setter:
|
Info |
setTitle(String value)
Bean property setter:
|
Info |
setVersion(String value)
Bean property setter:
|
Info |
termsOfService(Object value)
Same as
setTermsOfService(String) . |
Info |
title(Object value)
Same as
setTitle(String) . |
Info |
version(Object value)
Same as
setVersion(String) . |
public Info()
public String getTitle()
The title of the application.
public Info setTitle(String value)
The title of the application.
value
- The new value for this property.
public Info title(Object value)
setTitle(String)
.value
- The new value for this property.
public String getDescription()
A short description of the application.
public Info setDescription(String value)
A short description of the application.
value
- The new value for this property.
public Info description(Object value)
setDescription(String)
.value
- The new value for this property.
public String getTermsOfService()
The Terms of Service for the API.
public Info setTermsOfService(String value)
The Terms of Service for the API.
value
- The new value for this property.
public Info termsOfService(Object value)
setTermsOfService(String)
.value
- The new value for this property.
public Contact getContact()
The contact information for the exposed API.
public Info setContact(Contact value)
The contact information for the exposed API.
value
- The new value for this property.
public Info contact(Object value)
setContact(Contact)
.public License getLicense()
The license information for the exposed API.
public Info setLicense(License value)
The license information for the exposed API.
value
- The new value for this property.
public Info license(Object value)
setLicense(License)
.public String getVersion()
Provides the version of the application API (not to be confused with the specification version).
public Info setVersion(String value)
Provides the version of the application API (not to be confused with the specification version).
value
- The new value for this property.
public Info version(Object value)
setVersion(String)
.value
- The new value for this property.
public boolean hasTitle()
public boolean hasDescription()
public boolean hasVersion()
public boolean hasTermsOfService()
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 Info 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.public Set<String> keySet()
SwaggerElement
keySet
in class SwaggerElement
Copyright © 2016–2020 The Apache Software Foundation. All rights reserved.