{"record":{"id":"8044f755687364b7","repo":"OpenAPITools/openapi-generator","slug":"in-rule-rule-the-operands-were-not-provide","errorCode":null,"errorMessage":"In rule: \" + rule + \"the operands were not provided in the form of <Rule>=<Value>","messagePattern":"In rule: \" \\+ rule \\+ \"the operands were not provided in the form of <Rule>=<Value>","errorType":"http","errorClass":"ResponseStatusException","httpStatus":400,"severity":"error","filePath":"modules/openapi-generator-online/src/main/java/org/openapitools/codegen/online/service/Generator.java","lineNumber":140,"sourceCode":"        clientOptInput.openAPI(openapi);\n\n        CodegenConfig codegenConfig;\n        try {\n            codegenConfig = CodegenConfigLoader.forName(language);\n        } catch (RuntimeException e) {\n            throw new ResponseStatusException(HttpStatus.BAD_REQUEST, \"Unsupported target \" + language + \" supplied\");\n        }\n\n        if (opts.getOptions() != null) {\n            codegenConfig.additionalProperties().putAll(opts.getOptions());\n            codegenConfig.additionalProperties().put(\"openAPI\", openapi);\n        }\n\n        if (opts.getOpenapiNormalizer() != null && !opts.getOpenapiNormalizer().isEmpty()) {\n            for (String rule : opts.getOpenapiNormalizer()) {\n                String[] ruleOperands = rule.split(\"=\");\n                if (ruleOperands.length != 2) {\n                    throw new ResponseStatusException(HttpStatus.BAD_REQUEST, \"In rule: \" + rule + \"the operands were not provided in the form of <Rule>=<Value>\");\n                }\n                codegenConfig.openapiNormalizer().put(ruleOperands[0], ruleOperands[1]);\n            }\n        }\n\n        codegenConfig.setOutputDir(outputFolder);\n\n        clientOptInput.config(codegenConfig);\n\n        try {\n            List<File> files = new DefaultGenerator().opts(clientOptInput).generate();\n            if (files.size() > 0) {\n                List<File> filesToAdd = new ArrayList<>();\n                LOGGER.debug(\"adding to {}\", outputFolder);\n                filesToAdd.add(new File(outputFolder));\n                ZipUtil zip = new ZipUtil();\n                zip.compressFiles(filesToAdd, outputFilename);\n            } else {","sourceCodeStart":122,"sourceCodeEnd":158,"githubUrl":"https://github.com/OpenAPITools/openapi-generator/blob/fcec517be3cf5b7964296bcba25fbc97541484e7/modules/openapi-generator-online/src/main/java/org/openapitools/codegen/online/service/Generator.java#L122-L158","documentation":"Thrown when an entry of the optional openapiNormalizer list does not split on '=' into exactly two parts (Generator.java:136-141). Each rule must be the single string form <Rule>=<Value>, e.g. RESOLVE_INLINE_MODELS=true. Note the implementation uses rule.split(\"=\"); a value that itself contains '=' produces three parts and is rejected too, so both 'RULE' (no '=') and 'RULE=a=b' fail.","triggerScenarios":"Sending \"openapiNormalizer\": [\"RESOLVE_INLINE_MODELS\"] without '=true'; passing a JSON object or list of objects instead of the string array; values containing '=' (\"KEEP_ONLY_FIRST_TAG_IN_OPERATION=a=b\"); stray whitespace/glue characters between rules joined into one string.","commonSituations":"Porting CLI-style flags (--resolve-inline-models) directly into the API body; config files mapping rules to booleans that get serialized as objects; hand-editing the request JSON and dropping the '=value' suffix.","solutions":["Send every rule as one 'Rule=Value' string: [\"RESOLVE_INLINE_MODELS=true\",\"KEEP_ONLY_FIRST_TAG_IN_OPERATION=false\"]","Ensure values contain no '=' themselves, and each rule is its own array element","Use only documented rule names from the openapi-normalizer docs (e.g. RESOLVE_INLINE_MODELS, KEEP_ONLY_FIRST_TAG_IN_OPERATION, REMOVE_ANYOF_ONEOF, REFACTOR_ALLOF)"],"exampleFix":"// before\nin.setOpenapiNormalizer(List.of(\"RESOLVE_INLINE_MODELS\"));   // 400 In rule: RESOLVE_INLINE_MODELS the operands ...\n\n// after\nin.setOpenapiNormalizer(List.of(\"RESOLVE_INLINE_MODELS=true\"));","handlingStrategy":"validation","validationCode":"// enforce the exact 'Rule=Value' shape before posting\nprivate static final Pattern RULE = Pattern.compile(\"^[^=]+=[^=]*$\");\nfor (String r : normalizerRules) {\n    if (!RULE.matcher(r).matches()) throw new IllegalArgumentException(\"bad rule '\" + r + \"', expected <Rule>=<Value>\");\n}","typeGuard":"boolean isValidNormalizerRule(String r) {\n    return r != null && r.split(\"=\", -1).length == 2; // mirrors server: exactly one '='\n}","tryCatchPattern":null,"preventionTips":["Use string array entries like \"RESOLVE_INLINE_MODELS=true\", never bare flags or objects","Keep '=' out of rule values; the server's split rejects them"],"tags":["http-400","openapi-normalizer","input-format","openapi-generator-online"],"backgroundTag":"invalid-key-value-pair","analyzedSha":"fcec517be3cf5b7964296bcba25fbc97541484e7","analyzedAt":"2026-08-22T11:13:11.613Z","schemaVersion":2},"datasetVersion":"2026-08-22T14:17:55.899Z"}