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 protected void fillParameter(Object annotation, OperationGenerator operationGenerator, int paramIdx, PathParameter parameter) { super.fillParameter(annotation, operationGenerator, paramIdx, parameter); PathVariable pathVariable = (PathVariable) annotation; parameter.setRequired(pathVariable.required()); } }
private boolean optionalButPresentInThePath( OperationContext operationContext, PathVariable pathVariable, String paramName) { return !pathVariable.required() && operationContext.requestMappingPattern().contains("{" + paramName + "}"); }
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 protected void fillParameter(Object annotation, OperationGenerator operationGenerator, int paramIdx, PathParameter parameter) { super.fillParameter(annotation, operationGenerator, paramIdx, parameter); PathVariable pathVariable = (PathVariable) annotation; parameter.setRequired(pathVariable.required()); } }
methodParameter.defaultName().orNull()); if (pathVariable.get().required() || optionalButPresentInThePath(operationContext, pathVariable.get(), paramName)) { requiredSet.add(true);
@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 (pathParam != null) { try { required = pathParam.required();