Skip to content

Commit 6744c86

Browse files
authored
fix: Fixing issues in adding number parameters (#364)
<!-- 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 --> # Closes # [DII-792](https://issues.corp.twilio.com/browse/DII-792) Integer conversion is not proper in v6 of twilio-csharp library A short description of what this PR does. Integer conversion is not proper in v6 of twilio-csharp library ### 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 - [x] 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 b24d98a commit 6744c86

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ public List<KeyValuePair<string, string>> GetParams()
110110
}
111111
if (TestNumber != null)
112112
{
113-
p.Add(new KeyValuePair<string, string>("TestNumber", TestNumber.ToString()));
113+
p.Add(new KeyValuePair<string, string>("TestNumber", TestNumber.Value.ToString()));
114114
}
115115
if (TestNumberFloat != null)
116116
{

src/main/resources/config/csharp.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@
117117
"object": "Serializers.JsonObject(%s)",
118118
"bool?": "%s.Value.ToString().ToLower()",
119119
"decimal": "%s.Value.ToString()",
120+
"decimal?": "%s.Value.ToString()",
120121
"int?": "%s.ToString()",
121122
"long?": "%s.Value.ToString()"
122123
},

0 commit comments

Comments
 (0)