-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into OmarAlJarrah/add-contract-tests-executors
- Loading branch information
Showing
15 changed files
with
582 additions
and
121 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,3 +18,4 @@ jobs: | |
with: | ||
name: raw-specs | ||
path: raw-specs.yaml | ||
overwrite: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,3 +20,4 @@ jobs: | |
with: | ||
name: specs | ||
path: specs.yaml | ||
overwrite: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
name: PR Check Tests Run | ||
on: push | ||
|
||
jobs: | ||
run-rapid-tests: | ||
strategy: | ||
matrix: | ||
jdk: [8, 11, 17, 21] | ||
fail-fast: true | ||
max-parallel: 1 | ||
uses: ./.github/workflows/run-tests.yaml | ||
with: | ||
source: 'specs' | ||
specs_url: 'https://ewe-assets.s3.amazonaws.com/developer-tools/api/rapid/v3/specs.yaml' | ||
sdk_version: 1.0.${{ github.run_id }} | ||
sdk_namespace: 'rapid' | ||
jdk: ${{ matrix.jdk }} | ||
endpoint_prefix: '/v3' | ||
secrets: inherit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
name: Generate SDK | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
name: | ||
description: 'SDK Name' | ||
required: true | ||
type: string | ||
version: | ||
description: 'SDK Version' | ||
required: true | ||
type: string | ||
templates: | ||
description: 'Path to the templates directory' | ||
required: true | ||
type: string | ||
specs_key: | ||
description: 'Key to the transformed and ready to use specs artifact and name (without extension, e.g. specs, the file is expected to have the extension .yaml)' | ||
default: 'specs' | ||
type: string | ||
sdk_key: | ||
description: 'Key to the generated SDK artifact' | ||
default: 'sdk' | ||
type: string | ||
|
||
jobs: | ||
generate: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout EG SDK Repository | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: 'ExpediaGroup/expediagroup-java-sdk' | ||
path: sdk-repo | ||
|
||
- name: Download Specs | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: ${{ inputs.specs_key }} | ||
path: sdk-repo/generator/openapi | ||
|
||
- name: Set up JDK 21 | ||
uses: actions/setup-java@v4 | ||
with: | ||
java-version: '21' | ||
distribution: 'temurin' | ||
|
||
- name: Generate Product SDK | ||
working-directory: sdk-repo/generator/openapi | ||
run: | | ||
mvn clean install exec:java "-Dnamespace=${{ inputs.name }}" -DsdkVersion=${{ inputs.version }} "-Dspec=./${{ inputs.specs_key }}.yaml" -DtemplatesDir="${{ inputs.templates }}" | ||
- name: Install SDK | ||
working-directory: sdk-repo/generator/openapi/target/sdk | ||
run: | | ||
mvn clean install | ||
- name: Persist SDK Artifact | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: ${{ inputs.sdk_key }} | ||
path: | | ||
sdk-repo/generator/openapi/target/sdk | ||
!sdk-repo/generator/openapi/target/sdk/target | ||
overwrite: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
generator/openapi/src/main/kotlin/com/expediagroup/sdk/generators/openapi/Extensions.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.