Skip to content

Conversation

@tiwarishubham635
Copy link
Contributor

Feature DII-2111

  1. Add Api standard v1 handling for PHP
  2. For Api Standard v1 apis,
    • Skip adding hard coded pagination parameters
    • Extend Page class from TokenPaginationPage

Checklist

  • I acknowledge that all my contributions will be made under the project's license
  • Run make test-docker
  • Verify affected language according to the code change:
    • Generate twilio-java from our OpenAPI specification using the scripts/build_twilio_library.py using python scripts/build_twilio_library.py path/to/twilio-oai/spec/yaml path/to/twilio-java -l java and inspect the diff
    • Run make test in twilio-java
    • Create a pull request in twilio-java
    • Provide a link below to the pull request, this ensures that the generated code has been verified
  • I have made a material change to the repo (functionality, testing, spelling, grammar)
  • I have read the Contribution Guidelines 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.

@tiwarishubham635
Copy link
Contributor Author

PHP PR - twilio/twilio-php#887

Copy link
Contributor

Copilot AI left a 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 isApiV1 flag detection from OpenAPI specification extensions
  • Modifies PHP generated code to extend TokenPaginationPage instead of Page for 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.

Copy link
Contributor

Copilot AI left a 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.

@tiwarishubham635 tiwarishubham635 merged commit 3a9af75 into twilio_api_standards_changes Nov 27, 2025
14 checks passed
@tiwarishubham635 tiwarishubham635 deleted the php-pagination branch November 27, 2025 07:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants