Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
b377b5a
Merge branch 'main' into openapi-generator-v7
Kwok-he-Chu Mar 28, 2025
e1c631f
wip
Kwok-he-Chu Apr 10, 2025
b2b530c
WIP do-not-merge
Kwok-he-Chu Apr 28, 2025
b23b273
wip-
Kwok-he-Chu Jul 30, 2025
135cc1f
Upgrade to latest 7.16.0 generator and target net8.0
Kwok-he-Chu Oct 1, 2025
ef69b02
Update build.gradle to find current directory names with new structure
Kwok-he-Chu Oct 13, 2025
ca971b0
Fix correct order using dependsOn
Kwok-he-Chu Oct 13, 2025
47ebdac
Generate TokenizationWebhooks & BalanceWebhooks
Kwok-he-Chu Oct 23, 2025
46280ec
Separate webhooks generation from service generation
Kwok-he-Chu Oct 23, 2025
692be55
Use TypeMappings to change Set to List
Kwok-he-Chu Oct 23, 2025
d052269
Use HashSet instead
Kwok-he-Chu Oct 23, 2025
9a33d0d
Do post-processing for reservedWords
Kwok-he-Chu Oct 23, 2025
eb60d99
Remove equatable generation
Kwok-he-Chu Oct 23, 2025
cf651e1
formatting
Kwok-he-Chu Oct 24, 2025
7d5c91e
Include unique ApiToken per service
Kwok-he-Chu Oct 24, 2025
a969a43
Fix replaceFromTo list
Kwok-he-Chu Oct 25, 2025
60396d5
Add Webhook support
Kwok-he-Chu Oct 25, 2025
73fa9d5
Add handler-folder-logic
Kwok-he-Chu Oct 27, 2025
dfc5b69
Renamed variables to match their functionality
Kwok-he-Chu Oct 27, 2025
1c53ff8
Do not include the `Adyen.{{Webhook}}.Services` as namespace for webh…
Kwok-he-Chu Oct 27, 2025
b2456c9
use serviceName.endWith("Webhooks")
Kwok-he-Chu Oct 27, 2025
72b9456
Generate LegalManagementApi V4
Kwok-he-Chu Oct 29, 2025
89222ba
Replace wWWAuthenticate with wwwAuthenticate
Kwok-he-Chu Oct 29, 2025
a2e3bd3
Do not deploy /docs
Kwok-he-Chu Oct 30, 2025
57505db
Revert "Do not deploy /docs"
Kwok-he-Chu Oct 30, 2025
22e5520
Update to include SupportingFiles for HmacKeyToken used in Webhooks
Kwok-he-Chu Nov 13, 2025
32292fb
Merge branch 'main' into openapi-generator-v7-dry-run
Kwok-he-Chu Nov 13, 2025
7b28488
Support x-has-at-least-one-webhook-root
Kwok-he-Chu Nov 13, 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
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ To generate all services in all libraries, run:
For all services in a library, run:

```
./gradlew :go:services

./gradlew :go:services
```

For a single specific service:
Expand Down Expand Up @@ -46,6 +45,8 @@ For Node.js, set the generator version via CLI:

```
./gradlew :node:cleanRepo :node:checkout -PopenapiGeneratorVersion=5.4.0
./gradlew :java:cleanRepo :java:checkout -PopenapiGeneratorVersion=7.11.0
./gradlew :dotnet:cleanRepo :dotnet:checkout -PopenapiGeneratorVersion=7.11.0
```

### Development
Expand All @@ -57,6 +58,8 @@ For local testing of some library:

```shell
rm -rf go/repo && ln -s ~/workspace/adyen-go-api-library go/repo
rm -rf java/repo && ln -s ~/workspace/adyen-java-api-library java/repo
rm -rf dotnet/repo && ln -s ~/workspace/adyen-dotnet-api-library dotnet/repo
```

To run unit tests:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ ext {
// Generate a full client for each service
services.each { Service svc ->
def generate = tasks.register("generate$svc.name", GenerateTask) {
println "Generating ${svc.name} Client..."
group 'generate'
description "Generate a $project.name client for $svc.name."
dependsOn 'cloneRepo'
Expand All @@ -86,7 +87,7 @@ services.each { Service svc ->
"configuration": "configuration"
])
additionalProperties.set([
'serviceName': project.ext.serviceName,
'serviceName': project.ext.serviceName
])
globalProperties.set([
'modelDocs' : 'false',
Expand Down Expand Up @@ -231,6 +232,7 @@ project.ext.services.each { Service svc ->

// Check if the service name ends with "Webhooks"
if (svc.name.endsWith("Webhooks") && json.containsKey("components") && json["components"].containsKey("schemas")) {
def addOnce = true
json["components"]["schemas"].each { Map.Entry schema ->
def properties = schema.value?.properties
// add 'x-webhook-root' to the webhook model (we find 'environment' and 'data' attributes)
Expand All @@ -247,12 +249,24 @@ project.ext.services.each { Service svc ->
if (schema.key.equals("DisputeNotificationRequest")) {
schema.value["x-webhook-root"] = true
}

// Workaround
// Mark one model `{{#x-has-at-least-one-webhook-root}}` as true. I could not extend this property at the root-level.
// Context: {{#models}}{{#model.vendorExtensions.x-webhook-root}} -> {{#first}} won't work with multiple `x-webhook-root` extensions
if (addOnce) {
schema.value["x-has-at-least-one-webhook-root"] = true
addOnce = false
}
}
}

specFile.text = JsonOutput.prettyPrint(JsonOutput.toJson(json))
}
}
tasks.named("generate$svc.name") { dependsOn addWebhookExtension }

tasks.named("generate$svc.name", GenerateTask) {
println "Generating ${svc.name} Webhooks..."

Choose a reason for hiding this comment

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

medium

This println statement is inside a loop that iterates over all services, but it prints a message suggesting a webhook is being generated for every service. This is misleading and can cause confusion. The message should only be printed for actual webhook services.

        if (svc.webhook) println "Generating ${svc.name} Webhooks..."

dependsOn addWebhookExtension
}
}

Loading