Skip to main content

Miscellaneous

This section contains a collection of code generation settings that don't fit into any specific category but are still crucial for fine-tuning and customizing your developer experience.

Disable Linting

APIMatic-generated SDKs are designed to successfully pass lint tests. These SDK packages include the settings and commands necessary for running lint tests, allowing you to independently verify our claim. But you also have the option to disable this feature.

This setting allows you to disable generation of the files and commands that are used for lint testing.

Usage

To use this feature, you need to specify a Boolean value. By default, its value is set to false.

"info": {
...,
"x-codegen-settings": {
"DisableLinting": false
}
}

Language Support

C#JavaPHPPythonRubyTSGo
✔️✔️✔️

Use Java Properties Config

You can initialize a Java SDK to load SDK configuration directly from the properties file. To use this feature, set this setting to true.

note

This is an experimental setting so it might not work in all cases. Please contact our support if you run into an issue.

Usage

To use this feature, you need to specify a Boolean type. By default, its value is set to false.

"info": {
...,
"x-codegen-settings": {
"JavaUsePropertiesConfig": false
}
}

Language Support

This setting only applies to Java SDKs.

License Text

This setting sets the license text to use in place of the standard MIT license. This text will go in the license file that is shipped with the SDK package.

Usage

To use this feature, you need to specify a String value. If no value is provided, APIMatic Code Generator will add the standard MIT license inside the SDK.

"info": {
...,
"x-codegen-settings": {
"LicenseText": "License text here..."
}
}

Language Support

C#JavaPHPPythonRubyTSGo
✔️✔️✔️✔️✔️✔️

Store Timezone Information

Enable this setting to store timezone information with date-time types. If disabled, SDKs will attempt to convert all date-time values to UTC.

Usage

To use this feature, you need to specify a Boolean value. By default, its value is set to false.

"info": {
...,
"x-codegen-settings": {
"StoreTimezoneInformation": false
}
}

Language Support

C#JavaPHPPythonRubyTSGo
✔️✔️

Change in SDK

Configuring this setting has the following effect on the generated SDK:

Value Change
true
DateTimeOffset datetime = DateTime.ParseExact(
"2023-03-13T12:52:32.123Z",
"yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK",
provider: CultureInfo.InvariantCulture,
DateTimeStyles.RoundtripKind);
false (default)
DateTime datetime = DateTime.ParseExact(
"2023-03-13T12:52:32.123Z",
"yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK",
provider: CultureInfo.InvariantCulture,
DateTimeStyles.RoundtripKind);

Apply Customizations

This setting sets customer-specific customizations to be applied during SDK and documentation generation. Each customization is a customer-specific key. It triggers specific customization in CodeGen and dependent projects. These keys are provided by the APIMatic support team where necessary.

Usage

To use this feature, you need to specify set of keys in a list of string List<string>.

"info": {
...,
"x-codegen-settings": {
"ApplyCustomizations": [ "custom-abc", "custom-xyz" ]
}
}

Language Support

C#JavaPHPPythonRubyTSGo
✔️✔️✔️✔️✔️✔️

Deprecated Settings

We have marked the following CodeGen settings as deprecated since we will no longer provide support for them in the future.

Custom Dependencies

Use this setting to add custom dependencies to the project.

Usage

To use this feature, you need to specify a list of custom dependencies List<CustomDependencies> like:

"info": {
...,
"x-codegen-settings": {
"CustomDependencies": [{
"Version": "1.0.0",
"Name": "uuid",
"Scope": "Compile"
}]
}
}

Language Support

C#JavaPHPPythonRubyTSGo
✔️✔️✔️✔️✔️✔️