{"record":{"id":"c68cf129954bbc68","repo":"OpenAPITools/openapi-generator","slug":"invalid-http-library-library-only-supportedlib","errorCode":null,"errorMessage":"Invalid HTTP library {library}. Only {supportedLibraries} are supported.","messagePattern":"Invalid HTTP library (.+?)\\. Only (.+?) are supported\\.","errorType":"validation","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpClientCodegen.java","lineNumber":799,"sourceCode":"                    needsCustomHttpMethod = true;\n                },\n                HTTPCLIENT, () -> {\n                    setLibrary(HTTPCLIENT);\n                    additionalProperties.put(\"useHttpClient\", true);\n                    needsUriBuilder = true;\n                },\n                UNITY_WEB_REQUEST, () -> {\n                    setLibrary(UNITY_WEB_REQUEST);\n                    additionalProperties.put(\"useUnityWebRequest\", true);\n                    needsUriBuilder = true;\n                }\n        );\n        final Runnable action = libraryActions.get(library);\n        if (action != null) {\n            action.run();\n        } else {\n            String supportedLibraries = String.join(\", \", libraryActions.keySet());\n            throw new RuntimeException(\"Invalid HTTP library \" + library + \". Only \" + supportedLibraries + \" are supported.\");\n        }\n\n        final String inputFramework = (String) additionalProperties.getOrDefault(CodegenConstants.DOTNET_FRAMEWORK, latestFramework.name);\n        final String[] frameworks;\n        final List<FrameworkStrategy> strategies = new ArrayList<>();\n\n        if (inputFramework.contains(\";\")) {\n            // multiple target framework\n            frameworks = inputFramework.split(\";\");\n            additionalProperties.put(\"multiTarget\", true);\n        } else {\n            // just a single value\n            frameworks = new String[]{inputFramework};\n        }\n\n        for (String framework : frameworks) {\n            boolean strategyMatched = false;\n            for (FrameworkStrategy frameworkStrategy : frameworkStrategies) {","sourceCodeStart":781,"sourceCodeEnd":817,"githubUrl":"https://github.com/OpenAPITools/openapi-generator/blob/fcec517be3cf5b7964296bcba25fbc97541484e7/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpClientCodegen.java#L781-L817","documentation":"Error \"Invalid HTTP library {library}. Only {supportedLibraries} are supported.\" thrown in OpenAPITools/openapi-generator.","triggerScenarios":"Thrown when the 'library' option for the C# client generator names an HTTP library that is not supported; the message lists the supported libraries. Choose one of the listed libraries.","commonSituations":"See trigger scenarios.","solutions":["Set the 'library' option to one of the supported libraries listed in the message."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"fcec517be3cf5b7964296bcba25fbc97541484e7","analyzedAt":"2026-08-22T11:13:11.613Z","schemaVersion":2},"datasetVersion":"2026-08-22T14:17:55.899Z"}