Skip to content

Commit c3f625f

Browse files
author
Nicki Nixon
committed
fix javascript references to be node and point to typescript-axios generator
1 parent 85210bc commit c3f625f

File tree

1 file changed

+18
-46
lines changed

1 file changed

+18
-46
lines changed

.github/workflows/sdk-generation-validation.yml

Lines changed: 18 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
name: SDK Generation Validation
22

33
on:
4-
pull_request
5-
# paths:
6-
# - 'openapi/mx_platform_api.yml'
4+
pull_request:
5+
paths: 'openapi/mx_platform_api.yml'
76

87
jobs:
98
validate-sdk-generation:
@@ -69,7 +68,7 @@ jobs:
6968
run: |
7069
openapi-generator-cli generate \
7170
-i openapi/mx_platform_api.yml \
72-
-g ${{ matrix.language }} \
71+
-g ${{ matrix.generator }} \
7372
-o ./sdk-output/${{ matrix.language }} \
7473
--skip-validate-spec
7574
@@ -83,64 +82,37 @@ jobs:
8382
# Check for key files based on language
8483
case "${{ matrix.language }}" in
8584
"java")
86-
test -f pom.xml || (echo "❌ Missing pom.xml" && exit 1)
87-
find src -name "*.java" | head -1 > /dev/null || (echo "❌ No Java files found" && exit 1)
85+
find . -name "pom.xml" || (echo "❌ Missing pom.xml" && exit 1)
86+
find . -name "*.java" || (echo "❌ No Java files found" && exit 1)
8887
echo "✅ Java SDK structure validated"
8988
;;
9089
"ruby")
91-
ls *.gemspec > /dev/null 2>&1 || (echo "❌ Missing gemspec file" && exit 1)
92-
find lib -name "*.rb" | head -1 > /dev/null || (echo "❌ No Ruby files found" && exit 1)
90+
find . -name "*.gemspec" || (echo "❌ Missing gemspec file" && exit 1)
91+
find . -name "*.rb" || (echo "❌ No Ruby files found" && exit 1)
9392
echo "✅ Ruby SDK structure validated"
9493
;;
9594
"python")
96-
test -f setup.py || (echo "❌ Missing setup.py" && exit 1)
97-
find . -name "*.py" | head -1 > /dev/null || (echo "❌ No Python files found" && exit 1)
95+
find . -name "setup.py" || (echo "❌ Missing setup.py" && exit 1)
96+
find . -name "*.py" || (echo "❌ No Python files found" && exit 1)
9897
echo "✅ Python SDK structure validated"
9998
;;
100-
"javascript")
101-
test -f package.json || (echo "❌ Missing package.json" && exit 1)
102-
find . -name "*.js" | head -1 > /dev/null || (echo "❌ No JavaScript files found" && exit 1)
103-
echo "✅ JavaScript SDK structure validated"
99+
"node")
100+
find . -name "package.json" || (echo "❌ Missing package.json" && exit 1)
101+
find . -name "*.ts" -o -name "*.js" || (echo "❌ No TypeScript/JavaScript files found" && exit 1)
102+
echo "✅ Node SDK structure validated"
104103
;;
105104
"csharp")
106-
ls *.csproj > /dev/null 2>&1 || (echo "❌ Missing csproj file" && exit 1)
107-
find . -name "*.cs" | head -1 > /dev/null || (echo "❌ No C# files found" && exit 1)
105+
find . -name "*.csproj" || (echo "❌ Missing csproj file" && exit 1)
106+
find . -name "*.cs" || (echo "❌ No C# files found" && exit 1)
108107
echo "✅ C# SDK structure validated"
109108
;;
110109
"go")
111-
test -f go.mod || (echo "❌ Missing go.mod" && exit 1)
112-
find . -name "*.go" | head -1 > /dev/null || (echo "❌ No Go files found" && exit 1)
110+
find . -name "go.mod" || (echo "❌ Missing go.mod" && exit 1)
111+
find . -name "*.go" || (echo "❌ No Go files found" && exit 1)
113112
echo "✅ Go SDK structure validated"
114113
;;
115114
esac
116-
117-
- name: Generate validation report
118-
if: always()
119-
run: |
120-
echo "## SDK Generation Report for ${{ matrix.language }}"
121-
echo "- **Status**: ${{ job.status }}"
122115
123116
- name: Clean up
124117
if: always()
125-
run: rm -rf ./sdk-output/${{ matrix.language }}
126-
127-
validation-summary:
128-
needs: validate-sdk-generation
129-
runs-on: ubuntu-latest
130-
if: always()
131-
steps:
132-
- name: Check all SDK generations passed
133-
run: |
134-
if [[ "${{ needs.validate-sdk-generation.result }}" == "success" ]]; then
135-
echo "✅ SDK Generation Validation: PASSED"
136-
echo "All 6 SDK languages generated successfully from OpenAPI specification"
137-
echo "## ✅ SDK Generation Validation: PASSED"
138-
echo "All 6 SDK languages (Java, Ruby, Python, JavaScript, C#, Go) generated successfully."
139-
else
140-
echo "❌ SDK Generation Validation: FAILED"
141-
echo "One or more SDK generations failed. Check individual language job logs for detailed error messages."
142-
echo "## ❌ SDK Generation Validation: FAILED"
143-
echo "**One or more SDK languages failed to generate.**"
144-
echo "Check the individual language job logs above for detailed error messages."
145-
exit 1
146-
fi
118+
run: rm -rf ./sdk-output/${{ matrix.language }}

0 commit comments

Comments
 (0)