Skip to content

Commit 2c428e6

Browse files
authored
Merge pull request #5484 from OAI/dev-sync-with-main
dev: sync with main
2 parents e429b7f + 42d680f commit 2c428e6

29 files changed

Lines changed: 1096 additions & 3586 deletions

.github/dependabot.yml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,3 @@ updates:
55
schedule:
66
interval: daily
77
open-pull-requests-limit: 10
8-
- package-ecosystem: npm
9-
directory: "/"
10-
schedule:
11-
interval: daily
12-
open-pull-requests-limit: 10
13-
groups:
14-
vitest:
15-
patterns:
16-
- "*vitest*"

.github/pull_request_template.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ present on the main branch, only on the development branches).
88
* 3.1.x spec and schemas: v3.1-dev branch
99
* 3.2.x spec and schemas: v3.2-dev branch
1010
* 3.3.x spec and schemas: v3.3-dev branch
11-
* process documentation and build infrastructure: main
11+
* process documentation and shared infrastructure: main
1212
1313
Note that we do not accept changes to published specifications.
1414
-->

.github/workflows/respec.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
node-version: "24.x"
3737

3838
- name: Install dependencies
39-
run: npm ci
39+
run: npm ci --allow-git=root
4040

4141
- uses: actions/checkout@v7 # checkout main branch of website repo
4242
with:
@@ -46,7 +46,7 @@ jobs:
4646
path: deploy
4747

4848
- name: run main script
49-
run: scripts/md2html/build.sh
49+
run: npm run build
5050

5151
- name: Create Pull Request
5252
uses: peter-evans/create-pull-request@v8

.github/workflows/schema-publish.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
node-version: "24.x"
4040

4141
- name: Install dependencies
42-
run: npm ci
42+
run: npm ci --allow-git=root
4343

4444
- uses: actions/checkout@v7 # checkout main branch of website repo
4545
with:
@@ -49,7 +49,7 @@ jobs:
4949
path: deploy
5050

5151
- name: run main script
52-
run: scripts/schema-publish.sh
52+
run: npm run publish-schemas
5353

5454
- name: Create Pull Request
5555
uses: peter-evans/create-pull-request@v8

.github/workflows/schema-tests.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
node-version: '24.x'
2929

3030
- name: Install dependencies
31-
run: npm ci
31+
run: npm ci --allow-git=root
3232

3333
- name: Run tests
3434
run: npm run test

.github/workflows/validate-markdown.yaml

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

24-
- name: Lint work-in-progress spec
25-
run: npx --yes markdownlint-cli2 --config spec.markdownlint.yaml src/oas.md
26-
27-
- name: Lint other files
28-
run: npx --yes markdownlint-cli2 *.md
24+
- name: Install dependencies
25+
run: npm ci --allow-git=root
2926

27+
- name: Validate Markdown
28+
run: npm run validate-markdown

.linkspector.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@ ignorePatterns:
1414
- pattern: 'slack.com' # Slack invite links 403 with linkspector
1515
- pattern: 'clientdomain.com'
1616
- pattern: 'example.org'
17-
- pattern: 'https://www.w3.org/TR/xml-names11/'
17+
- pattern: 'w3.org' # W3 returns 403 for automated requests
1818
- pattern: 'https://www.npmjs.com/package/markdownlint'
1919
- pattern: 'https://www.merriam-webster.com/dictionary/'

CONTRIBUTING.md

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,23 @@ When you engage with this project, please:
2525
We actively close interactions that don't meet these expectations, so please don't be offended as we protect the time and energy of our volunteers.
2626
If you do think that something was closed in error, you are welcome to reach out to us to follow up.
2727

28+
## Shared infrastructure
29+
30+
This repository uses the shared OpenAPI Initiative infrastructure package
31+
[`@oai/build-infra`](https://github.com/OAI/build-infra) for Markdown
32+
validation, HTML builds, schema publication, schema tests, and release helper
33+
commands. The npm scripts in this repository are intentionally thin wrappers
34+
around that package.
35+
36+
The shared infrastructure docs explain how the tooling works and how to maintain
37+
it:
38+
39+
- [build-infra README](https://github.com/OAI/build-infra/blob/main/README.md)
40+
- [build-infra CONTRIBUTING](https://github.com/OAI/build-infra/blob/main/CONTRIBUTING.md)
41+
42+
Most contributors only need the commands shown below. Maintainers changing the
43+
tooling itself should read the build-infra docs first.
44+
2845

2946
### Active branches
3047

@@ -228,7 +245,7 @@ The steps for creating a `vX.Y.Z-rel` branch are:
228245
- adjust and repeat until done
229246
- merge changes to `src/oas.md` back into `vX.Y-dev` via PR
230247
4. Create `vX.Y.Z-rel` from `vX.Y-dev` and adjust it
231-
- the bash script `scripts/adjust-release-branch.sh` does this:
248+
- `npm run adjust-release-branch` does this:
232249
- 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
233250
- copy file `EDITORS.md` to `versions/X.Y.Z-editors.md`
234251
- delete folder `src`
@@ -240,11 +257,16 @@ The steps for creating a `vX.Y.Z-rel` branch are:
240257

241258
The HTML renderings of the specification versions are generated from the `versions` directory on `main` by manually triggering the [`respec` workflow](https://github.com/OAI/OpenAPI-Specification/blob/main/.github/workflows/respec.yaml), which generates a pull request for publishing the HTML renderings to the [spec site](https://spec.openapis.org).
242259

260+
The release commands are implemented in
261+
[`OAI/build-infra`](https://github.com/OAI/build-infra). If a command behaves
262+
unexpectedly, check this repository's `spec.config.json` first, then see the
263+
[build-infra release documentation](https://github.com/OAI/build-infra/blob/main/README.md#release-process-summary).
264+
243265
#### Start Next Patch Version
244266

245267
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:
246268

247-
1. Run bash script `scripts/start-release.sh` in branch `vX.Y-dev` to
269+
1. Run `npm run start-release` in branch `vX.Y-dev` to
248270
- create branch `vX.Y-dev-start-X.Y.(Z+1)`
249271
- initialize `src/oas.md` with empty history and content from `versions/X.Y.Z.md`
250272
- 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`
@@ -258,7 +280,7 @@ Alternatively, if no patch version X.Y.(Z+1) is planned, delete file `src/oas.md
258280
A new minor version X.(Y+1).0 or major version (X+1).0.0 is started similarly:
259281

260282
1. Create branch `vX'.Y'-dev` from `vX.Y-dev`
261-
2. Run bash script `scripts/start-release.sh` in the new branch to
283+
2. Run `npm run start-release` in the new branch to
262284
- create branch `vX'.Y'-dev-start-X'.Y'.0`
263285
- initialize `src/oas.md` with empty history and content from `versions/X.Y.Z.md`
264286
- change version heading to X'.Y'.0 and add a new line to the version history table in Appendix A of `src/oas.md`
@@ -570,4 +592,3 @@ This process makes use of the following labels:
570592
An issue is opened every week, 7 days in advance, for the Technical Developer Community (TDC), it provides the information to connect the meeting, and serves as a placeholder to build the agenda for the meeting. Anyone is welcome to attend the meeting, or to add items to the agenda as long as they plan on attending to present the item. These issues are also automatically pinned for visibility and labeled with "Housekeeping".
571593

572594
Ten (10) days after the meeting date is passed (date in the title of the issue), it gets closed and unpinned automatically.
573-

README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,13 @@ Looking to see how you can create your own OpenAPI definition, present it, or ot
3333
The current process for developing the OpenAPI Specification is described in
3434
the [Contributing Guidelines](CONTRIBUTING.md).
3535

36+
Build, test, schema publication, and release command infrastructure is shared
37+
with other OpenAPI Initiative specification repositories through
38+
[OAI/build-infra](https://github.com/OAI/build-infra). See that repository's
39+
[README](https://github.com/OAI/build-infra/blob/main/README.md) and
40+
[CONTRIBUTING guide](https://github.com/OAI/build-infra/blob/main/CONTRIBUTING.md)
41+
for details on the shared tooling.
42+
3643
Developing the next version of the OpenAPI Specification is guided by the [Technical Steering Committee (TSC)](MAINTAINERS.md). This group of committers bring their API expertise, incorporate feedback from the community, and expand the group of committers as appropriate. All development activity on the future specification will be performed as features and merged into this branch. Upon release of the future specification, this branch will be merged to `main`.
3744

3845
The TSC holds weekly web conferences to review open pull requests and discuss open issues related to the evolving OpenAPI Specification. Participation in weekly calls and scheduled working sessions is open to the community. You can view the entire OpenAPI [technical meeting calendar](https://calendar.google.com/calendar/u/0/embed?src=c_fue82vsncog6ahhjvuokjo8qsk@group.calendar.google.com) online.
@@ -51,4 +58,3 @@ Not all feedback can be accommodated, and there may be solid arguments for or ag
5158

5259
See: [License (Apache-2.0)](https://github.com/OAI/OpenAPI-Specification/blob/main/LICENSE)
5360

54-

_archive_/schemas/v3.0/schema.test.mjs

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
import { readdirSync, readFileSync } from "node:fs";
2-
import YAML from "yaml";
3-
import { validate, setMetaSchemaOutputFormat } from "@hyperjump/json-schema/openapi-3-0";
4-
import { BASIC } from "@hyperjump/json-schema/experimental";
5-
import { describe, test, expect } from "vitest";
6-
7-
import contentTypeParser from "content-type";
8-
import { addMediaTypePlugin } from "@hyperjump/browser";
9-
import { buildSchemaDocument } from "@hyperjump/json-schema/experimental";
2+
import { describe, test, expect } from "@oai/build-infra/test";
3+
import {
4+
addMediaTypePlugin,
5+
BASIC,
6+
buildSchemaDocument,
7+
contentTypeParser,
8+
setMetaSchemaOutputFormat,
9+
validate,
10+
YAML
11+
} from "@oai/build-infra/schema/openapi-3-0-test";
1012

1113
addMediaTypePlugin("application/schema+yaml", {
1214
parse: async (response) => {

0 commit comments

Comments
 (0)