Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
b47a6db
chore: created java modern generator for rc release (#663)
sbansla Aug 5, 2025
3cefa7f
chore: Java Enum processors and factory (#664)
sbansla Aug 6, 2025
9e2a1d8
doc: added uml diagram for enum processor design (#665)
sbansla Aug 6, 2025
fa68524
chore: Create common factory for enum (#666)
sbansla Aug 6, 2025
14b6c73
chore: Parameter processor for twilio-java generatiom (#667)
sbansla Aug 6, 2025
fe09ea5
created operation processor (#668)
sbansla Aug 6, 2025
43f51ff
added urlencoded processor (#669)
sbansla Aug 6, 2025
010b0e8
Update schema mapping (#670)
sbansla Aug 6, 2025
f73f7ad
added mustache template files (#671)
sbansla Aug 6, 2025
d9871ef
added constructor, settermethod and inequality feature (#672)
sbansla Aug 6, 2025
17ed8bc
Add format specific features (#673)
sbansla Aug 6, 2025
5048693
added recursive traverser, json response processor, model processor, …
sbansla Aug 6, 2025
117de52
fixed promoter and corrected api class names (#676)
sbansla Aug 6, 2025
b7b4520
Testing twilio-java modernisation (#678)
sbansla Aug 29, 2025
6271159
chore: prepared java modern for release (#682)
sbansla Sep 12, 2025
b064d81
test enabled
sbansla Sep 12, 2025
404c17c
Merge branch 'main' into twilio-java-generation-modernisation
sbansla Sep 12, 2025
6ccaae0
disabled sonar
sbansla Sep 12, 2025
154efe7
Merge branch 'twilio-java-generation-modernisation' of https://github…
sbansla Sep 12, 2025
8c68fae
disabled python release
sbansla Sep 12, 2025
e25edfc
remove spec
sbansla Sep 12, 2025
6609f4a
skipped orgs spec
sbansla Sep 12, 2025
96724ed
renamed twilio-java to twilio-java-legacy
sbansla Sep 12, 2025
053a83d
keeping java tests only
sbansla Sep 12, 2025
065c7e7
disabled python generator and moved spec out of scripts
sbansla Sep 16, 2025
9511886
added scim+json support
sbansla Sep 17, 2025
0636037
added noauth changes
sbansla Sep 18, 2025
3f92850
removed noauth unused extensions
sbansla Sep 18, 2025
3872c9a
refactored constructor generator to use path, query, header param ins…
sbansla Sep 20, 2025
2807d60
fixed Endpoint and Twiml data types
sbansla Sep 24, 2025
c1abd8a
fixed uri promoters
sbansla Sep 24, 2025
65e6d1f
fixed constructor generation due to similar data types
sbansla Sep 24, 2025
0a3db3d
fixed Enum datatype is getting appended by resource name multiple times
sbansla Sep 25, 2025
487250f
fixed the array items appending inner in inline schema
sbansla Sep 28, 2025
6f8795b
using builder pattern for twilio-java nested model generation
sbansla Sep 29, 2025
c797d7a
created constant to check api standard version
sbansla Oct 28, 2025
d697fbe
chore: Twilio API Standard v1.0
manisha1997 Nov 4, 2025
30287d0
chore: Twilio API Standard v1.0
manisha1997 Nov 5, 2025
0a57b12
chore: Twilio API Standard v1.0
manisha1997 Nov 5, 2025
b3b4acf
chore: Twilio API Standard v1.0
manisha1997 Nov 5, 2025
d6630a8
chore: Twilio API Standard v1.0
manisha1997 Nov 5, 2025
0a96e4d
chore: Twilio API Standard v1.0
manisha1997 Nov 5, 2025
cfa13b5
chore: Twilio API Standard v1.0
manisha1997 Nov 5, 2025
959f58c
chore: use eclipse temurin 8
manisha1997 Nov 6, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
strategy:
fail-fast: false
matrix:
language: [ 'csharp', 'go', 'java', 'node', 'php', 'python', 'ruby' ]
language: ['java' ]
runs-on: ubuntu-latest
timeout-minutes: 20
env:
Expand Down
15 changes: 13 additions & 2 deletions examples/java/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,19 @@
FROM openjdk:8
FROM eclipse-temurin:8-jdk

RUN apt-get update && apt-get install maven -y
# Install Maven with proper error handling
RUN apt-get update && \
apt-get install -y --no-install-recommends maven && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*

WORKDIR /app
# Install git
RUN apt-get update && \
apt-get install -y --no-install-recommends git && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*

# Use HTTPS instead of SSH for git clone
RUN git clone https://github.com/twilio/twilio-java.git
WORKDIR /app/twilio-java/

Expand Down
2 changes: 2 additions & 0 deletions examples/test_spec/java/twilio_customfeature_v1.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# This spec is twilio-java specific and Tests following
# 1. It tests custom feature for twilio-java examples: constructors, DateInequality
10 changes: 10 additions & 0 deletions examples/test_spec/twilio_auth_v1.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
components:
securitySchemes:
oAuth2ClientCredentials:
type: oauth2
flows:
clientCredentials:
tokenUrl: https://preview-iam.twilio.com/v1/token
scopes: {}
paths:

212 changes: 212 additions & 0 deletions examples/test_spec/twilio_datamodels_v1.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,212 @@
openapi: 3.1.0
info:
title: OneOf API Examples
version: 1.0.0
servers:
- url: https://api.twilio.com

paths:
/v1/directOneOf:
post:
operationId: CreateDirectOneOf
summary: Direct oneOf in request body
requestBody:
required: true
content:
application/json:
schema:
oneOf:
- $ref: '#/components/schemas/Cat'
- $ref: '#/components/schemas/Dog'
responses:
'200':
description: Success

# /v1/nestedOneOf:
# post:
# operationId: CreateNestedOneOf
# summary: Nested oneOf in request body
# requestBody:
# required: true
# content:
# application/json:
# schema:
# type: object
# properties:
# pet:
# oneOf:
# - $ref: '#/components/schemas/Cat'
# - $ref: '#/components/schemas/Dog'
# owner:
# type: string
# responses:
# '200':
# description: Success
#
# /v1/multipleNestedOneOf:
# post:
# operationId: CreateMultipleDirectOneOf
# summary: Multiple nested oneOf in request body
# requestBody:
# required: true
# content:
# application/json:
# schema:
# type: object
# properties:
# petDetails:
# type: object
# properties:
# pet:
# oneOf:
# - $ref: '#/components/schemas/Cat'
# - $ref: '#/components/schemas/Dog'
# additionalInfo:
# oneOf:
# - $ref: '#/components/schemas/One'
# - $ref: '#/components/schemas/Two'
# owner:
# type: string
# responses:
# '200':
# description: Success
#
# /v1/arrayOfOneOf:
# post:
# operationId: CreateArrayOfOneOf
# summary: Array of oneOf in request body
# requestBody:
# required: true
# content:
# application/json:
# schema:
# type: object
# properties:
# pets:
# type: array
# items:
# oneOf:
# - $ref: '#/components/schemas/Cat'
# - $ref: '#/components/schemas/Dog'
# responses:
# '200':
# description: Success
# /v1/parallelOneOfAndObject:
# post:
# operationId: CreateParallelOneOfAndObject
# summary: OneOf and normal object in parallel
# requestBody:
# required: true
# content:
# application/json:
# schema:
# type: object
# properties:
# pet:
# oneOf:
# - $ref: '#/components/schemas/Cat'
# - $ref: '#/components/schemas/Dog'
# owner:
# type: object
# properties:
# name:
# type: string
# age:
# type: integer
# responses:
# '200':
# description: Success
#
# /v1/oneOfWithAdditionalProperties:
# post:
# operationId: CreateOneOfWithAdditionalProperties
# summary: OneOf with additional properties
# requestBody:
# required: true
# content:
# application/json:
# schema:
# type: object
# properties:
# pet:
# oneOf:
# - $ref: '#/components/schemas/Cat'
# - $ref: '#/components/schemas/Dog'
# metadata:
# type: object
# additionalProperties:
# type: string
# responses:
# '200':
# description: Success
#
# /v1/oneOfWithRequiredFields:
# post:
# operationId: CreateOneOfWithRequiredFields
# summary: OneOf with required fields in parallel
# requestBody:
# required: true
# content:
# application/json:
# schema:
# type: object
# required:
# - pet
# - owner
# properties:
# pet:
# oneOf:
# - $ref: '#/components/schemas/Cat'
# - $ref: '#/components/schemas/Dog'
# owner:
# type: object
# properties:
# name:
# type: string
# contact:
# type: string
# responses:
# '200':
# description: Success

components:
schemas:
Cat:
type: object
properties:
type:
type: string
enum: [cat]
name:
type: string
huntingSkill:
type: string
enum: [clueless, lazy, adventurous, aggressive]

Dog:
type: object
properties:
type:
type: string
enum: [dog]
name:
type: string
packSize:
type: integer
minimum: 0

One:
type: object
properties:
param1:
type: string
param2:
type: string

Two:
type: object
properties:
object1:
type: string
object2:
type: string
106 changes: 106 additions & 0 deletions examples/test_spec/twilio_enum_v1.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
info:
contact:
email: support@twilio.com
name: Twilio Support
url: https://support.twilio.com
description: This is the public Twilio REST API.
license:
name: Apache 2.0
url: https://www.apache.org/licenses/LICENSE-2.0.html
termsOfService: https://www.twilio.com/legal/tos
title: Twilio - CONTENT
version: 1.11.0
openapi: 3.0.1

paths:
/v1/content:
servers:
- url: https://enum.twilio.com
get:
summary: Retrieve items with various filter options
parameters:
# PARAMETER_SINGLE
- name: singleParam
in: query
description: A single enum value as a query parameter
required: false
schema:
type: string
enum:
- asc
- desc
example: asc

# PARAMETER_ARRAY
- name: arrayParam
in: query
description: Order items using an array of enums
required: false
schema:
type: array
items:
type: string
enum:
- asc
- desc
example: [asc]

# PARAMETER_ARRAY
- name: arrayParamRef
in: query
required: false
description: An array parameter referencing a reusable schema
schema:
type: array
items:
$ref: '#/components/schemas/singleReusable'

- name: singleParamRef
in: header
schema:
$ref: '#/components/schemas/singleReusable'

responses:
'200':
description: A list of items
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Item'

components:
schemas:
Item:
type: object
properties:
# PROPERTY_SINGLE
singleProperty:
type: string
enum: [available, pending, sold]
description: A single enum value as a property in a schema
example: available

# PROPERTY_ARRAY
arrayProperty:
type: array
items:
type: string
enum: [new, sale, featured]
description: An array of enum values in a schema property
example: [new, featured]

# REUSABLE_ARRAY
arrayReusable:
type: array
items:
$ref: '#/components/schemas/singleReusable'
description: An array of reusable enum defined in components
example: [electronics, clothing]

# REUSABLE_SINGLE
singleReusable:
type: string
enum: [electronics, furniture, clothing]
description: A reusable single-value enum defined in components
2 changes: 2 additions & 0 deletions examples/test_spec/twilio_nestedmodel_v1.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# This spec tests followings
# 1. Nested model in request body and component schema
Loading
Loading