Skip to content

Commit 05f6bc6

Browse files
committed
Update GitHub Actions to Node 24 compatible versions
GitHub is deprecating Node 20 on Actions runners (EOL April 2026). Updated actions to their latest major versions with Node 24 support: - actions/checkout v4 → v6 - Added persist-credentials: true for check-codegen workflow (checkout@v6 no longer persists credentials by default, needed for git submodule update --recursive --remote)
1 parent 7efe3c4 commit 05f6bc6

3 files changed

Lines changed: 87 additions & 3 deletions

File tree

.github/workflows/check-codegen.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,10 @@ jobs:
1313
runs-on: ubuntu-latest
1414

1515
steps:
16-
- uses: actions/checkout@v4
16+
- uses: actions/checkout@v6
1717
with:
1818
submodules: recursive
19+
persist-credentials: true
1920

2021
- name: Check all submodules up-to-date
2122
run: |
@@ -26,6 +27,6 @@ jobs:
2627
runs-on: ubuntu-latest
2728
needs: [check-submodules]
2829
steps:
29-
- uses: actions/checkout@v4
30+
- uses: actions/checkout@v6
3031
- name: Check existing swagger specification is up-to-date
3132
run: curl https://api.aspose.cloud/v4.0/barcode/swagger/spec | diff --strip-trailing-cr -y --suppress-common-lines spec/aspose-barcode-cloud.json -

.github/workflows/check-urls.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
check-urls:
1717
runs-on: ubuntu-latest
1818
steps:
19-
- uses: actions/checkout@v4
19+
- uses: actions/checkout@v6
2020
with:
2121
submodules: recursive
2222

CLAUDE.md

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
# CLAUDE.md
2+
3+
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
4+
5+
## What This Repo Does
6+
7+
Generates SDKs for Aspose.BarCode Cloud REST API across 8 languages using OpenAPI Generator. Each SDK lives in a git submodule under `submodules/`. Templates and configs in `codegen/` control what gets generated.
8+
9+
## Code Generation Pipeline
10+
11+
```
12+
spec/aspose-barcode-cloud.json (OpenAPI 3.0 spec)
13+
+ codegen/config-<lang>.json (per-language config: versions, package names, URLs)
14+
+ codegen/Templates/<lang>/*.mustache (customized mustache templates)
15+
→ codegen/Tools/openapi-generator-cli.jar
16+
→ codegen/.generated/<lang>/ (temp output)
17+
→ submodules/<lang>/ (final SDK code)
18+
→ make after-gen (formatting, linting, example insertion)
19+
```
20+
21+
Template variable reference: config JSON keys become `{{varName}}` in mustache templates. Original upstream templates are at https://github.com/OpenAPITools/openapi-generator/tree/master/modules/openapi-generator/src/main/resources/
22+
23+
## Key Commands
24+
25+
```bash
26+
make sdk # Generate ALL SDKs
27+
make <lang> # Generate one SDK: android, dart, dotnet, go, java, node, php, python
28+
make update # Fetch latest API spec from Aspose Cloud
29+
make format # Format Python scripts with Black (line-length=120)
30+
```
31+
32+
Inside each `submodules/<lang>/`:
33+
```bash
34+
make test # Run SDK tests
35+
make after-gen # Post-generation: format, lint, insert examples, add deprecation warnings
36+
```
37+
38+
## Workflow for Changing SDK Code
39+
40+
Per `Agents.md` — this is the required workflow:
41+
42+
1. Make changes in the SDK submodule (`submodules/<lang>/`)
43+
2. Run `make test` in the submodule to verify
44+
3. Update the corresponding mustache template in `codegen/Templates/<lang>/`
45+
4. Stage your submodule changes, then run `make <lang>` from the repo root
46+
5. Verify there are no unstaged changes in the submodule (generated code must match your changes)
47+
6. Fix templates if generated code diverges
48+
7. Do NOT commit or push — only stage changes
49+
50+
## Directory Mapping
51+
52+
| Template dir | Config file | Submodule | Generator name |
53+
|------------------------------|-------------------------------|-----------------------|-----------------|
54+
| `codegen/Templates/android/` | `codegen/config-android.json` | `submodules/android/` | android |
55+
| `codegen/Templates/csharp/` | `codegen/config-dotnet.json` | `submodules/dotnet/` | csharp-netcore |
56+
| `codegen/Templates/dart/` | `codegen/config-dart.json` | `submodules/dart/` | dart |
57+
| `codegen/Templates/go/` | `codegen/config-go.json` | `submodules/go/` | go |
58+
| `codegen/Templates/java/` | `codegen/config-java.json` | `submodules/java/` | java |
59+
| `codegen/Templates/nodejs/` | `codegen/config-node.json` | `submodules/node/` | typescript-node |
60+
| `codegen/Templates/php/` | `codegen/config-php.json` | `submodules/php/` | php |
61+
| `codegen/Templates/python/` | `codegen/config-python.json` | `submodules/python/` | python |
62+
63+
Note: template dir names don't always match submodule names (e.g., `csharp` vs `dotnet`, `nodejs` vs `node`).
64+
65+
## Post-Generation Processing
66+
67+
Large API files get split into per-request classes using Python helpers in `codegen/Tools/`:
68+
- `split-java-file.py`, `split-cs-file.py`, `split-php-file.py`
69+
70+
Each language's `after-gen` runs: auto-formatting, example insertion (`scripts/insert-example.bash`), deprecation warning injection, and documentation formatting.
71+
72+
## Release Process
73+
74+
1. `./scripts/start-release.bash` — creates release branches, bumps versions in all `config-*.json`
75+
2. `make sdk` — regenerate all SDKs
76+
3. Push PRs, review, merge to main
77+
4. Tag releases as `vYY.MM`, publish to package registries
78+
79+
Version format: `YY.MM.patch` (Go uses `4.YYMM.patch`, Dart uses `4.YY.MM`). Version updates are handled by `scripts/new-version.py`.
80+
81+
## Requirements
82+
83+
Java runtime (for openapi-generator-cli.jar), Python 3 (for scripts, Black formatter), Bash (WSL on Windows). Each SDK needs its own toolchain for `make test` / `make after-gen`.

0 commit comments

Comments
 (0)