-
Notifications
You must be signed in to change notification settings - Fork 229
feat(client-generator): agent-friendly generators — python, go, php, cli + neutral authoring toolkit and eject workflow #3016
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 127 commits
ea9fbba
75f7376
dd3d9ad
ab4fd93
ab6b026
357e49e
d08648f
7eec23a
7e4dd6d
5f0bac9
419deaa
ae6f1eb
7e871bd
00d20d9
4496668
b9045b0
d84f077
b20f589
0296ef4
481858b
c8a439a
a777e4b
bd9ac35
aacf152
0a1e1a1
0ac7190
9e399d5
08752c7
47d9a41
f1b2339
a4b840a
8b8b5fc
a9336cd
9685e23
696cd4a
1b8895b
1eb95ec
f6ab32f
a856027
d6dce9f
5f088f2
c5d324a
9e671dc
29f48dc
8c296a4
3b2f4cd
c61f052
f4330f5
81b3800
f93e2de
0fa5302
60e4125
b2869a8
a74b943
cfbfd31
9728c7f
5a332e1
fdd5b30
6ed27e1
8335506
31f3a80
6e06798
5c837dc
e65e52f
e24a5a7
0e85d36
f9beb13
1e6528e
61a9f0a
4772a5d
33e078f
637218d
3329229
912d2cb
ea9d834
4ca28a5
ba4fa89
f5c45b7
3167889
33dd6ce
2adf755
631a9e4
ee6eaa4
e7d282f
e75de09
ee02eea
5728004
33e24b6
c96f2b5
63d369a
a916968
99d13cc
22cd204
79026d0
6ae6e41
e5658f9
d415bbf
c335ef6
c0c60c8
28d8e0f
2270e1b
06334de
b562a31
6e9b404
327eda4
05a12ff
7ee3ab3
1acf29d
485586c
12bebc5
27f008c
d345a7b
c41a000
05666b0
792f6e4
4a52931
a8fed72
1cee039
d0d6f45
340f195
723650e
8dffbce
90003ad
a8d986e
d19e458
4637d76
e039367
771b9dd
7e8bb05
3a61c3b
ae4a9d0
e8df6a4
597b938
183cfa5
a12a0f7
2483b7f
cba1e0d
098ae0b
cab6952
7b20bdd
4b2404e
ee592ce
596acc8
1797cf8
2c5b8a9
c8bb72a
6acb94e
34b91bc
205072e
d7e041a
2a53c15
bce4e3b
80f1332
e15b884
6b636fa
1b62605
076afc6
960889c
c714437
cb2d497
1724969
d3c7d22
266bf67
33a7d95
7b2fcf8
abada70
248190f
eaf126e
d6c63e8
1854e62
9f08ce8
e271f78
eb102e2
03ea402
b44754b
c4a2c61
8f221df
1f11313
15b38e8
f994b2c
7ed38b7
6090b29
f17da0c
381a54b
d544283
5dc9c42
ca5b332
fb53dc6
2a46d21
085210d
287f473
eb8a8a4
2522929
217287b
fd65869
17f9465
2082d01
187ebb8
991b3ac
c819c4f
daefd83
1582809
9ed3ffd
a36cc78
0b8a1fe
9710db4
5911875
b945730
fee9559
57f009d
1ba6e7a
090b1c3
1bdd8ec
6cf104a
147e81b
cae28e8
56d5e39
44c5113
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| --- | ||
| '@redocly/client-generator': minor | ||
| '@redocly/cli': minor | ||
| --- | ||
|
|
||
| Added agent-friendly client generation: `python`, `go`, `php`, `cli`, and `cli-docs` generators beside the TypeScript ones, a language-neutral authoring toolkit with per-generator options, and an `eject-generator` command that vendors any built-in generator — plus its design as an agent skill — into your repo. |
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -37,10 +37,31 @@ jobs: | |
| uses: davelosert/vitest-coverage-report-action@d63aa97db4c0319f304f1787689de1ca548365cf # v2.11.1 | ||
|
|
||
| e2e: | ||
| # The e2e suite is split across shards so no single runner carries the whole set. | ||
| # Running all suites in one step was cancelled mid-run by the Actions service once the | ||
| # generate-client suites grew past ~28 (a healthy runner, no resource exhaustion); | ||
| # each shard stays well under that. | ||
| # Everything under tests/e2e EXCEPT generate-client, which has its own job below. | ||
|
tatomyr marked this conversation as resolved.
|
||
| # Split across shards so no single runner carries the whole set: running all suites in | ||
| # one step was cancelled mid-run by the Actions service once the suite count grew past | ||
| # ~28 (a healthy runner, no resource exhaustion), and each shard stays well under that. | ||
| runs-on: ubuntu-latest | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| shard: [1, 2, 3] | ||
| steps: | ||
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | ||
| - uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0 | ||
| with: | ||
| node-version: 24 | ||
| cache: npm | ||
| - name: Install dependencies | ||
| run: npm ci | ||
| - name: E2E Tests (shard ${{ matrix.shard }}/3) | ||
| run: npm run e2e -- --shard=${{ matrix.shard }}/3 | ||
|
|
||
| generators: | ||
|
tatomyr marked this conversation as resolved.
Outdated
|
||
| # Client generation has its own job: its bars compile real Python, Go, PHP, and | ||
| # TypeScript output from generated clients (including big real-world descriptions), so | ||
| # they are the slowest tests we have and they need toolchains nothing else does. | ||
| # Keeping them here means adding another language bar cannot slow the shared e2e job. | ||
| runs-on: ubuntu-latest | ||
| strategy: | ||
| fail-fast: false | ||
|
|
@@ -52,10 +73,22 @@ jobs: | |
| with: | ||
| node-version: 24 | ||
| cache: npm | ||
| - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 | ||
| with: | ||
| python-version: '3.12' | ||
| - name: Install httpx (the Python import bars need it) | ||
| run: pip install httpx | ||
| # Go, gofmt, and php come with the runner image; a bar whose toolchain is missing | ||
| # skips itself, so a thinner image degrades coverage instead of failing the job. | ||
| - name: Cache the pinned GitHub REST description | ||
| uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4 | ||
| with: | ||
| path: tests/e2e/generate-client/.cache | ||
| key: large-descriptions-${{ hashFiles('tests/e2e/generate-client/large-descriptions.test.ts') }} | ||
|
Comment on lines
+69
to
+80
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we need a separate test suite for generator.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Agreed, and it's already the biggest suite. Splitting generator tests (client-generator unit + |
||
| - name: Install dependencies | ||
| run: npm ci | ||
| - name: E2E Tests (shard ${{ matrix.shard }}/2) | ||
| run: npm run e2e -- --shard=${{ matrix.shard }}/2 | ||
| - name: Generator Tests (shard ${{ matrix.shard }}/2) | ||
| run: npm run generators -- --shard=${{ matrix.shard }}/2 | ||
|
|
||
| examples: | ||
| # The examples gitignore their generated clients (only zero-install-quickstart commits | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.