Skip to content

Commit af16bbc

Browse files
committed
Week of March 24 changes
- more error definitions - remove "stale" bot/action - tweak the definition of OPTIONAL a bit - remove etag stuff for now - require "self" to NOT include $details if hasdoc=false in responses, but it's ok in requests Fixed xregistry#282 Signed-off-by: Doug Davis <[email protected]>
1 parent bc47d54 commit af16bbc

File tree

12 files changed

+476
-265
lines changed

12 files changed

+476
-265
lines changed

.github/workflows/stale.yaml

Lines changed: 0 additions & 29 deletions
This file was deleted.

cloudevents/spec.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,14 @@ The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD",
2424
"SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be
2525
interpreted as described in [RFC 2119](https://tools.ietf.org/html/rfc2119).
2626

27-
For clarity, OPTIONAL attributes (specification defined and extensions) are
28-
OPTIONAL for clients to use, but servers MUST be prepared for them to appear
29-
in incoming requests and MUST support them since "support" simply means
30-
persisting them in the backing datastore. However, as with all attributes, if
31-
accepting the attribute would result in a bad state (such as exceeding a size
32-
limit, or results in a security issue), then the server MAY choose to reject
33-
the request.
27+
For clarity, OPTIONAL attributes (specification-defined and extensions) are
28+
OPTIONAL for clients to use, but the servers' responsibility will vary.
29+
Server-unknown extension attributes MUST be silently stored in the backing
30+
datastore. Specification-defined, and server-known extension, attributes MUST
31+
generate an error if corresponding feature is not supported or enabled.
32+
However, as with all attributes, if accepting the attribute would result in a
33+
bad state (such as exceeding a size limit, or results in a security issue),
34+
then the server MAY choose to reject the request.
3435

3536
In the pseudo JSON format snippets `?` means the preceding attribute is
3637
OPTIONAL, `*` means the preceding attribute MAY appear zero or more times,

core/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
# Registry Service - Version 0.5-wip
1+
# xRegistry Service - Version 0.5-wip
22

3-
See the [Registry Service specification](spec.md).
3+
See the [xRegistry Service specification](spec.md).

core/spec.md

Lines changed: 387 additions & 187 deletions
Large diffs are not rendered by default.

endpoint/spec.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -159,13 +159,14 @@ The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD",
159159
"SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be
160160
interpreted as described in [RFC 2119](https://tools.ietf.org/html/rfc2119).
161161

162-
For clarity, OPTIONAL attributes (specification defined and extensions) are
163-
OPTIONAL for clients to use, but servers MUST be prepared for them to appear
164-
in incoming requests and MUST support them since "support" simply means
165-
persisting them in the backing datastore. However, as with all attributes, if
166-
accepting the attribute would result in a bad state (such as exceeding a size
167-
limit, or results in a security issue), then the server MAY choose to reject
168-
the request.
162+
For clarity, OPTIONAL attributes (specification-defined and extensions) are
163+
OPTIONAL for clients to use, but the servers' responsibility will vary.
164+
Server-unknown extension attributes MUST be silently stored in the backing
165+
datastore. Specification-defined, and server-known extension, attributes MUST
166+
generate an error if corresponding feature is not supported or enabled.
167+
However, as with all attributes, if accepting the attribute would result in a
168+
bad state (such as exceeding a size limit, or results in a security issue),
169+
then the server MAY choose to reject the request.
169170

170171
In the pseudo JSON format snippets `?` means the preceding attribute is
171172
OPTIONAL, `*` means the preceding attribute MAY appear zero or more times,

message/spec.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -137,13 +137,14 @@ The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD",
137137
"SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be
138138
interpreted as described in [RFC 2119](https://tools.ietf.org/html/rfc2119).
139139

140-
For clarity, OPTIONAL attributes (specification defined and extensions) are
141-
OPTIONAL for clients to use, but servers MUST be prepared for them to appear
142-
in incoming requests and MUST support them since "support" simply means
143-
persisting them in the backing datastore. However, as with all attributes, if
144-
accepting the attribute would result in a bad state (such as exceeding a size
145-
limit, or results in a security issue), then the server MAY choose to reject
146-
the request.
140+
For clarity, OPTIONAL attributes (specification-defined and extensions) are
141+
OPTIONAL for clients to use, but the servers' responsibility will vary.
142+
Server-unknown extension attributes MUST be silently stored in the backing
143+
datastore. Specification-defined, and server-known extension, attributes MUST
144+
generate an error if corresponding feature is not supported or enabled.
145+
However, as with all attributes, if accepting the attribute would result in a
146+
bad state (such as exceeding a size limit, or results in a security issue),
147+
then the server MAY choose to reject the request.
147148

148149
In the pseudo JSON format snippets `?` means the preceding attribute is
149150
OPTIONAL, `*` means the preceding attribute MAY appear zero or more times,

schema/spec.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -114,13 +114,14 @@ The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD",
114114
"SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be
115115
interpreted as described in [RFC 2119](https://tools.ietf.org/html/rfc2119).
116116

117-
For clarity, OPTIONAL attributes (specification defined and extensions) are
118-
OPTIONAL for clients to use, but servers MUST be prepared for them to appear
119-
in incoming requests and MUST support them since "support" simply means
120-
persisting them in the backing datastore. However, as with all attributes, if
121-
accepting the attribute would result in a bad state (such as exceeding a size
122-
limit, or results in a security issue), then the server MAY choose to reject
123-
the request.
117+
For clarity, OPTIONAL attributes (specification-defined and extensions) are
118+
OPTIONAL for clients to use, but the servers' responsibility will vary.
119+
Server-unknown extension attributes MUST be silently stored in the backing
120+
datastore. Specification-defined, and server-known extension, attributes MUST
121+
generate an error if corresponding feature is not supported or enabled.
122+
However, as with all attributes, if accepting the attribute would result in a
123+
bad state (such as exceeding a size limit, or results in a security issue),
124+
then the server MAY choose to reject the request.
124125

125126
In the pseudo JSON format snippets `?` means the preceding attribute is
126127
OPTIONAL, `*` means the preceding attribute MAY appear zero or more times,

tools/dict

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,7 @@ wss
261261
www
262262
xhtml
263263
xid
264+
xids
264265
xml
265266
xmlschema
266267
xpath

tools/errorcheck

Lines changed: 25 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,30 +4,45 @@
44

55
set -e
66

7-
PATTERN="Error Processing"
7+
START_PATTERN="start-err-def"
8+
END_PATTERN="end-err-def"
89

910
for f in $* ; do
1011
echo "> $f"
1112

12-
grep "$PATTERN" $f > /dev/null || \
13-
(echo "Can't find '$PATTERN' in '$f'" ; exit 1)
13+
# Make IFS a dummay char so we save the newlines
14+
IFS="!" lines=$(sed -r -n "/$START_PATTERN/,/$END_PATTERN/p" $f | \
15+
sed -n 's/#### //p')
1416

15-
first="UNUSED ERRORS:\n"
17+
[[ "$lines" == "" ]] && echo "Can't find any errors" && exit 1
1618

17-
lines=$(sed -r -n "/### $PATTERN/,/\[rfc/p" $f | sed -n 's/#### //p')
1819
readarray -t err_array <<< "$lines"
1920
rc=0
21+
first="UNUSED ERRORS:\n"
22+
2023
for err in "${err_array[@]}"; do
2124
ref=$(echo "$err" | tr '[:upper:]' '[:lower:]' | sed "s/ /-/g")
22-
if grep "(#$ref)" $f > /dev/null ; then
23-
continue
24-
fi
25+
grep "(#$ref)" $f > /dev/null && continue
26+
27+
# special case this one
28+
[[ "$ref" == "server_error" ]] && continue
29+
2530
echo -ne $first
2631
first=""
27-
echo "$err (#$ref)"
32+
echo "- $err"
2833
rc=1
2934
done
30-
[[ "$rc" != "0" ]] && exit 1
35+
36+
# make sure the errors are alphabetized
37+
diff=$(IFS="!" diff <(echo "$lines") <(echo "$lines" | sort) || true)
38+
if [[ "$diff" != "" ]] ; then
39+
[[ "$rc" != "0" ]] && echo
40+
echo "ALPHABETIZE THESE:"
41+
echo "$diff" | grep "> " | sed "s/> /- /"
42+
rc=1
43+
fi
44+
45+
[[ "$rc" != "0" ]] && exit $rc
3146

3247
done
3348

tools/schema-generator.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -852,6 +852,7 @@ def main():
852852
model_definition = { "groups": {} }
853853
for input_file in args.input_files:
854854
with open(input_file) as file:
855+
print(f"> {input_file} as '{args.type}'")
855856
input_definition = json.load(file)
856857
input_definition = resolve_imports(os.path.dirname(input_file), input_definition)
857858
if "groups" in input_definition:

0 commit comments

Comments
 (0)