diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java index 91edad3cd51..82cebbf0224 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java @@ -1857,7 +1857,13 @@ public class DefaultCodegen implements CodegenConfig { } /** - * Return the name of the oneOf schema + * Return the name of the oneOf schema. + * + * This name is used to set the value of CodegenProperty.openApiType. + * + * If the 'x-one-of-name' extension is specified in the OAS document, return that value. + * Otherwise, a name is constructed by creating a comma-separated list of all the names + * of the oneOf schemas. * * @param names List of names * @param composedSchema composed schema