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: CONTRIBUTING.md
+74-17Lines changed: 74 additions & 17 deletions
Original file line number
Diff line number
Diff line change
@@ -195,6 +195,25 @@ Reviews requesting changes should have their changes addressed regardless of how
195
195
The specification versions are published to the [spec site](https://spec.openapis.org) by creating an `vX.Y.Z-rel` branch where `src/oas.md` is renamed to the appropriate `versions/X.Y.Z.md` file and then merged to `main`.
196
196
This renaming on the `vX.Y.Z-rel` branch preserves the commit history for the published file on `main` when using `git log --follow` (as is the case for all older published files).
197
197
198
+
The steps for creating a `vX.Y.Z-rel` branch are:
199
+
200
+
1. Update `EDITORS.md` on `main`
201
+
2. Merge `main` into `dev` and `dev` into `vX.Y-dev` via PRs
202
+
- Sync PRs are automatically created by workflows `sync-main-to-dev` and `sync-dev-to-vX.Y-dev`
203
+
3. Prepare spec files in `vX.Y-dev`
204
+
-`npm run format-markdown`
205
+
-`npm run build-src`
206
+
- open `deploy-preview/oas.html` in browser and verify correct formatting
207
+
- adjust and repeat until done
208
+
- merge changes to `src/oas.md` back into `vX.Y-dev` via PR
209
+
4. Create `vX.Y.Z-rel` from `vX.Y-dev` and adjust it
210
+
- move `src/oas.md` to `versions/X.Y.Z.md`
211
+
- copy `EDITORS.md` to `versions/X.Y.Z-editors.md`
212
+
- delete `src/schemas`
213
+
- delete `tests/schema`
214
+
5. Merge `vX.Y.Z-rel` into `main` via PR
215
+
- this PR should only add files `versions/X.Y.Z.md` and `versions/X.Y.Z-editors.md`
216
+
198
217
The HTML renderings of the specification versions are automatically generated from the `versions` directory on `main` by 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).
199
218
200
219
### Schema Iterations
@@ -317,7 +336,7 @@ For information on the branch and release strategy for OAS 3.0.4 and 3.1.1 and e
317
336
### Branch roles
318
337
319
338
*`main` is used to publish finished work and hold the authoritative versions of general documentation such as this document, which can be merged out to other branches as needed. The `src` tree is ***not*** present on `main`.
320
-
*`dev` is the primary branch for working with the `src` tree, which is kept up-to-date with the most recent release on the most recent minor (X.Y) release line, and serves as the base for each new minor release line. Development infrastructure that is not needed on `main` is maintained here, and can be merged out to other non-`main` branches as needed.
339
+
*`dev` is the primary branch for working with the `src` tree. Development infrastructure that is not needed on `main` is maintained here, and can be merged out to other non-`main` branches as needed.
321
340
Changes on `main` are automatically included in a pull request to `dev` (see the (section on [branch sync](#branch-sync-automation)).
322
341
*`vX.Y-dev` is the minor release line development branch for X.Y, including both the initial X.Y.0 minor version and all subsequent X.Y.Z patch versions. All PRs are made to oldest active `vX.Y-dev` branch to which the change is relevant, and then merged forward as shown in the diagram further down in this document.
323
342
*`vX.Y.Z-rel` is the release branch for an X.Y.Z release (including when Z == 0). It exists primarily for `git mv`-ing `src/oas.md` to the appropriate `versions/X.Y.Z.md` location before merging back to `main`, and can also be used for any emergency post-release fixes that come up, such as when a 3rd party changes URLs in a way that breaks published links.
@@ -329,17 +348,15 @@ Upon release:
329
348
* Pre-release steps:
330
349
* The most recent _published_ patch release from the previous line is merged up to `vX.Y-dev`, if relevant
331
350
* If doing simultaneous releases on multiple lines, do them from the oldest to newest line
332
-
* If the release is the most recent on the current line, merge `vX.Y-dev` to `dev`
333
351
* For example, if releasing 3.1.3 and 3.2.0:
334
-
* release 3.1.3 first, including merging `v3.1-dev` to `dev` as 3.1 is current at that moment
335
-
* release 3.2.0 second, also merging `v3.2-dev` to `dev` as 3.2 becomes current at that point
336
-
* any subsequent 3.1.4 would **_not_** trigger a merge of `v3.1-dev` to `dev`, as 3.1 would no longer be current
352
+
* release 3.1.3 first
353
+
* release 3.2.0 second
337
354
* Release branching and merging:
338
355
* branch `vX.Y.Z-rel` from `vX.Y-dev` (same commit that was merged to `dev` if relevant)
339
-
* After renaming `src/oas.md` to `versions/X.Y.Z.md`, merge `vX.Y.Z-rel` to `main`
356
+
* After renaming `src/oas.md` to `versions/X.Y.Z.md` and [other adjustments](#specification-versions), merge `vX.Y.Z-rel` to `main`
340
357
* Publishing to the [spec site](https://spec.openapis.org) is triggered by the merge to `main`
341
358
* Post-release steps:
342
-
* If this was a major or minor release (Z == 0), branch `vX.Y+1-dev` from `dev`, from the commit where `vX.Y-dev` was merged to `dev`
359
+
* If this was a major or minor release (Z == 0), branch `vX.Y+1-dev` from `vX.Y-dev`
343
360
344
361
_Release lines are grouped by color, although the colors of `dev` and `main` are not significant as these diagrams are limited to only 8 colors._
345
362
@@ -380,31 +397,50 @@ gitGraph TB:
380
397
checkout v3.1-dev
381
398
branch v3.1.2-rel order:3
382
399
commit id:"rename src/oas.md to versions/3.1.2.md"
383
-
checkout dev
384
-
merge v3.1-dev id:"update dev with active line patch release"
400
+
385
401
checkout main
386
402
merge v3.1.2-rel tag:"3.1.2"
403
+
checkout dev
404
+
merge main id:"auto-sync from main"
405
+
checkout v3.1-dev
406
+
merge dev id:"auto-sync from dev"
387
407
checkout v3.2-dev
408
+
merge dev id:"auto-sync from dev "
409
+
388
410
commit id:"more 3.2.0 work"
389
411
checkout v3.1-dev
390
412
commit id:"update version in src/oas.md to 3.1.3"
391
413
commit id:"another 3.1.x fix"
392
414
checkout v3.2-dev
393
415
commit id:"still more 3.2.0 work"
394
416
merge v3.1-dev id:"merge 3.1.3 fixes before releasing"
395
-
checkout dev
396
-
merge v3.1-dev id:"update dev with last pre-minor release patch release"
397
-
merge v3.2-dev id:"update dev with minor release"
417
+
398
418
checkout v3.1-dev
399
419
branch v3.1.3-rel order:4
400
420
commit id:"rename src/oas.md to versions/3.1.3.md"
401
421
checkout v3.2-dev
402
422
branch v3.2.0-rel order:7
403
423
commit id:"rename src/oas.md to versions/3.2.0.md"
424
+
404
425
checkout main
405
426
merge v3.1.3-rel tag:"3.1.3"
427
+
checkout dev
428
+
merge main id:" auto-sync from main"
429
+
checkout v3.1-dev
430
+
merge dev id:" auto-sync from dev"
431
+
checkout v3.2-dev
432
+
merge dev id:" auto-sync from dev "
433
+
434
+
checkout main
406
435
merge v3.2.0-rel tag:"3.2.0"
407
436
checkout dev
437
+
merge main id:" auto-sync from main"
438
+
checkout v3.1-dev
439
+
merge dev id:" auto-sync from dev"
440
+
checkout v3.2-dev
441
+
merge dev id:" auto-sync from dev "
442
+
443
+
checkout v3.2-dev
408
444
branch v3.3-dev order:9
409
445
checkout v3.1-dev
410
446
commit id:"update version in src/oas.md to 3.1.4"
@@ -420,17 +456,36 @@ gitGraph TB:
420
456
merge v3.1-dev id:"merge 3.1.4 fixes before releasing"
421
457
checkout v3.3-dev
422
458
merge v3.2-dev id:"merge 3.1.4 / 3.2.1 fixes"
423
-
checkout dev
424
-
merge v3.2-dev id:"merge patch from active release line"
459
+
425
460
checkout v3.1-dev
426
461
branch v3.1.4-rel order:5
427
462
commit id:"rename src/oas.md to versions/3.1.4.md"
428
463
checkout v3.2-dev
429
464
branch v3.2.1-rel order:8
430
465
commit id:"rename src/oas.md to versions/3.2.1.md"
466
+
431
467
checkout main
432
468
merge v3.1.4-rel tag:"3.1.4"
469
+
checkout dev
470
+
merge main id:" auto-sync from main"
471
+
checkout v3.1-dev
472
+
merge dev id:" auto-sync from dev"
473
+
checkout v3.2-dev
474
+
merge dev id:" auto-sync from dev "
475
+
checkout v3.3-dev
476
+
merge dev id:" auto-sync from dev "
477
+
478
+
checkout main
433
479
merge v3.2.1-rel tag:"3.2.1"
480
+
checkout dev
481
+
merge main id:" auto-sync from main"
482
+
checkout v3.1-dev
483
+
merge dev id:" auto-sync from dev"
484
+
checkout v3.2-dev
485
+
merge dev id:" auto-sync from dev "
486
+
checkout v3.3-dev
487
+
merge dev id:" auto-sync from dev "
488
+
434
489
checkout v3.2-dev
435
490
commit id:"update version in src/oas.md to 3.2.2"
436
491
checkout v3.3-dev
@@ -442,9 +497,11 @@ gitGraph TB:
442
497
To keep changes in sync, we have some GitHub actions that open pull requests to take changes from `main` onto the `dev` branch, and from `dev` to each active version branch.
443
498
444
499
-`sync-main-to-dev` opens a pull request with all the changes from the `main` branch that aren't yet included on `dev`.
445
-
This needs a single approval from either maintainers or TSC and can be merged.
446
-
The aim is to bring build script and repository documentation changes to the other branches.
447
-
Published versions of the specifications and schemas will also move across branches with this approach.
500
+
-`sync-dev-to-vX.Y-dev` opens pull requests with all the changes from `dev` that aren't yet included on the corresponding `vX.Y-dev` branch.
501
+
502
+
These need a single approval from either maintainers or TSC and can be merged.
503
+
The aim is to bring build script and repository documentation changes to the other branches.
504
+
Published versions of the specifications and schemas will also move across branches with this approach.
Copy file name to clipboardExpand all lines: README.md
-2Lines changed: 0 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -19,8 +19,6 @@ This GitHub project is the starting point for OpenAPI. Here you will find the in
19
19
20
20
This repository contains [the Markdown sources](versions) for [all published OpenAPI Specification versions](https://spec.openapis.org/). For release notes and release candidate versions, refer to the [releases page](releases).
21
21
22
-
Each folder in this repository, such as [schemas](schemas) and [tests](tests), should contain folders pertaining to the current and previous versions of the specification.
23
-
24
22
## See It in Action
25
23
26
24
If you just want to see it work, check out the [list of current examples](https://learn.openapis.org/examples/).
> JSON Schema files for validating OpenAPI descriptions using current OpenAPI versions are available on https://spec.openapis.org/#openapi-specification-schemas.
5
+
>
6
+
> These schema files are maintained in the `src/schemas` folder of the corresponding `vX.Y-dev` branch in this repository.
7
+
8
+
> [!CAUTION]
9
+
> Schema files in this folder are not maintained any more and are not intended for productive use.
The work on the JSON Schema for the Swagger Specification was donated to the community by [Francis Galiegue](https://github.com/fge)!
4
+
5
+
Keep in mind that due to some JSON Schema limitations, not all constraints can be described. The missing constraints will be listed here in the future.
0 commit comments