Skip to content

Commit e9984a0

Browse files
Merge dev into v3.1-dev-sync-with-dev
2 parents ebbb145 + 1d53c84 commit e9984a0

13 files changed

Lines changed: 4164 additions & 5915 deletions
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: build-infra-integration
2+
3+
on:
4+
pull_request: {}
5+
workflow_dispatch: {}
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- uses: actions/checkout@v7
13+
with:
14+
fetch-depth: 0
15+
16+
- uses: actions/setup-node@v7
17+
with:
18+
node-version: "24.x"
19+
20+
- name: Enable Corepack
21+
run: corepack enable
22+
23+
- name: Install dependencies
24+
run: yarn install --immutable
25+
26+
- name: Build latest published specification
27+
if: ${{ hashFiles('versions/*.md') != '' }}
28+
run: yarn build latest
29+
30+
- name: Build source specification
31+
if: ${{ hashFiles('src/*.md') != '' }}
32+
run: yarn build src

.github/workflows/respec.yaml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,11 @@ jobs:
3535
with:
3636
node-version: "24.x"
3737

38+
- name: Enable Corepack
39+
run: corepack enable
40+
3841
- name: Install dependencies
39-
run: npm ci --allow-git=root
42+
run: yarn install --immutable
4043

4144
- uses: actions/checkout@v7 # checkout main branch of website repo
4245
with:
@@ -46,7 +49,7 @@ jobs:
4649
path: deploy
4750

4851
- name: run main script
49-
run: npm run build
52+
run: yarn build
5053

5154
- name: Create Pull Request
5255
uses: peter-evans/create-pull-request@v8

.github/workflows/schema-publish.yaml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,11 @@ jobs:
3838
with:
3939
node-version: "24.x"
4040

41+
- name: Enable Corepack
42+
run: corepack enable
43+
4144
- name: Install dependencies
42-
run: npm ci --allow-git=root
45+
run: yarn install --immutable
4346

4447
- uses: actions/checkout@v7 # checkout main branch of website repo
4548
with:
@@ -49,7 +52,7 @@ jobs:
4952
path: deploy
5053

5154
- name: run main script
52-
run: npm run publish-schemas
55+
run: yarn publish-schemas
5356

5457
- name: Create Pull Request
5558
uses: peter-evans/create-pull-request@v8

.github/workflows/schema-tests.yaml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ name: schema-test
44
# Issue: https://github.com/OAI/OpenAPI-Specification/pull/2489
55

66
#
7-
# This workflow runs the npm test script to validate passing and failing
7+
# This workflow runs the Yarn test script to validate passing and failing
88
# testcases for the metaschemas
99
#
1010

@@ -27,10 +27,13 @@ jobs:
2727
with:
2828
node-version: '24.x'
2929

30+
- name: Enable Corepack
31+
run: corepack enable
32+
3033
- name: Install dependencies
31-
run: npm ci --allow-git=root
34+
run: yarn install --immutable
3235

3336
- name: Run tests
34-
run: npm run test
37+
run: yarn test
3538
env:
3639
BASE: ${{ github.event.pull_request.base.ref }}

.github/workflows/validate-markdown.yaml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,11 @@ jobs:
2121
with:
2222
node-version: "24.x"
2323

24+
- name: Enable Corepack
25+
run: corepack enable
26+
2427
- name: Install dependencies
25-
run: npm ci --allow-git=root
28+
run: yarn install --immutable
2629

2730
- name: Validate Markdown
28-
run: npm run validate-markdown
31+
run: yarn validate-markdown

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
target
66
atlassian-ide-plugin.xml
77
node_modules/
8+
.yarn/
89
deploy/
910
deploy-preview/
1011
coverage/

.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
24

.yarnrc.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
nodeLinker: node-modules
2+
approvedGitRepositories:
3+
- https://github.com/OAI/build-infra.git

CONTRIBUTING.md

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ If you do think that something was closed in error, you are welcome to reach out
3030
This repository uses the shared OpenAPI Initiative infrastructure package
3131
[`@oai/build-infra`](https://github.com/OAI/build-infra) for Markdown
3232
validation, HTML builds, schema publication, schema tests, and release helper
33-
commands. The npm scripts in this repository are intentionally thin wrappers
33+
commands. The package scripts in this repository are intentionally thin wrappers
3434
around that package.
3535

3636
The shared infrastructure docs explain how the tooling works and how to maintain
@@ -194,25 +194,26 @@ Draft pull requests can still be reviewed while in draft state.
194194
### Preview specification HTML locally
195195

196196
> [!NOTE]
197-
> `npm run build-src` calls bash scripts. Use [Git Bash](https://gitforwindows.org/) on Windows, or use the Windows Subsystem for Linux (WSL).
197+
> `yarn build-src` calls bash scripts. Use [Git Bash](https://gitforwindows.org/) on Windows, or use the Windows Subsystem for Linux (WSL).
198198
199199
Before creating a pull request or marking a draft pull request as ready for review, validate your changes locally:
200200

201-
1. Install [Node.js](https://nodejs.org/)
201+
1. Install Node.js 24 and run `corepack enable` once to make the repository's
202+
pinned Yarn version available
202203
2. Check out this repo, go to the repo root, and switch to a development branch
203-
3. Execute `npm install` (once, repeat after merging upstream changes)
204+
3. Execute `yarn install --immutable` (repeat after merging upstream changes)
204205
4. Run the commands relevant to what you changed:
205206

206207
| Command | What it does |
207208
| ------- | ------------- |
208-
| `npm run validate-markdown` | markdownlint + link check only — fast loop while editing |
209-
| `npm run format-markdown` | auto-fix markdownlint violations |
210-
| `npm run build-src` | full check: validation, HTML build, schema publish |
211-
| `npm test` | runs the JSON Schema and build tooling test suites |
209+
| `yarn validate-markdown` | markdownlint + link check only — fast loop while editing |
210+
| `yarn format-markdown` | auto-fix markdownlint violations |
211+
| `yarn build-src` | full check: validation, HTML build, schema publish |
212+
| `yarn test` | runs the JSON Schema and build tooling test suites |
212213

213-
5. After `npm run build-src`, open output file `deploy-preview/oas.html` with a browser and check your changes
214+
5. After `yarn build-src`, open output file `deploy-preview/oas.html` with a browser and check your changes
214215

215-
Please make sure the markdown validates and builds, and that `npm test` passes, before creating a pull request or marking a draft pull request as ready for review.
216+
Please make sure the markdown validates and builds, and that `yarn test` passes, before creating a pull request or marking a draft pull request as ready for review.
216217

217218
## Reviewers
218219

@@ -239,13 +240,13 @@ The steps for creating a `vX.Y.Z-rel` branch are:
239240
2. Merge `main` into `dev` and `dev` into `vX.Y-dev` via PRs
240241
- sync PRs are automatically created by workflows `sync-main-to-dev` and `sync-dev-to-vX.Y-dev`
241242
3. Prepare spec files in `vX.Y-dev`
242-
- `npm run format-markdown`
243-
- `npm run build-src`
243+
- `yarn format-markdown`
244+
- `yarn build-src`
244245
- open `deploy-preview/oas.html` in browser and verify correct formatting
245246
- adjust and repeat until done
246247
- merge changes to `src/oas.md` back into `vX.Y-dev` via PR
247248
4. Create `vX.Y.Z-rel` from `vX.Y-dev` and adjust it
248-
- `npm run adjust-release-branch` does this:
249+
- `yarn adjust-release-branch` does this:
249250
- copy file `src/oas.md` to `versions/X.Y.Z.md` and replace the release date placeholder `| TBD |` in the history table of Appendix A with the current date
250251
- copy file `EDITORS.md` to `versions/X.Y.Z-editors.md`
251252
- delete folder `src`
@@ -266,7 +267,7 @@ unexpectedly, check this repository's `spec.config.json` first, then see the
266267

267268
Once the released specification version is [synced](#branch-sync-automation) back to the `vX.Y-dev` branch, the next patch version X.Y.(Z+1) can be started:
268269

269-
1. Run `npm run start-release` in branch `vX.Y-dev` to
270+
1. Run `yarn start-release` in branch `vX.Y-dev` to
270271
- create branch `vX.Y-dev-start-X.Y.(Z+1)`
271272
- initialize `src/oas.md` with empty history and content from `versions/X.Y.Z.md`
272273
- change version heading to X.Y.(Z+1) and add a new line to the version history table in Appendix A of `src/oas.md`
@@ -280,7 +281,7 @@ Alternatively, if no patch version X.Y.(Z+1) is planned, delete file `src/oas.md
280281
A new minor version X.(Y+1).0 or major version (X+1).0.0 is started similarly:
281282

282283
1. Create branch `vX'.Y'-dev` from `vX.Y-dev`
283-
2. Run `npm run start-release` in the new branch to
284+
2. Run `yarn start-release` in the new branch to
284285
- create branch `vX'.Y'-dev-start-X'.Y'.0`
285286
- initialize `src/oas.md` with empty history and content from `versions/X.Y.Z.md`
286287
- change version heading to X'.Y'.0 and add a new line to the version history table in Appendix A of `src/oas.md`

0 commit comments

Comments
 (0)