Skip to content

Commit 858f3a5

Browse files
committed
Add more context and some corrections to the style guide
1 parent 64600ce commit 858f3a5

File tree

1 file changed

+16
-8
lines changed

1 file changed

+16
-8
lines changed

CONTRIBUTING.md

+16-8
Original file line numberDiff line numberDiff line change
@@ -129,20 +129,28 @@ Contributions to this repository should follow the style guide as described in t
129129
### Markdown
130130

131131
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.
132+
as configured by the `.markdownlint.yaml` file in the root of the project.
133+
The `markdownlint` tool can also fix formatting, which can save time with tables in particular.
133134

134135
The following additional rules should be followed but currently are not enforced by tooling:
135136

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
137+
1. The first mention of a normative reference or an OAS-defined Object in a (sub)*section is a link, additional mentions are not.
138+
2. OAS-defined Objects such as Schema Objects are written in this style, and are not monospaced.
139+
3. Use "example" instead of "sample" - this spec is not about statistics.
140+
4. Use "OpenAPI Object" instead of "root".
141+
5. Fixed fields are monospaced.
142+
6. Field values are monospaced in JSON notation: `true`, `false`, `null`, `"header"` (with double-quotes around string values).
143+
7. A combination of fixed field name with example value uses JS notation: `in: "header"`, combining rules 5 and 6.
143144
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.
144145
9. Use Oxford commas, avoid Shatner commas.
145146
10. Use `<span id="thing"></span>` for link anchors. The `<a name="thing"></a>` format has been deprecated.
147+
11. Headings use [title case](https://en.wikipedia.org/wiki/Title_case) and are followed by a blank line.
148+
149+
Plus some suggestions, rather than rules:
150+
151+
* Use one sentence per line in paragraphs and bullet points, to make diffs and edits easier to compare and understand.
152+
A blank line is needed to cause a paragraph break in Markdown.
153+
* In examples, use realistic values rather than foo/bar.
146154

147155
### Use of "keyword", "field", "property", and "attribute"
148156

0 commit comments

Comments
 (0)