Skip to content

Commit 5dca9eb

Browse files
authored
Merge branch 'main' into formal-minor-patch-criteria
2 parents dd82d55 + f3161e5 commit 5dca9eb

File tree

6 files changed

+113
-62
lines changed

6 files changed

+113
-62
lines changed

.github/workflows/respec.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ jobs:
4949
delete-branch: true
5050
path: deploy
5151
labels: Housekeeping
52-
reviewers: webron,darrelmiller
52+
reviewers: darrelmiller,webron,earth2marsh,webron,lornajane,mikekistler,miqui,ralfhandl,handrews,karenetheridge
5353
title: Update ReSpec-rendered specification versions
5454
commit-message: Update ReSpec-rendered specification versions
5555
signoff: true

.github/workflows/schema-publish.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ jobs:
4949
path: deploy
5050
labels: Housekeeping,Schema
5151
reviewers: darrelmiller,webron,earth2marsh,webron,lornajane,mikekistler,miqui,ralfhandl,handrews,karenetheridge
52-
title: Publish OpenAPI Metaschema Iterations
53-
commit-message: New OpenAPI metaschema iterations
52+
title: Publish OpenAPI Schema Iterations
53+
commit-message: New OpenAPI schema iterations
5454
signoff: true
5555
body: |
5656
This pull request is automatically triggered by GitHub action `schema-publish`.

CONTRIBUTING.md

+105-42
Original file line numberDiff line numberDiff line change
@@ -14,66 +14,100 @@ If in doubt about a policy, please [ask on our Slack](https://communityinviter.c
1414

1515
No changes, ***no matter how trivial***, are ever made to the contents of published specifications. The only potential changes to those documents are updates to link URLs _if and only if_ the targeted document is moved by a 3rd party. Other changes to link URLs are not allowed.
1616

17-
### Changing the schemas
18-
19-
Schemas are only changed _after_ the specification is changed.
20-
Changes are made to the YAML versions on the `main` branch.
21-
The JSON versions are generated when published to the [spec site](https://spec.openapis.org/), at which time the `WORK-IN-PROGRESS` URI placeholders are replaced with the publication date.
22-
2317
### Authoritative source of truth
2418

2519
The [spec site](https://spec.openapis.org) is the source of truth.
2620

2721
This changed in 2024, as the markdown files on `main` do not include certain credits and citations.
2822

29-
## Development and publication process
23+
## Development process
3024

31-
As of October 2024 (post-OAS 3.0.4 and 3.1.1), the OAS is developed in the `src/oas.md` file on minor release `X.Y-dev` branches that are derived from the baseline `dev` branch.
25+
As of October 2024 (post-OAS 3.0.4 and 3.1.1), the OAS is developed in the `src/oas.md` file on minor release `vX.Y-dev` branches that are derived from the baseline `dev` branch.
3226

33-
All work **MUST be done on a fork**, using a branch from the _earliest relevant and [active](#active-branches)_ `X.Y-dev` branch, and then submitted as a PR to that `X.Y-dev` branch.
34-
For example, if a change in November 2024 apples to both 3.1 and 3.2, the PR would go to the `v3.1-dev` branch, which will be merged up to `v3.2-dev` before the next 3.2 release.
27+
Schema changes are made on the same branch, but can be released independently. When making a specification change for a new minor or major release that has a schema impact, including the schema change in the PR is preferred. Patch releases cannot contain changes that _require_ a schema update.
3528

36-
Releases are published to the [spec site](https://spec.openapis.org) by creating an `X.Y.Z-rel` branch where `src/oas.md` is renamed to the appropriate `versions/X.Y.Z.md` file and them merged to `main`. The HTML versions of the OAS are automatically generated from the `versions` directory on `main`. This renaming on the `X.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).
29+
### Branch roles
3730

38-
For information on the branch and release strategy for OAS 3.0.4 and 3.1.1 and earlier, see the comments in [issue #3677](https://github.com/OAI/OpenAPI-Specification/issues/3677).
31+
* `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`.
32+
* `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.
33+
* `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.
34+
* `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.
3935

40-
### Branch diagram (3.1.2, 3.2.0, and later)
36+
### Using forks
4137

42-
Initial steps:
38+
All work **MUST be done on a fork**, using a branch from the _earliest relevant and [active](#active-branches)_ `vX.Y-dev` branch, and then submitted as a PR to that `vX.Y-dev` branch.
39+
For example, if a change in November 2024 apples to both 3.1 and 3.2, the PR would go to the `v3.1-dev` branch, which will be merged up to `v3.2-dev` before the next 3.2 release.
4340

44-
* `dev` branches from `main` at the 3.1.1 release commit
45-
* Each `X.Y-dev` branches from `dev`
41+
## Publishing
4642

47-
Upon release:
43+
The specification and schemas 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`. The HTML versions of the OAS are automatically generated from the `versions` directory on `main`. 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).
4844

49-
* Each `X.Y.Z-rel` branches from the corresponding `X.Y-dev`
50-
* After renaming `src/oas.md`, `X.Y.Z-rel` merges to `main`
51-
* Publishing to the [spec site](https://spec.openapis.org) is triggered by the merge to `main`
45+
The publishing process for schemas is still under discussion (see issues [#3715](https://github.com/OAI/OpenAPI-Specification/issues/3715) and [#3716](https://github.com/OAI/OpenAPI-Specification/issues/3716)), with the current proposal being to release them directly from the `vX.Y-dev` branch without merging to `main`, as the schemas in source control have placeholder identifiers and are not intended to be used as-is.
46+
47+
### Historical branch strategy
5248

53-
Initiating the next minor release after releasing `X.Y.0`:
49+
For information on the branch and release strategy for OAS 3.0.4 and 3.1.1 and earlier, see the comments in [issue #3677](https://github.com/OAI/OpenAPI-Specification/issues/3677).
50+
51+
### Branching and merging (3.1.2, 3.2.0, and later)
5452

55-
* The same `X.Y-dev` commit that is the base of `X.Y.0-rel` is merged back to `dev` to keep `src/oas.md` on `dev` in sync with the last minor release
56-
* This `X.Y.0` commit on `dev` is the base of `X.Y+1-dev`
53+
Upon release:
5754

58-
Other notes:
55+
* Pre-release steps:
56+
* The most recent _published_ patch release from the previoius line is merged up to `vX.Y-dev`, if relevant
57+
* If doing simultaneous releases on multiple lines, do them from the oldest to newest line
58+
* If the release is the most recent on the current line, merge `vX.Y-dev` to `dev`
59+
* For example, if releasing 3.1.3 and 3.2.0:
60+
* release 3.1.3 first, including merging `v3.1-dev` to `dev` as 3.1 is current at that moment
61+
* release 3.2.0 second, also merging `v3.2-dev` to `dev` as 3.2 becomes current at that point
62+
* any subsequent 3.1.4 would **_not_** trigger a merge of `v3.1-dev` to `dev`, as 3.1 would no longer be current
63+
* Release branching and merging:
64+
* branch `vX.Y.Z-rel` from `vX.Y-dev` (same commit that was merged to `dev` if relevant)
65+
* After renaming `src/oas.md` to `versions/X.Y.Z.md`, merge `vX.Y.Z-rel` to `main`
66+
* Publishing to the [spec site](https://spec.openapis.org) is triggered by the merge to `main`
67+
* Post-release steps:
68+
* 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`
5969

60-
* Patch releases are _not_ merged to `dev`
70+
_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._
6171

6272
```mermaid
73+
---
74+
config:
75+
themeVariables:
76+
git0: "#5588bb"
77+
git1: "#cc8899"
78+
git2: "#eedd88"
79+
git3: "#ccbb66"
80+
git4: "#aa9944"
81+
git5: "#887722"
82+
git6: "#99ccff"
83+
git7: "#77aadd"
84+
gitBranchLabel1: "#000000"
85+
gitBranchLabel2: "#000000"
86+
gitBranchLabel3: "#000000"
87+
gitBranchLabel4: "#000000"
88+
gitBranchLabel5: "#ffffff"
89+
gitBranchLabel6: "#000000"
90+
gitBranchLabel7: "#000000"
91+
---
6392
gitGraph TB:
6493
commit id:"merge 3.1.1.md to main" tag:"3.1.1"
6594
branch dev order:1
6695
commit id:"rename 3.1.1.md to src/oas.md"
6796
branch v3.1-dev order:2
6897
commit id:"update version in src/oas.md to 3.1.2"
6998
checkout dev
70-
branch v3.2-dev order:5
99+
branch v3.2-dev order:6
71100
commit id:"update version in src/oas.md to 3.2.0"
72101
commit id:"some 3.2.0 work"
73102
checkout v3.1-dev
74103
commit id:"a 3.1.x fix"
104+
checkout v3.2-dev
105+
merge v3.1-dev id:"merge 3.1.2 fixes"
106+
checkout v3.1-dev
75107
branch v3.1.2-rel order:3
76108
commit id:"rename src/oas.md to versions/3.1.2.md"
109+
checkout dev
110+
merge v3.1-dev id:"update dev with active line patch release"
77111
checkout main
78112
merge v3.1.2-rel tag:"3.1.2"
79113
checkout v3.2-dev
@@ -83,30 +117,51 @@ gitGraph TB:
83117
commit id:"another 3.1.x fix"
84118
checkout v3.2-dev
85119
commit id:"still more 3.2.0 work"
86-
merge v3.1-dev id:"merge 3.1.x fixes before releasing"
120+
merge v3.1-dev id:"merge 3.1.3 fixes before releasing"
121+
checkout dev
122+
merge v3.1-dev id:"update dev with last pre-minor release patch release"
123+
merge v3.2-dev id:"update dev with minor release"
87124
checkout v3.1-dev
88125
branch v3.1.3-rel order:4
89126
commit id:"rename src/oas.md to versions/3.1.3.md"
90127
checkout v3.2-dev
91-
branch v3.2.0-rel order:6
128+
branch v3.2.0-rel order:7
92129
commit id:"rename src/oas.md to versions/3.2.0.md"
93130
checkout main
94131
merge v3.1.3-rel tag:"3.1.3"
95132
merge v3.2.0-rel tag:"3.2.0"
96133
checkout dev
97-
merge v3.2-dev id:"update dev with minor release"
98-
branch v3.3-dev order:7
134+
branch v3.3-dev order:9
99135
checkout v3.1-dev
100136
commit id:"update version in src/oas.md to 3.1.4"
101137
checkout v3.2-dev
102138
commit id:"update version in src/oas.md to 3.2.1"
103139
checkout v3.3-dev
104140
commit id:"update version in src/oas.md to 3.3.0"
105-
```
106-
107-
### Schema development
108141
109-
Development of schemas [currently occurs on `main`](#changing-the-schemas), but the process is [being re-evaluated and is likely to change](https://github.com/OAI/OpenAPI-Specification/issues/3715).
142+
checkout v3.1-dev
143+
commit id:"a 3.1.4 fix"
144+
checkout v3.2-dev
145+
commit id:"a 3.2.1 fix"
146+
merge v3.1-dev id:"merge 3.1.4 fixes before releasing"
147+
checkout v3.3-dev
148+
merge v3.2-dev id:"merge 3.1.4 / 3.2.1 fixes"
149+
checkout dev
150+
merge v3.2-dev id:"merge patch from active release line"
151+
checkout v3.1-dev
152+
branch v3.1.4-rel order:5
153+
commit id:"rename src/oas.md to versions/3.1.4.md"
154+
checkout v3.2-dev
155+
branch v3.2.1-rel order:8
156+
commit id:"rename src/oas.md to versions/3.2.1.md"
157+
checkout main
158+
merge v3.1.4-rel tag:"3.1.4"
159+
merge v3.2.1-rel tag:"3.2.1"
160+
checkout v3.2-dev
161+
commit id:"update version in src/oas.md to 3.2.2"
162+
checkout v3.3-dev
163+
commit id:"3.3 work"
164+
```
110165

111166
#### Active branches
112167

@@ -129,20 +184,28 @@ Contributions to this repository should follow the style guide as described in t
129184
### Markdown
130185

131186
Markdown files in this project should follow the style enforced by the [markdownlint tool](https://www.npmjs.com/package/markdownlint),
132-
as configured by the `.markdownlint.json` file in the root of the project.
187+
as configured by the `.markdownlint.yaml` file in the root of the project.
188+
The `markdownlint` tool can also fix formatting, which can save time with tables in particular.
133189

134190
The following additional rules should be followed but currently are not enforced by tooling:
135191

136-
1. The first mention of a normative reference or an OAS-defined Object in a (sub)*section is a link, additional mentions are not
137-
2. OAS-defined Foo Bar Objects are written in this style, and are not monospaced
138-
3. "example" instead of "sample" - this spec is not about statistics
139-
4. Use "OpenAPI Object" instead of "root"
140-
5. Fixed fields are monospaced
141-
6. Field values are monospaced in JSON notation: `true`, `false`, `null`, `"header"` (with double-quotes around string values), ...
142-
7. A combination of fixed field name with example value uses JS notation: `in: "header"`, combining rules 5 and 6
192+
1. The first mention of a normative reference or an OAS-defined Object in a (sub)*section is a link, additional mentions are not.
193+
2. OAS-defined Objects such as Schema Objects are written in this style, and are not monospaced.
194+
3. Use "example" instead of "sample" - this spec is not about statistics.
195+
4. Use "OpenAPI Object" instead of "root".
196+
5. Fixed fields are monospaced.
197+
6. Field values are monospaced in JSON notation: `true`, `false`, `null`, `"header"` (with double-quotes around string values).
198+
7. A combination of fixed field name with example value uses JS notation: `in: "header"`, combining rules 5 and 6.
143199
8. An exception to 5-7 is colloquial use, for example "values of type `array` or `object`" - "type" is not monospaced, so the monospaced values aren't enclosed in double quotes.
144200
9. Use Oxford commas, avoid Shatner commas.
145201
10. Use `<span id="thing"></span>` for link anchors. The `<a name="thing"></a>` format has been deprecated.
202+
11. Headings use [title case](https://en.wikipedia.org/wiki/Title_case) and are followed by a blank line.
203+
204+
Plus some suggestions, rather than rules:
205+
206+
* Use one sentence per line in paragraphs and bullet points, to make diffs and edits easier to compare and understand.
207+
A blank line is needed to cause a paragraph break in Markdown.
208+
* In examples, use realistic values rather than foo/bar.
146209

147210
### Use of "keyword", "field", "property", and "attribute"
148211

CONTRIBUTORS.md

-12
This file was deleted.

package-lock.json

+4-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
"yargs": "^17.7.2"
3030
},
3131
"devDependencies": {
32-
"@hyperjump/json-schema": "^1.9.8",
32+
"@hyperjump/json-schema": "^1.9.9",
3333
"c8": "^10.1.2",
3434
"markdownlint-cli": "^0.42.0",
3535
"mdv": "^1.3.4",

0 commit comments

Comments
 (0)