Skip to content

Commit 58908e6

Browse files
[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
1 parent 8e8471c commit 58908e6

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1857,7 +1857,13 @@ public String toAnyOfName(List<String> names, ComposedSchema composedSchema) {
18571857
}
18581858

18591859
/**
1860-
* Return the name of the oneOf schema
1860+
* Return the name of the oneOf schema.
1861+
*
1862+
* This name is used to set the value of CodegenProperty.openApiType.
1863+
*
1864+
* If the 'x-one-of-name' extension is specified in the OAS document, return that value.
1865+
* Otherwise, a name is constructed by creating a comma-separated list of all the names
1866+
* of the oneOf schemas.
18611867
*
18621868
* @param names List of names
18631869
* @param composedSchema composed schema

0 commit comments

Comments
 (0)