public Parameter buildParams(ParameterInfo parameterInfo, Components components,
			RequestMethod requestMethod, MethodAttributes methodAttributes, String openApiVersion) {
		MethodParameter methodParameter = parameterInfo.getMethodParameter();
		if (parameterInfo.getParamType() != null) {
			if (!ValueConstants.DEFAULT_NONE.equals(parameterInfo.getDefaultValue()))
				parameterInfo.setRequired(false);
			else
				parameterInfo.setDefaultValue(null);
			return this.buildParam(parameterInfo, components, methodAttributes.getJsonViewAnnotation());
		}
		// By default
		if (!isRequestBodyParam(requestMethod, parameterInfo, openApiVersion, methodAttributes)) {
			parameterInfo.setRequired(!((DelegatingMethodParameter) methodParameter).isNotRequired() && !methodParameter.isOptional());
			parameterInfo.setDefaultValue(null);
			return this.buildParam(parameterInfo, components, methodAttributes.getJsonViewAnnotation());
		}
		return null;
	}
Build params parameter.

@param parameterInfo    the parameter info
@param components       the components
@param requestMethod    the request method
@param methodAttributes the method attributes
@param openApiVersion   the open api version
@return the parameter
springdoc-openapi-starter-common/src/main/java/org/springdoc/core/service/AbstractRequestService.java