-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: add required query param in read operations php #631
Conversation
PHP preview PR - twilio/twilio-php#842 |
@@ -89,6 +89,24 @@ | |||
{{/vendorExtensions.x-serialize-map}} | |||
{{/vendorExtensions.x-serialize}} | |||
{{/vendorExtensions.optionFileParams}} | |||
{{#queryParams.0}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
verify with multiple required query parameters.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay
Quality Gate passed for 'twilio-oai-generator-php'Issues Measures |
Quality Gate passed for 'twilio-oai-generator-java'Issues Measures |
Quality Gate passed for 'twilio-oai-generator-node'Issues Measures |
Quality Gate passed for 'twilio-oai-generator-python'Issues Measures |
Verified the following cases of objects and maps. In PHP, Object implies dataTypes like date and bool. While all lists and maps are treated as Example spec: {
"name": "AccountSid",
"in": "query",
"description": "The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Payments resource.",
"schema": {
"type": "string",
"minLength": 34,
"maxLength": 34,
"pattern": "^AC[0-9a-fA-F]{32}$"
},
"required": true,
"examples": {
"readEmpty": {
"value": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
},
"readFull": {
"value": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
}
}
},
{
"name": "MessageDate",
"in": "query",
"description": "Only show notifications for the specified date, formatted as `YYYY-MM-DD`. You can also specify an inequality, such as `<=YYYY-MM-DD` for messages logged at or before midnight on a date, or `>=YYYY-MM-DD` for messages logged at or after midnight on a date.",
"schema": {
"type": "string",
"format": "date"
},
"examples": {
"readFull": {
"value": "2008-01-02"
},
"readEmpty": {
"value": "2008-01-02"
}
}
},
{
"name": "ListOfNames",
"in": "query",
"description": "A comma-separated list of the names of the keys to retrieve.",
"schema": {
"type": "array",
"items": {
"type": "string"
}
},
"examples": {
"readFull": {
"value": ["foo", "bar"]
},
"readEmpty": {
"value": ["foo", "bar"]
}
}
}, Generated code in PHP: 'MessageDate' =>
Serialize::iso8601Date($options['messageDate']),
'ListOfNames' =>
Serialize::map($options['listOfNames'], function ($e) { return $e; }),
'AccountSid' =>
$options['accountSid'], |
Fixes #DI-1676
Add required query params in read operation for PHP.
Verified that this issue is only in PHP and not in any other language.
Review PR for php: twilio/twilio-php#842 [Do not merge]
Checklist
make test-docker
python examples/build_twilio_go.py path/to/twilio-oai/spec/yaml path/to/twilio-go
and inspect the diffmake test
intwilio-php
twilio-php
If you have questions, please create a GitHub Issue in this repository.