From 58908e6494f38b7928b6be51ff450dce40f115ad Mon Sep 17 00:00:00 2001 From: Sebastien Rosset Date: Fri, 24 Apr 2020 09:07:15 -0700 Subject: [PATCH] [codegen] change x-oneOf-name to x-one-of-name. Consistency with naming conventions and x-all-of-name (#5820) * change x-oneOf-name to x-one-of-name. * Add code comments * Add code comments --- .../java/org/openapitools/codegen/DefaultCodegen.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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