Skip to content

Conversation

@sbansla
Copy link
Contributor

@sbansla sbansla commented Jan 18, 2026

Feature

Previous:
A resource can have one type of response only and that is stored in resource file, Example:
/v1/student (create, list)
/v1/student/{id} (update, fetch, delete)
All above 5 operations must have same response and those are stored in StudentResource class.

Changed:
Now each operation will have different response based in apiStandard flag.
Each operation response is stored in Different resource files.
StudentCreateResource, StudentFetchResource etc.

Final design is:
public class StudentResource { ... } // All methods are present here
public class StudentCreateResponse { ... } // Operation specific response

To validate changes, I created PR for Aws resource
twilio/twilio-csharp#813

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.

sbansla and others added 30 commits August 5, 2025 11:46
# Fixes #
Created a skeleton of twilio-java-modern generator, it will be used for
next java rc release.
Added Java Enum processors and factory to resolve enum models and datatypes
added uml diagram for enum processor design
Added spec for enum and created common factory for processing parameter and property type enums.
Added parameter processor and injected enum factory.
Made enum factory as singleton class.
Created operation processor and injected in api resource builder.
Added url encoded body processor
added typemapping to convert format to java specific data type and added importmapping for the java datatypes that are mapping to format in open api spec.
Add twilio-java modern mustache template files.
added constructor, settermethod and inequality feature (#672)
tiwarishubham635 and others added 24 commits November 20, 2025 17:31
<!--
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 #

C# as of now uses custom datatypes for nested response schema but does
not generate appropriate classes for those custom datatypes. This PR
handles this issue by traversing recursively through the responseModel
and its nested codegenProperties to resolve nested response schema and
adds them to nestedModels variable at api resource level which is then
generated using the mustache file in the same way as nested request
bodies are handled.

Also, with this change all languages now support nested response
handling.



### Checklist
- [x] 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](https://github.com/twilio/twilio-java) from
our [OpenAPI specification](https://github.com/twilio/twilio-oai) using
the [scripts/build_twilio_library.py](./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](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.
<!--
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
-->

# Feature
[DII-2111](https://twilio-engineering.atlassian.net/browse/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
- [x] 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](https://github.com/twilio/twilio-java) from
our [OpenAPI specification](https://github.com/twilio/twilio-oai) using
the [scripts/build_twilio_library.py](./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](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.

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
<!--
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 #

PR for python twilio/twilio-python#896
As part of this PR

Added method setIsV1ApiStandard to TwilioCodegenAdapter, so that it is
accessible across different generators
Added inheriting TokenPagination class when IsV1Api is true

### Checklist
- [x] 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](https://github.com/twilio/twilio-java) from
our [OpenAPI specification](https://github.com/twilio/twilio-oai) using
the [scripts/build_twilio_library.py](./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](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.
<!--
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 #

Support for custom error response in ruby.
Following java's pattern.
Version class will send entire response body to the method.
Method will parse it and throw error or send object.
twilio/twilio-ruby#768 --> This PR will work
with this.

### Checklist
- [x] 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](https://github.com/twilio/twilio-java) from
our [OpenAPI specification](https://github.com/twilio/twilio-oai) using
the [scripts/build_twilio_library.py](./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](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.

---------

Co-authored-by: Shubham <stiwari@twilio.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: shrutiburman <87537688+shrutiburman@users.noreply.github.com>
Co-authored-by: kridai <kgoswami@twilio.com>
Co-authored-by: sbansla <104902068+sbansla@users.noreply.github.com>
<!--
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 #

custom error response

### Checklist
- [x] 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](https://github.com/twilio/twilio-java) from
our [OpenAPI specification](https://github.com/twilio/twilio-oai) using
the [scripts/build_twilio_library.py](./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](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.
<!--
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 #

API Standards token pagination

### Checklist
- [x] 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](https://github.com/twilio/twilio-java) from
our [OpenAPI specification](https://github.com/twilio/twilio-oai) using
the [scripts/build_twilio_library.py](./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](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.
<!--
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 #

A short description of what this PR does.

### Checklist
- [x] 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](https://github.com/twilio/twilio-java) from
our [OpenAPI specification](https://github.com/twilio/twilio-oai) using
the [scripts/build_twilio_library.py](./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](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.

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Manisha Singh <singhmanisha.250025@gmail.com>
Co-authored-by: sbansla <104902068+sbansla@users.noreply.github.com>
<!--
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 #

Add PageMetadata

### Checklist
- [x] 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](https://github.com/twilio/twilio-java) from
our [OpenAPI specification](https://github.com/twilio/twilio-oai) using
the [scripts/build_twilio_library.py](./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](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.
<!--
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 #

Using models only in case of v1 for delete.
This will work with twilio/twilio-ruby#776 
All the models will be merged together to creating one <Class>Instance
object

### Checklist
- [x] 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](https://github.com/twilio/twilio-java) from
our [OpenAPI specification](https://github.com/twilio/twilio-oai) using
the [scripts/build_twilio_library.py](./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](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.
<!--
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 #

Earlier, for operations having different response schemas under the same
resource we combined the properties to make a single response schema
Changed the implementation to dynamically generate separate class files
for each response schema and return the correct response schema for
respective operation

### Checklist
- [x] 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](https://github.com/twilio/twilio-java) from
our [OpenAPI specification](https://github.com/twilio/twilio-oai) using
the [scripts/build_twilio_library.py](./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](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.
<!--
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
[DII-2125](https://twilio-engineering.atlassian.net/browse/DII-2125)

Adding new error response in go as per twilio api standards v1.0

### Checklist
- [x] 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](https://github.com/twilio/twilio-java) from
our [OpenAPI specification](https://github.com/twilio/twilio-oai) using
the [scripts/build_twilio_library.py](./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](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.
<!--
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 #

Add support for token pagination based on api standards in go

### Checklist
- [x] 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](https://github.com/twilio/twilio-java) from
our [OpenAPI specification](https://github.com/twilio/twilio-oai) using
the [scripts/build_twilio_library.py](./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](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.
<!--
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 #

Changes include supporting new methods {operation}_with_http_info that
are generated with include status_code and response_headers along with
data

twilio-python- linked pr
twilio/twilio-python#902

### Checklist
- [x] 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](https://github.com/twilio/twilio-java) from
our [OpenAPI specification](https://github.com/twilio/twilio-oai) using
the [scripts/build_twilio_library.py](./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](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.
}
codegenModelResolver.resolve(codegenModel, this);
responseModels.add(codegenModel);
Set<CodegenProperty> distinctResponseModel = getDistinctResponseModel(responseModels);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I cant understand how does this work with a set of CodegenProperty ? Is this intentional?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Flatten design is choosen for response object at first level.

CreateMessageResponse {
ABC prop1;
String prop2;
}

class ABC {
// properties
}

Why flatten ?
Response type must be of type "Resource". And if response only has String type, sdk build will fail because string does not inherit from 'Resource'

Base automatically changed from twilio_api_standards_changes to main January 22, 2026 08:54
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.

5 participants