{"record":{"id":"4921125ac80fd87f","repo":"OpenAPITools/openapi-generator","slug":"usejspecify-is-only-suppored-in-these-libraries","errorCode":null,"errorMessage":"useJspecify is only suppored in these libraries: {JSPECIFY_SUPPORTED_LIBRARIES}","messagePattern":"useJspecify is only suppored in these libraries: (.+?)","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaClientCodegen.java","lineNumber":346,"sourceCode":"        // Ensure the OAS 3.x discriminator mappings include any descendent schemas that allOf\n        // inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values,\n        // and the discriminator mapping schemas in the OAS document.\n        this.setLegacyDiscriminatorBehavior(false);\n\n        initMpRestClientVersionToRootPackage();\n    }\n\n    private void initMpRestClientVersionToRootPackage() {\n        mpRestClientVersions.put(\"1.4.1\", new MpRestClientVersion(\"javax\", \"pom.mustache\"));\n        mpRestClientVersions.put(\"2.0\", new MpRestClientVersion(\"javax\", \"pom.mustache\"));\n        mpRestClientVersions.put(\"3.0\", new MpRestClientVersion(\"jakarta\", \"pom_3.0.mustache\"));\n    }\n\n    @Override\n    public void setUseJspecify(boolean useJspecify) {\n        // currently only available for a limited set of libraries\n        if (useJspecify && !JSPECIFY_SUPPORTED_LIBRARIES.contains(library)) {\n            throw new IllegalArgumentException(\"useJspecify is only suppored in these libraries: \" + JSPECIFY_SUPPORTED_LIBRARIES);\n        }\n        super.setUseJspecify(useJspecify);\n    }\n\n    @Override\n    public CodegenType getTag() {\n        return CodegenType.CLIENT;\n    }\n\n    @Override\n    public String getName() {\n        return \"java\";\n    }\n\n    @Override\n    public String getHelp() {\n        return \"Generates a Java client library (HTTP lib: Jersey (1.x, 2.x), Retrofit (2.x), OpenFeign (10.x) and more.\";\n    }","sourceCodeStart":328,"sourceCodeEnd":364,"githubUrl":"https://github.com/OpenAPITools/openapi-generator/blob/fcec517be3cf5b7964296bcba25fbc97541484e7/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaClientCodegen.java#L328-L364","documentation":"Error \"useJspecify is only suppored in these libraries: {JSPECIFY_SUPPORTED_LIBRARIES}\" thrown in OpenAPITools/openapi-generator.","triggerScenarios":"Thrown when useJspecify=true is set for the Java client generator with a library that does not support JSpecify annotations. Use one of the libraries listed in the message.","commonSituations":"See trigger scenarios.","solutions":["Set useJspecify only with one of the libraries listed in JSPECIFY_SUPPORTED_LIBRARIES, or remove the useJspecify option."],"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"}