From 840dec6d47b6a81e94a451c425669f025e1c88af Mon Sep 17 00:00:00 2001
From: Oscar Westra van Holthe - Kind
name
: a JSON string providing the name
of the record (required).namespace
, a JSON string that qualifies the name;namespace
, a JSON string that qualifies the name (optional);doc
: a JSON string providing documentation to the
user of this schema (optional).aliases:
a JSON array of strings, providing
@@ -165,7 +165,7 @@
name
: a JSON string providing the name
of the enum (required).aliases:
a JSON array of strings, providing
alternate names for this enum (optional).doc
: a JSON string providing documentation to the
@@ -257,7 +257,7 @@
the following attributes:
name
: a string naming this fixed (required).namespace
, a string that qualifies the name;namespace
, a string that qualifies the name (optional);aliases:
a JSON array of strings, providing
alternate names for this enum (optional).doc
: a JSON string providing documentation to the
@@ -273,60 +273,125 @@
Record, enums and fixed are named types. Each has +
Record, enums and fixed are named types. Each has a fullname that is composed of two parts; - a name and a namespace. Equality of names - is defined on the fullname.
-The name portion of a fullname, record field names, and - enum symbols must:
-[A-Za-z_]
[A-Za-z0-9_]
The name portion of a fullname, record field names, and + enum symbols must: +
+[A-Za-z_]
+ [A-Za-z0-9_]
+ A namespace is a dot-separated sequence of such names. - The empty string may also be used as a namespace to indicate the - null namespace. - Equality of names (including field names and enum symbols) - as well as fullnames is case-sensitive.
-The null namespace may not be used in a dot-separated - sequence of names. So the grammar for a namespace - is:
- <empty> | <name>[(<dot><name>)*]
The null namespace may not be used in a dot-separated + sequence of names. So the grammar for a namespace + is: +
+ <empty> | <name>[(<dot><name>)*]
+
In record, enum and fixed definitions, the fullname is - determined in one of the following ways:
-"name": "X", "namespace":
- "org.foo"
to indicate the
- fullname org.foo.X
."name": "org.foo.X"
to indicate the
- fullname org.foo.X
."name": "X"
is specified, and this occurs
- within a field of the record definition
- of org.foo.Y
, then the fullname
- is org.foo.X
. If there is no enclosing
- namespace then the null namespace is used.References to previously defined names are as in the latter - two cases above: if they contain a dot they are a fullname, if - they do not contain a dot, the namespace is the namespace of - the enclosing definition.
-Primitive type names have no namespace and their names may - not be defined in any namespace.
- A schema or protocol may not contain multiple definitions
- of a fullname. Further, a name must be defined before it is
- used ("before" in the depth-first, left-to-right traversal of
- the JSON parse tree, where the types
attribute of
- a protocol is always deemed to come "before" the
- messages
attribute.)
-
The fullname of a record, enum or fixed definition is determined by + the required `name` and optional `namespace` attributes like this:
+"name": "org.foo.X"
to indicate the
+ fullname org.foo.X
.
+ "name": "X", "namespace": "org.foo"
to indicate the
+ fullname org.foo.X
.
+ "name": "X"
is
+ specified, and this occurs within a field of the record definition
+ of org.foo.Y
, then the fullname is org.foo.X
.
+ This also happens if there is no enclosing namespace (i.e., the
+ enclosing schema definition has the null namespace).
+ References to previously defined names are as in the latter + two cases above: if they contain a dot they are a fullname, if + they do not contain a dot, the namespace is the namespace of + the enclosing definition. +
+Primitive type names have no namespace and their names may + not be defined in any namespace. +
+A schema or protocol may not contain multiple definitions
+ of a fullname. Further, a name must be defined before it is
+ used ("before" in the depth-first, left-to-right traversal of
+ the JSON parse tree, where the types
attribute of
+ a protocol is always deemed to come "before" the
+ messages
+ attribute.)
+
A protocol is a JSON object with the following attributes: