default int createOrUpdate(final RuleDTO ruleDTO) {

        // now, only check rule uri condition in pathPattern mode
        // todo check uri in other modes

        try {
            final List<RuleConditionDTO> ruleConditions = ruleDTO.getRuleConditions();
            ruleConditions.stream()
                    .filter(conditionData -> ParamTypeEnum.URI.getName().equals(conditionData.getParamType()))
                    .filter(conditionData -> OperatorEnum.PATH_PATTERN.getAlias().equals(conditionData.getOperator()))
                    .map(RuleConditionDTO::getParamValue)
                    .forEach(PathPatternParser.defaultInstance::parse);
        } catch (Exception e) {
            throw new ShenyuAdminException("uri validation of Condition failed, please check.", e);
        }
        return StringUtils.isBlank(ruleDTO.getId()) ? create(ruleDTO) : update(ruleDTO);
    }
create or update rule.

@param ruleDTO {@linkplain RuleDTO}
@return rows int
shenyu-admin/src/main/java/org/apache/shenyu/admin/service/RuleService.java