Search in sources :

Example 1 with ActivationContextParameter

use of org.apache.tapestry5.annotations.ActivationContextParameter in project tapestry-5 by apache.

the class DefaultOpenApiDescriptionGenerator method getParameterName.

private String getParameterName(Parameter parameter) {
    String name = null;
    final RequestParameter requestParameter = parameter.getAnnotation(RequestParameter.class);
    if (requestParameter != null && !CommonsUtils.isBlank(requestParameter.value())) {
        name = requestParameter.value();
    }
    ActivationContextParameter activationContextParameter = parameter.getAnnotation(ActivationContextParameter.class);
    if (activationContextParameter != null && !CommonsUtils.isBlank(activationContextParameter.value())) {
        name = activationContextParameter.value();
    }
    if (CommonsUtils.isBlank(name)) {
        name = parameter.getName();
    }
    return name;
}
Also used : ActivationContextParameter(org.apache.tapestry5.annotations.ActivationContextParameter) RequestParameter(org.apache.tapestry5.annotations.RequestParameter)

Aggregations

ActivationContextParameter (org.apache.tapestry5.annotations.ActivationContextParameter)1 RequestParameter (org.apache.tapestry5.annotations.RequestParameter)1