Package org.springdoc.core
Class MethodAttributes
- java.lang.Object
-
- org.springdoc.core.MethodAttributes
-
public class MethodAttributes extends Object
The type Method attributes.- Author:
- bnasslahsen
-
-
Constructor Summary
Constructors Constructor Description MethodAttributes(String[] methodProducesNew, String defaultConsumesMediaType, String defaultProducesMediaType, Map<String,io.swagger.v3.oas.models.responses.ApiResponse> genericMapResponse, Locale locale)Instantiates a new Method attributes.MethodAttributes(String defaultConsumesMediaType, String defaultProducesMediaType, String[] methodConsumes, String[] methodProduces, String[] headers, Locale locale)Instantiates a new Method attributes.MethodAttributes(String defaultConsumesMediaType, String defaultProducesMediaType, Locale locale)Instantiates a new Method attributes.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcalculateConsumesProduces(Method method)Calculate consumes produces.io.swagger.v3.oas.models.responses.ApiResponsescalculateGenericMapResponse(Map<String,io.swagger.v3.oas.models.responses.ApiResponse> genericMapResponse)Calculate generic map response api responses.voidcalculateHeadersForClass(Class<?> declaringClass)Calculate headers for class.String[]getClassConsumes()Get class consumes string [ ].String[]getClassProduces()Get class produces string [ ].Map<String,io.swagger.v3.oas.models.responses.ApiResponse>getGenericMapResponse()Gets generic map response.Map<String,String>getHeaders()Gets headers.StringgetJavadocReturn()Gets javadoc return valuecom.fasterxml.jackson.annotation.JsonViewgetJsonViewAnnotation()Gets json view annotation.com.fasterxml.jackson.annotation.JsonViewgetJsonViewAnnotationForRequestBody()Gets json view annotation for request body.LocalegetLocale()Gets locale.String[]getMethodConsumes()Get method consumes string [ ].String[]getMethodProduces()Get method produces string [ ].booleanisMethodOverloaded()Is method overloaded boolean.booleanisNoApiResponseDoc()Is no api response doc boolean.booleanisWithResponseBodySchemaDoc()Is with response body schema doc boolean.voidsetClassConsumes(String[] classConsumes)Sets class consumes.voidsetClassProduces(String[] classProduces)Sets class produces.voidsetJavadocReturn(String javadocReturn)Sets javadoc return value.voidsetJsonViewAnnotation(com.fasterxml.jackson.annotation.JsonView jsonViewAnnotation)Sets json view annotation.voidsetJsonViewAnnotationForRequestBody(com.fasterxml.jackson.annotation.JsonView jsonViewAnnotationForRequestBody)Sets json view annotation for request body.voidsetMethodOverloaded(boolean overloaded)Sets method overloaded.voidsetWithApiResponseDoc(boolean withApiDoc)Sets with api response doc.voidsetWithResponseBodySchemaDoc(boolean withResponseBodySchemaDoc)Sets with response body schema doc.
-
-
-
Constructor Detail
-
MethodAttributes
public MethodAttributes(String[] methodProducesNew, String defaultConsumesMediaType, String defaultProducesMediaType, Map<String,io.swagger.v3.oas.models.responses.ApiResponse> genericMapResponse, Locale locale)
Instantiates a new Method attributes.- Parameters:
methodProducesNew- the method produces newdefaultConsumesMediaType- the default consumes media typedefaultProducesMediaType- the default produces media typegenericMapResponse- the generic map responselocale- the locale
-
MethodAttributes
public MethodAttributes(String defaultConsumesMediaType, String defaultProducesMediaType, Locale locale)
Instantiates a new Method attributes.- Parameters:
defaultConsumesMediaType- the default consumes media typedefaultProducesMediaType- the default produces media typelocale- the locale
-
MethodAttributes
public MethodAttributes(String defaultConsumesMediaType, String defaultProducesMediaType, String[] methodConsumes, String[] methodProduces, String[] headers, Locale locale)
Instantiates a new Method attributes.- Parameters:
defaultConsumesMediaType- the default consumes media typedefaultProducesMediaType- the default produces media typemethodConsumes- the method consumesmethodProduces- the method producesheaders- the headerslocale- the locale
-
-
Method Detail
-
getClassProduces
public String[] getClassProduces()
Get class produces string [ ].- Returns:
- the string [ ]
-
setClassProduces
public void setClassProduces(String[] classProduces)
Sets class produces.- Parameters:
classProduces- the class produces
-
getClassConsumes
public String[] getClassConsumes()
Get class consumes string [ ].- Returns:
- the string [ ]
-
setClassConsumes
public void setClassConsumes(String[] classConsumes)
Sets class consumes.- Parameters:
classConsumes- the class consumes
-
getMethodProduces
public String[] getMethodProduces()
Get method produces string [ ].- Returns:
- the string [ ]
-
getMethodConsumes
public String[] getMethodConsumes()
Get method consumes string [ ].- Returns:
- the string [ ]
-
calculateConsumesProduces
public void calculateConsumesProduces(Method method)
Calculate consumes produces.- Parameters:
method- the method
-
isMethodOverloaded
public boolean isMethodOverloaded()
Is method overloaded boolean.- Returns:
- the boolean
-
setMethodOverloaded
public void setMethodOverloaded(boolean overloaded)
Sets method overloaded.- Parameters:
overloaded- the overloaded
-
setWithApiResponseDoc
public void setWithApiResponseDoc(boolean withApiDoc)
Sets with api response doc.- Parameters:
withApiDoc- the with api doc
-
isNoApiResponseDoc
public boolean isNoApiResponseDoc()
Is no api response doc boolean.- Returns:
- the boolean
-
getJsonViewAnnotation
public com.fasterxml.jackson.annotation.JsonView getJsonViewAnnotation()
Gets json view annotation.- Returns:
- the json view annotation
-
setJsonViewAnnotation
public void setJsonViewAnnotation(com.fasterxml.jackson.annotation.JsonView jsonViewAnnotation)
Sets json view annotation.- Parameters:
jsonViewAnnotation- the json view annotation
-
getJsonViewAnnotationForRequestBody
public com.fasterxml.jackson.annotation.JsonView getJsonViewAnnotationForRequestBody()
Gets json view annotation for request body.- Returns:
- the json view annotation for request body
-
setJsonViewAnnotationForRequestBody
public void setJsonViewAnnotationForRequestBody(com.fasterxml.jackson.annotation.JsonView jsonViewAnnotationForRequestBody)
Sets json view annotation for request body.- Parameters:
jsonViewAnnotationForRequestBody- the json view annotation for request body
-
calculateGenericMapResponse
public io.swagger.v3.oas.models.responses.ApiResponses calculateGenericMapResponse(Map<String,io.swagger.v3.oas.models.responses.ApiResponse> genericMapResponse)
Calculate generic map response api responses.- Parameters:
genericMapResponse- the generic map response- Returns:
- the api responses
-
getGenericMapResponse
public Map<String,io.swagger.v3.oas.models.responses.ApiResponse> getGenericMapResponse()
Gets generic map response.- Returns:
- the generic map response
-
isWithResponseBodySchemaDoc
public boolean isWithResponseBodySchemaDoc()
Is with response body schema doc boolean.- Returns:
- the boolean
-
setWithResponseBodySchemaDoc
public void setWithResponseBodySchemaDoc(boolean withResponseBodySchemaDoc)
Sets with response body schema doc.- Parameters:
withResponseBodySchemaDoc- the with response body schema doc
-
calculateHeadersForClass
public void calculateHeadersForClass(Class<?> declaringClass)
Calculate headers for class.- Parameters:
declaringClass- the declaring class
-
getJavadocReturn
public String getJavadocReturn()
Gets javadoc return value- Returns:
- the javadoc return
-
setJavadocReturn
public void setJavadocReturn(String javadocReturn)
Sets javadoc return value.- Parameters:
javadocReturn- the javadoc return value
-
getLocale
public Locale getLocale()
Gets locale.- Returns:
- the locale
-
-