{"record":{"id":"5289f6ebc359ac00","repo":"OpenAPITools/openapi-generator","slug":"is-an-invalid-enum-property-naming-option-plea","errorCode":null,"errorMessage":"{} is an invalid enum property naming option. Please choose from:","messagePattern":"(.+?) is an invalid enum property naming option\\. Please choose from:","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/XojoClientCodegen.java","lineNumber":708,"sourceCode":"            codegenParameter.example = \"New Dictionary\";\n        }\n    }\n\n    /**\n     * Sets the serialization engine for Xojo\n     *\n     * @param enumSerializationLibrary The string representation of the serialization library as defined by\n     *                                 {@link org.openapitools.codegen.languages.XojoClientCodegen.SERIALIZATION_LIBRARY_TYPE}\n     */\n    public void setSerializationLibrary(final String enumSerializationLibrary) {\n        try {\n            this.serializationLibrary = SERIALIZATION_LIBRARY_TYPE.valueOf(enumSerializationLibrary);\n        } catch (IllegalArgumentException ex) {\n            StringBuilder sb = new StringBuilder(enumSerializationLibrary + \" is an invalid enum property naming option. Please choose from:\");\n            for (SERIALIZATION_LIBRARY_TYPE t : SERIALIZATION_LIBRARY_TYPE.values()) {\n                sb.append(\"\\n  \").append(t.name());\n            }\n            throw new RuntimeException(sb.toString());\n        }\n    }\n\n    private String getDefaultPropertyValue(Schema schema) {\n        if (ModelUtils.isBooleanSchema(schema)) {\n            return \"False\";\n        } else if (ModelUtils.isDateSchema(schema)) {\n            return \"Nil\";\n        } else if (ModelUtils.isDateTimeSchema(schema)) {\n            return \"Nil\";\n        } else if (ModelUtils.isNumberSchema(schema)) {\n            return \"0\";\n        } else if (ModelUtils.isIntegerSchema(schema)) {\n            return \"0\";\n        } else if (ModelUtils.isStringSchema(schema)) {\n            return \"Sample\";\n        } else if (ModelUtils.isObjectSchema(schema)) {\n            return \"Nil\";","sourceCodeStart":690,"sourceCodeEnd":726,"githubUrl":"https://github.com/OpenAPITools/openapi-generator/blob/fcec517be3cf5b7964296bcba25fbc97541484e7/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/XojoClientCodegen.java#L690-L726","documentation":"XojoClientCodegen.setSerializationLibrary (line 708) parses the 'serializationLibrary' option with enum valueOf against SERIALIZATION_LIBRARY_TYPE, which contains exactly one constant: 'xoson' (line 52). Any other string throws a RuntimeException listing the valid values. Note the message text ('invalid enum property naming option') is a copy-paste artifact — it really refers to the serialization library, and the parse is case-sensitive, so 'XOSON' also fails.","triggerScenarios":"Passing -DserializationLibrary=json, -DserializationLibrary=XML (copied from the java generator), or even -DserializationLibrary=XOSON with wrong casing. Xojo currently only supports its native Xoson DTO serialization.","commonSituations":"Shared generation scripts that set serializationLibrary for many target languages; upgrading from generators where this option is meaningful; users who don't realize xoson is the only and default value.","solutions":["Drop the serializationLibrary option for Xojo — 'xoson' is the default and only choice.","Or pass the exact lowercase value: -DserializationLibrary=xoson (valueOf is case-sensitive).","Read the appended list in the thrown message; it enumerates every accepted constant."],"exampleFix":"# before\nopenapi-generator-cli generate -g xojo-client \\\n  -DserializationLibrary=XML\n\n# after\nopenapi-generator-cli generate -g xojo-client\n# (xoson is the default; or pass -DserializationLibrary=xoson)","handlingStrategy":"validation","validationCode":"if [ -n \"$SERIALIZATION_LIBRARY\" ] && [ \"$SERIALIZATION_LIBRARY\" != \"xoson\" ]; then\n  echo \"ERROR: xojo only supports serializationLibrary=xoson (case-sensitive)\" >&2\n  exit 1\nfi","typeGuard":"const XOJO_SERIALIZATION_LIBRARIES = ['xoson'] as const;\ntype XojoSerializationLibrary = typeof XOJO_SERIALIZATION_LIBRARIES[number];\nconst isXojoSerializationLibrary = (v: string): v is XojoSerializationLibrary =>\n  (XOJO_SERIALIZATION_LIBRARIES as readonly string[]).includes(v);","tryCatchPattern":null,"preventionTips":["Don't blanket-set serializationLibrary across all generators in one script — each has its own allowed set (Xojo: only lowercase 'xoson').","Check the error's appended value list; it is authoritative per generator."],"tags":["xojo","serialization","codegen","config-validation"],"backgroundTag":"invalid-option-value","analyzedSha":"fcec517be3cf5b7964296bcba25fbc97541484e7","analyzedAt":"2026-08-22T11:13:11.613Z","schemaVersion":2},"datasetVersion":"2026-08-22T14:17:55.899Z"}