{"record":{"id":"2d82657540a24a4c","repo":"OpenAPITools/openapi-generator","slug":"filter-with-no-value-not-supported-filter","errorCode":null,"errorMessage":"filter with no value not supported :[{filter}]","messagePattern":"filter with no value not supported :\\[(.+?)\\]","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"modules/openapi-generator/src/main/java/org/openapitools/codegen/OpenAPINormalizer.java","lineNumber":2495,"sourceCode":"                // Workaround: fix the syntax!\n                throw new IllegalArgumentException(message);\n            }\n        }\n\n        // Defines the filtering methods supported by the filter.\n        // Can be overridden by child classes to customize filtering.\n        public abstract Set<String> filteringMethods();\n\n        // Defines the usage message for the filter. This is used for logging purposes when the filter syntax is incorrect.\n        public abstract String usageMessage();\n\n        private void doParse() {\n            Set<String> filteringMethods = filteringMethods();\n            for (String filter : input.split(\";\")) {\n                filter = filter.trim();\n                String[] filterStrs = filter.split(\":\");\n                if (filterStrs.length != 2) { // only support filter with : at the moment\n                    throw new IllegalArgumentException(\"filter with no value not supported :[\" + filter + \"]\");\n                } else {\n                    String filterKey = filterStrs[0].trim();\n                    String filterValue = filterStrs[1];\n                    Set<String> parsedFilters = splitByPipe(filterValue);\n                    hasFilter = true;\n\n                    boolean found = false;\n                    for (String method : filteringMethods) {\n                        if (method.equals(filterKey)) {\n                            found = true;\n                            filteringMethodsMap.put(filterKey, parsedFilters);\n                            break;\n                        }\n                    }\n                    if (!found) {\n                        parse(filterKey, filterValue);\n                    }\n                }","sourceCodeStart":2477,"sourceCodeEnd":2513,"githubUrl":"https://github.com/OpenAPITools/openapi-generator/blob/fcec517be3cf5b7964296bcba25fbc97541484e7/modules/openapi-generator/src/main/java/org/openapitools/codegen/OpenAPINormalizer.java#L2477-L2513","documentation":"BaseFilter.doParse() splits each ';'-separated segment on ':' and requires exactly 2 parts — one key and one value. A segment with no colon, or with more than one colon (e.g. 'path:/v1:extra'), throws this IllegalArgumentException. It propagates through parse() (error 22) which prepends the usage message. Note that a trailing colon with empty value ('method:') is accepted since split yields 2 parts; only != 2 parts fails.","triggerScenarios":"FILTER=get|post (missing 'method:' prefix); FILTER=path:/v1:/v2 (second colon); SECURITY_SCHEMES_FILTER=type (bare key); stray ';' producing an empty/garbage segment like 'FILTER=method:get;'.","commonSituations":"Users writing filter values as bare lists without the key prefix; pasting values containing Windows drive letters or URL schemes that add a second ':'; split-by-';' leaving an empty trailing segment after a trailing semicolon — note empty trailing segment splits to [''] length 1 and throws.","solutions":["Add the missing filter key: 'method:get|post' not 'get|post'.","Remove extra ':' characters from the segment — only one separator between key and values is allowed.","Drop trailing ';' at the end of the option value to avoid empty segments.","Verify against the usage message emitted with the wrapped error."],"exampleFix":"# before\n--openapi-normalizer \"FILTER=get|post\"\n# after\n--openapi-normalizer \"FILTER=method:get|post\"","handlingStrategy":"validation","validationCode":"// Each ';'-separated segment must contain exactly one ':'\nboolean ok = Arrays.stream(value.split(\";\"))\n        .map(String::trim)\n        .allMatch(seg -> seg.split(\":\", -1).length == 2 && !seg.isEmpty());","typeGuard":null,"tryCatchPattern":"Catch IllegalArgumentException, echo the offending segment, prompt for corrected syntax — configuration error, no retry value.","preventionTips":["Never leave a trailing ';' in filter strings.","Avoid extra ':' inside values (URLs, drive letters).","Generate filter strings from structured data (key + list of values joined by '|') instead of hand-writing."],"tags":["openapi","normalizer","filter-syntax","configuration"],"backgroundTag":"invalid-configuration-syntax","analyzedSha":"fcec517be3cf5b7964296bcba25fbc97541484e7","analyzedAt":"2026-08-22T11:13:11.613Z","schemaVersion":2},"datasetVersion":"2026-08-22T14:17:55.899Z"}