-
Notifications
You must be signed in to change notification settings - Fork 22
feat: Add support for token pagination in php #716
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
feat: Add support for token pagination in php #716
Conversation
|
PHP PR - twilio/twilio-php#887 |
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.
Pull request overview
This pull request adds support for API Standard v1 token pagination in PHP code generation. The implementation conditionally handles pagination based on the API standard version specified in the OpenAPI specification's x-twilio.apiStandards field.
- Introduces
isApiV1flag detection from OpenAPI specification extensions - Modifies PHP generated code to extend
TokenPaginationPageinstead ofPagefor v1 APIs - Skips hardcoded pagination parameters (PageToken, Page, PageSize) for v1 APIs
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| src/main/resources/twilio-php/page.mustache | Conditionally imports TokenPaginationPage and extends it when isApiV1 is true |
| src/main/resources/twilio-php/listRead.mustache | Handles pageSize from options array for v1 APIs and skips standard pagination parameters |
| src/main/java/com/twilio/oai/api/ApiResources.java | Adds isApiV1 field populated from ResourceCacheContext |
| src/main/java/com/twilio/oai/TwilioPhpGenerator.java | Extracts and sets API standard version in ResourceCacheContext during OpenAPI processing |
| src/main/java/com/twilio/oai/DirectoryStructureService.java | Conditionally skips pagination parameter updates for v1 APIs |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
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.
Pull request overview
Copilot reviewed 5 out of 5 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
3a9af75
into
twilio_api_standards_changes
Feature DII-2111
Checklist
make test-dockerpython scripts/build_twilio_library.py path/to/twilio-oai/spec/yaml path/to/twilio-java -l javaand inspect the diffmake testintwilio-javatwilio-javaIf you have questions, please create a GitHub Issue in this repository.