Skip to content

Commit 005b812

Browse files
committed
Fix spec markdown lint errors
1 parent 4605b74 commit 005b812

File tree

5 files changed

+75
-55
lines changed

5 files changed

+75
-55
lines changed

build/build.js

+2
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import remarkGfm from "remark-gfm";
1111
import remarkHeadingId from "remark-heading-id";
1212
import remarkHeadings from "./remark-headings.js";
1313
import remarkPresetLintMarkdownStyleGuide from "remark-preset-lint-markdown-style-guide";
14+
import remarkLintMaximumHeadingLength from "remark-lint-maximum-heading-length";
1415
import remarkRehype from "remark-rehype";
1516
import remarkReferenceLinks from "./remark-reference-links.js";
1617
import remarkTableOfContents from "./remark-table-of-contents.js";
@@ -25,6 +26,7 @@ const build = async (filename) => {
2526
const md = readFileSync(filename, "utf-8");
2627
const file = await remark()
2728
.use(remarkPresetLintMarkdownStyleGuide)
29+
.use(remarkLintMaximumHeadingLength, false)
2830
.use(remarkGfm)
2931
.use(remarkHeadingId)
3032
.use(remarkHeadings, {

proposals/propertyDependencies-adr.md

+27-18
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
11
# Add New Keyword: `propertyDependencies`
22

3-
* Status: proposed
4-
* Deciders: @gregsdennis, @jdesrosiers, @relequestual
5-
* Date: 2022-04-07
3+
- Status: proposed
4+
- Deciders: @gregsdennis, @jdesrosiers, @relequestual
5+
- Date: 2022-04-07
66

77
Technical Story:
88

9-
- Issue discussing feature - https://github.com/json-schema-org/json-schema-spec/issues/1082
10-
- PR to add to the spec - https://github.com/json-schema-org/json-schema-spec/pull/1143
11-
- ADR to extract from the spec and use feature life cycle - https://github.com/json-schema-org/json-schema-spec/pull/1505
9+
- Issue discussing feature - <https://github.com/json-schema-org/json-schema-spec/issues/1082>
10+
- PR to add to the spec - <https://github.com/json-schema-org/json-schema-spec/pull/1143>
11+
- ADR to extract from the spec and use feature life cycle - <https://github.com/json-schema-org/json-schema-spec/pull/1505>
12+
13+
## Table of Contents
1214

1315
## Context and Problem Statement
1416

@@ -33,7 +35,8 @@ adopt or redefine `discriminator`.
3335

3436
## Considered Options
3537

36-
All of the following options have the same validation result as the following schema.
38+
All of the following options have the same validation result as the following
39+
schema.
3740

3841
```json
3942
{
@@ -64,10 +67,10 @@ that concept to solve this problem.
6467
}
6568
```
6669

67-
* Good, because it handle the most common use case: string property values
68-
* Good, because all property values are grouped together
69-
* Good, because it's less verbose
70-
* Bad, because it doesn't handle non-string property values
70+
- Good, because it handle the most common use case: string property values
71+
- Good, because all property values are grouped together
72+
- Good, because it's less verbose
73+
- Bad, because it doesn't handle non-string property values
7174

7275
### Option 2
7376

@@ -97,7 +100,9 @@ prone.
97100
* Good, because it supports all use cases
98101
* Bad, because properties are not naturally grouped together
99102
* Bad, because it's quite verbose
100-
* Bad, because we have no precedent for a keyword which explicitly defines its own properties. This would be new operational functionality, which we try to avoid if we can.
103+
* Bad, because we have no precedent for a keyword which explicitly defines its
104+
own properties. This would be new operational functionality, which we try to
105+
avoid if we can.
101106

102107
### Option 3
103108

@@ -124,7 +129,9 @@ object. It's still too verbose.
124129
* Good, because it supports all use cases
125130
* Good, because all property values are grouped together
126131
* Bad, because it's quite verbose
127-
* Bad, because we have no precedent for a keyword which explicitly defines its own properties. This would be new operational functionality, which we try to avoid if we can.
132+
* Bad, because we have no precedent for a keyword which explicitly defines its
133+
own properties. This would be new operational functionality, which we try to
134+
avoid if we can.
128135

129136
### Option 4
130137

@@ -148,10 +155,11 @@ naming aside), but otherwise has all the same problems as the other examples.
148155
}
149156
```
150157

151-
* Good, because it supports all use cases
152-
* Bad, because properties are not naturally grouped together
153-
* Bad, because it's very verbose
154-
* Bad, because it introduces a lot of inter-keyword dependencies, which we'd have to exhaustively define
158+
- Good, because it supports all use cases
159+
- Bad, because properties are not naturally grouped together
160+
- Bad, because it's very verbose
161+
- Bad, because it introduces a lot of inter-keyword dependencies, which we'd
162+
have to exhaustively define
155163

156164
### Option 5
157165

@@ -183,7 +191,8 @@ verbose.
183191
* Good, because it's a familiar syntax
184192
* Bad, because properties are not naturally grouped together
185193
* Bad, because it's very verbose
186-
* Bad, because `ifProperties` is very niche. Will this spawn a new series of `if*` keywords? How would it interact with `if`?
194+
* Bad, because `ifProperties` is very niche. Will this spawn a new series of
195+
`if*` keywords? How would it interact with `if`?
187196

188197
### Option 6
189198

proposals/propertyDependencies.md

+15-11
Original file line numberDiff line numberDiff line change
@@ -91,23 +91,27 @@ those goals means that some trade-offs need to be made.
9191
The `propertyDependencies` keyword will be added to the `https://json-schema.org/vocab/applicator` [applicator
9292
vocabulary](../jsonschema-core.html#applicatorvocab).
9393

94-
1. The following will be added to the JSON Schema Core specification as a
94+
1. The following will be added to the JSON Schema Core specification as a
9595
subsection of "Keywords for Applying Subschemas Conditionally".
9696
> ### `propertyDependencies`
9797
>
9898
> This keyword specifies subschemas that are evaluated if the instance is an
9999
> object and contains a certain property with a certain string value.
100100
>
101-
> This keyword's value MUST be an object. Each value in the object MUST be an
102-
> object whose values MUST be valid JSON Schemas.
101+
> This keyword's value MUST be an object. Each value in the object MUST be
102+
> an object whose values MUST be valid JSON Schemas.
103103
>
104-
> If the outer object key is a property in the instance and the inner object key
105-
> is equal to the value of that property, the entire instance must validate
106-
> against the schema. Its use is dependent on the presence and value of the
107-
> property.
104+
> If the outer object key is a property in the instance and the inner object
105+
> key is equal to the value of that property, the entire instance must
106+
> validate against the schema. Its use is dependent on the presence and
107+
> value of the property.
108108
>
109109
> Omitting this keyword has the same behavior as an empty object.
110-
2. The following subschema will be added to the Applicator Vocabulary schema, `https://json-schema.org/<version>/<release>/meta/applicator` at `/properties/propertyDependencies`:
110+
111+
2. The following subschema will be added to the Applicator Vocabulary schema,
112+
`https://json-schema.org/<version>/<release>/meta/applicator` at
113+
`/properties/propertyDependencies`:
114+
111115
```json
112116
{
113117
"type": "object",
@@ -124,9 +128,9 @@ subsection of "Keywords for Applying Subschemas Conditionally".
124128

125129
## [Appendix] Change Log
126130

127-
* [March 2021] - Initially proposed
128-
* [October 2021] Added to specification document
129-
* [May 2024] Extracted from specification document as experimental feature
131+
- [March 2021] - Initially proposed
132+
- [October 2021] Added to specification document
133+
- [May 2024] Extracted from specification document as experimental feature
130134

131135
## Champions
132136

proposals/vocabularies-adr.md

+24-22
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
1-
# [short title of solved problem and solution]
1+
# Rational for the Vocabulary System proposal
22

3-
* Status: proposed
4-
* Deciders: @gregsdennis, @jdesrosiers
5-
* Date: 2024-06-10
3+
- Status: proposed
4+
- Deciders: @gregsdennis, @jdesrosiers
5+
- Date: 2024-06-10
66

77
Technical Story:
88

9-
- Issues discussing feature - https://github.com/json-schema-org/json-schema-spec/issues?q=is%3Aopen+is%3Aissue+label%3Avocabulary
10-
- ADR to extract from the spec and use feature life cycle - https://github.com/json-schema-org/json-schema-spec/pull/1510
9+
- Issues discussing feature - <https://github.com/json-schema-org/json-schema-spec/issues?q=is%3Aopen+is%3Aissue+label%3Avocabulary>
10+
- ADR to extract from the spec and use feature life cycle - <https://github.com/json-schema-org/json-schema-spec/pull/1510>
11+
12+
## Table of Contents
1113

1214
## Context and Problem Statement
1315

@@ -27,9 +29,9 @@ and a new Core keyword, `$vocabulary` to support it.
2729

2830
### Current design as included in 2019-09 and 2020-12.
2931

30-
A vocabulary is a collection of keywords and is defined by a vocabulary document.
31-
For the 2019-09 and 2020-12 vocabularies, the documents are integrated into the
32-
specifications themselves.
32+
A vocabulary is a collection of keywords and is defined by a vocabulary
33+
document. For the 2019-09 and 2020-12 vocabularies, the documents are integrated
34+
into the specifications themselves.
3335

3436
With vocabularies as the primary method for defining individual keywords,
3537
dialects can be created by combining different vocabularies.
@@ -42,37 +44,37 @@ identify each vocab, and the values indicate whether the implementation must
4244
"understand" that vocab in order to process the schema. This keyword is only
4345
processed when it is found as part of a meta-schema.
4446

45-
* Good because it provides a language-agnostic method of defining extension
47+
- Good because it provides a language-agnostic method of defining extension
4648
keywords that's built into JSON Schema itself
47-
* Bad because unknown keywords are now unsupported, which implies that
49+
- Bad because unknown keywords are now unsupported, which implies that
4850
[unknown vocabularies are implicitly unsupported](https://github.com/orgs/json-schema-org/discussions/342)
4951

5052
### [option 2]
5153

5254
[example | description | pointer to more information | …]
5355

54-
* Good, because [argument a]
55-
* Good, because [argument b]
56-
* Bad, because [argument c]
57-
* <!-- numbers of pros and cons can vary -->
56+
- Good, because [argument a]
57+
- Good, because [argument b]
58+
- Bad, because [argument c]
59+
- ... <!-- numbers of pros and cons can vary -->
5860

5961
### [option 3]
6062

6163
[example | description | pointer to more information | …]
6264

63-
* Good, because [argument a]
64-
* Good, because [argument b]
65-
* Bad, because [argument c]
66-
* <!-- numbers of pros and cons can vary -->
65+
- Good, because [argument a]
66+
- Good, because [argument b]
67+
- Bad, because [argument c]
68+
- ... <!-- numbers of pros and cons can vary -->
6769

6870
## Decision Outcome
6971

70-
_TBD_
72+
*TBD*
7173

7274
### Positive Consequences <!-- optional -->
7375

74-
_TBD_
76+
*TBD*
7577

7678
### Negative Consequences <!-- optional -->
7779

78-
_TBD_
80+
*TBD*

proposals/vocabularies.md

+7-4
Original file line numberDiff line numberDiff line change
@@ -252,14 +252,17 @@ For example
252252
```
253253
-->
254254

255-
_**NOTE** Since the design of vocabularies will be changing anyway, it's not worth the time and effort to fill in this section just yet. As such, please read the above sections for loose requirements. For tighter requirements, please assume conformance with the 2020-12 Core and Validation specifications._
255+
***NOTE** Since the design of vocabularies will be changing anyway, it's not
256+
worth the time and effort to fill in this section just yet. As such, please
257+
read the above sections for loose requirements. For tighter requirements,
258+
please assume conformance with the 2020-12 Core and Validation specifications.*
256259

257260
## [Appendix] Change Log
258261

259262
* 2024-06-10 - Created
260263

261264
## [Appendix] Champions
262265

263-
| Champion | Company | Email | URI |
264-
|----------------------------|---------|-------------------------|----------------------------------|
265-
| Greg Dennis | | [email protected] | https://github.com/gregsennis |
266+
| Champion | Company | Email | URI |
267+
|-------------|---------|--------------------------------|---------------------------------|
268+
| Greg Dennis | | <mailto:[email protected]> | <https://github.com/gregsennis> |

0 commit comments

Comments
 (0)