Skip to content

Commit 8dc540b

Browse files
chore: changes in different languages for openapi-generator-cli version upgrade (#685)
<!-- We appreciate the effort for this pull request but before that please make sure you read the contribution guidelines, then fill out the blanks below. Please format the PR title appropriately based on the type of change: <type>[!]: <description> Where <type> is one of: docs, chore, feat, fix, test, misc. Add a '!' after the type for breaking changes (e.g. feat!: new breaking feature). **All third-party contributors acknowledge that any contributions they provide will be made under the same open-source license that the open-source project is provided under.** Please enter each Issue number you are resolving in your PR after one of the following words [Fixes, Closes, Resolves]. This will auto-link these issues and close them when this PR is merged! e.g. Fixes #1 Closes #2 --> # Fixes # 1. In C#, for operations having json payload, there used to be a `vendorExtension`, `x-is-json` which used to be set to `true`. That is removed in MVR. Now, we are using `bodyParams` are present or not to detect if the payload is json. This is in coherence with all other helpers as well Preview PR - twilio/twilio-csharp#805 2. In Go, certain docs files are getting updated, Preview PR - twilio/twilio-go#303 ### Checklist - [x] I acknowledge that all my contributions will be made under the project's license - [ ] Run `make test-docker` - [ ] Verify affected language: - [ ] Generate [twilio-go](https://github.com/twilio/twilio-go) from our [OpenAPI specification](https://github.com/twilio/twilio-oai) using the [build_twilio_go.py](./examples/build_twilio_go.py) using `python examples/build_twilio_go.py path/to/twilio-oai/spec/yaml path/to/twilio-go` and inspect the diff - [ ] Run `make test` in `twilio-go` - [ ] Create a pull request in `twilio-go` - [ ] Provide a link below to the pull request - [ ] I have made a material change to the repo (functionality, testing, spelling, grammar) - [ ] I have read the [Contribution Guidelines](https://github.com/twilio/twilio-oai-generator/blob/main/CONTRIBUTING.md) and my PR follows them - [ ] I have titled the PR appropriately - [ ] I have updated my branch with the main branch - [ ] I have added tests that prove my fix is effective or that my feature works - [ ] I have added the necessary documentation about the functionality in the appropriate .md file - [ ] I have added inline documentation to the code I modified If you have questions, please create a GitHub Issue in this repository.
1 parent 6f8795b commit 8dc540b

33 files changed

+120
-2630
lines changed

examples/csharp/src/Twilio/Rest/Api/V2010/Account/Call/FeedbackCallSummaryResource.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,10 @@ private static Request BuildUpdateRequest(UpdateFeedbackCallSummaryOptions optio
5656

5757
string path = "/2010-04-01/Accounts/{AccountSid}/Calls/Feedback/Summary/{Sid}.json";
5858

59-
string PathAccountSid = options.PathAccountSid ?? client.AccountSid;
60-
path = path.Replace("{"+"AccountSid"+"}", PathAccountSid);
6159
string PathSid = options.PathSid;
6260
path = path.Replace("{"+"Sid"+"}", PathSid);
61+
string PathAccountSid = options.PathAccountSid ?? client.AccountSid;
62+
path = path.Replace("{"+"AccountSid"+"}", PathAccountSid);
6363

6464
return new Request(
6565
HttpMethod.Post,
@@ -137,6 +137,7 @@ public static async System.Threading.Tasks.Task<FeedbackCallSummaryResource> Upd
137137
return await UpdateAsync(options, client);
138138
}
139139
#endif
140+
140141

141142
/// <summary>
142143
/// Converts a JSON string into a FeedbackCallSummaryResource object

examples/csharp/src/Twilio/Rest/Api/V2010/Account/CallOptions.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ public List<KeyValuePair<string, string>> GetParams()
8383

8484

8585
}
86+
8687
/// <summary> delete </summary>
8788
public class DeleteCallOptions : IOptions<CallResource>
8889
{

examples/csharp/src/Twilio/Rest/Api/V2010/Account/CallResource.cs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,7 @@ public static async System.Threading.Tasks.Task<CallResource> CreateAsync(
134134
return await CreateAsync(options, client);
135135
}
136136
#endif
137+
137138

138139
/// <summary> delete </summary>
139140
/// <param name="options"> Delete Call parameters </param>
@@ -144,10 +145,10 @@ private static Request BuildDeleteRequest(DeleteCallOptions options, ITwilioRest
144145

145146
string path = "/2010-04-01/Accounts/{AccountSid}/Calls/{TestInteger}.json";
146147

147-
string PathAccountSid = options.PathAccountSid ?? client.AccountSid;
148-
path = path.Replace("{"+"AccountSid"+"}", PathAccountSid);
149148
string PathTestInteger = options.PathTestInteger.ToString();
150149
path = path.Replace("{"+"TestInteger"+"}", PathTestInteger);
150+
string PathAccountSid = options.PathAccountSid ?? client.AccountSid;
151+
path = path.Replace("{"+"AccountSid"+"}", PathAccountSid);
151152

152153
return new Request(
153154
HttpMethod.Delete,
@@ -212,10 +213,10 @@ private static Request BuildFetchRequest(FetchCallOptions options, ITwilioRestCl
212213

213214
string path = "/2010-04-01/Accounts/{AccountSid}/Calls/{TestInteger}.json";
214215

215-
string PathAccountSid = options.PathAccountSid ?? client.AccountSid;
216-
path = path.Replace("{"+"AccountSid"+"}", PathAccountSid);
217216
string PathTestInteger = options.PathTestInteger.ToString();
218217
path = path.Replace("{"+"TestInteger"+"}", PathTestInteger);
218+
string PathAccountSid = options.PathAccountSid ?? client.AccountSid;
219+
path = path.Replace("{"+"AccountSid"+"}", PathAccountSid);
219220

220221
return new Request(
221222
HttpMethod.Get,

examples/csharp/src/Twilio/Rest/Api/V2010/AccountOptions.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ public List<KeyValuePair<string, string>> GetHeaderParams()
7676
}
7777

7878
}
79+
7980
/// <summary> delete </summary>
8081
public class DeleteAccountOptions : IOptions<AccountResource>
8182
{

examples/csharp/src/Twilio/Rest/Api/V2010/AccountResource.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,7 @@ public static async System.Threading.Tasks.Task<AccountResource> CreateAsync(
140140
return await CreateAsync(options, client);
141141
}
142142
#endif
143+
143144

144145
/// <summary> delete </summary>
145146
/// <param name="options"> Delete Account parameters </param>
@@ -484,6 +485,7 @@ public static async System.Threading.Tasks.Task<AccountResource> UpdateAsync(
484485
return await UpdateAsync(options, client);
485486
}
486487
#endif
488+
487489

488490
/// <summary>
489491
/// Converts a JSON string into a AccountResource object

examples/csharp/src/Twilio/Rest/FlexApi/V1/CallResource.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ public static async System.Threading.Tasks.Task<CallResource> UpdateAsync(
102102
return await UpdateAsync(options, client);
103103
}
104104
#endif
105+
105106

106107
/// <summary>
107108
/// Converts a JSON string into a CallResource object

examples/csharp/src/Twilio/Rest/FlexApi/V1/Credential/AwsResource.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -361,6 +361,7 @@ public static async System.Threading.Tasks.Task<AwsResource> UpdateAsync(
361361
return await UpdateAsync(options, client);
362362
}
363363
#endif
364+
364365

365366
/// <summary>
366367
/// Converts a JSON string into a AwsResource object

examples/csharp/src/Twilio/Rest/FlexApi/V1/Credential/NewCredentialsOptions.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,10 @@ public class CreateNewCredentialsOptions : IOptions<NewCredentialsResource>
4141
public decimal? TestNumber { get; set; }
4242

4343

44-
public float? TestNumberFloat { get; set; }
44+
public float TestNumberFloat { get; set; }
4545

4646

47-
public double? TestNumberDouble { get; set; }
47+
public double TestNumberDouble { get; set; }
4848

4949

5050
public decimal? TestNumberInt32 { get; set; }
@@ -170,5 +170,6 @@ public List<KeyValuePair<string, string>> GetParams()
170170

171171

172172
}
173+
173174
}
174175

examples/csharp/src/Twilio/Rest/FlexApi/V1/Credential/NewCredentialsResource.cs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -126,11 +126,11 @@ public static NewCredentialsResource Create(
126126
string testString,
127127
int? testInteger = null,
128128
DateTime? testDate = null,
129-
float? testNumberFloat = null,
129+
float testNumberFloat = null,
130130
object testObject = null,
131131
bool? testBoolean = null,
132132
decimal? testNumber = null,
133-
double? testNumberDouble = null,
133+
double testNumberDouble = null,
134134
decimal? testNumberInt32 = null,
135135
long? testNumberInt64 = null,
136136
DateTime? testDateTime = null,
@@ -171,11 +171,11 @@ public static async System.Threading.Tasks.Task<NewCredentialsResource> CreateAs
171171
string testString,
172172
int? testInteger = null,
173173
DateTime? testDate = null,
174-
float? testNumberFloat = null,
174+
float testNumberFloat = null,
175175
object testObject = null,
176176
bool? testBoolean = null,
177177
decimal? testNumber = null,
178-
double? testNumberDouble = null,
178+
double testNumberDouble = null,
179179
decimal? testNumberInt32 = null,
180180
long? testNumberInt64 = null,
181181
DateTime? testDateTime = null,
@@ -191,6 +191,7 @@ public static async System.Threading.Tasks.Task<NewCredentialsResource> CreateAs
191191
return await CreateAsync(options, client);
192192
}
193193
#endif
194+
194195

195196
/// <summary>
196197
/// Converts a JSON string into a NewCredentialsResource object

examples/csharp/src/Twilio/Rest/Iam/V1/ApiKeyOptions.cs

Lines changed: 0 additions & 131 deletions
This file was deleted.

0 commit comments

Comments
 (0)