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
+105-42
Original file line number
Diff line number
Diff line change
@@ -14,66 +14,100 @@ If in doubt about a policy, please [ask on our Slack](https://communityinviter.c
14
14
15
15
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.
16
16
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
-
23
17
### Authoritative source of truth
24
18
25
19
The [spec site](https://spec.openapis.org) is the source of truth.
26
20
27
21
This changed in 2024, as the markdown files on `main` do not include certain credits and citations.
28
22
29
-
## Development and publication process
23
+
## Development process
30
24
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.
32
26
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.
35
28
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
37
30
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.
39
35
40
-
### Branch diagram (3.1.2, 3.2.0, and later)
36
+
### Using forks
41
37
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.
43
40
44
-
*`dev` branches from `main` at the 3.1.1 release commit
45
-
* Each `X.Y-dev` branches from `dev`
41
+
## Publishing
46
42
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).
48
44
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
52
48
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)
54
52
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:
57
54
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`
59
69
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._
61
71
62
72
```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
+
---
63
92
gitGraph TB:
64
93
commit id:"merge 3.1.1.md to main" tag:"3.1.1"
65
94
branch dev order:1
66
95
commit id:"rename 3.1.1.md to src/oas.md"
67
96
branch v3.1-dev order:2
68
97
commit id:"update version in src/oas.md to 3.1.2"
69
98
checkout dev
70
-
branch v3.2-dev order:5
99
+
branch v3.2-dev order:6
71
100
commit id:"update version in src/oas.md to 3.2.0"
72
101
commit id:"some 3.2.0 work"
73
102
checkout v3.1-dev
74
103
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
75
107
branch v3.1.2-rel order:3
76
108
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"
77
111
checkout main
78
112
merge v3.1.2-rel tag:"3.1.2"
79
113
checkout v3.2-dev
@@ -83,30 +117,51 @@ gitGraph TB:
83
117
commit id:"another 3.1.x fix"
84
118
checkout v3.2-dev
85
119
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"
87
124
checkout v3.1-dev
88
125
branch v3.1.3-rel order:4
89
126
commit id:"rename src/oas.md to versions/3.1.3.md"
90
127
checkout v3.2-dev
91
-
branch v3.2.0-rel order:6
128
+
branch v3.2.0-rel order:7
92
129
commit id:"rename src/oas.md to versions/3.2.0.md"
93
130
checkout main
94
131
merge v3.1.3-rel tag:"3.1.3"
95
132
merge v3.2.0-rel tag:"3.2.0"
96
133
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
99
135
checkout v3.1-dev
100
136
commit id:"update version in src/oas.md to 3.1.4"
101
137
checkout v3.2-dev
102
138
commit id:"update version in src/oas.md to 3.2.1"
103
139
checkout v3.3-dev
104
140
commit id:"update version in src/oas.md to 3.3.0"
105
-
```
106
-
107
-
### Schema development
108
141
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
+
```
110
165
111
166
#### Active branches
112
167
@@ -129,20 +184,28 @@ Contributions to this repository should follow the style guide as described in t
129
184
### Markdown
130
185
131
186
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.
133
189
134
190
The following additional rules should be followed but currently are not enforced by tooling:
135
191
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.
143
199
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.
144
200
9. Use Oxford commas, avoid Shatner commas.
145
201
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.
146
209
147
210
### Use of "keyword", "field", "property", and "attribute"
0 commit comments