Skip to main content

Do-Not-Split Words in Code Generation Settings

· 2 min read

We have added a new CodeGen setting that allows you to specify a list of words that Code Generation will not split when converting identifiers from API specification to language-specific identifiers. This is useful for declaring brand names such as APIMatic.

E.g. if you provide the words apimatic and vmware in your the list, APIMaticandvmWare becomes ApimaticAndVmware or apimatic_and_vmware, depending on the place of use.

Details

Going with the previous example of the list containing apimatic and vmware, language specific examples of converting APIMaticandvmWare to class/model/field names are given in the table below.

Class NameMethod NameField NameArgument Name
AndroidApimaticAndVmwareapimaticAndVmwareapimaticAndVmwareapimaticAndVmware
C#ApimaticAndVmwareApimaticAndVmwareapimaticAndVmwareapimaticAndVmware
GOApimaticAndVmwareApimaticAndVmwareapimaticAndVmwareapimaticAndVmware
JavaApimaticAndVmwareapimaticAndVmwareapimaticAndVmwareapimaticAndVmware
NodeJSApimaticAndVmwareapimaticAndVmwareapimaticAndVmwareapimaticAndVmware
Obj-CApimaticAndVmwareapimaticAndVmwareapimaticAndVmwareapimaticAndVmware
PHPApimaticAndVmwareapimaticAndVmwareapimaticAndVmwareapimaticAndVmware
PythonApimaticAndVmwareapimatic_and_vmwareapimatic_and_vmwareapimatic_and_vmware
RubyApimaticAndVmwareapimatic_and_vmwareapimatic_and_vmwareapimatic_and_vmware

The setting can be accessed in the editor as shown below.

screenshot codegen settings