Skip to content

Commit 1046700

Browse files
author
Doug Davis
committed
Updates for week of March 4
- add some clarifications around the use of `latest` attribute - clarify that attributes with default values don't require their owning Objects to be present - be consistent about case after dashes (e.g. -word vs - Word) - treat hasDocument resources like Groups. Use of ?meta is meaningless, every MUST always be in the HTTP body. No xRegistry HTTP headers - DELETE will NOT return the deleted resources, use "204" - "latest" on a request that would result in "no latest version" is an error - "contenttype" is ok to use with RESOURCEurl. No guarantee it matches the Content-Type of a the GET to RESOURCEurl though - URI Template type : per RFC6570 section 3.2.1 (level 1) Signed-off-by: Doug Davis <[email protected]>
1 parent 1215988 commit 1046700

File tree

7 files changed

+259
-352
lines changed

7 files changed

+259
-352
lines changed

core/spec.md

Lines changed: 226 additions & 328 deletions
Large diffs are not rendered by default.

endpoint/spec.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ The following attributes are defined for the `endpoint` type:
271271
where `SPEC` is the non-empty string name of the specification that
272272
defines the Resource. An OPTIONAL `VERSION` value SHOULD be included if
273273
there are multiple versions of the specification available
274-
- for comparison purposes, this attribute MUST be considered case sensitive
274+
- For comparison purposes, this attribute MUST be considered case sensitive
275275
- If a `VERSION` is specified at the Group level, all Resources within that
276276
Group MUST have a `VERSION` value that is at least as precise as its
277277
Group, and MUST NOT expand it. For example, if a Group had a
@@ -299,8 +299,8 @@ The following attributes are defined for the `endpoint` type:
299299
use this same binding
300300
- Constraints:
301301
- At least one of `format` and `binding` MUST be specified
302-
- if present, MUST be a non-empty string
303-
- if present, MUST follow the naming convention `{NAME}/{VERSION}`,
302+
- If present, MUST be a non-empty string
303+
- If present, MUST follow the naming convention `{NAME}/{VERSION}`,
304304
whereby `{NAME}` is the name of the protocol and `{VERSION}` is the
305305
version of protocol.
306306
- Examples:
@@ -332,35 +332,35 @@ The following attributes are defined for the `endpoint` type:
332332
string or excluded from the serialization entirely.
333333
- Constraints:
334334
- OPTIONAL
335-
- if present, MUST be a string
335+
- If present, MUST be a string
336336
- Examples:
337337
- `queue1`
338338

339339
### `deprecated`
340340

341341
- Type: Object containing the following properties:
342-
- effective<br>
342+
- `effective`<br>
343343
An OPTIONAL property indicating the time when the Endpoint entered, or will
344344
enter, a deprecated state. The date MAY be in the past or future. If this
345345
property is not present the Endpoint is already in a deprecated state.
346346
If present, this MUST be an [RFC3339][rfc3339] timestamp.
347347

348-
- removal<br>
348+
- `removal`<br>
349349
An OPTIONAL property indicating the time when the Endpoint MAY be removed.
350350
The Endpoint MUST NOT be removed before this time. If this property is not
351351
present then client can not make any assumption as to when the Endpoint
352352
might be removed. Note: as with most properties, this property is mutable.
353353
If present, this MUST be an [RFC3339][rfc3339] timestamp and MUST NOT be
354354
sooner than the `effective` time if present.
355355

356-
- alternative<br>
356+
- `alternative`<br>
357357
An OPTIONAL property specifying the URL to an alternative Endpoint the
358358
client can consider as a replacement for this Endpoint. There is no
359359
guarantee that the referenced Endpoint is an exact replacement, rather the
360360
client is expected to investigate the Endpoint to determine if it is
361361
appropriate.
362362

363-
- docs<br>
363+
- `docs`<br>
364364
An OPTIONAL property specifying the URL to additional information about
365365
the deprecation of the Endpoint. This specification does not mandate any
366366
particular format or information, however some possibilities include:
@@ -417,7 +417,7 @@ The following attributes are defined for the `endpoint` type:
417417
- "MQTT/3.1.1", "MQTT/5.0" - Use the MQTT [3.1.1][MQTT 3.1.1] or [5.0][MQTT
418418
5.0] protocol. The shorthand "MQTT" maps to "MQTT/5.0".
419419
- "NATS/1.0.0" - Use the [NATS][NATS] protocol. MAY be shortened to "NATS",
420-
- which assumes usage of the latest NATS clients.
420+
- Which assumes usage of the latest NATS clients.
421421
- "KAFKA/3.5" - Use the [Apache Kafka][Apache Kafka] protocol. MAY be
422422
shortened to "KAFKA", which assumes usage of the latest Apache Kafka
423423
clients.

message/spec.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -199,8 +199,8 @@ addition to the basic [attributes](../core/spec.md#attributes-and-extensions):
199199
own. All definitions inside a group MUST use this same format.
200200
- Constraints:
201201
- At least one of `metadata` and `binding` MUST be specified.
202-
- if present, MUST be a non-empty string
203-
- if present, MUST follow the naming convention `{NAME}/{VERSION}`, whereby `{NAME}` is
202+
- If present, MUST be a non-empty string
203+
- If present, MUST follow the naming convention `{NAME}/{VERSION}`, whereby `{NAME}` is
204204
the name of the metadata format and `{VERSION}` is the version of the
205205
metadata format.
206206
- Examples:
@@ -217,8 +217,8 @@ addition to the basic [attributes](../core/spec.md#attributes-and-extensions):
217217
this same binding.
218218
- Constraints:
219219
- At least one of `metadata` and `binding` MUST be specified.
220-
- if present, MUST be a non-empty string
221-
- if present, MUST follow the naming convention `{NAME}/{VERSION}`, whereby `{NAME}` is
220+
- If present, MUST be a non-empty string
221+
- If present, MUST follow the naming convention `{NAME}/{VERSION}`, whereby `{NAME}` is
222222
the name of the protocol and `{VERSION}` is the version of protocol.
223223
- Examples:
224224
- `MQTT/3.1.1`

pagination/spec.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -155,22 +155,22 @@ http://example.com/people?limit=100
155155
Each successful response from the server will adhere to the following:
156156
- MUST respond with an HTTP 200
157157
- MUST include zero or more records
158-
- if the response refers to the start of the set of records, then the `prev`
158+
- If the response refers to the start of the set of records, then the `prev`
159159
Link MUST NOT be included in the response
160-
- if the response does not include the start of the set of records, then the
160+
- If the response does not include the start of the set of records, then the
161161
`prev` Link MAY be included in the response
162-
- the response MAY include the `first` Link in any response
163-
- if `limit` attribute was specified as part of the flow, the response MUST
162+
- The response MAY include the `first` Link in any response
163+
- If `limit` attribute was specified as part of the flow, the response MUST
164164
NOT include more records than what the `limit` attribute has indicated
165-
- if the response refers to the end of the set of records, then the `next`
165+
- If the response refers to the end of the set of records, then the `next`
166166
Link MUST NOT be included in the response
167-
- if the response does not refer to the end of the set of records, then the
167+
- If the response does not refer to the end of the set of records, then the
168168
`next` Link MUST be included in the response
169-
- the response MAY include the `last` Link in any response
170-
- the response MAY include the `expires` attribute in any response as an
169+
- The response MAY include the `last` Link in any response
170+
- The response MAY include the `expires` attribute in any response as an
171171
HTTP "Expires" header. If present, it MUST adhere to the format specified in
172172
[RFC 3339](https://tools.ietf.org/html/rfc7234#section-5.3)
173-
- it is STRONG RECOMMENDED that all responses include the `count` attribute
173+
- It is STRONG RECOMMENDED that all responses include the `count` attribute
174174

175175
Additionally, Links MUST appear in the HTTP response as HTTP headers using
176176
the format described in RFC5988.

schema/spec.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -244,8 +244,8 @@ algorithm for generating new `id` values and for determining which is the
244244
latest Version. See [Version IDs](../core/spec.md#version-ids) for more
245245
information, but in summary it means:
246246
- `id`s are unsigned integers starting with `1`
247-
- they monotomically increase by `1` with each new Version
248-
- the latest is the Version with the lexically largest `id` value after all
247+
- They monotomically increase by `1` with each new Version
248+
- The latest is the Version with the lexically largest `id` value after all
249249
Version's `id`s have been left-padded with spaces to the same length
250250

251251
When semantic versioning is used in a solution, it is RECOMMENDED to include a

tools/test_verify.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import pytest
66
from verify import (
77
_BANNED_PHRASES_PATTERN,
8+
_CAPITAL_DASH_PATTERN,
89
_FAKE_DOCS_DIR,
910
_MARKDOWN_BOOKMARK_PATTERN,
1011
_PHRASES_THAT_MUST_BE_CAPITALIZED_PATTERN,
@@ -36,6 +37,7 @@ def test_text_issues():
3637
ShOULD nOt
3738
mAy
3839
Optionally
40+
- each
3941
"required"
4042
"""
4143
)
@@ -47,6 +49,7 @@ def test_text_issues():
4749
"line 11: 'must' MUST be capitalized ('MUST')",
4850
"line 14: 'ShOULD nOt' MUST be capitalized ('SHOULD NOT')",
4951
"line 15: 'mAy' MUST be capitalized ('MAY')",
52+
"line 17: '- e' should start with a capital letter after the dash",
5053
}
5154

5255

tools/verify.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ class Settings:
6161
)
6262
_BANNED_PHRASES_PATTERN = re.compile(r"Cloud\s+Events?", flags=re.IGNORECASE)
6363
_LANGUAGES_DIR_PATTERN = re.compile(f"[/^]{_LANGUAGES_DIR_NAME}[/$]")
64+
_CAPITAL_DASH_PATTERN = re.compile(r"(^\s*)(-\s*[a-z])", flags=re.MULTILINE)
6465

6566

6667
def _is_text_all_uppercase(text: str) -> bool:
@@ -71,6 +72,10 @@ def _banned_phrase_issues(text: str) -> Iterable[Issue]:
7172
for match in _BANNED_PHRASES_PATTERN.finditer(text):
7273
yield _pattern_issue(match, text, f"{repr(match.group(0))} is banned")
7374

75+
def _capital_dash_issues(text: str) -> Iterable[Issue]:
76+
for match in _CAPITAL_DASH_PATTERN.finditer(text):
77+
yield _pattern_issue(match, text, f"{repr(match.group(2))} should start with a capital letter after the dash")
78+
7479

7580
def _miscased_phrase_issues(text: str) -> Iterable[Issue]:
7681
for match in _PHRASES_THAT_MUST_BE_CAPITALIZED_PATTERN.finditer(text):
@@ -90,6 +95,7 @@ def _should_skip_plain_text_issues(text: str) -> bool:
9095
def _plain_text_issues(text: str) -> Iterable[Issue]:
9196
if not _should_skip_plain_text_issues(text):
9297
yield from _banned_phrase_issues(text)
98+
yield from _capital_dash_issues(text)
9399
yield from _miscased_phrase_issues(text)
94100

95101

0 commit comments

Comments
 (0)