HTTP Configuration
These CodeGen settings allow you to manage HTTP configurations in the generated SDKs.
Enable HTTP Cache
Use this setting to enable/disable HTTP caching for idempotent endpoint methods.
Please note that this setting is experimental and may not function properly at all times. Feel free to 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": {
"EnableHttpCache": false
}
}
Language Support
C# | Java | PHP | Python | Ruby | TS | Go |
---|---|---|---|---|---|---|
❌ | ❌ | ❌ | ✔️ | ✔️ | ❌ | ❌ |
Append Content Headers
Enabling this setting will automatically determine the request and response content types and append appropriate accept
and content-type
headers. This affects the generated SDK as well as the HTTP documentation. For example, accept: application/json
and content-type: application/json
headers will be appended for JSON serialization mode.
Usage
To use this feature, you need to specify a Boolean
type. By default, its value is set to true
.
"info": {
...,
"x-codegen-settings": {
"AppendContentHeaders": true
}
}
Language Support
C# | Java | PHP | Python | Ruby | TS | Go |
---|---|---|---|---|---|---|
✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ |
Change in API Call
You can see the change this setting has in the HTTP curl command:
Value | Change |
true (default) |
|
false |
|
Allow Skipping SSL Certificate Verification
This setting creates a configuration option in SDKs to optionally skip certificate verification when establishing HTTPs connections.
Skipping verification of an SSL certificate isn't the recommended approach as it opens the possibility of security vulnerability.
Usage
To use this feature, you need to specify a Boolean
type. By default, its value is set to false
.
"info": {
...,
"x-codegen-settings": {
"AllowSkippingSSLCertVerification": false
}
}
Language Support
C# | Java | PHP | Python | Ruby | TS | Go |
---|---|---|---|---|---|---|
✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ❌ | ❌ |