OpenAPITools/openapi-generator · error · RuntimeException
Invalid HTTP library {library}. Only {supportedLibraries} ar
Error message
Invalid HTTP library {library}. Only {supportedLibraries} are supported. What it means
Error "Invalid HTTP library {library}. Only {supportedLibraries} are supported." thrown in OpenAPITools/openapi-generator.
Source
Thrown at modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpClientCodegen.java:799
needsCustomHttpMethod = true;
},
HTTPCLIENT, () -> {
setLibrary(HTTPCLIENT);
additionalProperties.put("useHttpClient", true);
needsUriBuilder = true;
},
UNITY_WEB_REQUEST, () -> {
setLibrary(UNITY_WEB_REQUEST);
additionalProperties.put("useUnityWebRequest", true);
needsUriBuilder = true;
}
);
final Runnable action = libraryActions.get(library);
if (action != null) {
action.run();
} else {
String supportedLibraries = String.join(", ", libraryActions.keySet());
throw new RuntimeException("Invalid HTTP library " + library + ". Only " + supportedLibraries + " are supported.");
}
final String inputFramework = (String) additionalProperties.getOrDefault(CodegenConstants.DOTNET_FRAMEWORK, latestFramework.name);
final String[] frameworks;
final List<FrameworkStrategy> strategies = new ArrayList<>();
if (inputFramework.contains(";")) {
// multiple target framework
frameworks = inputFramework.split(";");
additionalProperties.put("multiTarget", true);
} else {
// just a single value
frameworks = new String[]{inputFramework};
}
for (String framework : frameworks) {
boolean strategyMatched = false;
for (FrameworkStrategy frameworkStrategy : frameworkStrategies) {View on GitHub (pinned to fcec517be3)
Solutions
- Set the 'library' option to one of the supported libraries listed in the message.
When it happens
Trigger: 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.
Common situations: See trigger scenarios.
AI-assisted analysis of OpenAPITools/openapi-generator@fcec517be3 (2026-08-22).
Data as JSON: /api/errors/c68cf129954bbc68.
Report an issue: GitHub.