private boolean singlePathVariable(PathVariable pathVariable, Class<?> type) { return !Map.class.isAssignableFrom(type) || StringUtils.hasText(pathVariable.name()); }
public PathVariableNamedValueInfo(PathVariable annotation) { super(annotation.name(), annotation.required(), ValueConstants.DEFAULT_NONE); } }
public PathVariableNamedValueInfo(PathVariable annotation) { super(annotation.name(), annotation.required(), ValueConstants.DEFAULT_NONE); } }
public PathVariableNamedValueInfo(PathVariable annotation) { super(annotation.name(), annotation.required(), ValueConstants.DEFAULT_NONE); } }
@Override public String getAnnotationParameterName(Object annotation) { String value = ((PathVariable) annotation).value(); if (value.isEmpty()) { value = ((PathVariable) annotation).name(); } return value; }
private PathParameter extractPathVariable(Type type, PathVariable pathVariable) { String paramName = StringUtils.defaultIfEmpty(pathVariable.value(), pathVariable.name()); PathParameter pathParameter = new PathParameter().name(paramName); Property schema = readAsPropertyIfPrimitive(type); if (schema != null) { pathParameter.setProperty(schema); } return pathParameter; }
@Override public String getAnnotationParameterName(Object annotation) { String value = ((PathVariable) annotation).value(); if (value.isEmpty()) { value = ((PathVariable) annotation).name(); } return value; }
public PathVariableNamedValueInfo(PathVariable annotation) { super(annotation.name(), annotation.required(), ValueConstants.DEFAULT_NONE); } }
public PathVariableNamedValueInfo(PathVariable annotation) { super(annotation.name(), annotation.required(), ValueConstants.DEFAULT_NONE); } }
@Override boolean doCollect(ApiParamObject apiParamObject, AnnotatedElement element) { PathVariable pathVariable = element.getAnnotation(PathVariable.class); if (pathVariable == null) { return false; } String name = null; if (StringUtils.hasText(pathVariable.value())) { name = pathVariable.value(); } if (StringUtils.hasText(pathVariable.name())) { name = pathVariable.name(); } apiParamObject.setName(name); boolean required = pathVariable.required(); apiParamObject.setRequired(required); return true; } };
if (pathVariable.isPresent()) { String paramName = MoreObjects.firstNonNull( emptyToNull(pathVariable.get().name()), methodParameter.defaultName().orNull());
if (parameterName.isEmpty()) { try { parameterName = pathParam.name();