in oas-generator/oas-generator-core/src/main/java/org/apache/servicecomb/toolkit/generator/annotation/ParameterAnnotationProcessor.java [33:69]
public void process(Parameter parameterAnnotation, ParameterContext paramCtx) {
Schema schema = parameterAnnotation.schema();
io.swagger.v3.oas.models.media.Schema schemaFromAnnotation = SwaggerAnnotationUtils.getSchemaFromAnnotation(schema);
if (schemaFromAnnotation != null) {
paramCtx.setSchema(schemaFromAnnotation);
}
paramCtx.setRequired(parameterAnnotation.required());
paramCtx.setAllowEmptyValue(parameterAnnotation.allowEmptyValue());
paramCtx.setAllowReserved(parameterAnnotation.allowReserved());
paramCtx.setDeprecated(parameterAnnotation.deprecated());
paramCtx.setExample(parameterAnnotation.example());
switch (parameterAnnotation.in()) {
case HEADER:
paramCtx.setIn(InType.HEADER);
break;
case COOKIE:
paramCtx.setIn(InType.COOKIE);
break;
case PATH:
paramCtx.setIn(InType.PATH);
break;
case QUERY:
case DEFAULT:
default:
paramCtx.setIn(InType.QUERY);
}
paramCtx.setDescription(parameterAnnotation.description());
paramCtx.setRef(parameterAnnotation.ref());
paramCtx.setName(parameterAnnotation.name());
paramCtx.setExplode(getExplode(parameterAnnotation.explode()));
paramCtx.applyAnnotations(Collections.singletonList(parameterAnnotation));
}