Skip to content

Commit 7b7d80a

Browse files
authored
Merge pull request #4515 from lornajane/better-markdown-lint
Improve Markdown linting and use it on more files
2 parents 4709f40 + 856521d commit 7b7d80a

15 files changed

+789
-1007
lines changed

.github/workflows/validate-markdown.yaml

+7-8
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,15 @@ name: validate-markdown
44
# Issue: https://github.com/OAI/OpenAPI-Specification/issues/2130
55

66
#
7-
# This workflow validates files in the versions directory matching 3.*.md
8-
# Versions before 3.0 are not validated, as they contain linking errors
9-
# where it is not currently planned to go back and fix them
7+
# This workflow validates markdown files in the project root.
8+
# It also validates the work-in-progress specification file src/oas.md with slightly different rules.
109
#
1110

1211
# run this on push to any branch and creation of pull-requests
1312
on: [push, pull_request]
1413

1514
jobs:
16-
mdv:
15+
lint:
1716

1817
runs-on: ubuntu-latest
1918

@@ -27,8 +26,8 @@ jobs:
2726
with:
2827
node-version: '20.x'
2928

30-
- name: Validate markdown
31-
run: npx --yes mdv versions/3.*.md src/oas.md
29+
- name: Lint work-in-progress spec
30+
run: npx --yes markdownlint-cli2 --config spec.markdownlint.yaml src/oas.md
3231

33-
- name: Lint markdown 3.0.4, 3.1.1, and later
34-
run: npx --yes markdownlint-cli --config .markdownlint.yaml versions/3.0.4.md versions/3.1.[^0].md versions/3.[2-9].*.md src/oas.md
32+
- name: Lint other files
33+
run: npx --yes markdownlint-cli2 *.md

.markdownlint.yaml

+24-7
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,33 @@
1-
# Unordered list symbol
2-
MD004:
3-
style: asterisk
1+
# First heading is a top-level heading
2+
MD002: true
43

5-
# Unordered list indentation
4+
# Heading style (ATX is leading # symbols)
5+
MD003:
6+
style: atx
7+
8+
# Unordered list symbol can be anything
9+
MD004: false
10+
11+
# Unordered list indentation size
612
MD007:
713
indent: 2
814

9-
MD012: false # allow blank lines
15+
# Allow additional blank lines
16+
MD012: false
1017

18+
# Maximum line length
1119
MD013:
1220
line_length: 800
1321
tables: false
1422

15-
MD024: false # duplicate headings
16-
MD033: false # inline HTML
23+
# Headings need blank lines before and after
24+
MD022: true
25+
26+
# Duplicate headings are allowed
27+
MD024: false
28+
29+
# Surround lists with blank lines
30+
MD032: true
31+
32+
# Allow inline HTML
33+
MD033: false

CONTRIBUTING.md

+18-18
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,9 @@ Most ideas start as discussions.
4545

4646
Please do come and start a discussion to:
4747

48-
- ask questions
49-
- make suggestions
50-
- give feedback
48+
- ask questions
49+
- make suggestions
50+
- give feedback
5151

5252
Anyone can start a discussion and you're very welcome to do so! Write a message and pick a relevant discussion category.
5353

@@ -57,11 +57,11 @@ Participation in discussions and especially answering of questions is encouraged
5757

5858
Discussions are closed when:
5959

60-
- the question has been answered.
61-
- no further action or conversation would be useful.
62-
- there has been no engagement for a while, or a previously popular thread has been inactive for an extended period.
63-
- activity is now taking place elsewhere, such as in an issue.
64-
- the discussion is out of scope for the project.
60+
- the question has been answered.
61+
- no further action or conversation would be useful.
62+
- there has been no engagement for a while, or a previously popular thread has been inactive for an extended period.
63+
- activity is now taking place elsewhere, such as in an issue.
64+
- the discussion is out of scope for the project.
6565

6666
## Issues
6767

@@ -212,7 +212,7 @@ The steps for creating a `vX.Y.Z-rel` branch are:
212212
4. Create `vX.Y.Z-rel` from `vX.Y-dev` and adjust it
213213
- move `src/oas.md` to `versions/X.Y.Z.md`
214214
- copy `EDITORS.md` to `versions/X.Y.Z-editors.md`
215-
- delete `src/schemas`
215+
- delete `src/schemas`
216216
- delete `tests/schema`
217217
- bash script `scripts/adjust-release-branch.sh` performs these steps
218218
5. Merge `vX.Y.Z-rel` into `main` via PR
@@ -339,7 +339,7 @@ For information on the branch and release strategy for OAS 3.0.4 and 3.1.1 and e
339339

340340
### Branch roles
341341

342-
* `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`.
342+
* `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`.
343343
* `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.
344344
Changes on `main` are automatically included in a pull request to `dev` (see the (section on [branch sync](#branch-sync-automation)).
345345
* `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.
@@ -350,17 +350,17 @@ For information on the branch and release strategy for OAS 3.0.4 and 3.1.1 and e
350350
Upon release:
351351

352352
* Pre-release steps:
353-
* The most recent _published_ patch release from the previous line is merged up to `vX.Y-dev`, if relevant
354-
* If doing simultaneous releases on multiple lines, do them from the oldest to newest line
355-
* For example, if releasing 3.1.3 and 3.2.0:
356-
* release 3.1.3 first
357-
* release 3.2.0 second
353+
* The most recent _published_ patch release from the previous line is merged up to `vX.Y-dev`, if relevant
354+
* If doing simultaneous releases on multiple lines, do them from the oldest to newest line
355+
* For example, if releasing 3.1.3 and 3.2.0:
356+
* release 3.1.3 first
357+
* release 3.2.0 second
358358
* Release branching and merging:
359-
* branch `vX.Y.Z-rel` from `vX.Y-dev` (same commit that was merged to `dev` if relevant)
360-
* After renaming `src/oas.md` to `versions/X.Y.Z.md` and [other adjustments](#specification-versions), merge `vX.Y.Z-rel` to `main`
359+
* branch `vX.Y.Z-rel` from `vX.Y-dev` (same commit that was merged to `dev` if relevant)
360+
* After renaming `src/oas.md` to `versions/X.Y.Z.md` and [other adjustments](#specification-versions), merge `vX.Y.Z-rel` to `main`
361361
* Publishing to the [spec site](https://spec.openapis.org) is triggered by the merge to `main`
362362
* Post-release steps:
363-
* If this was a major or minor release (Z == 0), branch `vX.Y+1-dev` from `vX.Y-dev`
363+
* If this was a major or minor release (Z == 0), branch `vX.Y+1-dev` from `vX.Y-dev`
364364

365365
_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._
366366

EDITORS.md

+2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# OpenAPI Specification Editors
22

33
## Active
4+
45
* Darrel Miller [@darrelmiller](https://github.com/darrelmiller)
56
* Henry Andrews [@handrews](https://github.com/handrews)
67
* Jeremy Whitlock [@whitlockjc](https://github.com/whitlockjc)
@@ -12,6 +13,7 @@
1213
* Ron Ratovsky [@webron](https://github.com/webron)
1314

1415
## Emeritus
16+
1517
* Mike Ralphson [@MikeRalphson](https://github.com/MikeRalphson)
1618
* Uri Sarid [@usarid](https://github.com/usarid)
1719
* Jason Harmon [@jharmn](https://github.com/jharmn)

GOVERNANCE.md

+12-7
Original file line numberDiff line numberDiff line change
@@ -2,31 +2,36 @@
22

33
The OpenAPI Specification is a project of the OpenAPI Initiative (OAI), under the auspices of the Linux Foundation. For governance of the OAI, review the [OAI's charter](https://www.openapis.org/participate/how-to-contribute/governance).
44

5-
# Processes and procedures of the Technical Steering Committee (TSC)
5+
## Processes and procedures of the Technical Steering Committee (TSC)
66

77
The TSC is a self-organizing sub-group of the OAI. Herein are its principles and guidelines.
88

9-
## 1. The establishment of roles and the responsibilities for each role
9+
### 1. The establishment of roles and the responsibilities for each role
1010

1111
Roles:
1212

1313
* [Liaison](https://www.merriam-webster.com/dictionary/liaison) — Elected by TSC members in a plurality vote (oral count). Liaison represents the TSC to the OAI's Business Governing Board (BGB) at board meetings (though this itself does not confer voting rights) and is the public facing mouthpiece of the TSC.
1414

15-
* [Maintainer](https://www.merriam-webster.com/dictionary/maintainer) — all and only members of the TSC are maintainers, and are responsible for approving proposed changes to the specification. If membership drops below 3, work is suspended until the BGB can re-establish the minimum. To maintain agility, the TSC should be capped at a maximum 9 members, though that number can be reconsidered by the TSC in the future. Past members will be noted as emeritus status once they are no longer members.
15+
* [Maintainer](https://www.merriam-webster.com/dictionary/maintainer) — all and only members of the TSC are maintainers, and are responsible for approving proposed changes to the specification. If membership drops below 3, work is suspended until the BGB can re-establish the minimum. To maintain agility, the TSC should be capped at a maximum 9 members, though that number can be reconsidered by the TSC in the future. Past members will be noted as emeritus status once they are no longer members.
1616

1717
* [Community Manager](https://en.wikipedia.org/wiki/Online_community_manager) — responsible for onboarding of new contributors, dealing with antisocial behaviour before it becomes a code of conduct violation, and managing the issue triage team.
1818

1919
* [Rick](https://www.youtube.com/watch?v=dQw4w9WgXcQ) — Responsible for not giving up or letting down. Requires plurality vote of TSC members.
2020

21-
## 2. Adding members to the TSC
21+
### 2. Adding members to the TSC
2222

23-
A call-for-nominations period may be agreed upon by the TSC voting members and announced in a timely manner on a weekly TDC call (and documented on the agenda issue), assuming the TSC membership is not already at its maximum. A candidate may be nominated through a motion by a voting TSC member in a closed TSC meeting. A nominee must not receive opposition votes of more than 25% of the TSC voting membership via a confidential vote held electronically within a week following the nomination meeting. Approved nominees become provisional members and are expected to comport themselves as full members of the TSC during the provisional period of 6 months. The provisional period is concluded by a second, confidential vote similar to the nomination period's vote, after which newly confirmed members gain their voting rights. At most there are four voting periods per year (no more than one every three months), with a minimum of one per year.
23+
A call-for-nominations period may be agreed upon by the TSC voting members and announced in a timely manner on a weekly TDC call (and documented on the agenda issue), assuming the TSC membership is not already at its maximum.
24+
A candidate may be nominated through a motion by a voting TSC member in a closed TSC meeting.
25+
A nominee must not receive opposition votes of more than 25% of the TSC voting membership via a confidential vote held electronically within a week following the nomination meeting.
26+
Approved nominees become provisional members and are expected to comport themselves as full members of the TSC during the provisional period of 6 months.
27+
The provisional period is concluded by a second, confidential vote similar to the nomination period's vote, after which newly confirmed members gain their voting rights.
28+
At most there are four voting periods per year (no more than one every three months), with a minimum of one per year.
2429

25-
## 3. Removal of membership from the TSC
30+
### 3. Removal of membership from the TSC
2631

2732
Occasionally it may be necessary to remove a TSC member, such as behavior that violates the code of conduct or prolonged absenteeism. A 66% vote (confidential, electronic) of the other TSC members is required to remove a member. Otherwise, TSC members are removed when they renounce their position by informing the TSC of their effective resignation date via email.
2833

29-
## 4. Criteria for decisions
34+
### 4. Criteria for decisions
3035

3136
The group will strive to achieve all decisions via unopposed consensus. When not possible, unresolved conflicts will be raised to the OAI's Technical Oversight Board (TOB).
3237

IMPLEMENTATIONS.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
### Implementations
1+
# Implementations
22

33
The list of implementations formerly in this file is no-longer maintained here.
44

5-
You may find a more comprehensive list at https://tools.openapis.org
5+
You may find a more comprehensive list at <https://tools.openapis.org>
66

7-
Instructions on listing your projects are contained in https://github.com/OAI/Tooling#how-can-you-help
7+
Instructions on listing your projects are contained in <https://github.com/OAI/Tooling#how-can-you-help>
88

99
These tools are not endorsed by the OAI.

MAINTAINERS.md

+2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# OpenAPI Initiative Technical Steering Committee Members
22

33
## Active
4+
45
* Darrel Miller [@darrelmiller](https://github.com/darrelmiller)
56
* Jeremy Whitlock [@whitlockjc](https://github.com/whitlockjc)
67
* Marsh Gardiner [@earth2marsh](https://github.com/earth2marsh)
@@ -11,6 +12,7 @@
1112
* Ralf Handl [@ralfhandl](https://github.com/ralfhandl)
1213

1314
## Emeritus
15+
1416
* Mike Ralphson [@MikeRalphson](https://github.com/MikeRalphson)
1517
* Uri Sarid [@usarid](https://github.com/usarid)
1618
* Jason Harmon [@jharmn](https://github.com/jharmn)

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
![Build Status](https://github.com/OAI/OpenAPI-Specification/workflows/validate-markdown/badge.svg) [![Issue triagers](https://www.codetriage.com/oai/openapi-specification/badges/users.svg)](https://www.codetriage.com/oai/openapi-specification)
44

5-
![](https://avatars3.githubusercontent.com/u/16343502?v=3&s=200)
5+
![OpenAPI logo](https://avatars3.githubusercontent.com/u/16343502?v=3&s=200)
66

77

88
The OpenAPI Specification is a community-driven open specification within the [OpenAPI Initiative](https://www.openapis.org/), a Linux Foundation Collaborative Project.
@@ -30,7 +30,7 @@ Looking to see how you can create your own OpenAPI definition, present it, or ot
3030

3131
## Participation
3232

33-
The current process for developing the OpenAPI Specification is described in
33+
The current process for developing the OpenAPI Specification is described in
3434
the [Contributing Guidelines](CONTRIBUTING.md).
3535

3636
Developing the next version of the OpenAPI Specification is guided by the [Technical Steering Committee (TSC)](https://www.openapis.org/participate/how-to-contribute/governance#TDC). 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`.

SECURITY_CONSIDERATIONS.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
## OpenAPI Document Formats
44

55
OpenAPI documents use JSON, YAML, and JSON Schema, and therefore share their security considerations:
6+
67
- [JSON](https://www.iana.org/assignments/media-types/application/json)
78
- [YAML](https://www.iana.org/assignments/media-types/application/yaml)
89
- [JSON Schema Core](https://json-schema.org/draft/2020-12/json-schema-core#section-13)
@@ -22,4 +23,4 @@ OpenAPI documents may contain references to external resources that may be deref
2223

2324
## Markdown and HTML Sanitization
2425

25-
Certain properties allow the use of Markdown which can contain HTML including script. It is the responsibility of tooling to appropriately sanitize the Markdown.
26+
Certain properties allow the use of Markdown which can contain HTML including script. It is the responsibility of tooling to appropriately sanitize the Markdown.

TOB.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
11
# Technical Oversight Board ("TOB")
22

3-
## Description:
3+
## Description
4+
45
> The TOB is responsible for managing conflicts, violations of procedures or guidelines or other issues that cannot be resolved in the TSC for the OAS. For further details please consult the OpenAPI Project Charter.
56
67
## TSC Elected - terms through May 2023
8+
79
Isabelle Mauny @isamauny
810

911
Uri Sarid @usarid
1012

11-
Marsh Gardiner @earth2marsh
13+
Marsh Gardiner @earth2marsh
1214

1315
Ron Ratovsky @webron
1416

0 commit comments

Comments
 (0)