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

cn.willingxyz.restdoc.spring.parameter.parser.SpringPrimitiveParameterParser Maven / Gradle / Ivy

There is a newer version: 0.2.1.4
Show newest version
package cn.willingxyz.restdoc.spring.parameter.parser;

import cn.willingxyz.restdoc.core.models.ParameterModel;
import cn.willingxyz.restdoc.core.parse.RestDocParseConfig;
import cn.willingxyz.restdoc.core.parse.impl.AbstractMethodParameterParser;

import java.lang.reflect.Parameter;
import java.lang.reflect.Type;

public class SpringPrimitiveParameterParser extends AbstractMethodParameterParser {
    public SpringPrimitiveParameterParser(RestDocParseConfig configuration) {
        super(configuration);
    }

    @Override
    protected ParameterModel.ParameterLocation getParameterLocation(Parameter parameter, Type actualParamType) {
        return ParameterModel.ParameterLocation.QUERY;
    }

    @Override
    protected boolean isRequired(Parameter parameter, Type actualParamType) {
        return true;
    }

    @Override
    public boolean isSupport(Parameter parameter) {
        return true;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy