All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.mangofactory.swagger.readers.operation.parameter.ParameterAccessReader Maven / Gradle / Ivy

package com.mangofactory.swagger.readers.operation.parameter;

import com.mangofactory.swagger.readers.Command;
import com.mangofactory.swagger.scanners.RequestMappingContext;
import com.wordnik.swagger.annotations.ApiParam;
import org.springframework.core.MethodParameter;

public class ParameterAccessReader implements Command {
  @Override
  public void execute(RequestMappingContext context) {
    MethodParameter methodParameter = (MethodParameter) context.get("methodParameter");
    ApiParam apiParam = methodParameter.getParameterAnnotation(ApiParam.class);
    String access = "";
    if (null != apiParam) {
      access = apiParam.access();
    }
    context.put("paramAccess", access);
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy