Package io.swagger.jaxrs.utils
Class ReaderUtils
- java.lang.Object
-
- io.swagger.jaxrs.utils.ReaderUtils
-
public class ReaderUtils extends Object
-
-
Constructor Summary
Constructors Constructor Description ReaderUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static List<io.swagger.models.parameters.Parameter>
collectConstructorParameters(Class<?> cls, io.swagger.models.Swagger swagger)
Collects constructor-level parameters from class.static List<io.swagger.models.parameters.Parameter>
collectFieldParameters(Class<?> cls, io.swagger.models.Swagger swagger)
Collects field-level parameters from class.static String
getPath(javax.ws.rs.Path classLevelPath, javax.ws.rs.Path methodLevelPath, String parentPath, boolean isSubresource)
static String[]
splitContentValues(String[] strings)
Splits the provided array of strings into an array, using comma as the separator.
-
-
-
Method Detail
-
collectConstructorParameters
public static List<io.swagger.models.parameters.Parameter> collectConstructorParameters(Class<?> cls, io.swagger.models.Swagger swagger)
Collects constructor-level parameters from class.- Parameters:
cls
- is a class for collectingswagger
- is the instance of the Swagger- Returns:
- the collection of supported parameters
-
collectFieldParameters
public static List<io.swagger.models.parameters.Parameter> collectFieldParameters(Class<?> cls, io.swagger.models.Swagger swagger)
Collects field-level parameters from class.- Parameters:
cls
- is a class for collectingswagger
- is the instance of the Swagger- Returns:
- the collection of supported parameters
-
splitContentValues
public static String[] splitContentValues(String[] strings)
Splits the provided array of strings into an array, using comma as the separator. Also removes leading and trailing whitespace and omits empty strings from the results.- Parameters:
strings
- is the provided array of strings- Returns:
- the resulted array of strings
-
-