[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
This commit is contained in:
Sebastien Rosset 2020-04-24 09:07:15 -07:00 committed by GitHub
parent 8e8471c1fd
commit 58908e6494
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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