You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/Adding-a-New-API-Version.md
+23-23Lines changed: 23 additions & 23 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -85,28 +85,28 @@ api_version:
85
85
- v20300101 # NEW
86
86
```
87
87
88
-
**Location 2: Semantic versioning validation**
88
+
**Location 2: Update ConfigValidator**
89
89
90
-
In the `Validate` job's validation step, add a new conditional check for your version:
90
+
In `.github/config_validator.rb`, add your new version to the `SUPPORTED_VERSIONS` mapping:
91
91
92
-
```yaml
93
-
if [ "$API_VERSION" = "v20111101" ] && [ "$MAJOR_VERSION" != "2" ]; then
94
-
echo "❌ Semantic versioning error: v20111101 must have major version 2, found $MAJOR_VERSION"
95
-
exit 1
96
-
fi
97
-
98
-
if [ "$API_VERSION" = "v20250224" ] && [ "$MAJOR_VERSION" != "3" ]; then
99
-
echo "❌ Semantic versioning error: v20250224 must have major version 3, found $MAJOR_VERSION"
100
-
exit 1
101
-
fi
102
-
103
-
if [ "$API_VERSION" = "v20300101" ] && [ "$MAJOR_VERSION" != "4" ]; then
104
-
echo "❌ Semantic versioning error: v20300101 must have major version 4, found $MAJOR_VERSION"
105
-
exit 1
106
-
fi
92
+
```ruby
93
+
class ConfigValidator
94
+
SUPPORTED_VERSIONS = {
95
+
"v20111101" => 2, # Major version must be 2
96
+
"v20250224" => 3, # Major version must be 3
97
+
"v20300101" => 4 # Major version must be 4 (NEW)
98
+
}.freeze
99
+
# ... rest of class unchanged
100
+
end
107
101
```
108
102
109
-
This ensures the major version in your config file matches the expected value for that API version.
103
+
The `ConfigValidator` automatically validates that:
104
+
- The API version is in `SUPPORTED_VERSIONS`
105
+
- The major version in your config file matches the expected value (e.g., v20300101 → major version 4)
106
+
- The config file syntax is valid YAML
107
+
- The file exists at the specified path
108
+
109
+
**No workflow changes needed** — the existing validation step in `generate.yml` calls `ConfigValidator` with your new version, and it automatically validates using the updated mapping.
110
110
111
111
### 2.2 Update generate_publish_release.yml
112
112
@@ -363,7 +363,7 @@ Use this checklist to verify you've completed all steps:
363
363
-[ ] Created `openapi/config-v20300101.yml` with correct syntax
364
364
-[ ] Major version in config is unique and sequential (4.0.0 for v20300101)
365
365
-[ ] Updated `.github/workflows/generate.yml` with new version in dropdown options
366
-
-[ ] Updated `.github/workflows/generate.yml` with semantic versioning validation
366
+
-[ ] Updated `.github/config_validator.rb` with new version in `SUPPORTED_VERSIONS` mapping
367
367
-[ ] Updated `.github/workflows/generate_publish_release.yml` with version-to-config mapping in Setup job
368
368
-[ ] Updated `.github/changelog_manager.rb` with new version in `API_VERSION_ORDER` array
369
369
-[ ] Updated `.github/workflows/on-push-master.yml` path triggers with `v20300101/**`
@@ -397,16 +397,16 @@ Use this checklist to verify you've completed all steps:
397
397
**Solution**: Verify the version is listed in the `on.workflow_dispatch.inputs.api_version.options` section and YAML syntax is valid
398
398
399
399
### Semantic versioning validation fails
400
-
**Cause**: Validation check missing for new version or major version mismatch
401
-
**Solution**: Ensure the validation check for your version is added to generate.yml and the major version in your config matches the expected value
400
+
**Cause**: ConfigValidator not updated with new version or major version mismatch
401
+
**Solution**: Ensure the new version is added to `SUPPORTED_VERSIONS` in `.github/config_validator.rb` and the major version in your config file matches the expected value
402
402
403
403
### Generated version is 2.x.x or 3.x.x instead of 4.0.0
404
404
**Cause**: Wrong major version in config file
405
405
**Solution**: Update `npmVersion: 4.0.0` in config file to use unique major version
406
406
407
407
### generate_publish_release.yml doesn't recognize new version
408
-
**Cause**: Version-to-config mapping missing in Setup jobor ChangelogManager not updated
409
-
**Solution**: Verify two locations in generate_publish_release.yml are updated: (1) version-to-config mapping in Setup job, and (2) add version to API_VERSION_ORDER in changelog_manager.rb
408
+
**Cause**: Version-to-config mapping missing in Setup job, ChangelogManager not updated, or ConfigValidator not updated
409
+
**Solution**: Verify three locations are updated: (1) version-to-config mapping in generate_publish_release.yml Setup job, (2) add version to `API_VERSION_ORDER` in `changelog_manager.rb`, and (3) add version to `SUPPORTED_VERSIONS` in `config_validator.rb`
410
410
411
411
### on-push-master.yml doesn't trigger after merge
412
412
**Cause**: Path trigger syntax incorrect or matrix not updated
Copy file name to clipboardExpand all lines: docs/Multi-Version-SDK-Flow.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
3
3
**Document Purpose**: Quick-reference guide to the multi-version SDK generation, publishing, and release system. This is your entry point to understanding how the system works.
4
4
5
-
**Last Updated**: January 27, 2026
5
+
**Last Updated**: January 28, 2026
6
6
**Read Time**: 5-10 minutes
7
7
**Audience**: Anyone joining the team or needing a system overview
0 commit comments