Skip to content

Commit

Permalink
Conditional use of inlineSchemaNameMappings
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelpaul committed Dec 13, 2023
1 parent 9468e4a commit 69fd9c0
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ services.each { Service svc ->
inputSpec.set("$rootDir/schema/json/${svc.filename}")
outputDir.set("$buildDir/services/${svc.id}")
templateDir.set("$projectDir/repo/$project.ext.templates")
engine.set('mustache')
validateSpec.set(false)
skipValidateSpec.set(true)
reservedWordsMappings.set([
Expand Down Expand Up @@ -115,6 +116,10 @@ tasks.register('services') {
}

tasks.named('generateCheckout', GenerateTask) {
if (project.name == 'node') {
// generator v5 does not support inlineSchemaNameMappings
return
}
inlineSchemaNameMappings.set([
'PaymentRequest_paymentMethod' : 'CheckoutPaymentMethod',
'DonationPaymentRequest_paymentMethod': 'DonationPaymentMethod',
Expand Down
1 change: 0 additions & 1 deletion node/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ services.each { Service svc ->
// Generation
tasks.named("generate${svc.name}", GenerateTask) {
apiPackage.set(serviceName)
apiNameSuffix.set('Service')
configFile.set("$projectDir/config.yaml")
additionalProperties.putAll([
'modelPropertyNaming': 'original',
Expand Down
1 change: 1 addition & 0 deletions python/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ services.<Service> each { Service svc ->

// Generation
tasks.named("generate${svc.name}", GenerateTask) {
engine.set('mustache')
configFile.set("$projectDir/config.yaml")
additionalProperties.putAll([
'serviceName': serviceName,
Expand Down

0 comments on commit 69fd9c0

Please sign in to comment.