Package Configuration
The following CodeGen settings allow you to configure the package settings for the generated SDKs.
- It is recommended to configure these Code Generation settings through APIMatic portal.
- If you are generating SDKs through APIMatic API, then it's preferred to use the APIMatic Build file to set the package settings.
- If you are generating an SDK directly through our website, please follow this guide on SDK Package Publishing.
Java Group ID
This setting sets Java GroupId to be used in Maven POM file generated in Java SDKs. This group ID must follow Java package name rules.
Usage
To use this feature, you need to specify a String
value. By default, its value will be the Java package name set in your specification file.
"info": {
...,
"x-codegen-settings": {
"JavaGroupId": "io.apimatic"
}
}
Language Support
This setting only applies to Java SDKs.
Change in SDK
You can notice the change in Java group ID by accessing the pom.xml file.
Value | Change |
Default |
|
Configured |
|
Java Artifact ID
This setting sets the Java ArtifactId used by package managers.
Usage
To use this feature, you need to specify the ArtifactId as a String
value. If no value is provided, the value used will be Java's project name separated by dashes.
"info": {
...,
"x-codegen-settings": {
"JavaArtifactId": "com.spring-boot"
}
}
Language Support
This setting only applies to Java SDKs.
Change in SDK
You can notice the change in Java artifact ID by accessing the pom.xml file.
Value | Change |
Default |
|
Configured |
|
PHP Composer Package Name
This setting sets name
in composer.json file for PHP SDKs.
Usage
You must provide a String
with the format your-vendor-name/package-name
. By default, its value is apimatic/APIName
.
"info": {
...,
"x-codegen-settings": {
"PHPComposerPackageName": "company/tester"
}
}
Language Support
This setting only applies to PHP SDKs.
Change in SDK
Configuring this setting has the following change in the PHP composer.json file:
Value | Change |
Default |
|
Configured |
|
Enable PHP Composer Version String
Enable this setting to add version
component to the composer.json file in PHP SDKs.
This approach is not the best practice to release the PHP package as it can cause conflicts with Git tag-based version publishing. Please use this setting with caution.
Usage
To use this feature, you need to specify a Boolean
value. By default, its value is set to false
.
"info": {
...,
"x-codegen-settings": {
"EnablePHPComposerVersionString": false
}
}
Language Support
This setting only applies to PHP SDKs.
Change in SDK
Configuring this setting changes the composer.json as follows:
Value | Change |
true |
|
false (default) |
|